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

I faced this problem when designing my own notation [1].

Solved it by surrounding code with more ticks than maximum number of consecutive ticks inside its text. This allows arbitrary nesting.

Postgres solves it by using `$something$ whatever $something$` [2].

[1] https://github.com/PratikDeoghare/brashtag [2] https://www.postgresql.org/docs/current/sql-syntax-lexical.h...


> Solved it by surrounding code with more ticks than maximum number of consecutive ticks inside its text. This allows arbitrary nesting.

So, the same thing that Markdown does, as described in TFA?



I also use a single text file. I have developed my own notation to give it some structure [1]. I have a parser for the notation that creates tree of the document. Then I write various programs that walk the tree and do cool things. I have been happy(didn't feel like I needed anything else) with my system for some years now.

Checkout the video: https://youtu.be/CpcsOiETgxA

[1] https://github.com/PratikDeoghare/brashtag

Apologies for low quality of video and code. :)

-----------

Example file:

  ```
         [x*x for x in range(10)]
  ```
  #out{}

Now if notebook program is watching the file then it will send the code block to jupyter server and write results to `#out{}` "bag". And file will look like this.

  ```
         [x*x for x in range(10)]
  ```
  #out{
         ````````````````````````````````````````````        
         [0, 1, 4, 9, 16, 25, 36, 49, 64, 81]
         ````````````````````````````````````````````}


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

Search: