Live data from Hacker News

Vapor: a type-safe web framework for Swift

github.com

31–40 of 76 posts

Re: Vapor: a type-safe web framework for Swift

#31
post #25

But why? Why would you create a web framework in a single-thread environment? This line of code: https://github.com/tannernelson/vapor/blob/master/Sources/Se... - makes this framework totally useless.

Do you realize that node.js is single threaded? Having more than one process works fine for most purposes. Because the bottlenecks are more IO driven than CPU time.

Please check the function I am referring to.

Also, yes, I think concurrency model in node.js is the worst possible one.

Re: Vapor: a type-safe web framework for Swift

#32
post #31

Earlier quoted context omitted.

Do you realize that node.js is single threaded? Having more than one process works fine for most purposes. Because the bottlenecks are more IO driven than CPU time.

Please check the function I am referring to. Also, yes, I think concurrency model in node.js is the worst possible one.

I saw it. It's just a function to keep the main thread, ie. main() alive while the worker threads process the async events. Nothing out of the ordinary..

Re: Vapor: a type-safe web framework for Swift

#36
post #16

Earlier quoted context omitted.

Xcode or AppCode(from JetBrains).

Both run only on mac if I remember well? Anything that could run on ubuntu?

Atom https://atom.io/

https://medium.com/@Aciid/hacking-atom-to-create-a-swift-ide...

Re: Vapor: a type-safe web framework for Swift

#37
post #25

But why? Why would you create a web framework in a single-thread environment? This line of code: https://github.com/tannernelson/vapor/blob/master/Sources/Se... - makes this framework totally useless.

The server isn't single threaded. It uses the dispatch concurrent thread pool for processing. The (granted, ugly) line you've linked is for blocking and keeping the main thread alive so the process doesn't end. However, the requests are processed on the dispatch "Background" queue. See "boot" here:

https://github.com/tannernelson/vapor/blob/master/Sources/So...

Re: Vapor: a type-safe web framework for Swift

#38
post #31

Earlier quoted context omitted.

Do you realize that node.js is single threaded? Having more than one process works fine for most purposes. Because the bottlenecks are more IO driven than CPU time.

Please check the function I am referring to. Also, yes, I think concurrency model in node.js is the worst possible one.

And why is it the worst possible one? Preforked threads per request are much worse as NGinX showed Apache

Re: Vapor: a type-safe web framework for Swift

#39
post #14

What's the best GUI IDE for a new comer to swift?

I've been using vim + vim-swift ( https://github.com/keith/swift.vim ) to learn Swift, with great results ..

Some Emacs support:

https://github.com/nathankot/company-sourcekit

Re: Vapor: a type-safe web framework for Swift

#40
post #34

Good to see people getting serious about Swift cross platform projects. Let's hope it doesn't share the fate of Apple's Dylan projects. Been looking into this recently so leaving it here as friendly competition: https://air.mozilla.org/ur-web-a-simple-model-for-programmin...

Why would you compare it to Dylan? Swift will be the most popular iOS language within 18 months. If you look at the new iOS books that are released, most use Swift. I count over 3 dozen books within 18 months of Swift's release:

http://www.h4labs.com/dev/ios/books

Post reply on HN