News for hackers. Stuff that matters.
Re:Poll: What Programming Language Do You Use for Server Sid... by zingermc on Tuesday June 28, 2016 @12:28PM (#11995094)
I haven't found a web server language to my liking yet. Maybe I'm too picky, but I'd like to satisfy all of these requirements:

- Static typing -- I want to eliminate as many runtime bugs as I can

- Type inference -- Like in SML and Haskell

- No JVM -- Personal preference, but I'd rather not pull in this monster if I don't have to.

- Good pre-made web framework -- I've briefly looked at OCaml but the web frameworks seem disappointing. Tell me if I'm wrong!

Re:Poll: What Programming Language Do You Use for Server Sid... by beefhash on Tuesday June 28, 2016 @12:35PM (#11995178)
With .NET Core having recently hit 1.0[1], wouldn't C#/ASP.NET Core fit the bill now?

[1] https://blogs.msdn.microsoft.com/dotnet/2016/06/27/announcin...

Re:Poll: What Programming Language Do You Use for Server Sid... by wtetzner on Tuesday June 28, 2016 @12:39PM (#11995220)
It sounds like they might prefer F# over C#. Also, if they're not willing to pull in the JVM, it seems unlikely they'd be happy about pulling in the CLR.
Re:Poll: What Programming Language Do You Use for Server Sid... by nbarbettini on Tuesday June 28, 2016 @01:01PM (#11995398)
.NET Core makes the CLR dependency a little easier to swallow. It's modular, so you can only pull in the stuff (packages) you need. Cuts down on the bloat and "CLR kitchen sink" quite a bit.
Re:Poll: What Programming Language Do You Use for Server Sid... by electrotype on Tuesday June 28, 2016 @01:16PM (#11995534)
Modern JVM based frameworks are far from being "monsters", and you have a lot, lot of choices! Many of them have an embedded HTTP server so they are very easy to develop and deploy.

In case you want to investigate some:

- https://grails.org

- http://sparkjava.com

- https://www.playframework.com

- http://projects.spring.io/spring-boot

- https://www.spincast.org

- http://jooby.org

- http://www.ninjaframework.org/

- http://www.dropwizard.io/0.9.3/docs/

Re:Poll: What Programming Language Do You Use for Server Sid... by outworlder on Tuesday June 28, 2016 @01:32PM (#11995709)
What about Rust?

It has static typing, limited type inference (function parameters need their types declared - by design - will infer otherwise), no JVM, and has several web frameworks. Not sure if any of them would be considered "good" by your definition, but check it out: https://github.com/flosse/rust-web-framework-comparison

Re:Poll: What Programming Language Do You Use for Server Sid... by Cshelton on Tuesday June 28, 2016 @01:40PM (#11995788)
Rust is exactly the language I want for the web. Unfortunately, the ecosystem is still a little too immature. In time...someday...

I've already decided my next service/api will be in Rust.

Re:Poll: What Programming Language Do You Use for Server Sid... by steveklabnik on Tuesday June 28, 2016 @02:43PM (#11996343)
For an ecosystem overview: http://www.arewewebyet.org/

Still is early days, but there's a lot of stuff too. Excited to see it develop further.

Re:Poll: What Programming Language Do You Use for Server Sid... by frankpf on Tuesday June 28, 2016 @01:17PM (#11995541)
Check out Ur/Web[1].

It's a functional, pure and statically typed language inspired by Haskell. It claims that programs that compile successfully cannot:

- Suffer from any kinds of code-injection attacks

- Return invalid HTML

- Contain dead intra-application links

- Have mismatches between HTML forms and the fields expected by their handlers

- Include client-side code that makes incorrect assumptions about the "AJAX"-style services that the remote web server provides

- Attempt invalid SQL queries

- Use improper marshaling or unmarshaling in communication with SQL databases or between

[1]: http://www.impredicative.com/ur/

Re:Poll: What Programming Language Do You Use for Server Sid... by montyedwards on Tuesday June 28, 2016 @01:56PM (#11995918)
Rust has:

- Static typing

- Type inference (and pattern matching)

- No dependency on JVM, .NET, or BEAM

But the number of web frameworks, etc. for Rust sucks compared to that of older languages like Go. Go 1.0 was released in early 2012 and Rust 1.0 in May 2015.

Rust is more verbose than Go, but Go's FFI to functions written in C isn't as efficient and since "cgo isn't go", I'm not sure cgo covered by Go 1.0 compatibility guarantee.

On the other hand, Go has tons of "batteries included" plus web frameworks so that is pretty awesome to have on stable platforms (I don't consider Windows a stable platform for Go and got burned several times, but Go works great on FreeBSD & Ubuntu.)

I suspect Go & Swift won't have robust reliability on Windows (compared to other platforms) but they'll be rock solid on the ones they favor. Rust may have better prospects regarding this, but Rust still too new this year for web server language -- wait until MIR is integrated and a couple more releases after that.

Re:Poll: What Programming Language Do You Use for Server Sid... by eatonphil on Tuesday June 28, 2016 @01:10PM (#11995479)
I will be revisiting OCaml sometime in the near future to write a more solid web framework for it (compared to OWebl). This time it will be based on FastCGI rather than doing the networking itself I think.

In the meantime, I'm more actively working on Ponyo for Standard ML right now. Take a look at the ponyo.org server[0] for a brief glance at what it can do today.

Check out the /r/sml wiki if you are trying to get started. And please join #sml on Freenode if you have any questions!

[0] https://github.com/eatonphil/ponyo/blob/master/site/server/s...

Re:Poll: What Programming Language Do You Use for Server Sid... by cel1ne on Tuesday June 28, 2016 @12:52PM (#11995324)
The nice thing about the JVM is that it's contained and has excellent monitoring and profiling tools.

Anyway: What about kotlin [0]?

* 100% java compatible * can compile to the JVM and javascript, so you should be able to run it with node.

[0]: https://kotlinlang.org/

Googling found this: https://jonninja.github.io/node.kt/

Re:Poll: What Programming Language Do You Use for Server Sid... by softawre on Tuesday June 28, 2016 @01:08PM (#11995464)
We use Kotlin. Their JS transpiler stuff is still pretty new, though they are back to working on it post 1.0.

If you use Kotlin, use the JVM - at least for now.

Re:Poll: What Programming Language Do You Use for Server Sid... by b3b0p on Tuesday June 28, 2016 @02:40PM (#11996323)
Doesn't Spring Boot support Kotlin?

https://start.spring.io

Re:Poll: What Programming Language Do You Use for Server Sid... by supster on Tuesday June 28, 2016 @12:49PM (#11995291)
I have very similar requirements, and I think within the next few years, Swift will fill this niche very well.
Re:Poll: What Programming Language Do You Use for Server Sid... by AsyncAwait on Tuesday June 28, 2016 @01:20PM (#11995586)
Agreed, Vapor[1] is coming along nicely.

1 - https://github.com/qutheory/vapor

Re:Poll: What Programming Language Do You Use for Server Sid... by yozhik on Tuesday June 28, 2016 @02:59PM (#11996496)
I've just started using D for this sort of thing. It has web framework called Vibe.d (http://vibed.org/). I'm pretty happy with it, and it seems to satisfy all of your requirements. Note that I've only just started to use it, so I don't know how well it will hold up over time, but I'm enjoying it so far.
Re:Poll: What Programming Language Do You Use for Server Sid... by rzhikharevich on Tuesday June 28, 2016 @12:46PM (#11995262)
Doesn't Go fit these requirements?
Re:Poll: What Programming Language Do You Use for Server Sid... by AsyncAwait on Tuesday June 28, 2016 @01:24PM (#11995613)
Go has a relatively weak, unsafe type system despite being statically typed. Also, lack of generics, optionals or tagged unions is kind of a bummer.
Re:Poll: What Programming Language Do You Use for Server Sid... by orclev on Tuesday June 28, 2016 @12:31PM (#11995134)
There are a couple Haskell frameworks that might fit the bill. Yesod is a big one, although some take issue with its excessive use of Template Haskell. Others to look at would include Servant, and the very confusingly named rest framework.
Re:Poll: What Programming Language Do You Use for Server Sid... by gshulegaard on Tuesday June 28, 2016 @01:10PM (#11995483)
With type hints in Python 3.5+, does Python fit your list? Genuinely curious.
Re:Poll: What Programming Language Do You Use for Server Sid... by gshulegaard on Tuesday June 28, 2016 @03:33PM (#11996806)
Just to add some details:

- Static typing -- Type hints enable restriction of the dynamic typing behavior of default Python to mimic static types

- Type inference -- Not familiar with the particular behavior of type inference of Haskell, but yes.

- No JVM -- Definitely no JVM, but not particularly high performance so...there is that.

- Good pre-made web framework -- Lots of good ones, Python ecosystem is fairly rich in general, but ones I have used: Django, Pyramid, Flask, etc.

Re:Poll: What Programming Language Do You Use for Server Sid... by zingermc on Wednesday June 29, 2016 @09:58AM (#12001636)
That's a really good point! I have used the CherryPy framework before, but I've never used Python type hints before.
Re:Poll: What Programming Language Do You Use for Server Sid... by WayneBro on Tuesday June 28, 2016 @06:42PM (#11998159)
Maybe Typescript? (On Node.js obviously for server side).
Re:Poll: What Programming Language Do You Use for Server Sid... by ShirsenduK on Tuesday June 28, 2016 @01:13PM (#11995511)
You need Elixir with the Phoenix framework!
Re:Poll: What Programming Language Do You Use for Server Sid... by lkitching on Tuesday June 28, 2016 @01:18PM (#11995554)
Isn't Elixir dynamically typed?