Earlier quoted context omitted.
I didn't know there's an editor integration to Carbon. Is there a specific extension for VScode?
yes - https://marketplace.visualstudio.com/items?itemName=ericadam...
Show HN: Ray.so – Create images of your code
61–70 of 129 posts
Re: Show HN: Ray.so – Create images of your code
#62If you're looking for this, but with an API, I built https://sourcecodeshots.com to power syntax highlighting and Open Graph images of code for https://essay.dev . I initially used carbon.now.sh, but they don't have an API, and the community-provided API is pretty slow because it uses a headless browser to generate the image. Source Code Shots uses VSCode's syntax-highlighting engine, so the highlighting is about as…
Since I suspect the cause here is copy-pasting off of an algorithms/code gallery, my guess is that there are examples across other languages. I checked everything I feel idiomatically comfortable enough and the others all seemed fine, but there are a lot of options here so who knows.
Re: Show HN: Ray.so – Create images of your code
#63Re: Show HN: Ray.so – Create images of your code
#64The only missing feature I really need is Elixir syntax support (even though Ruby works for most examples)
Re: Show HN: Ray.so – Create images of your code
#65Earlier quoted context omitted.
Yeah, we wanted to add an API at some point and also provide a deeper integration with Raycast. What would you like to build with the API?
Say I have code snippets I want to include in a Jekyll blog for example. I could call your API from a pipeline process, store the images and link them from the posts. A plugin would be deeper integration, but an API would just work and would be great already. I guess a similar process could work for other blogging platforms.
Re: Show HN: Ray.so – Create images of your code
#66If you're looking for this, but with an API, I built https://sourcecodeshots.com to power syntax highlighting and Open Graph images of code for https://essay.dev . I initially used carbon.now.sh, but they don't have an API, and the community-provided API is pretty slow because it uses a headless browser to generate the image. Source Code Shots uses VSCode's syntax-highlighting engine, so the highlighting is about as…
This is pretty cool but I notice the default R fibonacci code is like comically non-idiomatic (or poorly linted, even). Since I suspect the cause here is copy-pasting off of an algorithms/code gallery, my guess is that there are examples across other languages. I checked everything I feel idiomatically comfortable enough and the others all seemed fine, but there are a lot of options here so who knows.
For the languages I don't know, I looked at the code people posted on rosettacode.org
Re: Show HN: Ray.so – Create images of your code
#67Is there some way to get a CSS snippet out for publishing in a blog/article/presentation or is it only images?
edit: is this purely to add a rounded border/pad that you wouldn't get with WND+SHIFT+S / CMD+SHIFT+4 for sharing on sites where you don't control the style?
Re: Show HN: Ray.so – Create images of your code
#68I may be rather opinionated on this, but there are literally community efforts to transcribe memes and other pictures containing text so visually impaired people get access to content, and meanwhile about every 3-4 weeks HN features yet another web app that basically takes human readable text and stores it in one of the most inefficient and inaccessible ways possible. It becomes invisible to screenreaders, impossible…
Some people love the text from an aesthetic view. I don't think we should be against that but rather to advocate the improvement of accessible technology.
Re: Show HN: Ray.so – Create images of your code
#69Earlier quoted context omitted.
Say I have code snippets I want to include in a Jekyll blog for example. I could call your API from a pipeline process, store the images and link them from the posts. A plugin would be deeper integration, but an API would just work and would be great already. I guess a similar process could work for other blogging platforms.
Wouldn't this make the code snippets completely inaccessible since you cannot copy text from an image?
And, anyway, most people would rather clone the public repo or use GitHub for copy/paste purposes.