News for hackers. Stuff that matters.
Re:Show HN: Plain Text Cryptocurrency Prices by tiborsaas on Tuesday June 14, 2022 @11:28AM (#31740901)
I get randomly HTML and ASCII in the terminal, otherwise cool product.

It would be nice to configure a list of coins to be displayed. Something like:

    https://plaintextco.in/collection/btc+tezos+near
Also, you could reduce the HTML size significantly by using <i> instead of <span> and create a classnames for the colors.
Re:Show HN: Plain Text Cryptocurrency Prices by guillaumec on Tuesday June 14, 2022 @12:30PM (#31741843)
Yes, since I got too many requests from HN, I had to enable the CDN. I didn't realize it would cache both html and terminal request together. I tried setting "Vary: User-Agent" but it didn't work. You can add: "?term=true" to make it work in terminal for now.
Re:Show HN: Plain Text Cryptocurrency Prices by weird-eye-issue on Wednesday June 15, 2022 @01:18AM (#31749390)
I think Vary: Accept-Encoding or similar is the solution for this but not sure
Re:Show HN: Plain Text Cryptocurrency Prices by alainchabat on Tuesday June 14, 2022 @11:33AM (#31741001)
looks like OP implemented it ( https://plaintextco.in/about ) :

   https://plaintextco.in/?ids=bitcoin,ethereum,mina-protocol,avalanche-2
Re:Show HN: Plain Text Cryptocurrency Prices by tiborsaas on Tuesday June 14, 2022 @11:41AM (#31741111)
oh cool, it's now ready for bookmarking :)
Re:Show HN: Plain Text Cryptocurrency Prices by danuker on Tuesday June 14, 2022 @10:36AM (#31740169)
This is awesome! I will be able to check the prices without spinning up my old laptop's fan.

My preference for time is much longer-term. Trading too often can lead to ruin due to transaction fees (and/or emotion).

I'd use the 1 day, 30 day, and 365 day price changes instead of 1h, 24h, 7d.

Another small issue: I can't use autoscroll in Firefox because the whole page width is a link.

Re:Show HN: Plain Text Cryptocurrency Prices by lazyvar on Tuesday June 14, 2022 @11:04AM (#31740567)
Some small feedback if I may: Could you separate the link and the text on the main page? My first thought was: "This isn't text. I can't highlight or copy anything. It's actually the opposite of what the title says." But everything was as advertised when viewing an actual coin.

Cool site! Cheers!

Re:Show HN: Plain Text Cryptocurrency Prices by guillaumec on Tuesday June 14, 2022 @11:06AM (#31740580)
You are probably right. I should also probably add a link to a 'true' plain text version that returns a pure txt.
Re:Show HN: Plain Text Cryptocurrency Prices by memorable on Tuesday June 14, 2022 @11:13AM (#31740671)
Re:Show HN: Plain Text Cryptocurrency Prices by GabrielStarks on Tuesday June 14, 2022 @02:43PM (#31744016)
Hi! I want say that Social media marketing is a best way for promotion product, service, your businesses or site… And this is a good strategy and excellent tool for attracting the attention of potential customers or for getting popular in social media networks. I will share professional site for safe social media marketing. If you want take high positions in the ranking, get organic traffic or be popular in social media networks… Just check this site, i think it will be very useful. https://get-accs.com/
Re:Show HN: Plain Text Cryptocurrency Prices by _eht on Tuesday June 14, 2022 @10:05AM (#31739689)
Plaintext and ascii art are in this year and that’s cool to me. Nice work.
Re:Show HN: Plain Text Cryptocurrency Prices by olalonde on Tuesday June 14, 2022 @10:25AM (#31739992)
Pretty cool, I noticed it works both in the browser and command line. I suppose you are using the User-Agent header to detect which version to serve? Which library did you use for the interface?
Re:Show HN: Plain Text Cryptocurrency Prices by guillaumec on Tuesday June 14, 2022 @10:39AM (#31740199)
It's all done by hand in go. Yes it uses the user agent to guess if the request comes from a terminal.
Re:Show HN: Plain Text Cryptocurrency Prices by bluetidepro on Tuesday June 14, 2022 @10:25AM (#31739989)
HN hug of death, I assume.
Re:Show HN: Plain Text Cryptocurrency Prices by matthewcford on Tuesday June 14, 2022 @10:33AM (#31740134)
I assumed the prices were 0, hence the empty webpage.
Re:Show HN: Plain Text Cryptocurrency Prices by jokestir on Tuesday June 14, 2022 @09:31AM (#31739176)
That's awesome.

Some things that can be improved:

- The UI is left justified on my mobile browser. It will look better if it is centered.

- The font is too small. Perhaps you could increase font size so users don't have to zoom in.

Also, did you a framework to generate plaintext front-end or is it hand crafted?

Re:Show HN: Plain Text Cryptocurrency Prices by guillaumec on Tuesday June 14, 2022 @09:47AM (#31739444)
Thanks for the comment! I wanted to keep the html and css as simple as possible so I didn't put much layout. If it gets traction I will improve that. Same thing for the font.

It's all hand crafted. My first time using golang so the code is probably not as efficient as it could be.

Re:Show HN: Plain Text Cryptocurrency Prices by 1337shadow on Tuesday June 14, 2022 @10:22AM (#31739954)
Really? It even renders ascii and colors properly in a terminal with curl !!!

\xe2\x94\x82\n\xe2\x94\x94\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x98\n

Re:Show HN: Plain Text Cryptocurrency Prices by KyleBerezin on Tuesday June 14, 2022 @10:27AM (#31740030)
Firefox 101.0.1 on Windows didn't seem to render it correctly. I was going to compare it to chrome but then the server died. Very cool page though.

Update: the server is back up and it looks fine on Firefox now. false alarm

Re:Show HN: Plain Text Cryptocurrency Prices by rabuse on Tuesday June 14, 2022 @10:24AM (#31739986)
All I see is a white page.
Re:Show HN: Plain Text Cryptocurrency Prices by memorable on Tuesday June 14, 2022 @10:36AM (#31740170)
Same here. Hug of death.
Re:Show HN: Plain Text Cryptocurrency Prices by weird-eye-issue on Tuesday June 14, 2022 @10:36AM (#31740177)
Is this white page some sort of satire or is it down?
Re:Show HN: Plain Text Cryptocurrency Prices by memorable on Tuesday June 14, 2022 @11:12AM (#31740667)
It's down ATM. I found a Wayback Machine snapshot for proof.

https://web.archive.org/web/20220614131126/https://plaintext...

Re:Show HN: Plain Text Cryptocurrency Prices by paulnpace on Tuesday June 14, 2022 @10:51AM (#31740381)
Interesting. I wasn't aware that you could use a Cloudflare IP address along with a different name server.
Re:Show HN: Plain Text Cryptocurrency Prices by lxgr on Tuesday June 14, 2022 @11:08AM (#31740613)
Maybe they're using something like an ALIAS record instead of a CNAME setup?
Re:Show HN: Plain Text Cryptocurrency Prices by captn3m0 on Tuesday June 14, 2022 @10:56AM (#31740449)
Cloudflare Worker perhaps
Re:Show HN: Plain Text Cryptocurrency Prices by rkagerer on Wednesday June 15, 2022 @10:38AM (#31753554)
Oh. From the headline I was hoping for something easily parseable.
Re:Show HN: Plain Text Cryptocurrency Prices by giantrobot on Tuesday June 14, 2022 @10:43AM (#31740251)
I got a blank page...did crypto prices drop that much today?
Re:Show HN: Plain Text Cryptocurrency Prices by julianeon on Tuesday June 14, 2022 @10:53AM (#31740411)
This is really nice. Great work.
Re:Show HN: Plain Text Cryptocurrency Prices by sodality2 on Tuesday June 14, 2022 @10:10AM (#31739760)
Getting a 504 :(
Re:Show HN: Plain Text Cryptocurrency Prices by Retr0id on Tuesday June 14, 2022 @10:15AM (#31739843)
An intriguing failure mode (response body seems truncated)

  $ curl -i https://plaintextco.in/
  HTTP/2 504 
  date: Tue, 14 Jun 2022 14:13:44 GMT
  [more headers]
  cf-ray: 71b3ab17fc7254d5-MAN
  
        <!DOCTYPE htm
Re:Show HN: Plain Text Cryptocurrency Prices by guillaumec on Tuesday June 14, 2022 @10:18AM (#31739886)
I think the server code has a concurrent access bug that makes it crash in the middle of a request. Unfortunately due to the current charge I can't even restart it at the moment.
Re:Show HN: Plain Text Cryptocurrency Prices by guillaumec on Tuesday June 14, 2022 @10:20AM (#31739922)
Back online for now... please be gentle ;)
Re:Show HN: Plain Text Cryptocurrency Prices by rapiz on Tuesday June 14, 2022 @10:37AM (#31740182)
Got this just now (2022-06-14T22:36:26+08:00)
Re:Show HN: Plain Text Cryptocurrency Prices by guillaumec on Tuesday June 14, 2022 @10:12AM (#31739791)
Yeah the server is not handling the load at the moment... I am trying to restart it.
Re:Show HN: Plain Text Cryptocurrency Prices by KyleBerezin on Tuesday June 14, 2022 @10:25AM (#31739990)
The curse of Hacker News attention
Re:Show HN: Plain Text Cryptocurrency Prices by guillaumec on Tuesday June 14, 2022 @10:30AM (#31740090)
Well, I should have tested a bit more before posting.
Re:Show HN: Plain Text Cryptocurrency Prices by nominusllc on Tuesday June 14, 2022 @10:47AM (#31740315)
Is the source posted somewhere? Maybe we can help
Re:Show HN: Plain Text Cryptocurrency Prices by guillaumec on Tuesday June 14, 2022 @10:57AM (#31740458)
Not at the moment, this was a week end project, and the code is quite horrible. But yes I should probably put it online and get advise.
Re:Show HN: Plain Text Cryptocurrency Prices by nominusllc on Tuesday June 14, 2022 @12:08PM (#31741469)
pas grave, post it :)
Re:Show HN: Plain Text Cryptocurrency Prices by j_leboulanger on Tuesday June 14, 2022 @10:46AM (#31740301)
Here is an extract of what happens in terminal :

curl https://plaintextco.in/coins/bitcoin

<!DOCTYPE html> <title></title> <meta name="description" content="Plain text cryptocurrency prices"> <style> @font-face { font-family: 'dejavu-sans-mono'; src: url('/static/DejaVuSansMono.ttf') format('truetype'); } * { font-family: 'dejavu-sans-mono'; font-size: small; line-height: 120%; } </style>

<h1>plaintextco.in</h1>

<h1></h1>

<pre> Bitcoin (BTC)

     <span style="color: #f7931a;"></span><span style="color: #f7931a;"></span><span style="color: #fe971a;background-color: #f7931a;"></span><span style="color: #fe971a;background-color: #f7931a;"></span><span style="color: #fc961a;background-color: #f7931a;"></span><span style="color: #fc961a;background-color: #f7931a;"></span><span style="color: #fd971a;background-color: #f7931a;"></span><span style="color: #ff971a;background-color: #f7931a;"></span><span style="color: #f7931a;"></span><span style="color: #f7931a;"></span>      Price                    $22,183
  <span style="color: #f7931a;"></span><span style="color: #f7931a;background-color: #f7931a;"></span><span style="color: #fd971a;background-color: #f7931a;"></span><span style="color: #f7931a;background-color: #ff9a1b;"></span><span style="color: #f79319;background-color: #fa941a;"></span><span style="color: #f79217;background-color: #f7931a;"></span><span style="color: #f79116;background-color: #f7931a;"></span><span style="color: #f9a239;background-color: #f79116;"></span><span style="color: #f9a53f;ba

It's impossible to read :(
Re:Show HN: Plain Text Cryptocurrency Prices by jasonjayr on Tuesday June 14, 2022 @10:56AM (#31740447)
Elinks in a terminal with 256 color + utf-8 renders it pretty decently.

https://imgur.com/a/NPsN5N5

Re:Show HN: Plain Text Cryptocurrency Prices by guillaumec on Tuesday June 14, 2022 @10:48AM (#31740324)
Actually it also supports a black and white mode using only utf8 characters. I haven't exposed it yet though.
Re:Show HN: Plain Text Cryptocurrency Prices by paulnpace on Tuesday June 14, 2022 @10:55AM (#31740436)
Lynx looks great.
Re:Show HN: Plain Text Cryptocurrency Prices by izzydata on Tuesday June 14, 2022 @11:09AM (#31740626)
This is what I get when trying it on any terminal on Windows.
Re:Show HN: Plain Text Cryptocurrency Prices by JakDrako on Tuesday June 14, 2022 @02:35PM (#31743885)
I got something readable on Windows by calling it from the "Git bash" terminal (installs with git)