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

There are some valid use cases here, I hope this will not affect users of wopr (https://github.com/yaronn/wopr).



That's interesting, but not very well-suited to real-time dashboards, is it? Seems to be for one-offs.


curling the markup is not for realtime. sometimes you can get away with curling in a loop with some sleep, and depending on the latency / scale you will get the same effect. however blessed-contrib can also be used as a server side component where clients curl for its endpoint (which is different than curling a static markup). that way it can return a live stream of data. you would use the same approach as https://github.com/yaronn/wopr/blob/master/server/server.js#... where your present method implementation will run in some loop / timeout and keep sending data (by calling screen.render).


To visualize weather in the terminal you can also use:

$> a=$(curl -Ls "bit.ly/1OuRPDJ"); curl --data "$a" "tty.zone?cols=${COLUMNS}"

(via https://github.com/yaronn/wopr)


That's a shortcut for the wopr page


one use case is when ssh-ing machines you can see visual reports rather than text and numbers (think cpu metrics or app specific).


Another example is US weather map:

$> a=$(curl -Ls "bit.ly/1OuRPDJ"); curl --data "$a" "tty.zone?cols=${COLUMNS}"


this uses xterm, so it's more accessible to most users than the other alternatives you mentioned. also note wopr is not just about the graphs (like https://github.com/yaronn/blessed-contrib) but also about having a declarative format, and even consuming it with curl.


Hi everyone, I am the author. Feel free to ask me anything or come up with suggestions!


Very cool! It got me daydreaming about an alternative to html designed from the ground up to minimize webpage bloat and avoid tracking (1x1 pixel gifs, etc.)


Why do you decided to use XML as the basic format?


XML is a standard format for markup (e.g. HTML). When XML is used where it shouldn't (object serialization) it adds complexity. Here it signals that creating a report is as simple (or at least as standard) as creating HTML. What other format you had in mind?


>XML is a standard format for markup (e.g. HTML).

XHTML is maybe the most hated incarnation of HTML, and is no longer encouraged.


You can still write xml-compliant HTML; whether it's called XHTML or not is splitting hairs. You still get all the benefits of a very rich toolset for document preparation. I work on a site that makes heavy use of xslt and works with xml-compliant HTML as input/output.


Maybe "SGML" would have been a better descriptor?


XML and XHTML are two different things. Related, but different. XHTML is no longer encouraged for website markup, that part is true too. That does not mean that XML is no longer encouraged.


[deleted]


IMO JSON is less readable for this kind of document. XML is more explicit (at the cost of being chatty) but it's actually good for markup. For example nesting is easier to visually manage with XML due to tooling and explicitness of closing tags.

JSON is good for smaller objects you normally use during coding where you do not want the format to get in your way. Here I actually do want a very explicit format as it's the main thing.


Greetings, Professor Falken.


Shutdownify github page now leads to 404. You would think they should know better than that. Stay classy, S9Y.


True, thought in some parts of the world it's not sabbath anymore


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

Search: