hacker

Arnav Bansal

@ArnavBansal (15)
The fastest React.js Starter Template in the world
posted to Templates by amasad

@HahaYes It makes use of esbuild, a javascript compiler written in Go https://github.com/evanw/esbuild

Wanting to implement this in C++
posted to Ask by jimmybitcoin

Paging my friend @eric_wang, who's been obsessed over prime sieves (in c++) all of last year

Optimized Sieve of Eratosthenes.
posted to Share by eric_wang

Well done!

How to clone/fork git repos
posted to Ask by cheak1974

Do you want to clone a git repo to an existing repl, or import a repo to a new repl?

If the former, you can use regular git commands in shell. For the latter, isn't that what the 'import repo' button do?

Hope I understand your question correctly!

It's My Birthday!
posted to Share by Coder100

Happy birthday! :D

How to give download url to a file
posted to Ask by ConvertAPI

@ConvertAPI https://repl.it/@ArnavBansal/Chaining-JPG-to-PDF-then-MERGE A download url requires there to be a server at the other end. I don't think there's a simple access URL to grab a single file. A server in nodejs is pretty simple to set up ^

How to give download url to a file
posted to Ask by ConvertAPI

@ConvertAPI you can print a full URL to the repl. console.log('https://repl.it/@ConvertAPI/Chaining-JPG-to-PDF-then-MERGE') should be clickable.

We're also working on a way to deeplink to files in the repl (but it won't open it as a PDF, just a PDF inside the repl)

How to give download url to a file
posted to Ask by ConvertAPI

@ConvertAPI well, you could just link to the repl itself?

How to give download url to a file
posted to Ask by ConvertAPI

One way to let users download a file is to set up a simple web server. In NodeJS, you can use a library such as express (expressjs.com) to do so

Cellular Automata in BASIC (rule 126)
posted to Share by ArnavBansal

@SixBeeps woah, cool!

TIL BASIC (1964) actually predates cellular automata (~1980s)

Thanks!

Cellular Automata in BASIC (rule 126)
posted to Share by ArnavBansal

@Roar123 Thanks!

We render one row at a time, based on simple rules: we look at the cell above, one cell to the left, and one to the right.

In this case, a cell is turned on if any one or two of the three cells above it are alive, but dies if all three cells are alive.

We can produce quite a lot of complexity from a small number of simple rules. Here's rule 30 for example: https://en.wikipedia.org/wiki/Rule_30