TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: BeautifulCode, generate beautiful images of your source code

54 pointsby rahulpadalkarover 4 years ago

25 comments

ditnover 4 years ago
This seems like a pretty straight clone of <a href="https:&#x2F;&#x2F;carbon.now.sh&#x2F;" rel="nofollow">https:&#x2F;&#x2F;carbon.now.sh&#x2F;</a>
评论 #25286514 未加载
评论 #25286824 未加载
评论 #25287116 未加载
评论 #25287111 未加载
评论 #25289403 未加载
tpoacherover 4 years ago
This is a minor pet peeve of mine so apologies if I come across as rude, but the word &#x27;codes&#x27; is a linguistic error (particularly prominent in indian coders for some reason, but also common elsewhere).<p>The word &#x27;code&#x27; when applied to computer source code has no plural.<p>This is in contrast to other uses where it <i>does</i> have a plural, like in &quot;Nuclear Codes&quot;, or &quot;Codes of conduct&quot;. In this capacity, it refers to codes as a collection of &#x27;individual code items&#x27; (i.e. symbolic representations that map to practical functionality) that can be thought of as countable items in a bag.<p>However, when used to denote things like source code, or morse code, it is an uncountable singular noun. It is wrong to say &quot;I sent a message using Morse Codes&quot;. In this sense, &#x27;code&#x27; is similar to sugar, fruit, fish, etc. Note that sugar, fruit, and fish also have this distinction that the word has a plural form, but the plural is only used to denote &#x27;different varieties of&#x27;, as opposed to a large number of sugar molecules, a large number of otherwise identical fruit items in a basket, or a large number of individual fish of the same type.<p>Obviously you can&#x27;t change the website now just to correct a silly grammar mistake, since that would cost money, but ... arrrgh.<p>Other words often mistakenly used in the plural when they shouldn&#x27;t: - Advice: Let me give you some advice (not some advices) - Practice: You need more practice (not practices) - Exercise: You lack exercise (not exercises - &#x27;exercises&#x27; means a collection of individual exercise items, not an increased quantity of exercise) - Text: You need to add more text (not texts - &#x27;texts&#x27; means a number of text items, e.g. &quot;this appears in many texts&quot;)<p>etc.<p>&lt;&#x2F;rant&gt;
评论 #25292253 未加载
评论 #25290240 未加载
bobnamobover 4 years ago
Whichever syntax highlighter they&#x27;re using doesn&#x27;t handle decent chunks of more modern C++ syntax (trailing return types, lambda definitions).<p>Honestly not all that surprised given it refers to C++ as &quot;C and C++&quot;...<p>The elsewise mentioned <a href="https:&#x2F;&#x2F;carbon.now.sh&#x2F;" rel="nofollow">https:&#x2F;&#x2F;carbon.now.sh&#x2F;</a> seems to handle this just fine.
评论 #25286738 未加载
franky47over 4 years ago
I was using carbon.sh to generate those images, but recently I&#x27;ve switched to CodeSnap [1], a VS Code extension that does the same thing without leaving the editor.<p>[1] <a href="https:&#x2F;&#x2F;marketplace.visualstudio.com&#x2F;items?itemName=adpyke.codesnap" rel="nofollow">https:&#x2F;&#x2F;marketplace.visualstudio.com&#x2F;items?itemName=adpyke.c...</a>
评论 #25287359 未加载
mklover 4 years ago
I don&#x27;t understand. Why not just take a screenshot of that bit of code? That way you get the proper font and syntax highlighting, and don&#x27;t get the unnecessary fake window and background. If it&#x27;s too small for a slide or whatever, just zoom in first.<p>Also, &quot;Codes&quot; is incorrect in this context, and should be &quot;Code&quot;.
评论 #25287872 未加载
评论 #25289801 未加载
verdvermover 4 years ago
I would prefer a format that can be copied as text. Images of code are frustrating...
评论 #25286443 未加载
评论 #25286930 未加载
评论 #25286357 未加载
评论 #25286199 未加载
ChrisRRover 4 years ago
I can&#x27;t explain why, but i find it annoying when anyone refers to source code as &quot;codes&quot;
评论 #25287453 未加载
评论 #25289906 未加载
marmadukeover 4 years ago
The line numbers do not line up with the lines of code?
评论 #25286189 未加载
machinelaboover 4 years ago
I can understand the syntax highlighting, but why add a window around it and some buttons? What&#x27;s the value proposition? Aesthetics?
评论 #25287900 未加载
airstrikeover 4 years ago
I do feel this is missing a few features<p>* Missing Input Mono :(<p>* Assumes I&#x27;m on a Mac (spoiler alert, I&#x27;m not)<p>* Fixed size window<p>* No adjustable line height
m3adowover 4 years ago
I expected something similar to Instacode (<a href="http:&#x2F;&#x2F;instaco.de&#x2F;" rel="nofollow">http:&#x2F;&#x2F;instaco.de&#x2F;</a>) with more options and filters and was a bit disappointed. I used Instacode a couple of times for nice images in otherwise dry blog entries.
daviesgeekover 4 years ago
I’d love to see this be able to handle larger blocks of code. I have a particularly bad poorly bit of code I’d love to print out and keep around XD
oneeyedpigeonover 4 years ago
&quot;Hide&#x2F;show...&quot; is a weird label for those checkboxes at the bottom, especially since they work in completely opposite ways.
FraKtusover 4 years ago
Editing the code is weird with Safari 13, the pointer was a few char off. Exporting PNG does not work.
bobbydreamerover 4 years ago
What would be useful is an api like send in whole code as base64 and it responds with base64 png.
bArrayover 4 years ago
Is there an offline version of this?
ChrisMarshallNYover 4 years ago
Site doesn’t scroll on my iPad. I’ll check it out on my computer in a while.
alpbover 4 years ago
You might want to render 2x, the output PNG is quite pixelated.
etaioinshrdluover 4 years ago
Oh! So this is where the images on twitter are coming from :)
Nginx487over 4 years ago
Needless to say, the code itself should be beautiful.
grbiover 4 years ago
I&#x27;m looking the same for screen capture.
评论 #25286942 未加载
keyleover 4 years ago
The font list is... very impressive.
pacifikaover 4 years ago
Just enough lines for the PHPDoc.
popup21over 4 years ago
PrtScn<p>...then share
tsjqover 4 years ago
Ah! The &#x27;Fair and Lovely&#x27; for software programs .