ProductPromotion
Logo

Swift

made by https://0x3d.site

GitHub - NozeIO/Noze.io: Evented I/O streams for Swift
Evented I/O streams for Swift. Contribute to NozeIO/Noze.io development by creating an account on GitHub.
Visit Site

GitHub - NozeIO/Noze.io: Evented I/O streams for Swift

GitHub - NozeIO/Noze.io: Evented I/O streams for Swift

Swift3 Swift4 Swift5 macOS iOS Linux Travis

"Das Haus das Verrรผckte macht."

Note (2021-11-09): It is not recommended to use this for production, though it still makes a nice demo. The more modern, and quite recommendable, version of this is Macro.swift, which is based on SwiftNIO (instead of GCD like Noze.io).

Noze.io was an attempt to carry over the Node.js ideas into pure Swift. It uses libdispatch for event-driven, non-blocking I/O. Noze.io is built around type-safe back-pressure aware pull-streams (using Swift generics) operating on batches of items. Instead of just operating on bytes, operate on batches of Unicode lines or database records or HTML responses or - you get the idea. Be efficient: Stream everything and รŸatch.

A focus is to keep the API similar to Node. Not always possible - Swift is not JavaScript - but pretty close. It comes with rechargeables included, Noze.io is self-contained and doesn't require any extra dependencies. It includes modules such as cows, leftpad, express or redis.

Noze.io works in Cocoa environments as well as on Linux. Head over to our Start page for install instructions.

Is it a good idea? You tell us. Not sure, but we think it might be, because: a) While Swift looks very much like JavaScript, it is actually a very high performance statically typed and AOT-compiled language, b) Code often looks better in Swift, mostly due to trailing-closure syntax, c) No monkey patching while still providing extensions. There are cons too.

Shows us some code!

There is a reasonably large collection of simple, focused: Noze.io examples But here you go, the "standard" Node example, a HelloWorld httpd:

import http

http.createServer { req, res in 
  res.writeHead(200, [ "Content-Type": "text/html" ])
  res.end("<h1>Hello World</h1>")
}
.listen(1337)

An echo daemon, just piping the in-end of a socket into its own-out end:

import net

net.createServer { sock in
  sock.write("Welcome to Noze.io!\r\n")
  sock | sock
}
.listen(1337)

More complex stuff including a Todo-MVC backend can be found in the Noze.io examples. Like what you see? Head over to our Start page to get started.

Contact

Hey, we love feedback. Join the mailing list, Slack channel or just drop us an email to tell us why this is crap (or not?).

Supported Swift Versions

OS Swift Xcode Make SPM
macOS 3.0 Xcode 8 ๐Ÿ‘๐Ÿป ๐Ÿ‘
macOS 3.1 Xcode 8.3 ๐Ÿ‘๐Ÿป ๐Ÿ‘
tuxOS 3.0.2 ๐Ÿ‘๐Ÿป ๐Ÿ‘
tuxOS 3.1 ๐Ÿ‘๐Ÿป ๐Ÿ‘

With the release of Swift 3 Noze.io drops support for Swift 2.x. If you are still interested in using it with 2.x, the last release is still available in the legacy/swift23 branch on GitHub.

Status

  • We chose the traditional Swift approach: Make something barely usable, though demoable, and release it with a 3.0 version tag. Then hope that the community kicks in and fills open spots. Well kinda. It's pretty good already! ๐Ÿ˜‰

  • It already has leftpad. As well as cows ๐Ÿฎ!

  • Implements primarily the happy path. Errors will error. Presumably this will improve over time.

  • A huge strength of Node is the npm package environment and the myriads of packages available for it. Or wait, is it? Well, at least we have leftpad included. And we hope that the Swift package environment is going to grow as well.

  • There are tons of open ends in Noze.io. We welcome contributions of all kinds.

Who

Noze.io is brought to you by The Always Right Institute and ZeeZide. We wouldn't be sad if more people would like to join the effort :-)

More Resources
to explore the angular.

mail [email protected] to add your project or resources here ๐Ÿ”ฅ.

Related Articles
to learn about angular.

FAQ's
to learn more about Angular JS.

mail [email protected] to add more queries here ๐Ÿ”.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory