-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
0x04 is the cruelest month #9
Comments
Fizzy Drinks
(Generated with https://gist.github.com/cpressey/c590e0a0e5b61f4b3e7c using Robert Louis Stevenson's "Treasure Island" from Project Gutenberg as the input text.) |
|
Disk Full
|
(((This doesn't "count" for NaPoGenMo 2015, because it was written in 2014, but in the interest of generated "poetry", I just now put this online. I was considering submitting it during NaNoGenMo 2014, but the thought of running it for 50K words seemed excessive. Its output did get published elsewhere, however -- but without source code.))) |
A Beatnik quine is something I'm going to shoot for. Achieve, maybe not, but shoot for, definitely. I wrote a simple quine in Python while on the tube. It's not very "Pythonic", but then, it's not supposed to be. It's supposed to be "I haven't written a quine in years, I wonder if I remember how to do this, also, let's be pedantic about it to make it easier to see what's going on and/or translate into other languages." Beatnik presents its own challenges. Not least of which is the fact that the one implementation I found does not correctly run the one example program I found. This is not an uncommon occurrence in esolang circles; I consider myself lucky just to have found them, as often these things just disappear when their author's website goes poof. |
Hello, world!
(This is the source code. It's a Beatnik program that outputs the rather trite two-word poem "Hello, world!". Certain other programs were used to construct this program; they will be published shortly.) |
This is lovely! |
Why thank you! I really should have said "certain other programs were used in the construction of this program" -- there was a certain amount of manual editing involved. All of the punctuation and formatting was hand-added, and some (maybe 3%?) of the commands were "adjusted" to improve the flow at the more awkward points. The ultimate goal of making a quine in this will be... very, very difficult. |
Tools used to produce and run the above Beatnik program now available in this repository (public domain). The program also runs on Catatonic Porpoise's Beatnik interpreter. |
As a matter of devblogging... You can see that Python quine I wrote devolve as it is successively refactored into a form suitable for a cruder programming language here. However, I am now 98% certain that it is not possible to write a quine in Beatnik. It's simply too weak a language. A quine requires that you do something like this:
The second line requires that you access So I don't see any way to store a string in Beatnik such that you could access the whole string without destroying it. Which you would need to do, to access it twice. So, back to the drawing board. |
Is Beatnik not Turing-complete? Doesn't mean that it is humanly-doable, though. |
https://esolangs.org/wiki/Beatnik#Computational_class
I wonder, though, if a quine is still possible, if you essentially limit it On Mon, Apr 13, 2015 at 3:09 PM Michael Paulukonis [email protected]
|
For instance, 'xy' is scored as 12; fe as 5; xyp as 15; xe as 9. On Mon, Apr 13, 2015 at 3:27 PM John Ohno [email protected] wrote:
|
Indeed, I wrote that just a few days ago, after I determined it wasn't Turing-complete. For all I know, this has been well-known amongst Beatnik enthusiasts for years, and it's just that no-one bothered to note it on the wiki page. A language doesn't have to be Turing-complete in order to have a quine -- there's some real research on this somewhere which I can dig up for anyone who is interested, but it's a bit dry and mathematical. On the other hand, if a language is Turing-complete, it definitely has a quine (barring some pathological technicalities that are, again, kind of dry and mathematical and uninteresting, at least to me, at least at this moment.) I won't claim that I have a watertight proof that Beatnik doesn't have a quine, but I think my analysis of the data-storage situation in my previous comment is enough to dissuade me from continuing to look for one... ...especially here in NaPoGenMo, where there are countless other vistas to explore. I'm thinking of playing with SVG a bit, because I don't know as much about it as I'd like to, and I've always has a great fondness for concrete poetry. |
While it might not be possible to use beatnik to produce a quine, I imagine On Tue, Apr 14, 2015 at 3:18 AM Chris Pressey [email protected]
|
I think the next logical step for Beatnik is "99 Bottles of Beer", which I've sketched, but I don't really feel like carrying through with (computing those jump offsets... not really difficult, but ugh. Maybe someday.) Instead, I played with SVG. Threw together this thing which lets you type in lines of text, and constructs a concrete poem out of them. It's pretty lame actually -- er, to be more positive, there's lots of places it could be improved. Well, y'have to start somewhere. It's self-contained and short and public domain, so feel free to cannibalize it for whatever purposes. If you want to save the generated SVG, you need to use SVG Crowbar -- there might be a simpler solution, but if so I haven't found it. Note that SVG Crowbar, in spite of describing itself as "Chrome-specific", does in fact work in Firefox (for simple SVGs like this), and in fact I have only tested this thing on Firefox so far. |
wow |
Heh, if I didn't have this weird obsession with reinventing the wheel, I'd probably just use d3 and not worry about constructing SVGs "by hand" like this. One attractive thing would be to make the dimensions of the SVG be actually A4 (or 8.5"x11" for all y'all in North America) so that when the SVG is printed out on paper, it's true to scale. But speaking of reinventing the wheel, I got distracted again! Because I played with @MichaelPaulukonis's code and it reminded me about the crazy thoughts I had about text pipelines earlier this year (the rants about which you can read in early messages on the generativetext forum if you have too much time on your hands) and I decided to ignore my own observation that generative art and software engineering don't really mix and and and this. The main idea (if there was one) was to write it in Javascript in a way where it could be run under node or in a web browser. It's not quite there, but it shows promise. Really though, it's just an excuse to indulge in that quasi-algebraic thrill of writing a framework... which inevitably solves some problems well while making other problems even harder. |
There are also SVG to canvas libs, and from there you can go to a jpeg png Also, you can now redirect the input so it's not coming from a text=box, -Michael Paulukonis Sent from somewhere in the Cloud On Tue, Apr 21, 2015 at 5:25 AM, Chris Pressey [email protected]
|
Ack! I only just found out that it's also International Pwoermd Writing Month! #pwoermds #InterNaPwoWriMo ...with only days left, anyone want to tackle a pwoermd generator (for InterNaPwoGenMo, naturally)??? |
OK. I'm calling this a wrap, for now. Things I'm not proud of:
otoh... things I am proud of:
|
Full disclosure: I already tweeted this bash one-liner which generates 30 single-stanza poems. Or 1 poem with 30 stanzas. Or something. A sample output of it runnning on my Ubuntu installation can be found in this gist, the first stanza/poem/whatever I shall quote here, because I quite like it:
I don't think I am quite done, however, although what else I quite plan to do I have not quite decided. Quite.
The text was updated successfully, but these errors were encountered: