GithubHelp home page GithubHelp logo

uzhttp's Introduction

polynote

Gitter chat Build status

Polynote is an experimental polyglot notebook environment. Currently, it supports Scala and Python (with or without Spark), SQL, and Vega.

For more information, see Polynote's website

Why?

Current notebook solutions, like Jupyter and Zeppelin, are lacking in some fundamental features:

  • Code editing – the code editing capabilities in most notebook tools leave plenty to be desired. Why can't a notebook tool have modern editing capabilities like those you'd find in an IDE? Polynote provides useful autocomplete, parameter hints, and more – we're planning to add even more features, like jump-to-definition.
  • Text editing – you can use the WYSIWYG editor for composing text cells, so you'll know what the text will look like as you're writing. TeX equations are also supported.
  • Multi-language support – Polynote allows you to mix multiple languages in one notebook, while sharing definitions seamlessly between them.
  • Runtime insight – Polynote tries to keep you informed of what's going on at runtime:
    • The tasks area shows you what the kernel is doing at any given time.
    • The symbol table shows you what variables and functions you've defined, so you don't have to scroll around to remind yourself.
    • Compile failures and runtime exceptions are highlighted in the editor (for supported languages), so you can see exactly what's going wrong.

uzhttp's People

Contributors

atooni avatar frekw avatar ghostdogpr avatar gurghet avatar jeremyrsmith avatar sviezypan avatar tusharmath avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

uzhttp's Issues

Weird message causing `fromReqString` to fail

Yesterday my server (yes, a production server) got stuck when processing a particular request that caused this:

╠══╦══╗
║  ║  ║
║  ║  ╠─An unchecked error was produced.
║  ║  ║ scala.MatchError: List(0) (of class scala.collection.immutable.$colon$colon)
║  ║  ║ 	at uzhttp.Request$NoBody$.fromReqString(Request.scala:97)
║  ║  ║ 	at uzhttp.server.Server$Connection.$anonfun$doRead$4(Server.scala:404)
║  ║  ║ 	at zio.internal.FiberContext.evaluateNow(FiberContext.scala:342)
║  ║  ║ 	at zio.internal.FiberContext.$anonfun$fork$17(FiberContext.scala:770)
║  ║  ║ 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
║  ║  ║ 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
║  ║  ║ 	at java.base/java.lang.Thread.run(Thread.java:834)

These are the last few request before failing:

[REQUEST] GET /gila/?c=admin 404 Not Found (4 ms to finish, 5 ms total) (closed)
[REQUEST] POST /actions/authenticate.php 404 Not Found (1 ms to finish, 1 ms total) (closed)
[REQUEST] GET / 200 OK (4 ms to finish, 29 ms total) (closed)
[REQUEST] GET /wp-login.php 404 Not Found (9 ms to finish, 9 ms total) (closed)
[REQUEST] POST /search.php?searchtype=5 404 Not Found (762423 ns to finish, 921797 ns total) (closed)
[REQUEST] POST /ws/v1/cluster/apps/new-application 404 Not Found (1 ms to finish, 1 ms total) (closed)

They have nothing to do with my website, except for the / 200 OK. So I presume it's just part of some commonly used script to infect CMS websites.

Release 0.3.0-RC2

Hi there, if you find the time, perhaps you could merge #44 and kick off a release for 03.0-RC2 to sync with the latest ZIO RC ?

Thank you very much in advance

ExampleServer on the readme not compiling

Hi, I'm trying to use uzhttp so obviously I was trying the example on the readme file but I can't compile it.

Error is

[error] /Users/yolo/uzhttp/src/main/scala/q/Main.scala:13:15: type mismatch;
[error]  found   : zio.ZIO[Any with zio.blocking.Blocking with zio.clock.Clock,Throwable,Nothing]
[error]     (which expands to)  zio.ZIO[Any with zio.Has[zio.blocking.Blocking.Service] with zio.Has[zio.clock.Clock.Service],Throwable,Nothing]
[error]  required: zio.ZIO[zio.ZEnv,Nothing,Int]
[error]     (which expands to)  zio.ZIO[zio.Has[zio.clock.Clock.Service] with zio.Has[zio.console.Console.Service] with zio.Has[zio.system.System.Service] with zio.Has[zio.random.Random.Service] with zio.Has[zio.blocking.Blocking.Service],Nothing,Int]
[error]       }.serve.useForever

Release 0.30-RC1

Just a gentle reminder to do the release when you find the time to do so.
Thanks again for the library.

make ConstBody and NoBody public

I'm trying to adapt some code from http4s. One of the things I do there is write tests which generate a request object that gets compared to the routes and processed using my backend returning a Response object. The test can be run without firing up the server and worrying about actual http stuff going over the wire. http4s promotes this technique for unit testing.

But here all the concrete classes (except websockets) are private. So I have to have my own concrete version of Request (I copy NoBody and ConstBody) to create requests.

That's doable, though inconvenient. The worse problem is that I can't get at the body of a response at all, since there is no method on Response and the concrete classes are all private with private constructors.

In effect, I have rendered untestable all the stuff involved with content headers, formatting and so on, unless my unit tests actually instantiate a server and a client explicitly.

release for zio 1.03

Hi
I'm doing my library updates round.
Do I need a new release of uzhttp? Or is it likely to be compatible? Or should I just try and see what happens :-)

Test against the latest ZIO snapshot

Hi @jeremyrsmith, we just merged a significant refactor to ZStream in which chunks are embedded on all streams.

Would be great if you could test uzhttp against the latest snapshot and report back if any issues pop up.

uzhttp for zio 2

Hi there,

i needed a quick HTTP server for some demos in our project that uses ZIO 2 already, so I have forked the repo and now have a uzhttp clone that uses ZIO 2.0.0-M4.

In case yyou are interested, we can see how you would like to put that in your repo - most likely it is not a PR as ZIO 2 is not yet released und you might want to keep the ZIO 1 version for a while longer.

However, in case you are interested, here it is: https://github.com/blended-zio/uzhttp/tree/zio2

Support for Sec-WebSocket-Protocol

When a WebSocket connection is made with the header Sec-WebSocket-Protocol, the server is supposed to send this header back in the response if the protocol is supported.

See: https://tools.ietf.org/html/rfc6455#section-11.3.4

The |Sec-WebSocket-Protocol| header field is used in the WebSocket
   opening handshake.  It is sent from the client to the server and back
   from the server to the client to confirm the subprotocol of the
   connection.

FYI how it's done in other libraries:

  • in http4s, the WebSocketBuilder accepts a list of headers that are passed in the response. This is quite flexible.
  • in Akka HTTP, it's more specific, there is an explicit subprotocol: Option[String] parameter that allows giving the value to use in the Sec-WebSocket-Protocol header

2.12.* compilation issue

Hi,
I was trying to compile this using Scala 2.12.10 and I get a weird error on the usage of partial functions.

Specifically

Server.scala:103:51: method apply in object PartialFunction is deprecated (since 2.12.5): For converting an ordinary function f to a partial function pf, use `val pf: PartialFunction[A, B] = { case x => f(x) }`. For creating a new PartialFunction, use an explicit type annotation instead, like in `val pf: PartialFunction[Int, String] = { case 1 => "one" }`.
[error]       copy(requestHandler = requestHandler orElse PartialFunction(handler))

I tried to fix it myself to no avail.

Have you guys seen this?

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.