Hacker News new | past | comments | ask | show | jobs | submit login

I'm always amazed by Marijn's brilliance (Author of Lezer, CodeMirror and the awesome ProseMirror toolkit)

The level of depth he dives into to perfect his projects is insane. For example, lezer is a parser generator( which by itself is not a trivial feat with novel ideas like incremental computations applied to parsing) to power his mainstream project which is CodeMirror.

Like this Prosemirror too has some insane levels of engineering underneath married with thoughtful architectural decisions.

Apparently, a big fan of his works.




He's also the author of a really great JavaScript book: https://eloquentjavascript.net/ - which he's been intermittently updating since 2007!


He's incredibly responsive too. He just answered my question about an hour after it was asked... on a Sunday evening.

Slightly off topic; is anyone aware of any Lezer grammar for regex? I've not been able to find any in the FOSS world. I suspect Regex101 has one, bit it's sadly closed source.


Yeah, this happened to us too a couple of times. Once, we asked for a clarification and he took it as a sensible requirement, made the changes and took it to master in just over an evening.

The next day we just had to update our package to the latest version and marvel at his response time.


Have you checked the js grammar? It has a regex grammar, though not sure if that's what you are looking for



Massively agree. Code mirror 5 was excellent. Code mirror 6 was a big enough improvement to justify the upgrade. I've used it as part of 2 large projects and it's handled every expanding use case I've needed it to. It supports themes, sql,js and 2 weeks ago I used its diff functionality. Really great library I can fully recommend.


Code mirror 6 is super hard to use though unless you are a front end expert. Code mirror 5 was basically plug and play. Code mirror 6 is a box of Legos and you are responsible to build and bundle your own editor from scratch.


I have a project that's intended to make Code Mirror 6 as ready to use as any HTML tag: https://github.com/justinfagnani/codemirror-elements

You can put a basic code editor on your page like:

    <cm-editor></cm-editor>
and drop in themes and modes like:

    <cm-editor>
      <cm-lang-javascript typescript></cm-lang-javascript>
      <cm-theme-one-dark></cm-theme-one-dark>
    </cm-editor>
This works in plain HTML or any framework.


Looking at this now. Thanks!

How about a dist folder with a plain js file (or a js file and a css file) that you can load directly?

I am sick unto death of Node and all its associates.


The npm package has the pre-built files: https://www.npmjs.com/package/codemirror-elements

I publish to npm because 1) Package managers are a fabulous idea. They're an easy way to download a package and it's dependencies, and update them over time. 2) it's not a good idea to push build artifacts to your repo, 3) This depends on CodeMirror, which is published to npm. Otherwise I would have to provide it too. That's too much work. 4) you don't need to be a Node developer to use npm.


Not as extensive as the previous poster. I wrote a small custom component wrapper a while back: https://github.com/flawiddsouza/code-mirror-custom-element.


> Code mirror 6 is a box of Legos and you are responsible to build and bundle your own editor from scratch.

Yep. Let me stress that there's absolutely nothing wrong with this if that's what you want to do -- but it's less than optimal for the person who just wants to add a JavaScript file for the editor, with maybe a JS/CSS combo to support syntax highlighting for a specific language. Codemirror 5 was like that, pretty much.

You basically have to set up a whole independent build and packaging system to configure Codemirror 6, and a lot of people just don't want to deal with that.

It's a pity it's the only JavaScript-based editor that works at all reliably on mobile (I would be delighted to be proven wrong about this).


That's why I'm staying with CodeMirror 5 too.

It seems like for the past few years many high profile JS projects increased the complexity of using their software for (to me) unclear benefits.





Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: