Generating nixers introductions with the shell. - Programming On Unix
Users browsing this thread:
|
|||
Hello, children. Today I will walk you through letting
the computer generate an introduction to the nixers forum, automatically! It is very easy. First, you run this command: Code: curl http://venam.nixers.net/nixers_intro.html | awk '/div class="code">/ { p=1 } p { print($0) } /<\/div/ { p=0}' | sed 's/<[^>]\+>//' | awk '$0!~/^$/ { print($0) }' | sed 's/^ //' >intros This downloads a bunch of existing nixers introductions from venams website (I really hope he updates that one day so that we have EVEN MORE DATA!). Then you download a neat little markov chain generator by mpu (godlike!): Code: curl http://c9x.me/cbits/markov.c >markov.c Now, we're ready to go! Our intro will contain of 10 unstructured, hilarious sentences. We run Code: ./markov -c 10 intros The result may look somewhat like this: Code: >>> god is here to learn. I especially like the last sentence generated. It sums up the community pretty well. This enthusiastic, but also slightly insane style of language. I hope you liked my little excurse into 'just using a utility'. Have a nice day. |
|||
|
|||
I just gave that a few runs and it's pretty hilarious. Just in time for my intro muahaha
|
|||
|
|||
HA, this is awesome. neat!
|
|||
|
|||
I particularly enjoyed the ending of this one:
>>> br see you all around. >>> he code in python perl c c and much more. >>> main wm s are herbst monster cwm. >>> i m relatively inexperienced as a coder but i am planning to attend hartford university for a dual major in computer science including a partially completed degree in computing. >>> hello everybody i ve noticed this forum appear in a few other languages which is really insignificant. >>> deskthority. >>> i am a super moderator and unix enthusiast living in canada. >>> i ve been hanging around irc for about a week now and finally decided to register on the forums. >>> thats all i can think of. >>> php. |
|||
|
|||
>>> main wm s are herbst monster cwm.
This is very cool. I should update that page, yes. I'm not sure if I still have the code that generated it. EDIT: Let's start a project on Github that autogenerates this. |
|||
|
|||
You can find the data here: http://venam.nixers.net/nixers_intro.data
It's the result from this query: Code: select mybb_threads.uid,mybb_threads.username,mybb_threads.tid,mybb_threads.subject,firstpost,message from mybb_threads,mybb_posts where mybb_threads.fid=10 and mybb_threads.firstpost=mybb_posts.pid INTO OUTFILE '/tmp/nixers_intro.data' FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n'; |
|||
|
|||
Thanks for updating the data.
Could you post a version with just the raw text data, without the meta information? That would be great, thanks. With the current data one gets lines like this: Code: >>> ric 276 diyorgasms 432 hi everyone 3736 i m a programmer gamer memer and i like obnoxious screaming music and maybe just maybe i ll like you too i contribute to wiki. |
|||
|
|||
Is that better http://venam.nixers.net/nixers_intro_text?
|
|||
|
|||
Yep, that's perfect!
Thanks! |
|||
|
|||
I found the code that generated the old page.
here it is. |
|||