krzyzanowskim / onlineswiftplayground Goto Github PK
View Code? Open in Web Editor NEWOnline Swift Playground
Home Page: http://online.SwiftPlayground.run
License: Other
Online Swift Playground
Home Page: http://online.SwiftPlayground.run
License: Other
Can't connect to server http://online.swiftplayground.run
Hi
the first.... great tool, I use it every time when i need something to check in swift. But now for long time web http://online.swiftplayground.run/ is not working
Can you please look at it
Thanks :)
It would be great to interact with playground for multiple users simultaneously like https://code.yandex-team.ru/
Now the editor is resizing/scaling correctly on smaller devices. This should be fixed
It seems on every refresh of the page, the same resources are downloaded over and over again. It would be more efficient to have caching on the client side, hence less CO2 emission.
I've noticed the server stop responding after some time (usually ~2 days) and can't properly restart it. Not sure what the NIO is doing but I have to reboot (or logout) the user to unbind. It's weird. Does it ring any bell @josefdolezal?
Launched as
.build/swift-5.7-RELEASE/x86_64-apple-macosx/release/PlaygroundServer serve --hostname 0.0.0.0
It may, or may not be related to vapor/vapor#2502
If you include "assert()" in the source code they don't seem to be evaluated. To reproduce the error just try assert(false)
. Nothing happens when executing.
HTTPS link in the description does not work: https://SwiftPlayground.run
→ http://SwiftPlayground.run
.
Any ideas to support the ⌘ + ENTER keystroke combination to run the code in the playground? Essentially, this key combination would do whatever happens when the green Run button is clicked. That would be cool!
Sign out
Expected:
Playground with code.
Actual:
Page with Let's play
button.
Sometimes scrolling within the code window and output window does not work properly.
This is a screenrecording of the issue in the output window, couldn't replicate again the code window issue.
Using Chrome Version 81.0.4044.129 (Official Build) (64-bit) on MacOS.
Code wrote in the Code Window to reproduce the issue in the Output Window:
import Foundation
class Adapter: NSObject {
static var lat: Int = {
// some calculations
print("lat")
return 1
}()
}
print(Adapter.lat)
print(Adapter.lat)
class Adapter2: NSObject {
static var width: Int {
// some calculations
print("width")
return 1
}
}
print(Adapter2.width)
print(Adapter2.width)
Hi
Thank you for great web. I am using it to check my code, and quick scripts
But can be possible to upgrade versions of swift on the web interface? You are providing only 5.0 and 5.1-release of swift, but today is out version 5.5.2 (https://github.com/apple/swift/releases)
It may be handy in some situations
Thank you for considering it.
Trying a code snippet that doesn't import
anything doesn't work for me on http://online.swiftplayground.run/. When trying just print("lol")
, the output is the following:
Swift version 4.0.3 (swift-4.0.3-RELEASE)
Target: x86_64-unknown-linux-gnu
/usr/bin/swift -frontend -c -primary-file /tmp/C32686A8-2BA6-4678-B992-3301A819626C.XrYPNz/main.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -I /swiftplayground/.build/release -gnone -suppress-warnings -swift-version 4 -enforce-exclusivity=checked -module-name SwiftPlayground -o /tmp/main-e86eb6.o
/usr/bin/swift-autolink-extract /tmp/main-e86eb6.o -o /tmp/main-a37d34.autolink
/usr/bin/clang++ -fuse-ld=gold -target x86_64-unknown-linux-gnu -Xlinker -rpath -Xlinker /usr/lib/swift/linux /usr/lib/swift/linux/x86_64/swift_begin.o /tmp/main-e86eb6.o -L /swiftplayground/.build/release -lOnlinePlayground -L /usr/lib/swift/linux -lswiftCore --target=x86_64-unknown-linux-gnu @/tmp/main-a37d34.autolink /usr/lib/swift/linux/x86_64/swift_end.o -o /tmp/C32686A8-2BA6-4678-B992-3301A819626C.XrYPNz/main
/swiftplayground/.build/release/libOnlinePlayground.a(OnlinePlayground.swift.o):/swiftplayground/.build/x86_64-unknown-linux/release/OnlinePlayground.build/OnlinePlayground.swift.o:_swift_FORCE_LOAD_$_swiftGlibc_$_OnlinePlayground: error: undefined reference to '_swift_FORCE_LOAD_$_swiftGlibc'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
<unknown>:0: error: link command failed with exit code 1 (use -v to see invocation)
I tried to build and run locally. The UI came up fine and the backend started fine as well. I'm running on macOS Catalina, Xcode 11.1. However, when the call eventually lands up at the backend, what I get back in the UI is error: no such module 'OnlinePlayground'
. Please see screenshot. Could you please help to shed some light and help me debug this?
The idea comes from typescript playground. If you open up the following
https://www.typescriptlang.org/play/index.html#src=console.log(%22Hello%22)%3B , you'll see that the source is console.log("Hello");
which was embedded in hash as #src=conso....
. So, you get point.
This way it would be really easy to share some runnable snippets to online.swiftplayground.run. Including the swift version as well it would be something like this:
http://online.swiftplayground.run/#v=4.2&src=print(%22Hello%22)
A bit related to #5
My issue is i wanna see the compile time, like how many ms it takes to compile. how can i do that. Appreciate.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.