Hacker Newsnew | past | comments | ask | show | jobs | submit | aryx's commentslogin

A semgrep rule is not code; it does not run anything.


This is nice, but when your language will grow, why would you use that instead of lex/yacc? It's hard to beat a nice BNF grammar; In fact they felt the need to put the BNF grammar for the things they were parsing at the end of the README, because it's far more readable that those >* skip <* stuff.


A good thing about parser combinators like this is that they’re unambiguous by construction.

I also find them much more controllable and manageable in practice. I think that’s a common experience with imperative parsing in general, as it’s the approach used in I’d say the majority of industrial compilers.

> It's hard to beat a nice BNF grammar; In fact they felt the need to put the BNF grammar

The BNF grammar there is incomplete compared to their actual code, it’s just a sketch it doesn’t completely describe the accepted language, so hard to argue it’s better as you wouldn’t be able to do anything with it!


True the BNF grammar is easier to read but using lex/yacc doesn't mean easier to read: https://sites.ualberta.ca/dept/chemeng/AIX-43/share/man/info...

I much prefer parser combinators over anything else I've tried that generates code.


Most language parsers don't use lex/yacc. Recursive descent, PEG and similar are more common.


imo parser combinators are vastly easier to use, read and write than lex/yacc.


Great idea! Will do that.


How do I 3d print it with colors?


No color support, but you can export the map to an STL file with the function `save_3dprint()`. You can declare the maximum width/depth and it will scale the model to the size you've specified.


Looks indeed like a very developer-oriented OS. Then why still use CVS?



It's easy to forget nowadays but OpenBSD was ahead of the pack in providing anonymous CVS access at a time when getting the source meant only getting tars of the source for a release.


git is GPL, which BSD people tend not to like.

I think they're writing a git replacement under the BSD License, though I don't know how progress is going on that.


The author of the BSD version, Game of Trees (got), recently did a presentation at EuroBSDCon, and that video is online[1]. It focuses on security and has quite a bit of functionality, including some new things like having multiple working directories from the same repository and even checking out subdirectories from the repository. Looks like progress is going well. It doesn't do network/remote actions, but you can use the normal git binary for pushing and pulling.

[1] https://www.youtube.com/watch?v=PRIgeouw7-4


> having multiple working directories from the same repository

  $ git worktree add ../foo-develop develop


This comes up every year on misc@, so allow me to just link you to a thread about it: https://marc.info/?t=156380787000001&r=1&w=2

tl;dr, it's the devil they know and they need no feature that Git or Mercurial provides.


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

Search: