16 comments

  • somat22 hours ago
    On the topic of plain text databases, I have been playing around with wordnet(basically the backbone data structure of a thesaurus ) and while there are a lot of perfectly good libraries to handle the data I was having fun building my own. One interesting thing is that the original data format has the byte offset of every record and link baked into the data, this makes it trivial to avoid having to load the whole thing into memory and you can directly seek to the record in question thus making it a plain text database. Admittedly one only good for reading as writes would have to rebuild all the indexes.<p><a href="https:&#x2F;&#x2F;wordnet.princeton.edu&#x2F;documentation&#x2F;wndb5wn" rel="nofollow">https:&#x2F;&#x2F;wordnet.princeton.edu&#x2F;documentation&#x2F;wndb5wn</a><p>Honestly now days the whole thing can be trivially loaded into memory but back when the project was started this was much more of a concern, I do know that once I figured this out I started re writing my program to see how little memory I could use, It was a lot of fun to use access patterns other than &quot;load the whole thing into memory&quot;
    • mike_d10 hours ago
      Have a look at cdb. The more you read about its simplistic design the more you realize it is damn near the perfect solution for static and semi-static datasets. Fetches are either 1 or 2 disk reads depending on if the key exists.<p><a href="https:&#x2F;&#x2F;cdb.cr.yp.to&#x2F;" rel="nofollow">https:&#x2F;&#x2F;cdb.cr.yp.to&#x2F;</a>
  • emil-lp1 day ago
    <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=22153665">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=22153665</a> 505 points, 143 comments, 6 years ago<p><a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=31832564">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=31832564</a> 155 points, 52 comments, 3 years ago<p><a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=15302035">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=15302035</a> 105 points, 46 comments, 8 years ago
    • emil-lp1 day ago
      See also:<p><a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Recutils" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Recutils</a>
      • 171862744023 hours ago
        I would love to be able to do `info recutils` before installing, as for deciding whether I want to install it. Is there someway to point info at some online source? (Yes I know there are published HTML versions of Texinfo documents, but I really want to do that in my terminal without needing to locate a website.)
        • skydhash23 hours ago
          If you&#x27;re on Debian, you can do<p><pre><code> w3m `apt-cache show recutils | awk &#x27;&#x2F;Homepage&#x2F; { print $2 }&#x27;` </code></pre> Adapt the above to your system and its software
  • saulpw1 day ago
    I use the .rec format whenever I want a database maintained in git&#x2F;github. The format is ideal if you want reasonable data diffs.
    • emil-lp1 day ago
      What tool do you use to read&#x2F;write&#x2F;modify? Do you do it manually?
      • saulpw1 day ago
        I use VisiData[0] to view and modify in bulk. For simple error corrections I just edit the text file. For insertions as part of another process I&#x27;ll write a simple script that appends a block of test to one of the .rec files.<p>[0] <a href="https:&#x2F;&#x2F;visidata.org" rel="nofollow">https:&#x2F;&#x2F;visidata.org</a>
        • simonw1 day ago
          (saulpw is the author of VisiData, and it&#x27;s a marvelous piece of software.)
          • saulpw23 hours ago
            I guess I should have made that disclaimer myself, thanks for filling in the gap!
          • 171862744023 hours ago
            Thanks. Instantly installed as well. Free software is awesome (here: GNU, Linux, APT, and now recutils and visidata)!
        • sundarurfriend23 hours ago
          Has support for recfiles improved recently? I was overjoyed when I learnt that VisiData had support for recfiles since I&#x27;d been getting tired of editing recfiles manually and liked VisiData&#x27;s UI when working with CSVs and such.<p>But at least at the time (~2 years ago IIRC), the support was really basic, just basic record display, and most importantly, editing the parts VD didn&#x27;t understand lead to data loss. I don&#x27;t remember what I was trying to do - the error report I wrote with those details died with my old machine - but it wasn&#x27;t anything too complicated, just array fields and foreign keys I believe i.e. just using recfile features one step beyond a listing of `key: value` pairs. I gave up on recfiles as a whole after losing data a few times like this (since I hadn&#x27;t found any other suitable tool either).
          • VariousPrograms21 hours ago
            Last I used Visidata, it didn&#x27;t play nice with fields like %sort (they&#x27;d disappear if you re-saved the file) and if you had two fields with the same name in one record they&#x27;d get combined into a single field like &quot;Name[2]:&quot; when you re-saved. It might&#x27;ve also killed comments? I&#x27;m certainly not surprised it only has basic recfile support, because who use recfiles, but I&#x27;d be careful using VD with them for anything but viewing.
            • saulpw16 hours ago
              I haven&#x27;t put the work into supporting full round-tripping, so yes, at the moment it&#x27;s mostly useful for reading&#x2F;viewing. If someone files an issue that would likely go a long way towards getting better support!
        • nextaccountic13 hours ago
          The front page &quot;when you have .. but you need ..&quot; doesn&#x27;t list rec files as a format. What other obscure formats does this support? I can&#x27;t find a list
          • saulpw10 hours ago
            <a href="https:&#x2F;&#x2F;visidata.org&#x2F;formats" rel="nofollow">https:&#x2F;&#x2F;visidata.org&#x2F;formats</a><p>We keep that list up to date.
  • qubex23 hours ago
    Amazingly rugged design that somehow places man and machine on equal footing by throwing us back to the time of casette futurism.<p>Amazingly poor choice of logo.
    • nickpeterson23 hours ago
      It’s turtles all the way down.
      • philistine17 hours ago
        Those turtles are not highlighting a saying; they&#x27;re having sex. They should be at a 0 degree angle on top of one another to represent the saying.
        • aitchnyu16 hours ago
          The turtle lives &#x27;twixt plated decks<p>Which practically conceal its sex.<p>I think it clever of the turtle<p>In such a fix to be so fertile.
      • qubex23 hours ago
        Yeah they go down so deep they start appearing from above.
  • c7b17 hours ago
    I like plaintext database files, and this looks way more readable than csv. But what I&#x27;d find even more interesting than improved readability would be features like atomicity. There are many tools for joins and other basic operations on tables stored in various text formats, but the real gap to &#x27;proper&#x27; databases are ACID properties.
  • ndegruchy1 day ago
    I love recutils. The database format is simple enough, it has a bunch of options for constraints, and it has Bash integration and a great Emacs mode to search, edit and verify the integrity of the database.<p>Sure, it&#x27;s not as fast as SQLite or bigger systems, but often it&#x27;s enough for smaller projects.
  • wuming220 hours ago
    With recutils csv2rec I have my invoices list.<p>With recutils recsel | recfmt -f template.fodt I have my invoices.<p>soffice and curl to generate .pdf s and email them off.<p>With recutils recset I have my invoices status updated. Done.
  • binaryturtle1 day ago
    For those who get blocked by gnu.org with a 403 (older Firefox) or an even sillier &quot;Too Many Requests&quot; error (older Safari) need to override their user agents strings to &quot;curl&quot; to make the site load again.
    • userbinator22 hours ago
      <i>need to override their user agents strings to &quot;curl&quot; to make the site load again.</i><p>That seems very on-brand for them, as curl&#x27;s default UA gets blocked by most sites.
  • setheron1 day ago
    In 2010 I remember people being very proficient with this at Amazon.<p>I really enjoying the toolset to query logs etc...<p>Good memories.
  • novoreorx19 hours ago
    Reminds me of <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=45458455">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=45458455</a><p>In the AI era, the rec file seems to be a great choice for formatting text that will be feed into LLMs. Imagine converting an HTML table into a RAG file, the context will be much clearer.
    • anthk11 hours ago
      How avoiding LLM&#x27;s altogether and using Emacs with Recutils for instance?
  • lloydatkinson23 hours ago
    Tortoise sex is a bold choice for a logo, but certainly memorable.
  • 171862744023 hours ago
    Thanks for the submission. I had no idea that existed, but I am definitely going to use this now.
  • adius21 hours ago
    As a similar, yet more powerful data format I started using Nickel (<a href="https:&#x2F;&#x2F;nickel-lang.org" rel="nofollow">https:&#x2F;&#x2F;nickel-lang.org</a>). It has very sophisticated typing and transformation features. Highly recommended!
    • augusto-moura21 hours ago
      rec files are not configuration, they are just a very simple and basic way of representing tabular data, very similar to a CSV. But it uses lines to separate columns and records, making it much simpler to add and edit records by hand, differently from CSV
    • casparvitch21 hours ago
      recutils is aimed at database rather than config use-cases
  • superxpro125 hours ago
    2 turtles fucking is certainly a logo choice...
  • bsndjdkd1 day ago
    [flagged]
    • justinator1 day ago
      Leave Fred and George alone! They love each other.
    • ahoka1 day ago
      I thought you was kidding first…
    • dontdoxxme1 day ago
      This among other things is why the GNU project as a whole has little credibility left.
      • 171862744023 hours ago
        Or &quot;modern&quot; people are too detached from reality.<p>Procreation of turtles (which this doesn&#x27;t even show, there are just two turtles and turtles love to just walk on things including other turtles) is nothing secret.
      • F3nd022 hours ago
        Taste in logos—among the most dependable of measures for credibility!
    • drpixie21 hours ago
      As Mr Pratchett says - &quot;it&#x27;s turtles all the way down&quot;.
    • debo_1 day ago
      &quot;Mommy, where do plaintext databases come from?&quot;<p>&quot;You see son, when a boy turtle and a girl turtle love each other very much...&quot;
  • nrclark17 hours ago
    It&#x27;s a bummer that the library and utilities are GPLv3 - really limits adoption, because it means that product developers can&#x27;t build it into the kinds of small embedded Linux systems where it would really shine.
    • happymellon16 hours ago
      Have you tried reaching out to enquire if you could buy a version that was at least LGPL or proprietary licenced for you to bundle in your closed source application?<p>Or was this just a statement about being entitled to other peoples work and closing it up?
    • 171862744014 hours ago
      &gt; product developers can&#x27;t build it into the kinds of small embedded Linux systems<p>Are you sure about that? Because if you don&#x27;t ship binaries, but whole devices, than only AGPL might demand what you think GPL does. Also I don&#x27;t see what the issue is with &quot;distributing&quot; software from somebody else. If you designed things modular, the GPL software can be updated without the user needing to touch any of your proprietary code.
    • anthk11 hours ago
      GPL doesn&#x27;t extend to I&#x2F;O.