Lurker News

Comments (229) 60 threads

Earlier comments
minikomi3 replies#
Wow, now we can write pages like

     {
      "content": [
        ["html", {},
         [["head", {}, []],
          ["body", {},
           [["h1", { id: "main-header" }, [
               "Welcome to my",
               ["span", { class: "red-text" },
                ["PAGE"]]]],
            ["h2", { id: "sub-header" }, [
                "It's so cool.",
                ["br", {}, nil],
                "Don't you think?"]]]]]]]};
gpnt1 reply#
This is actually the exact opposite of why I have created WDR. The JSON is supposed to be only pure data. All the markup should be inside the render.
escherize#
We do basically this. [0][1]

[0] escherize.com/w/hiccup.space
[1] escherize.com/w/cljsfiddle

spondyl5 replies#
You know, I once had a resume powered by JSON. It was rendered to a PDF (and HTML) but the syntax was backed by JSON. This was years back and I shudder to even recall the idea.

I didn't create the project mind you, it was some NPM package back when I was a fresh 'un who didn't have thoughts on using a billion subdependencies
Anyway, I was nearly broke and when I went to apply for the benefit, I was asked for my resume as a word doc
Clearly, you can imagine how this conversation went down but I had brought a PDF on a USB which I offered to print out instead.
The clerk refused to let me plug in my USB for fear I was going to "hack" her and the HTML page, saving as a PDF with Chrome, took some convincing to ask her to navigate to so it could be printed
I guess the lesson here is that if you expect to run out of funds, make sure you have your most essential documents stored via Microsoft Word?

vlovich1231 reply#
I’ve generally saved my HTML resume to PDF without any major issues as a professional SWE for the past ~15 years or so, although I’ve been dealing primarily with SV tech companies and not government agencies in the UK.

Microsoft Word is fine too but I would still use something like PDF for export and sharing (still not sure how Microsoft Word solves the usb problem for you).
Generally though I like something text-like that I can revision control more easily/edit in vim. Maybe I’ll switch to something like pan doc going forward (then you can generate word if they really want it).

spondyl#
Pandoc can even generate Word docs?! Well dang
throwaway22451 reply#
This seems more about putting barriers up to make it difficult for people to collect benefits.

If you had this experience again, there would likely be some other barrier.

spondyl#
The real head scratcher is that after all that, they said "Ah, you have rent of $160/week? We're glad to offer you $110. Perhaps I misunderstood but paying rent is very much a binary situation so I wondered what was even the point of such a system
rewtraw1 reply#
Probably https://jsonresume.org

I have my resume defined using this schema, which is handy because it's supported enough that every few years when I actually need to update it, I can find a website (such as https://resumake.io) where I can just copy in the JSON and get a nicely formatted PDF out of it.

spondyl#
That's the one
gpvos#
LibreOffice and MS Word both can open PDFs, although maybe this happened before they could.
trevordixon#
My resume is an XML document and a stylesheet I feed to Prince (https://www.princexml.com/), which is an amazing piece of software. I also used it once to generate a book I had printed by some on-demand printing company. I got great output out of it.
quineoa3 replies#
Isn't Reddit like this, in a way? You can append ".json" at the end and get the data for a page. Others can build their own UI on top of this, if they don't prefer the first party representation.

https://www.reddit.com/r/pics/.json

zdragnar#
If you go back to the web as a bunch of file servers, where every URL ended in the extension type of the document you wanted, this is what you get. Then MVC frameworks said "hey, if the URL represents some semantic aspect of the View, we can show off the power of MVC by letting users swap out the view by changing the extension!" And voila, some.com/url.html for HTML and some.com/url.xml for XML and, later, some.com/url.json for JSON

Most of the big MVC frameworks offered this out of the box at some point, which made life easier before dedicated RESTful APIs became a thing.

Felk#
The same could be achieved by having the server return different views of the data for different HTTP Accept headers, although not as convenient as appending a file extension. I once did this to interpolate REST API responses into dedicated HTML templates if requested with Accept: text/html, which made exploring the API in the browser more enjoyable.
gpnt#
Yeah, it is kind the same, but with the same page.

Load more comments