adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml MOOC http://1149.fr/ocaml-mooc | OCaml 4.02.3 announced http://ocaml.org/releases/4.02.html | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
Simn has quit [Quit: Leaving]
<zozozo> mahem1: you can easily implement exists for Queues using Queue.fold or Queue.iter I think
<zozozo> so that it does not modify the queue
<mahem1> zozozo: I was thinking of using Queue.fold, but my lust for efficientcy got the better of me and I ended up recursively poping stuff off so that it would short-circuit...
<zozozo> mahem1: you can use Queue.iter and an exception to exit early if you find the element
<mahem1> zozozo: Fair enough.
<mahem1> I guess I just don't like trusting the callee not to modify the modify the Queue.
<mahem1> But I guess that is to be expected.
<zozozo> well, if the documentation of the function speicfies it does not modify the queue, it should be alright
<mahem1> Yeah,
ryanartecona has joined #ocaml
struktured has joined #ocaml
Denommus has joined #ocaml
Anarchos has joined #ocaml
ismaelga has quit [Remote host closed the connection]
damason has joined #ocaml
ismaelga has joined #ocaml
madroach has quit [Ping timeout: 260 seconds]
madroach has joined #ocaml
ncthom91 has joined #ocaml
ncthom91 has quit [Max SendQ exceeded]
ollehar has quit [Quit: ollehar]
ncthom91 has joined #ocaml
python476 has quit [Ping timeout: 246 seconds]
ryanartecona has quit [Quit: ryanartecona]
ismaelga has quit [Remote host closed the connection]
struktured has quit [Ping timeout: 246 seconds]
ismaelga has joined #ocaml
pierpa has quit [Ping timeout: 265 seconds]
ismaelga has quit [Remote host closed the connection]
ncthom91 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kandu_ is now known as kandu
ousado has quit [Read error: Connection reset by peer]
NingaLeaf has joined #ocaml
ousado has joined #ocaml
Guest38 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ismaelga has joined #ocaml
Anarchos has quit [Quit: Page closed]
ontologiae has quit [Ping timeout: 260 seconds]
ceryo has joined #ocaml
struktured has joined #ocaml
Denommus has quit [Ping timeout: 265 seconds]
FreeBirdLjj has joined #ocaml
ismaelga has quit [Remote host closed the connection]
struktured has quit [Ping timeout: 255 seconds]
ncthom91 has joined #ocaml
ryanartecona has joined #ocaml
yegods has joined #ocaml
ygrek has quit [Ping timeout: 265 seconds]
ceryo_ has joined #ocaml
yegods has quit [Ping timeout: 264 seconds]
struktured has joined #ocaml
ceryo has quit [Ping timeout: 252 seconds]
ceryo has joined #ocaml
ceryo_ has quit [Ping timeout: 240 seconds]
meiji11 has joined #ocaml
FreeBirdLjj has quit []
TBads has joined #ocaml
FreeBirdLjj has joined #ocaml
ceryo has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
trix has quit [Ping timeout: 240 seconds]
Intensity has quit [Ping timeout: 244 seconds]
trix has joined #ocaml
trix is now known as Guest3838
Intensity has joined #ocaml
groovy2shoes has joined #ocaml
TBads has quit [Ping timeout: 250 seconds]
TBads has joined #ocaml
shinnya has quit [Ping timeout: 260 seconds]
ncthom91 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ncthom91 has joined #ocaml
Bahman has joined #ocaml
kushal has joined #ocaml
Guest3838 has quit [Ping timeout: 255 seconds]
wolfcore has joined #ocaml
wolfcore is now known as Guest49066
manud has quit [Quit: manud]
ncthom91 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
NingaLeaf has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Bahman has quit [Ping timeout: 252 seconds]
aaronelkins has joined #ocaml
Bahman has joined #ocaml
mac10688 has quit [Ping timeout: 250 seconds]
cc_evo has joined #ocaml
<cc_evo> hello
<cc_evo> what's the est way to show piece of code through irc chat?
<cc_evo> best*
MercurialAlchemi has joined #ocaml
darkf has joined #ocaml
<coody> pastebin.com or gist.github.com work
groovy2shoes has quit [Quit: Leaving]
TBads has quit [Ping timeout: 250 seconds]
fluter has quit [Ping timeout: 252 seconds]
yegods has joined #ocaml
AlexRussia has quit [Ping timeout: 276 seconds]
yegods has quit [Ping timeout: 265 seconds]
<cc_evo> thank you coody
<cc_evo> anyone can tell why this is happening in OCaml? why 16 returns wrong result?
<flux> cc_evo, 31 bit integer overflow
<cc_evo> thank you :)
<flux> cc_evo, you should either choose Int64 for slightly bigger range of numbers or double for even bigger. if, if you care about precision, the num package.
<cc_evo> so the algorithm is correct but it is 32 bit limitation ?
MercurialAlchemi has quit [Ping timeout: 276 seconds]
<cc_evo> how would I rewrite the function that does this operation "x = x * x in x" to accept argument in float instead of int ?
igoroliveira has quit [Quit: Connection closed for inactivity]
MercurialAlchemi has joined #ocaml
manud has joined #ocaml
yegods has joined #ocaml
fluter has joined #ocaml
yegods has quit [Remote host closed the connection]
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
jeffmo has quit [Read error: Connection reset by peer]
jeffmo has joined #ocaml
manud has quit [Quit: manud]
JacobEdelman has quit [Quit: Connection closed for inactivity]
pyon is now known as pyon-tinuation
aaronelkins has quit [Ping timeout: 240 seconds]
zpe has quit [Remote host closed the connection]
zpe has joined #ocaml
Bahman has quit [Ping timeout: 264 seconds]
<flux> cc_evo, x = x *. x in x
zpe has quit [Ping timeout: 255 seconds]
teknozulu has quit [Ping timeout: 255 seconds]
<cc_evo> thank you
<cc_evo> and it also allows me to use much alrger numbers, great!
teknozulu has joined #ocaml
kandu has quit [Ping timeout: 250 seconds]
fluter has quit [Ping timeout: 272 seconds]
kandu has joined #ocaml
kandu is now known as Guest95420
fluter has joined #ocaml
<cc_evo> in this code i don't know what exactly line "if x * x > n then true" works and how does it determine if the number is a prime
<cc_evo> code is for finding prime numbers
manud has joined #ocaml
jeffmo has quit [Quit: jeffmo]
<cc_evo> or is it that code sets starting test number as 3 and then adds 2 in each loop, effectively testing the n number's modulo against all odd numbers in increments of 2 till it will reach one that when multiplied by itself would have value larger than n,
<cc_evo> at which point it would determine number as prime if it didn't find any odd number in the loop that would give modulo = 0
Sorella has quit [Quit: Connection closed for inactivity]
zpe has joined #ocaml
ygrek has joined #ocaml
Guest95420 is now known as kandu
aaronelkins has joined #ocaml
Gvidon has joined #ocaml
ryanartecona has quit [Quit: ryanartecona]
freehck has joined #ocaml
fluter has quit [Ping timeout: 240 seconds]
Haudegen has quit [Ping timeout: 250 seconds]
fluter has joined #ocaml
Haudegen has joined #ocaml
teknozulu has quit [Ping timeout: 246 seconds]
pierpa has joined #ocaml
meiji11 has quit [Remote host closed the connection]
sz0 has joined #ocaml
python476 has joined #ocaml
ianhedoesit has joined #ocaml
ely-se has joined #ocaml
sz0_ has joined #ocaml
sz0_ has quit []
<lyxia> cc_evo: To test whether a number is prime you can check whether it is divisible by any number smaller than it. One thing to observe is that indeed you only need to check that for 2 and odd numbers.
<lyxia> cc_evo: And another thing is that you only need to check for numbers <= sqrt(x)
<lyxia> because if there is a divisor d > sqrt(x), then x/d is also a divisor, but < sqrt(x).
<lyxia> so you should have found it earlier.
ismaelga has joined #ocaml
ismaelga has quit [Read error: Connection reset by peer]
ismaelga has joined #ocaml
jonludlam has quit [Ping timeout: 260 seconds]
agumonkey has joined #ocaml
ygrek has quit [Ping timeout: 264 seconds]
rand has joined #ocaml
Kakadu has joined #ocaml
cthuluh has quit [Ping timeout: 272 seconds]
<cc_evo> Thanks Lyxia
cthuluh has joined #ocaml
<lyxia> cc_evo: You're welcome.
larhat has quit [Quit: Leaving.]
<ely-se> 2 and oddness aren't special
<ely-se> you also can observe you only need to check that for 3 and numbers not divisible by 3
<ely-se> or 5 and numbers not divisible by 5
<ely-se> or any prime and numbers not divisible by that prime
<ely-se> for any prime N, N is the only prime divisible by N. 2 and evenness (i.e. divisible by 2) aren't special in any way.
<cc_evo> I was told OCaml is not the best choice for first language - but I found understanding language easier than coing up with good algorithms - sometimes trying to figure out a good one just leaves me with my brain 'cooked' and I just need to sleep over it or ask around for advice.
<lyxia> you need a bit more code to get other non-multiples though, whereas with 2 you can just increment by 2.
<ely-se> yes :p
ismael_ has joined #ocaml
ismaelga has quit [Read error: Connection reset by peer]
shinnya has joined #ocaml
manud has quit [Quit: manud]
octachron has joined #ocaml
ely-se has quit [Quit: leaving]
Simn has joined #ocaml
<cc_evo> thanks for the input, ya'll have a good night
mort___ has joined #ocaml
cc_evo has quit []
Mercuria1Alchemi has joined #ocaml
Mercuria1Alchemi has quit [Ping timeout: 240 seconds]
ontologiae has joined #ocaml
djellemah has joined #ocaml
dsheets has joined #ocaml
sz0 is now known as sz0`
dsheets has quit [Ping timeout: 252 seconds]
coody has quit [Quit: Connection closed for inactivity]
sz0` is now known as sz0
yegods has joined #ocaml
yegods has quit [Remote host closed the connection]
yegods has joined #ocaml
shinnya has quit [Ping timeout: 246 seconds]
AlexRussia has joined #ocaml
orbifx has joined #ocaml
mort___ has quit [Read error: Connection reset by peer]
mort___ has joined #ocaml
yegods has quit [Remote host closed the connection]
yegods has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 260 seconds]
Maelan has quit [Ping timeout: 252 seconds]
tobiasBora has quit [Ping timeout: 250 seconds]
Maelan has joined #ocaml
tobiasBora has joined #ocaml
ianhedoesit has quit [Quit: leaving]
jonludlam has joined #ocaml
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
emias has quit [Quit: Bye]
emias has joined #ocaml
NingaLeaf has joined #ocaml
Haudegen has quit [Ping timeout: 246 seconds]
agumonkey has quit [Ping timeout: 244 seconds]
ceryo has joined #ocaml
Haudegen has joined #ocaml
octachron has quit [Quit: Leaving]
jonludlam has quit [Ping timeout: 250 seconds]
fluter has quit [Ping timeout: 240 seconds]
Bahman has joined #ocaml
fluter has joined #ocaml
BitPuffin has joined #ocaml
fluter has quit [Ping timeout: 246 seconds]
ceryo has quit [Ping timeout: 260 seconds]
NingaLeaf has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
fluter has joined #ocaml
yegods has quit [Remote host closed the connection]
ely-se has joined #ocaml
jonludlam has joined #ocaml
ceryo has joined #ocaml
rand has quit [Quit: leaving]
<tizoc> my merlin setup is not liking [@something ...] attributes in type definitions (it used to, not sure when it stopped working)
<tizoc> example: type t = Calendar.t [@printer print_timestamp] [@@deriving show]
<tizoc> and I have PKG ppx_deriving.std in my .merlin
<tizoc> the error is "Syntax error inside `type', expecting `='", any idea of what may I be missing?
<def`> which version of merlin?
<tizoc> def`: 2.3
<def`> tizoc: it's a bug, please report :(
<tizoc> def`: ok, will create an issue, I wasn't sure if it was related to ppx_deriving, my own setup or what, but I narrowed it down and the problem seems to be that merlin is unhappy with any [@annotation] placed on type declarations (but only at top level, annotations on record fields for example works fine)
<def`> yes
<def`> no annotations on manifest, which diverges from official compiler. we will issue a release tomorrow
sgnb has joined #ocaml
<tizoc> def`: issue #471
Bahman has quit [Quit: Ave atque vale]
<def`> tizoc: seen, thanks
BitPuffin has quit [Ping timeout: 255 seconds]
<reynir> Nice
inr_ is now known as inr
sz0 is now known as sz0`
ely-se has quit [Quit: leaving]
ncthom91 has joined #ocaml
Mercuria1Alchemi has joined #ocaml
charpi has joined #ocaml
demonimin has quit [Remote host closed the connection]
JacobEdelman has joined #ocaml
demonimin has joined #ocaml
ncthom91 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
MercurialAlchemi has quit [Ping timeout: 246 seconds]
ncthom91 has joined #ocaml
NingaLeaf has joined #ocaml
yegods has joined #ocaml
Sorella has joined #ocaml
Denommus has joined #ocaml
NingaLeaf has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mort___ has quit [Ping timeout: 240 seconds]
yegods has quit [Remote host closed the connection]
lobo has joined #ocaml
ddosia has joined #ocaml
yegods has joined #ocaml
igoroliveira has joined #ocaml
yegods has quit [Remote host closed the connection]
ely-se has joined #ocaml
psy_ has joined #ocaml
aaronelkins has quit [Quit: aaronelkins]
Denommus has quit [Quit: rebooting]
charpi has quit [Remote host closed the connection]
charpi has joined #ocaml
coody has joined #ocaml
ontologiae has quit [Ping timeout: 264 seconds]
Denommus has joined #ocaml
govg has joined #ocaml
jhaberku has joined #ocaml
slash^ has joined #ocaml
b0mbastus has joined #ocaml
b0mbastus has left #ocaml [#ocaml]
ygrek has joined #ocaml
mort___ has joined #ocaml
zpe has quit [Remote host closed the connection]
struktured has quit [Ping timeout: 260 seconds]
ely-se has quit [Quit: leaving]
Denommus has quit [Quit: rebooting]
FreeBirdLjj has quit [Remote host closed the connection]
ryanartecona has joined #ocaml
yegods has joined #ocaml
BitPuffin has joined #ocaml
tane has joined #ocaml
yegods has quit [Ping timeout: 250 seconds]
orbifx has quit [Quit: WeeChat 1.3]
Kakadu has quit [Quit: Page closed]
^elyse^ has joined #ocaml
^elyse^ has quit [Client Quit]
yegods has joined #ocaml
yegods has quit [Read error: Connection reset by peer]
yegods_ has joined #ocaml
mort___ has quit [Quit: Leaving.]
NingaLeaf has joined #ocaml
ncthom91 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Guest38 has joined #ocaml
mort___ has joined #ocaml
ismael_ has quit [Remote host closed the connection]
NingaLeaf has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ollehar has joined #ocaml
tane has quit [Quit: Verlassend]
struktured has joined #ocaml
mort___ has quit [Quit: Leaving.]
ismaelga has joined #ocaml
Haudegen has quit [Ping timeout: 240 seconds]
yegods_ has quit [Remote host closed the connection]
struktured has quit [Ping timeout: 240 seconds]
kushal has quit [Ping timeout: 255 seconds]
NingaLeaf has joined #ocaml
Haudegen has joined #ocaml
ismaelga has quit [Remote host closed the connection]
Denommus has joined #ocaml
charpi has quit [Remote host closed the connection]
orbifx has joined #ocaml
kushal has joined #ocaml
bombastus has joined #ocaml
bombastus has quit [Remote host closed the connection]
hcarty has joined #ocaml
<hcarty> Does the Lwt PPX extension support match%lwt ... with | exception e -> ...? When I try I get an unused match case error.
<hcarty> For example: http://vpaste.net/xuwG9
<hcarty> Removing the 'exception' case gets rid of the warning.
<hcarty> This is OCaml 4.02.3, Lwt 2.5.0 from opam
<def`> you can look at the generated ast
<Drup> it should be supported yes
<Drup> hum, we have an heuristic for wildcard patterns but it seems like we dont' use it for the exception part
<Drup> can you make a bug report ? I'll fix it later
<hcarty> Drup: Sure, I'll file it now
<hcarty> Thanks
govg has quit [Ping timeout: 276 seconds]
<ygrek> it is already fixed in git iirc
zaquest has quit [Ping timeout: 272 seconds]
ryanartecona has quit [Quit: ryanartecona]
rpg has joined #ocaml
jonludlam has quit [Ping timeout: 255 seconds]
* Mercuria1Alchemi orders an ocaml tshirt
<Mercuria1Alchemi> well, hoodies actually
<Mercuria1Alchemi> shipping from the US hurts a lot though
jhaberku` has joined #ocaml
ygrek has quit [Ping timeout: 264 seconds]
jhaberku has quit [Ping timeout: 244 seconds]
<hcarty> Drup: Thanks for the already-done fix :-) Do you think a release would be possible with all of the ppx improvements which have happened post-2.5.0? Or a separate opam package for lwt.ppx.
pyon-tinuation is now known as hamilto-nyan
nullcatxxx_ has joined #ocaml
<reynir> I was thinking of ordering a hoodie, too, but I'm also in Europe :/
<nullcatxxx_> maybe ask Anil, ocaml labs is making ordering in batch...
BitPuffin has quit [Ping timeout: 255 seconds]
ollehar has quit [Ping timeout: 252 seconds]
Kakadu has joined #ocaml
larhat has joined #ocaml
kdas_ has joined #ocaml
kushal has quit [Ping timeout: 250 seconds]
octachron has joined #ocaml
teknozulu has joined #ocaml
<Drup> hcarty: I think that's the only improvement
<Drup> and yeah, we should probably cut a release
jonludlam has joined #ocaml
<hcarty> Weren't there some other tweaks like if%lwt?
<hcarty> I may have that mixed up with something else...
ygrek has joined #ocaml
shinnya has joined #ocaml
<Drup> hcarty: possible, I don't remember
<Drup> (I do the fix, then erase it from the memory buffer to free space :D)
<jhaberku`> Would there be any interest is starting a Gitter chat room for ocaml/ocaml on GitHub now that development has officially shifted there? I suppose it would be an alternative to this channel and the mailing list.
<adrien> this channel is canonical, not official
freehck has quit [Ping timeout: 240 seconds]
<Drup> jhaberku`: None of the core team member are on this chan, and I'm pretty sure none would be on gitter either.
<edwin> is gitter like a persistent IRC chatroom? cause I first thought its a forum, but its got no topic
ollehar has joined #ocaml
<Drup> edwin: and non foss, and yet in another protocole
<edwin> ah if piding can't talk to it then its not for me
<edwin> pidgin*
<Drup> there is a proxy for IRC
<Drup> but it's a proxy, with the awkwardness implied.
NingaLeaf has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
darkf has quit [Quit: Leaving]
<jhaberku`> Drup: The argument for Gitter is that it lowers the barrier to entry for new people (IRC can be a little daunting). Still, I understand wanting to not fragment an already relatively-small community.
shinnya has quit [Ping timeout: 276 seconds]
mort___ has joined #ocaml
tane has joined #ocaml
manud has joined #ocaml
kolko has joined #ocaml
octachron has quit [Quit: Leaving]
mort___ has quit [Quit: Leaving.]
tobiasBora has quit [Ping timeout: 240 seconds]
ncthom91 has joined #ocaml
Maelan has quit [Ping timeout: 244 seconds]
sgnb has quit [Read error: Connection reset by peer]
sgnb has joined #ocaml
manizzle has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
ismaelga has joined #ocaml
pierpa has quit [Ping timeout: 272 seconds]
tobiasBora has joined #ocaml
Maelan has joined #ocaml
jhaberku` has quit [Ping timeout: 255 seconds]
jonludlam has quit [Ping timeout: 255 seconds]
Guest38 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Mercuria1Alchemi has quit [Ping timeout: 246 seconds]
manud has quit [Ping timeout: 244 seconds]
ncthom91 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
badon has quit [Disconnected by services]
badon_ has joined #ocaml
badon_ is now known as badon
Haudegen has quit [Ping timeout: 240 seconds]
Guest38 has joined #ocaml
kdas_ has quit [Ping timeout: 252 seconds]
python476 has quit [Ping timeout: 246 seconds]
python476 has joined #ocaml
badon_ has joined #ocaml
badon has quit [Disconnected by services]
badon_ is now known as badon
zozozo has quit [Ping timeout: 240 seconds]
ygrek has quit [Ping timeout: 240 seconds]
hcarty has quit [Quit: WeeChat 1.3]
manud has joined #ocaml
zozozo has joined #ocaml
nullcatxxx_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Haudegen has joined #ocaml
nullcatxxx_ has joined #ocaml
amnn has joined #ocaml
python476 has quit [Ping timeout: 246 seconds]
amnn has quit [Quit: Textual IRC Client: www.textualapp.com]
Simn has quit [Read error: Connection reset by peer]
ygrek has joined #ocaml
mcmillhj has quit [Quit: Lost terminal]
^elyse^ has joined #ocaml
groovy2shoes has joined #ocaml
zaquest has joined #ocaml
rpg_ has joined #ocaml
rpg has quit [Ping timeout: 250 seconds]
tane has quit [Quit: Verlassend]
mac10688 has joined #ocaml
nullcatxxx_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rpg_ has quit [Quit: rpg_]
glosoli has joined #ocaml
yegods has joined #ocaml
rpg has joined #ocaml
rpg has quit [Client Quit]
manud has quit [Quit: manud]
NingaLeaf has joined #ocaml
glosoli has left #ocaml ["Textual IRC Client: www.textualapp.com"]
mfp has quit [Quit: Leaving]
tmtwd has joined #ocaml
^elyse^ has quit [Quit: Leaving]
yegods has quit [Read error: Connection reset by peer]
yegods has joined #ocaml
ontologiae has joined #ocaml
yegods has quit [Remote host closed the connection]
ismaelga has quit [Remote host closed the connection]
Kakadu has quit [Remote host closed the connection]
yegods has joined #ocaml
badon has left #ocaml ["Leaving"]
ceryo has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
yegods has quit [Remote host closed the connection]
yegods has joined #ocaml
NingaLeaf has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rpg has joined #ocaml
rpg has quit [Read error: Connection reset by peer]
rpg_ has joined #ocaml
yegods has quit [Remote host closed the connection]
badon has joined #ocaml
BitPuffin|osx has joined #ocaml
rpg_ has quit [Quit: rpg_]