Live data from Hacker News

F# enters Tiobe top 20 index for the first time

tiobe.com

21–30 of 30 posts

Re: F# enters Tiobe top 20 index for the first time

#21

Some F# to ponder: type LogicGate = | ON | OFF | NAND of LogicGate * LogicGate | NOT of LogicGate | AND of LogicGate * LogicGate | OR of LogicGate * LogicGate | NOR of LogicGate * LogicGate | XOR of LogicGate * LogicGate | XNOR of LogicGate * LogicGate let rec evaluate input = match input with | ON -> true | OFF -> false | NAND(a, b) -> not ((evaluate a) && (evaluate b)) | NOT(a) -> (evaluate (NAND(a, a))) | AND(a, b…

Curious: is this also valid ocaml?

Re: F# enters Tiobe top 20 index for the first time

#22

Some F# to ponder: type LogicGate = | ON | OFF | NAND of LogicGate * LogicGate | NOT of LogicGate | AND of LogicGate * LogicGate | OR of LogicGate * LogicGate | NOR of LogicGate * LogicGate | XOR of LogicGate * LogicGate | XNOR of LogicGate * LogicGate let rec evaluate input = match input with | ON -> true | OFF -> false | NAND(a, b) -> not ((evaluate a) && (evaluate b)) | NOT(a) -> (evaluate (NAND(a, a))) | AND(a, b…

The extra parentheses around the evaluates are not necessary, except in the last line. I'm fond of this pairing heap in F#:

    type 't heap = Empty | Heap of 't * 't heap list

    let findmin (Heap(x,_)) = x
    let merge h1 h2 = 
      match (h1,h2) with
      | Empty,h | h,Empty -> h
      | Heap(x,h1s),Heap(y,h2s) -> if x 

Re: F# enters Tiobe top 20 index for the first time

#23

Some F# to ponder: type LogicGate = | ON | OFF | NAND of LogicGate * LogicGate | NOT of LogicGate | AND of LogicGate * LogicGate | OR of LogicGate * LogicGate | NOR of LogicGate * LogicGate | XOR of LogicGate * LogicGate | XNOR of LogicGate * LogicGate let rec evaluate input = match input with | ON -> true | OFF -> false | NAND(a, b) -> not ((evaluate a) && (evaluate b)) | NOT(a) -> (evaluate (NAND(a, a))) | AND(a, b…

Curious: is this also valid ocaml?

Almost, |> isn't an operator in OCaml (although I think Batteries has something like |- that does the same thing) and printfn isn't in OCaml. Printf.printf is, but wouldn't work in this case (you'd need a format string). Also, List.map returns a new list, in OCaml you would probably want to do List.iter.

Re: F# enters Tiobe top 20 index for the first time

#24
post #9

Earlier quoted context omitted.

F# isn't listed on any of your charts. I think it's probably popular enough to show up in all of your data sources at this point. Also, maybe add GitHub and StackOverflow as data sources?

F# should probably go there, yeah. GitHub and StackOverflow started out really biased in terms of their communities - GitHub with Ruby, and StackOverflow with Microsoft languages. Do you think they've sufficiently lost that bias?

This is, by the way, an honest question. I think at a certain point they'll be mainstream enough to say yes, but it's tough to say when.

Re: F# enters Tiobe top 20 index for the first time

#25
post #23

Earlier quoted context omitted.

Curious: is this also valid ocaml?

Almost, |> isn't an operator in OCaml (although I think Batteries has something like |- that does the same thing) and printfn isn't in OCaml. Printf.printf is, but wouldn't work in this case (you'd need a format string). Also, List.map returns a new list, in OCaml you would probably want to do List.iter.

the |> operator is very very simple. ocaml implementation would look something like:

  let (|>) a b = b a ;;

Re: F# enters Tiobe top 20 index for the first time

#26

Some F# to ponder: type LogicGate = | ON | OFF | NAND of LogicGate * LogicGate | NOT of LogicGate | AND of LogicGate * LogicGate | OR of LogicGate * LogicGate | NOR of LogicGate * LogicGate | XOR of LogicGate * LogicGate | XNOR of LogicGate * LogicGate let rec evaluate input = match input with | ON -> true | OFF -> false | NAND(a, b) -> not ((evaluate a) && (evaluate b)) | NOT(a) -> (evaluate (NAND(a, a))) | AND(a, b…

Curious: is this also valid ocaml?

[deleted]

Re: F# enters Tiobe top 20 index for the first time

#27
post #9

Earlier quoted context omitted.

F# isn't listed on any of your charts. I think it's probably popular enough to show up in all of your data sources at this point. Also, maybe add GitHub and StackOverflow as data sources?

F# should probably go there, yeah. GitHub and StackOverflow started out really biased in terms of their communities - GitHub with Ruby, and StackOverflow with Microsoft languages. Do you think they've sufficiently lost that bias?

I think StackOverflow has; GitHub still seems a bit biased towards scripting languages like Ruby or Javascript though. In any case, since you show the graphs from the various sources, I don't think it matters if one source is more biased than another. If, for example, you used CodePlex as a data source, you'll see a huge bias towards C# -- but visitors to your site could simply draw their own conclusions from the charts.

Re: F# enters Tiobe top 20 index for the first time

#28
post #9

Earlier quoted context omitted.

F# isn't listed on any of your charts. I think it's probably popular enough to show up in all of your data sources at this point. Also, maybe add GitHub and StackOverflow as data sources?

F# should probably go there, yeah. GitHub and StackOverflow started out really biased in terms of their communities - GitHub with Ruby, and StackOverflow with Microsoft languages. Do you think they've sufficiently lost that bias?

On another note, you know what else could be a great source(s) for data? Google Scholar, CiteSeerX and arXiv. It'd be really interesting to compare the language usage between "industry" and academia.

Re: F# enters Tiobe top 20 index for the first time

#30
post #9

Earlier quoted context omitted.

F# should probably go there, yeah. GitHub and StackOverflow started out really biased in terms of their communities - GitHub with Ruby, and StackOverflow with Microsoft languages. Do you think they've sufficiently lost that bias?

I think StackOverflow has; GitHub still seems a bit biased towards scripting languages like Ruby or Javascript though. In any case, since you show the graphs from the various sources, I don't think it matters if one source is more biased than another. If, for example, you used CodePlex as a data source, you'll see a huge bias towards C# -- but visitors to your site could simply draw their own conclusions from the cha…

Where can I see the data for GitHub?

I'm not sure I even trust that... I do lots of bindings from OCaml to C, and whereas I consider them to be OCaml projects, GitHub sees they're more C by LOC and counts them as C.

Post reply on HN