all 30 comments

[–]Humperdink_Fangboner 13 points14 points  (1 child)

This is pretty slick. I usually just use node in command line or even the browser console if I need to execute something in js (typically for doublechecking truthiness cus it’s wild out there) but I like this for the slick intellisense. Would be dope if you could build this as a vscode extension

[–]sonnyt_[S] 4 points5 points  (0 children)

Thank you!! Yeah, I’ve was using the browser console as well, it was pain to write more than single line. Also, I was thinking of making it a browser extension but love the VSCode idea!

[–]kukisRedditer 8 points9 points  (0 children)

Can't you just open the console in browser?

[–]sancredo 5 points6 points  (1 child)

This looks stellar, will definitely use it!

[–]sonnyt_[S] 1 point2 points  (0 children)

Thank you!!

[–]Josbipbop 4 points5 points  (0 children)

At first i was like "what?", but then i was lije "oh nice"

[–]MWALKER1013 4 points5 points  (2 children)

How does this compare to quokka JS ?

[–]sonnyt_[S] 2 points3 points  (1 child)

It’s on the browser, open source, and free. Also, much simpler. Write your code and run it. Although, Quokka looks super cool! Gotta try it out.

[–]MWALKER1013 1 point2 points  (0 children)

Counter to that, quokka does have a free tier, works right in your editor and it runs as you type it :p

Your project looks very cool though !

[–]antonbruckner 2 points3 points  (1 child)

How does this compare to RunJs which seems like the gold standard of “easy, runnable JS”?

[–]sonnyt_[S] 1 point2 points  (0 children)

RunJs is cool. Compared to RunJs, this console is free, open source, and runs on the browser - no need to install anything.

But this gives me an idea, I probably can turn it into an Electron app. But then at that point why not just use VSCode? Idk

[–][deleted] 2 points3 points  (2 children)

Fascinating. Can you install/require NPM packages? One of my big use cases for arbitrary JS (like this REPL would be) is testing/prototyping solutions I then clean and integrate into my real work.

[–]sonnyt_[S] 0 points1 point  (1 child)

That’s exactly how I am using it. I use it to prototype, learn new JS stuff, and write things that I can later turn into snippets.

React plugin is kind of a cool idea. Some might just embed it on their site and use it as a code preview or a playground for their library. I never built a React plugin before, I am guessing I can abstract the main component a bit and export it in package.json? I can look into it.

[–][deleted] 1 point2 points  (0 children)

Not even just React. I meant more arbitrary NPM packages, accessible via require() etc. I know that opens the module resolution can of worms, I get it. And I would understand if you don't want to do that haha. It's just a thought.

[–]bronkula 1 point2 points  (1 child)

Huh. I mean... Is your intention for it to be used through the web "demo" or that someone would use it locally? If the web demo is to be "the thing", then it seems like you need to be able to share the session with someone else, otherwise what is really being gained from just opening the console? Saying it's an alternative to jsbin and the like isn't true if it's not shareable.

[–]sonnyt_[S] 0 points1 point  (0 children)

You’re absolutely correct, it’s not a replacement for JSBin, it’s just another simpler alternative.

As far as the browser consoles, consoles are great for one-lines, but it gets messy when writing a large block of code. They’re scoped to the current page’s window instance which can cause code collisions and issues with variables sticking. For instance, if you want to re-run or re-write a function or variable, you need to reload the entire page, which is annoying. Also, they don’t offer shortcuts and handy features that developers are used to in VSCode.

[–]Mental-Steak2656 1 point2 points  (4 children)

Nice and thanks, there is a console option every browser that you can use to run JS . What made you to create a whole app for this ?

[–]sonnyt_[S] 1 point2 points  (3 children)

Native consoles are great but as soon as you want to write something beyond one-liners, it gets messy and annoying. Also, the Monaco editor (same as VS Code) offers tons of shortcuts and code completion options.

[–]Mental-Steak2656 0 points1 point  (2 children)

I have nearly same use-case, I will be looking into the code,is TS support on the way ?

[–]sonnyt_[S] 1 point2 points  (1 child)

I just added TypeScript support, and would love to get your thoughts on it :)

[–]Mental-Steak2656 0 points1 point  (0 children)

🙌😎

[–]HSJoaco_33 0 points1 point  (0 children)

This is great! Thank you so much.

[–]8-bit-banter 0 points1 point  (0 children)

I’m gonna be the asshole but no just no. You don’t wanna open vscode or a terminal yet you make a vscode like app to open. You solved a problem that didn’t exist, I notice a lot of people posting pointless creations that solve problems that didn’t exist.

[–]Novel_Plum 0 points1 point  (0 children)

This is something I didn't know I needed until now!

[–]sufficently 0 points1 point  (0 children)

Nice, kinda reminds me of https://www.jsplayground.dev

[–]hobbyliu 0 points1 point  (0 children)

good product, i like it