Live data from Hacker News

Show HN: Ray.so – Create images of your code

ray.so

101–110 of 129 posts

Re: Show HN: Ray.so – Create images of your code

#101

If 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…

What's the reason for the sideways traffic light in the top bar? Is it part of the final image?

Re: Show HN: Ray.so – Create images of your code

#102

If 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…

What's the reason for the sideways traffic light in the top bar? Is it part of the final image?

It's supposed to resemble a mac app window. I can add a setting to remove it if you like. Email me at daniel@onegraph.com and I'll let you know when it's available.

Re: Show HN: Ray.so – Create images of your code

#103
post #82

Earlier quoted context omitted.

I use fancy code display tools when making slide shows. Though in my case I have a plugin for Notepad++ that lets me copy syntax highlighted code from NP++ and paste it into PowerPoint with all the highlighting and formatting maintained. Super cool plugin. I can't just screenshot my editor (VSCode) because I use a theme that many people find violently irritating (DOS Edit). Anyway, this looks like someone's fun littl…

I just googled your VSCode theme and can provide another anecdote of violent irritation.

I got mildly pleasant nostalgic feelings looking at screenshot of DOS Edit theme myself, but I still wouldn't want it as my daily driver. Can totally understand about screenshots of that not really being cool to chuck in a presentation too.

Re: Show HN: Ray.so – Create images of your code

#105
post #93

I have to say this feels rather strange next to the functionality of my PrintScreen key. Maybe I'm missing the point. I get that it's easier to look at than pastebin, but I'm struggling to grasp what else. I've always agreed that LOC is a terrible measurement, and similarly I don't delude myself into thinking positioned or colored code is more functional.

The use cases that come to mind are sharing previews of code snippets on platforms that don't support code formatting/highlighting like Twitter or Medium.

The cleaner fake UI of this site, uncluttered by any warning or other editor glyphs, and the auto-resize make it slightly more convenient than an editor screenshot I suppose.

Re: Show HN: Ray.so – Create images of your code

#106

Fun to play with. Most surprising is the auto-indent when typing Clojure code. The #1 missing feature is the ability to select a different typeface. #2 would be the ability to serve up an image from a URL like a pastebin or a-la speedtest.net speed test ( https://www.speedtest.net/result/10946633415.png )

The URL with a preview is on our radar. Gonna look into it when we have some spare time. This is a side project of our team that came out of a hackathon.

The URL preview would be a killer feature for sharing on social networks.

Re: Show HN: Ray.so – Create images of your code

#107

Earlier quoted context omitted.

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.

If you have a good recursive version of Fibonacci for R, I'd love to swap it out for what I currently have. For the languages I don't know, I looked at the code people posted on rosettacode.org

[deleted]

Re: Show HN: Ray.so – Create images of your code

#108

Not trying to be argumentative but this is completely over my head and I do not understand the purpose. Is 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?

I created a Github Action to generate images for code, within github issues. The benefits:

- Easy to view and understand the image of the code v/s the code block text when using a mobile device. Why? Easier to scroll images v/s text.

- Members will no longer have to rely on the issue reporters and commenters to format their code blocks correctly. Using the in built formatter, the code is always structured properly

- Maintainers can style the code blocks to suit their project's language and guidelines and not put the onus of this on the issue reporter / commenter

This uses carbon (https://github.com/carbon-app/carbon)

The Github Action in question: https://github.com/callmekatootie/carbonate

Re: Show HN: Ray.so – Create images of your code

#109
I see folks wondering about the use case - so here's one: I created a Github Action for use in Github Actions. The benefits:

- Easy to view and understand the image of the code v/s the code block text when using a mobile device. Why? Easier to scroll images v/s text.

- Members will no longer have to rely on the issue reporters and commenters to format their code blocks correctly. Using the in built formatter, the code is always structured properly

- Maintainers can style the code blocks to suit their project's language and guidelines and not put the onus of this on the issue reporter / commenter

Reference: https://github.com/callmekatootie/carbonate

I used Carbon to generate the images in this case - but you get the gist of what one can use images of code for

Re: Show HN: Ray.so – Create images of your code

#110

I see folks wondering about the use case - so here's one: I created a Github Action for use in Github Actions. The benefits: - Easy to view and understand the image of the code v/s the code block text when using a mobile device. Why? Easier to scroll images v/s text. - Members will no longer have to rely on the issue reporters and commenters to format their code blocks correctly. Using the in built formatter, the cod…

Why on earth would you want to provide a code snippet as an image for that?

Do you want retyping-bugs? That’s how you get retyping-bugs.

Post reply on HN