Generating nixers introductions with the shell. - Programming On Unix

Users browsing this thread:
pranomostro
Long time nixers
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
curl http://c9x.me/cbits/avl.c >avl.c
#compile the code
cc avl.c markov.c -o markov

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 signed up before lurking much so.
>>> have a nice evening all.
>>> i will probably end up using both however.
>>> beneath all computer-related stuff i m not as proficient in coding as many of you are.
>>> almost everyone ignored my questions with the exception of a user called venam who sarcastically gave me the advice to install gentoo.
>>> my dream career is to one day work with linux nix systems.
>>> i don t have a girlfriend don t have a girlfriend don t have to watch what i post because i d have cringed at whatever i d written here so i m going to college for essentially programming and i m still very much a novice at all this and have settled for what works for me although i m back on wmii since around a month - really like the tagging way of managing windows and yes i m aware about i3 but i don t know i m reki from hf.
>>> what certs should i look into.
>>> i really like its content.
>>> i m planning to real soon.

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.
crypto
Members
I just gave that a few runs and it's pretty hilarious. Just in time for my intro muahaha
neeasade
Grey Hair Nixers
HA, this is awesome. neat!
crypto
Members
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.
venam
Administrators
>>> 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.
venam
Administrators
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';
pranomostro
Long time nixers
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.
>>> 868 zerek 1210 hello world 8492 hi my name is brian and i m looking forward to getting involved 1020 kan 1475 hello fellow nixers novice hacker from norway here.
venam
Administrators
pranomostro
Long time nixers
Yep, that's perfect!

Thanks!
venam
Administrators
I found the code that generated the old page.
here it is.