New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Print a message pointing to the online playground if compiled without it #9622
Print a message pointing to the online playground if compiled without it #9622
Conversation
@deiv Thank you! Just note that the online version is not the same thing. So I wouldn't mention |
Oh, actually, I don't think we should merge this exactly because the online version is not the same thing, and there's nothing equivalent online (maybe there should?). |
@asterite yes, I wonder why are not the same ... Maybe, adjusting the text, letting know the user that the online version is not the same (the online seems that has less features) ? Example: Crystal was compiled without playground support
You can play with the online version (that doesn't have all the features) here: https://play.crystal-lang.org Seems a better option, that simply don't give any alternative. |
It's not that the online version has different features: it's a completely different thing. The embedded playground will show the type and value of each expression, and you can edit the code and it runs immediately. The online play page just let's you submit code which runs once, and you can share that code. The fact that the both include "play" in their name is misleading. I suggested many times that it would be great if crystal play would actually be a hosted site. The reason it's not is that in the local version you can use shards. In any case, we would need to do a survey to know how many people use the offline play feature, and how they use it. |
I think that the current message is enough. We can keep the flag beyond windows socket support. Thanks for raising the need. It will go away if the playground is splitted in from the compiler, but not before. To clarify @deiv , the lack of octicons in the archive is not a decision on our side. They are vendored to allow offline usage of the playground. Thanks for the official Debian package 🙇 |
How about:
|
Is there a meaningful incentive to point people to use the online playground, when they already have the compiler installed..?
The playground evaluations are shareable, but that also doesn't seem like something someone who wanted to use |
HI @z64,
Yes, point to something similar. Maybe the other option is to remove the commandline parameter. From a user view (that didn't compile crystal), sounds wrong to see "hey, crystal have a playground, but for you there's not (Crystal was compiled without playground support)".
The playground is for testing code or to play with the language in some agile manner ?. I see more agile, using the browser interface, instead of open a text editor, edit the file, save, and run the crystal compiler to run the file. |
Something similar is a file in your machine, and running it with
I think the current situation is fine. Instead of saying "Unknown command" and having users say "I swear this was a thing", they get an explanation of why it's not working in their current version.
Try hitting play.crystal-lang.org . For me it takes like 20 seconds to load. Probably because it's in heroku and it needs to spin up an instance. I don't see that as agile at all. The editor in the browser is not as convenient as your editor. You can't undo code once you submitted it. To edit the code you need to click a button, etc. That's the opposite of agile in my mind. The solution here is for us or someone to host an exact equivalent of |
To go into more detail, the playground is very limited in what you can do; (some of these could be improved, but this is how it is today)
These make the playground a very poor replacement for someone who was about to use You can write multiline ~ $ cr eval '
def fib(n)
if n <= 1
1
else
fib(n - 1) + fib(n - 2)
end
end
puts fib(42)
'
433494437 with none of the drawbacks above.
Considering all of the above, that is a very small thing to have to do for a predictable environment without unexpected limitations (your own). |
The compiler is actually better than |
Not, it's not similar. See steps below... By the way, you need an internet connection to download crystal... :p
The point is that is not "not working", is that can't be compiled. I dunno what is worst:
Maybe the two ...
For agile, I don't mean speed, I mean the easy to run some lines of code to test the language. For a user that never used crystal, is better to have a html interface with the editor and the compiler in it, and pushing only a button to get the code executed. Instead of:
Don't look at me :D |
There's not point here. We are talking about an interface where some new user can test and "play" with the language without knowing nothing about it. And to point the user to a replacement that could use to test crystal. Not about and IDE o enviroment for programing in crystal... |
Same as above. Correct me if I'm wrong, but one use case for 'crystal play' or playground is not to give a try to crystal? (without the hassle to execute the binary, etc ...) |
@deiv you make a lot of good points |
Yes, or someone tell's him about a new cool language named crystal, do an 'apt|yum search crystal' and later install it.
That's the point, playground for play or try it... (well, without the message this pull request is adding... maybe the user has to go to the web page)...
That's life, if all people were equals, ¿ wheres the party ? |
This way, is more clear, that the playground and the online page are not the same tools.
Hi,
For the Debian packaging, we remove the support for the playgroud due to the lack of octicons fonts in the archive. We will use the flag
-Dwithout_playground
, to deactivate it.This change simply add a message pointing the user to the online version.
Maybe, the next if out of context for this pull request, but for what we know, the
-Dwithout_playground
flag was added only for the use case of compiling crystal in windows (that lacks sockets support) [0].Is posible to maintain this flag for the entire lifecycle of crystal ? (we expect that at some point, when windows get's socket funcionality, the flag will be removed).
[0] #9031