# can i embed a godot game?
of course
of course
here's a π spigot from this blog post. a while ago, i implemented one of the algorithms here in scheme. it was fun to get a megabyte of π, and i want you to be able to have a similar experience :D. this version is unproven, as discussed in the original article, buuuut idrc. fair warning: especially with larger batch sizes, this is liable to freeze up the tab. tread carefully!
3.1 digits in batches of
gotta say, it's really sweet working with native generators. not really necessary here, but elegant. bigints were the real hero, i almost discarded the idea before i remembered js had them :P
at around 215 digits, the bigints become too big to allocate, at least on my machine. lame!
this is a geminic sequel to s10, which does exist yet!
this technique is taken from this code golf question.
i hope i can do it!
best guess: idk
i did it! not super efficiently, but it was fun. the slider goes up to 12, which is really pushing it, so exercise caution
this is a prequel to s11, which does exist yet!
a while ago, i made this cohost post about approximating π, and i'd like to implement my favorite approach here
current best guess: 0/0 * 4 = idk
this is thoroughly ingrained in my brain, but i hope it's still fairly intuitive for others. i like how the boundary becomes more clear with more samples, it makes the accuracy more understandable imo
i may not be stupid!
the technique as applied in s6 may be pointless, but, for a general equality, points that can move in two directions could actually be interesting! that might be here! in ! th efuture
okay dang this looks freaking great. hue is based on angle, look at the code! i love this
i have decided that instead of making it more accurate, i will leave it at this place of looking very cool
i never got anywhere with width-hacking on cohost, but can i implement a normal game in programming language‽
WIP! functional! really needs undo though!
see here if you want to know the #lingo
i realized something when talking about s7: i may be stupid.
first of all, it's worth understanding that s7 is actually my third go at this technique,
the first time was on about:blank
in canvas, and the second time was in picotron.
i just have to graph the function! the other method just looks cooler and is less reliable
here's the important part of the code: ctx.fillRect(x.map(x0, x1, 0, 300), f(x).map(y0, y1, 300, 0), 1, 1)
i also added approximated derivatives for fun :D
now, this is hardly “production-grade,” but it is fun. first play, then talk.
now this is a very janky demo for many, many reasons, but there's a kernel of an idea here that's very cool: moving a bunch of things independently to do a big thing.
some ideas to make this suck less:
now look at the code!
i have my blog for when i want to make really legit-looking posts. it's made with pollen, which is great, and i can make even the most lame posts (currently all of the posts) look very nice. however, there's a whole build system, the book is a program after all, a lot of things have to happen to make a post there happen. so i wanted something smaller. micro, if you will. hence, spout! i just write some html (which, tbh, i kinda prefer to markdown) with no restrictions. ssh, edit file, save file, done. it's great! it really needs an RSS feed, though…
i can do whatever i want! heck, i could even put javascript
this is the second
also easy to write!
note the # links
this is the first spout post
it is easy to write
that is important!