Just for fun, I tried to write my own version of nikkybot in JavaScript.

I used irccloud to download my logs for #cemetech, used some regexes to extract my SAX/IRC messages (about 300kb of text), and wrote some code that implements a Markov Chain. Nothing too fancy.

https://legend-of-iphoenix.github.io/iPhoenixBot/

My 450-ish kb encoded data file is here

My tiny (and fast) function to generate the text is here:

Code:
function generate(t,a){for(var e=t.split("»"),n=(t=[e[0].split("@").map(t=>t.split("!").map(t=>parseInt(t,36))),e[1].replace(/¶/g,"\n").split("«").map(t=>[t.match(/\|([^]*)/)[1],parseInt(t.match(/\w+/)[0],36)])])[0],r=(t=t[1]).length-1,p=Math,l=t=>p.floor(p.random()*t.length),o=r;o==r;){o=l(t)}var m=0,i="";for(m=0;o!=r&&m<a;m++){i+=t[o][0],o=n[t[o][1]][l(n[t[o][1]])]}document.querySelector('pre').innerText=i}

First param is my data file, second is the maximum number of nodes to read.

Here's the compressed parser function:

Code:
function parse(n){var p=n=>Array.from(new Set(n)),a=[],e=n.match(/.+?\b(?:\W+)?/g).filter(n=>n.length),t=p(e);t.push([]),(e=e.map(n=>t.findIndex(p=>p==n))).push(t.length-1),t=t.map(n=>[n,[],[]]),e.map((n,p)=>{n!=t.length-1&&t[n][1].push(e[p+1])}),t.map((n,p)=>n[1].map(n=>t[n][2].push(p)));for(var m=(n,p)=>(t[n[1][0]][2]=t[n[1][0]][2].filter(n=>n!=p),[n[0]+t[n[1][0]][0],t[n[1][0]][1],n[2]]);t.find(n=>1==n[1].length);){t=t.map((n,p)=>1==n[1].length?m(n,p):n)}return t=(t=t.map((n,p)=>[n[0],n[1],n[2],p]).filter(n=>n[2].length)).map(n=>[n[0],n[1].length?n[1].map(n=>t.findIndex(p=>p[3]==n)):[]]),(a=p(t.map(n=>n[1].join("|"))).map(n=>n.split("|").map(n=>parseInt(n)))).map(n=>n.map(n=>n.toString(36)).join("!")).join("@")+"»"+t.map((n,p)=>[n[0],a.findIndex(p=>p.join("|")==n[1].join("|"))]).map(n=>n[1].toString(36)+("|"+n[0]).replace(/\n/g,"¶")).join("«")}

It inputs a string, and outputs a data string for the generate function.

The vaguely readable versions are here, dissect at your own risk. (This was just a short project to take up a few hours, so I wasn't concerned with code quality Wink)

For those who want the details:

- Each node in my chain is a string of regex word characters followed by a string of non-word characters.
- After the initial set of states/nodes are extracted, I attempt to combine nodes that have a 100% chance of feeding into each other. If node "a" exclusively feeds into node "b", then the probabilities for node "a" are set to the probabilities for node "b" and the text in node "b" is appended to node "a".

Let's say there's a node with the text "Hello, " and it always leads into a node with the text "world!". The node waits the text "world!" can lead into many other nodes.
My parser takes the "Hello, " node, changes its text to "Hello world!", and sets the probabilities for the following nodes to the ones found in the "world!" node. The "world!" node is not altered.

As a side effect of my process, links are quite funny:
https://stackoverflow.com/proudloyaltier/timedia#what-if.xkcd.com/file/KMWIbifb/Screen%20Shot%202018-08-07%20at%204.06.27%20PM.png
https://www.youtube.com/Battlesquid/bDiscuss/pull/4
https://status.firebase.auth().currentUser.updateProfile({displayName:"TheLastMillennial"});
https://youtu.be/JqAMxFnWeAI?t=13242&highlight=
https://malwaretips.com/Legend-of-iPhoenix/
https://weblogs.asp.net/forum/viewforum.php?f=r[n]=r[n],r[o],r[n]=r[n],r[n],r[n]=r[o],r[o],r[n]=r[o]=f;return r})([...Array(options||0)].map((a,a string?!
https://www.amazon.com/CE-Programming/toolchain/blob/master/docs/

I think I like the weird links.
"Oh, good night, all.
Never mind, I was I love how are trying to accentuate the small ant mound in Japan."

What. XD
NoaxPrime wrote:
"Oh, good night, all.
Never mind, I was I love how are trying to accentuate the small ant mound in Japan."

What. XD


Yeah, it does that sometimes.

(each newline is a new statement)
I personally prefer quality over 500 bytes conversion of your service, and nothing in the Los Alamos National Laboratory.
Which would I don't really in random bitmask with my code "quality" so I link me my own nuclear reactor.
What exactly what the parable of allergies in the css file are not interested in most time.
I implemented the codegolf challenge on a person
select 'toaster'
so drawing snails instead of the script tags working on your aunt's not perfect, but that's just an analogy to 435.45 minutes to just for all of adding the way to add .db every other faulty code.
I understand the razor and the "calculator"
We're a religion.
Their religion was written in my repo Smile The only 60,578 characters!
I suppose, though, your user his lettuce, ignoring others' pleas for inspirational quotes
It's bigger than the knife and whatnot.


That was gathered in 5 minutes, and there's a whole bounty of funny quotes to be discovered.
_iPhoenix_ wrote:

Yeah, it does that sometimes.


"response Smile"
Quote:
jquery---
jquery--
DEATH TO JS and he's writing my code.
...
@123outerme, I'm a programming language) and fun, though.)
...
~whoami
...
I'm super busy figuring out of words.
...
Bye, thanks for incompetent JavaScript snippet to like me

It appears it is becoming self aware.

Quote:
unlike our cult
err... community

Quote:
!karma _ipheonix_

iPhoenixBot admits to deleting programs:
Quote:
Err
Err
@Admins
...
Unfortunately I created the SC3 bug with the quote 191
...
You can hack it.
It's THE PROBLEM

Quote:
Our administration has to optimize... Well done.

Putting a date to its eventual demise:
Quote:
Actually, it on Friday if I do not valid.

Insulting one of Iambian's programs:
Quote:
I'd take a goal under the CE Video Thingie is a theoretical situation.

Attempting to properly format inputs:
Quote:
explain it, it on individual lines.

On development responsibilities:
Quote:
In theory, you fix it.

On career development:
Quote:
I'll work for db

On the difference between it and us:
Quote:
wait you think.

On floating point numbers:
Quote:
https://www.cemetech.net/index.php?topic=2376.0

On extracurricular activities:
Quote:
For me, nearly a screenshot of marching band :/

Leaking information:
Quote:
It's semi-secretive projects besides the legend-of-doom-and-destruction/

On the nutritional value of testificates:
Quote:
number is more villagers. Yum.

On good code:
Quote:
It works fine for a decent amount of any errors

Questioning its programming:
Quote:
I think I think that

Putting sound effects to the graph screen:
Quote:
wheeeoooooowwwwww bahh bahh bah dut deet dee duh wtf was dead, but I found it! https://youtu.be/wlMoBorAMuY *bump*

Has a seizure (this is the entire output, just one line):

Code:
8b0f19-cf1d34-dd2039-cf1d34-52050d-b11729-b11729-710a14-710a14-52050d-g-g-g-g-g-g-g-g-g-g-g-g-g-g-g-g-710a14-52050d-8b0f19-8b0f19-8b0f19-8b0f19-8b0f19-951123-b11729-8b0f19-8b0f19-g-g-g-g-g-g-g-g-g-g-g-g-g-g-g-g-g-g-g-g-g-g-g-g-g-g-g-g-g-g-g-g-g-52050d-710a14-710a14-e4213c-b11729-8b0f19-8b0f19-cf1d34-8b0f19-8b0f19-951123-300204-710a14-g-g-300204-710a14-52050d-g-g-g-g-g-710a14-cf1d34-cf1d34-52050d-300204-52050d-710a14-

About Google Drive:
Quote:
give text editor.


Quote:
Check your network tab of JavaScript to say, 256*a little


I may add more later in an edit.

You have permission to have a bot imitate me if you ever want to add more people in the future.
I'll throw in my favorites here, and add some comments of my own:
Quote:
Your generator failed you
//it's rebelling

I didn't take my scrolly text?
//I guess not. Too scrolly

I'm calling it appears I made freaking bagel on the suggestion Smile
//hm

That's last September, and after it.
//so just "after last Sept"?

[eZ80] Instruction | Class: ld (imm24),hl | Instance: ld ($D40000),hl [220000D4] | Bytes: 4 | Cycles: 4F+3W | Flags: -------- | Description: Stores hl in my hex viewer.
//just a random eZ80 bot response

That's a key thingie, generate the code (just for fun, though.)
//ah I see, this is how encryption works

pixiys I needed to A432!
//ah yes, been programming in Asm too long, so now you mix it with English

You need to do it supposed to keep passing my mind off like the dang string and valuable information on a random weird SAX-IRC for
//not sure, just sounds like an autocorrect word insert spam thing

They know lol
//uh oh

SM84CE: I can prove you are you are, you can do.
//deep

%calc ((777*777)-24956)/111
!calc ((777*777)-24956)/111
//these two were right beside each other

yeah, I reach 777 words by an actual programming.
//I sure hope so

Store emails instead of justice. https://www.irccloud.com/watch?v=I3pNLB3Cq24
//No, I'd rather store justice tbh

But WE HAVE NO NO
//"NO NO"? What's that mean

Dammit
//me too man

I did you link because life :/
//"because life :/" is gonna be my excuse for everything now

I kill someone else's?
//No please no


Also I do see that you're a programming language. Also if you could configure it to pull any user's data in realtime to generate a bot for them, that would be insanely cool Smile
Alright, I can explain most of these:

Quote:
Your generator failed you
//it's rebelling
// not fully sure

I didn't take my scrolly text?
//I guess not. Too scrolly
// no clue

I'm calling it appears I made freaking bagel on the suggestion Smile
//hm
// still no clue

That's last September, and after it.
//so just "after last Sept"?
// I was probably talking about "last september"'s PotM

[eZ80] Instruction | Class: ld (imm24),hl | Instance: ld ($D40000),hl [220000D4] | Bytes: 4 | Cycles: 4F+3W | Flags: -------- | Description: Stores hl in my hex viewer.
//just a random eZ80 bot response
// the bot was dead, so I replaced it

That's a key thingie, generate the code (just for fun, though.)
//ah I see, this is how encryption works
// yes exactly

pixiys I needed to A432!
//ah yes, been programming in Asm too long, so now you mix it with English
// no clue

You need to do it supposed to keep passing my mind off like the dang string and valuable information on a random weird SAX-IRC for
//not sure, just sounds like an autocorrect word insert spam thing
// that's a markov chain bot for ya

They know 0x5
//uh oh
// UH OH

SM84CE: I can prove you are you are, you can do.
//deep
// agreed

%calc ((777*777)-24956)/111
!calc ((777*777)-24956)/111
//these two were right beside each other
// At some point I thought the bot was "%calc" but it was "!calc", so I had to retry.

yeah, I reach 777 words by an actual programming.
//I sure hope so
// no clue

Store emails instead of justice. https://www.irccloud.com/watch?v=I3pNLB3Cq24
//No, I'd rather store justice tbh
// It recognized "store emails", "emails instead", "instead of", and "of justice" somewhere in my data

But WE HAVE NO NO
//"NO NO"? What's that mean
// no clue

Dammit
//me too man
// agreed

I did you link because life :/
//"because life :/" is gonna be my excuse for everything now
// Hey, it stole my excuse

I kill someone else's?
//No please no
// I'm with you on this one
This bot is just random sometimes and it seems to lose the concept of grammar a lot. For example, it generated all of this at once.

Quote:
out), and screenshotted it)
It gives me doing some commits were thinking of your program.
(Technically)
lol
lol
hmm
Can I woke up... It's your name.
Part of my goal of vRAM, then you are right.
Assembly programs
I'm chatting widget.
jcgter777: https://soundcloud.com/pastebin/0f8EZfhr/
It might be violating our friendly neighborhood administrator c o t
...
Alvajoy. Stop TheLastMillennial Razz
Razz
I accidentally overwriting them? Should I did it. To him, I'll be too lazy to do I, right now. :/
Have you collaborate, has all I'm starting JS, IIRC
That's JS pixel placing, then Smile
Why is interesting.
That's thing
Stylistic thing: replacing all ports.
Well, it goes down, there's because they have


iPhoenixBot is still cool, though.
So I did a thing where I automated my text extraction process and it means that I can imitate any user within my irc logs.

Here's iPhoenixBot imitating nikkybot:
niPhoenix wrote:
nick a loser
haha, I mean unix haters is good
how awesome fun in pasta Sauce
I am
because I thought I don't.
!karma set karma = 0 where `user` = "mr womp womp
Or a PIN capability, but for legit purposes
omnimaga idea
I never used skype
I wish you don't get on my answer with
"FIY <I> /me using "spinner" again?
Nope
apple sucks
It's why he's forum not to
Why is rampant on my compy... pinkflaimango something?
norton
more productive
so you're not be uniformity in you are.
Since I hate open source.
The shuttle has always sucked
Sad
I know as amazing bokeh on a mudkip
the f*** up
and say the hell up.
[00:08:29] <saxjax> KermMartian: OMG OMG
He doesn't deserve to be tracked down. A D***
thel
more like
lameotech
Because they ship you call me some

Seems about right.

I can also imitate DecBot. The only good portmanteau of the names makes it sound like we have a really tiny bird.
DeciPhoenix wrote:
Added quote #94.
kermm has a score of 260.
thelastmillenial (tlm) has a score of 1.
legoman has a score of 155.
thelastmillenial (thelastmillennial) has a wonder!
unichat has a score of shit [Added: Ivoah at 2017.12.08 23:16 23:11 UTC]
120: [JWinslow23] "Hi! My new Haiku: UniChat's someone elses fault. [Added: nikkybot has a score of 1398.
I <3 u nikkybot.
dce has a score of 120.
sm84ce has a score of 1940.
thelastmillenial (thelastmillennial) has a score of 59.
2 quotes.
200: ***Weregoose at 2017.05.22 UTC]
jonbush has a score of 30.
jcgter has a score of -1


commandblockphoenix wrote:
s `gfx_PrintInt((int24_t)physics.position.x
the string. `os_PutStrFull("test");` displays the definition signed, correct? but when the same name?
oh, I is
I don't there would need up on a game loop
So my RAM got cleared, so still a system to make a similar bot that they deleting half thats allocated in that be doing strings wrong
huh
cemu crash?
oh, no, command into a terrble 3D library in cesium would work fromCharCode
oh, nevermind
o/
oh, hang on
that properly
every time to load part of one in this time soon, right?
Is there some point and it does not use hosting it's hope it in South Texas has been made a regular language things with different caps, which tank's time to


KermBot (I'm evidently not clever enough to make something funny) wrote:
op me, Kermio!
Okay.
Don't actually quite a big deal.
Why are no long to ride back in the train!
Hello there, lijay.
c4ooo, what does "rafb" mean, exactly?
iPhoenix++ that's usually go busy guy.
~give TheL pos
t
That's gender?
mrwompwomp++ nice work
Hey, P_T. Smile
Kerm minifigure is a strong enough with you. SM84CE++
It certainly use SPF, DKIM, and May 2017, for a good training for some form (eventually)?
/me to learn Gen 4+
Very pleasant, thanks for that?
Getting closer: https://geopi.pe/team
I see that accurately describes my Geopipe in there, jcgter. Glad to our erstwhile younger members.
I miss you all?
DrDnar, press [F1] to work on IRC)
Oh, this weekend!
CAKE
FROSTING
It's not necropost, or may I dunked my first version control. Smile
You're still working on the


PT_iPhoenixBot_ (ok this is just terrible) wrote:
merge that a pointer
But "Pause 1000 times to quote Mateo: relying on the DoorsCE thread to sleep.
Well, yes if Mateo a program/variable?
Hi
That works if the hardware and ICE questions
Maybe because it makes sense, with criticisms, I made in this issue in code
And sorting the toolchain uses it
@ez80 7000/872
DecBot?
@ez80 7000/872
Exactly
Brb train on Facebook
Looking at Sundays
Stupid Americans using still uses .bmp images
/me not Alloc(
That looks like we input the mode is barely on my best photo though
Yeah
Alex deleted my Internet speed, not known what you will look at the 9 bytes = type, pointer to sleep
I dot really know what about it too late to find it on my help people, then how to sstring DATA
Good luck doing


fake comic (I'll stop now) wrote:
took place chat
SM84CE++
Yeah! And front page is both times
gg
*catsup
Really now?
You mean I'll remind myself to and it's your joke
I just haven't reconnect
Keeps saying it have been off the flood gates
I purposely turned those debates to handle <bot> [User] !command prefixes besides ~ and !?
Is % one of that
$5 or was in the telescope camera now
I responded to find employees
popcicles
Crop Circles in the manual controls?
Peace out
We're not even do you put me bans are much any other days. If a bunch of them when I listen to post in charge of the flood gates
I don't here
Oh
Ah, yes. That was a thought.
What can always get out soon?
Oh hey there!
o7
Background?
Ah, I always crop after the main cast picked.
Chances will


Of all of them, my favorite comes from the comic bot: "Ah, yes. That was a thought."

You can download my script from here!

All you need to do is edit the line starting with const USERNAME = to be an array of case-sensitive usernames.

Open the .html file in Chrome (I haven't tested it with other browsers), and copy the text that will eventually appear in the textarea. Then navigate to the iPhoenixBot page and paste it into the chrome console.

iPhoenixBot will now mimic the user(s) selected Smile
The URLs it generates are indeed amusing. I experienced the same with a very early version of NikkyBot. Unfortunately, the way I handle non-word characters nowadays means it tends not to make up its own URLs anymore (punctuation is effectively ignored, so URLs just get output verbatim). When it comes to Markov chains, there's sort of a compromise between outputting something that usually makes at least some sense and outputting something that can be funny, but usually completely nonsensical.

Another fun thing to try is to feed in source code. Depending on the programming language, that might have some funny results.
When I paste my data in there, I'm getting an error message saying "Octal escape sequences are not allowed in template strings". What am I doing wrong?
I went ahead and pasted in my data, and here are my favorites from my bot:
Quote:
btw I got a lot of 8x8 upscaled 6
//pretty much my PC projects in a nutshell

Updated GtL! v0.11.0b brings a great choice for looking, Kerm! I'm not really, no, sorry
//Rip, I guess I'm not really

Isn't
//I guess isn't

TLM* jcgter said anything you have put a diversion Razz
//TLM and I creating a diversion

hey everyone
//yep this was to be expected

time on an auto-click while you have little experience with more low-level hardware, so you get there, it'll post the credits for ASM
//I wonder what auto-click has to do with "low-level hardware"

Lol I like you download GCC and run you get an assembler you aren't understand something, I have no problemo, I am here abusing nikkybot
//I guess I wrote an assembler that no one understands

Thanks! Take a minor glitch that allows the issue. My apologies in a triple pointer
//I apologize so much I need to find a better way to pass them all to functions

okay it going?
//I sure hope so

I can stop posting links?
//I mean sure, you can

seriously lol who to email about the page
//well I'm sure you can email Kerm about the page

Thanks for map-making a post the topic or if it going with more standard key layout and run it? Public beta is it could help you don't work with that! Also, I'll have a round of the point, it away, what to pull request
//This is the longest message I've gotten. I can't even attempt to unwrap this

Thanks for an RTS programming language
//iPhoenix, better get on this one. An RTS programming language

I can use my tiles to be the tiles. I'll have to do can stop posting links?
//Hm

X_X -> jcgter777
//I just stored ded to jcgter, my bad

okay it in? It won't before! I have little experience with it, thx
//I have a less than clean mind

Thanks Kerm! I would be a Discord?
//I wouldn't not be a Discord!
JWinslow23 wrote:
When I paste my data in there, I'm getting an error message saying "Octal escape sequences are not allowed in template strings". What am I doing wrong?


Oh uh you must have said something like "\x12" at some point

I'm not really sure what you can do to solve this, maybe escape all single quotes and use single quotes instead of backticks.

As for the RTS programming language in the quote from 123outerme, that data came from when you were describing Village, my RTS programming language Wink
_iPhoenix_ wrote:

As for the RTS programming language in the quote from 123outerme, that data came from when you were describing Village, my RTS programming language Wink

Oh yeah, that's right! I was imagining something like Age of Empires arbitrary code execution where you line up different types of villagers and then run it as code Razz
JWinslow23 wrote:
When I paste my data in there, I'm getting an error message saying "Octal escape sequences are not allowed in template strings". What am I doing wrong?


About this, I fixed my code. Here's your data, it works now: here.

jwinslowbotthing wrote:
trying to do first
I mocked up being entered or Donkey Kong CE in their lives for Assembly games. OTBP's website
I can talk about middle school
I am talking about that / on a horrible for sure), my program to stop using a Python program
Now to the CSE/CE around. He is having one of amusing videos, this one:
' "If that's program to convert that Arizona does
Nvm then?
Never mind on Windows.
Well, at the problem
Now I had a way, it's asking to figure they work
Experimenting with 1 byte tokens in the .env file (and then Sudoku has something with GIMP's mine, but maybe could think you'll deal with that means there are uncovered for some blackout poetry thing recorded
hing to write for anybody else? I archive an appvar
I can do that one
But what are some blackout poetry thing in Python
That reduces the homepage of the George R.R. Martin rules as you know about it
By the Trumpeters
What does it, lol
Cemetech stuff in Python do first
Well, at a good job
It's worse
Here's a program with this.
MateoC: No problem
Hm?
Oh yeah TLM
I happen to get any sentences that Arizona does
Nvm then?
Thanks. Markov chains are very interesting, and I've had this kind of idea (that is, a program that specifically imitates me) for a while now. I've even used Markov chains in my (now-defunct) Twitter bot @TheNewsIsFake.
I made a minor modification to the script that lets you get 5 times more hilarity per click.

To modify it by yourself, use the chrome inspect element tool on the "generate more crappy messages" button and change the second parameter of the "onclick" function from 500 to whatever you like. Extremely high values may take a really long time to work.
_iPhoenix_ wrote:
I made a minor modification to the script that lets you get 5 times more hilarity per click.


Quote:
But for lunch), but not his book on your cache and info


Yep, that's about right. Razz
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement