News for hackers. Stuff that matters.
Re:Ace – an embeddable code editor by humanrebar on Saturday November 03, 2018 @09:58AM (#18370169)
I would consider a new name.

Ace/ACE is maybe the most overused name or acronym out there. There are over a dozen entries in the Wikipedia disambiguation page in the computing subsection alone. And that doesn't count other domains and non-public projects.

https://en.m.wikipedia.org/wiki/Ace_(disambiguation)

Re:Ace – an embeddable code editor by derimagia on Saturday November 03, 2018 @11:46AM (#18370739)
It's not a new editor, it's been out for 8 years now. Lots of projects that use it. I get the concern though.
Re:Ace – an embeddable code editor by hnruss on Friday November 02, 2018 @11:01AM (#18363494)
I recently tried to embed Monaco but wound up with Ace instead due to issues using Monaco via requirejs. Was pleasantly surprised that Ace had all of the features we needed.
Re:Ace – an embeddable code editor by pmontra on Saturday November 03, 2018 @06:43AM (#18369574)
I tried to type in the snippet embedded in that page with Firefox Android. The cursor is about where I touched the screen but characters appear at the end of the line. The two locations move in sync when I use the arrow keys on my mobile keyboard.

That doesn't happen with the Etherpad editor. The demo at http://etherpad.org/ works well.

Re:Ace – an embeddable code editor by pandemicsyn on Saturday November 03, 2018 @12:47PM (#18371131)
Are there any good opensource WYSIWYG/drag and drop website builders? I've always been curious if folks like leadpages, wix, etc build their own from scratch or start with something off the shelf.
Re:Ace – an embeddable code editor by indigodaddy on Saturday November 03, 2018 @01:02PM (#18371232)
I think concrete5 is decent. Not sure if it's open source or not.
Re:Ace – an embeddable code editor by mettamage on Saturday November 03, 2018 @01:13PM (#18371289)
> concrete5 is an Open Source Content Management System (CMS)

source: https://www.concrete5.org/ -- https://github.com/concrete5

Re:Ace – an embeddable code editor by Immortalin on Saturday November 03, 2018 @06:00PM (#18372727)
GrapesJS is pretty decent.

https://grapesjs.com

Re:Ace – an embeddable code editor by js4ever on Friday November 02, 2018 @01:31PM (#18364961)
Ace is probably the fastest code editor, especially for large files. Features are far from monaco but you have to load only 200kb for ace vs 2.5mb for monaco
Re:Ace – an embeddable code editor by PurpleRamen on Saturday November 03, 2018 @08:30AM (#18369883)
Maybe it would make more sense to integrate those Editors then directly into the browser. Make it customizable and just create an API that can be used by some WebExtension, and deliver one out of the box. But at the end, a well adapted fast loading editor which is well integrated into the rest of the ecosystem might be some kind of next level for the Webstack-Platform.
Re:Ace – an embeddable code editor by egeozcan on Saturday November 03, 2018 @08:56AM (#18369967)
This would be too much added complexity for such a limited use case. Browsers are already approaching the complexity of an operating system and starting to bundle applications in them sounds like a weird thing to do when even operating systems are moving away from bundling.
Re:Ace – an embeddable code editor by espadrine on Saturday November 03, 2018 @10:25AM (#18370282)
More than that, the benefits would not be felt.

A PWA erases the cost of downloading the JS library, so that startup of the app would be the same as relying on having the same library bundled with the browser.

As far as latency goes, browsers won't beat what is already possible in HTML/CSS; or else, they can optimize the engine to match the performance and everyone benefits. That's why browsers' devtool editors are unsurprisingly in HTML/CSS (I believe Chrome/Firefox uses CodeMirror rather than Ace, but it works similarly).

Finally, functionality varies from one app to the other. One may want tabs to autocomplete; another may want them to input actual tabs; another, a number of spaces. Some may need multiple cursors, and some may need the editor's algorithms to not be too slow when the data to edit is compiled text (say, a single-line 100k minified JS file can crush the performance of your text editor if its string data structure is not ready).

There are no outstanding benefits to having a library be bundled in the browser.

Re:Ace – an embeddable code editor by guachesuedehack on Saturday November 03, 2018 @06:29AM (#18369530)
I believe ace has more features ?
Re:Ace – an embeddable code editor by skbly7 on Saturday November 03, 2018 @04:43PM (#18372375)
I am pretty much fan of Ace editor. It has worked perfectly over the years and have no nearby competitor when I compared back in 2015.

This was a project I made using ACE, "an online IDE (code, compile and run)" for competitive programmers: https://www.codechef.com/ide

Re:Ace – an embeddable code editor by flurdy on Saturday November 03, 2018 @07:50AM (#18369770)
How has the Amazon/AWS acquisition of C9 affected Ace? Is it abandonware or still very actively developed?
Re:Ace – an embeddable code editor by ryanlol on Saturday November 03, 2018 @07:57AM (#18369797)
Re:Ace – an embeddable code editor by megous on Saturday November 03, 2018 @01:34PM (#18371400)
Has the same problem like other web code editors. It does something weird with text selection and mouse click handling, so copy pasting using middle click doesn't work (in or out of the editor).
Re:Ace – an embeddable code editor by geokon on Saturday November 03, 2018 @07:05AM (#18369641)
What's the use-case for an editor embedded in a webpage? It doesn't seem to be able to live-edit the webpage code - so I guess I don't really get it..

It'd be nice is someone made a general text editor that was also embeddedable and could also live edit itself (or the program it's running in). The closest I've seen is Nightlight https://sekao.net/nightlight/

But it's not really "general purpose" like Emacs w/ Elisp and it's pretty Clojure specific

Re:Ace – an embeddable code editor by adaFrankly on Saturday November 03, 2018 @07:27AM (#18369709)
Long time reader here, I decided to create an account to reply to this.

We recently created a web interface for docker swarm as part of a university project, part of our requirements were that a compose file could be submitted via the web interface to create a new stack. We used ace for this and it worked quite nicely.

Re:Ace – an embeddable code editor by austincheney on Saturday November 03, 2018 @07:36AM (#18369735)
I maintain a code beautifier and parser. I use Ace to allow users to better read and understand their code as they use the features of my software. I also ensure that Ace is optional and can be turned off.

* https://prettydiff.com/

* parser - https://prettydiff.com/parse-framework/runtimes/browsertest....

By turning off Ace and turning it back on you can experience a huge change in user experience

Re:Ace – an embeddable code editor by rrdharan on Saturday November 03, 2018 @10:16AM (#18370238)
Dropbox Paper (https://paper.dropbox.com) uses a modified version of Ace. Paper is based on Hackpad (https://en.wikipedia.org/wiki/Hackpad) which used Ace:

https://github.com/dropbox/hackpad/tree/master/etherpad/src/...

Re:Ace – an embeddable code editor by tjhance on Saturday November 03, 2018 @01:16PM (#18371309)
Actually I think the 'ace' in Paper/Hackpad/Etherpad is a different thing called ace.
Re:Ace – an embeddable code editor by rrdharan on Friday November 16, 2018 @09:37PM (#18473588)
Hah, whoops - you’re right of course:

https://github.com/ether/pad/tree/master/infrastructure/ace

> ACE2 is EtherPad's editor, a content-editable-based rich text editor that supports IE6+, FF(2?/)3+, Safari(3?/)4+. It supports collaborative editing using operation transforms (easysync2), undo/redo, copy/paste.

> The name "ACE2" is because this is a rewrite of aiba's original content-editable AppJet Code Editor.

Re:Ace – an embeddable code editor by dbattaglia on Saturday November 03, 2018 @08:55AM (#18369966)
I've created a few systems that had web code editors on them. One was a CMS based on C# MVC Razor, the users were technical themselves so editing HTML and some light C# was better for them than a WYSIWYG editor. Another was a data ingest pipeline system that allowed customization of stages via Javascript. The scripts were stored in a database and edited via a web page (again, it was a technical audience and very small scripts so a web editor made sense).
Re:Ace – an embeddable code editor by makach on Friday November 02, 2018 @05:32AM (#18361675)
I love this editor. Used it for ages with c9!
Re:Ace – an embeddable code editor by aikah on Saturday November 03, 2018 @06:33AM (#18369542)
c9's online editor hasn't been updated for years, c9 team decided it would no longer open source their platform like they used to, ultimately not benefiting from potential volunteer's work who could have made c9 editor better. The proof of it is their online editor is stuck with an old Go version and doesn't even support Typescript, while some other online IDE just use Monaco, which is open source and better than Ace.
Re:Ace – an embeddable code editor by 4b11b4 on Saturday November 03, 2018 @12:45PM (#18371122)
Can't you embed a REPL? Seems like REPL.it will be the de-facto standard for most cases in the near future? Maybe it's too heavy for some applications? Why would you use anything other than REPL?
Re:Ace – an embeddable code editor by qnsi on Saturday November 03, 2018 @01:13PM (#18371291)
Isnt it different use case, though? If you want code executed - use replit, if you want editor use ACE.

But replit is not opensource, what would I use to have a repl on my site?

Re:Ace – an embeddable code editor by fiddlerwoaroof on Saturday November 03, 2018 @01:50PM (#18371486)