DSWP Bar for Firefox

Everything technical and nerdy stuff here plz !

Re: DSWP Bar for Firefox

Postby SvaRoX » 02.22.11

I think the data table needs quite a while to be written so I would like to be sure the table is full before being read. Can't it be done with LOCK TABLES instruction ? Not sure it only prevents reading it, maybe only writing it. Any idea ?
ut4_he_tennis_v0.1
-------------------------
"We are talking about computers here, compared to those I can read women like a book ;P"
Unclefragger
User avatar
SvaRoX
Leader
 
Posts: 1972
Joined: 11.29.08

Re: DSWP Bar for Firefox

Postby wurst » 02.22.11

hmm, which table?

btw, i still cant get rid of that 002 bar...
Image
User avatar
wurst
Godlike
 
Posts: 4648
Joined: 07.15.08
Location: Behind U
-----tdm:  
nick: [dswp]GewitterOma
skill: 1122.83
kills: 25960
deaths: 19847
ratio: 1.30
-----bomb:  
nick: [dswp]GewitterOma
skill: 812.172
kills: 3885
deaths: 3541
ratio: 1.09

Re: DSWP Bar for Firefox

Postby JRandomNoob » 02.23.11

SvaRoX wrote:I'm surprised python always get wrong data, how do you retrieve it ?

I'm surprised too, because there shouldn't be any difference in results whether I'm retrieving the page via browser, using that Javanese voodoo in DSWP bar, or using Python libraries. I've tried urllib, urllib2, and httplib -- all of these give perfect results on first try, it's just that the last line of retrieved data is always wrong. Not truncated, not botched, server gives me wrong data. And yes, thank you, other pages come through just fine. There must be a workaround, but I've tried everything I can think of (and some more) to no avail.

Although now I downloaded Cuntie's source (you ain't making it easy to find it:-P) and found that she uses different address to retrieve the data. I was trying the method used in DSWP bar (POST a username and password to http://www.dswp.de/old/perso_friends.php), but Cuntie's looking at http://www.dswp.de/old/perso_friends_bot.php instead. Which is working perfectly, BTW. (Nonetheless, the issue with the former page needs fixing; there are some people is a Javascript using this data every day;-))

SvaRoX wrote:Too bad you don't code on CuntBot, it's open source you know ;)

Scary thought, me writing something that I can't kill when someone inadvertently pushes it into infinite loop:-P (which happened twice when I tried conditional refreshing to force the page magically becoming correct). To make it clear: Today it's fourth day of writing code for me in any language (I suppose playing with Javascripts embedded in HTML so they become broken for some mystical reason, which I did ten years earlier, doesn't count).

---

Unclefragger just brought Cuntie back online, BTW. I'm going to continue working on aimlessbot anyway, it's not like Cuntie doesn't ever drop:-) And I should implement the randomizer used in Cuntie's code (for better penises, HELL YEAH), and do some magic so that both bots could listen for commands at the same time without aimlessbot trying to answer the same stuff, and... well, it's interesting, coding.
User avatar
JRandomNoob
DSWP Meme Artist
 
Posts: 1852
Joined: 12.05.10
Location: Estonia
-----tdm:  
nick: WidespreadPanic
skill: 618.539
kills: 12260
deaths: 10971
ratio: 1.11
-----bomb:  
nick: SelfRescuingPrincess
skill: 254.796
kills: 219
deaths: 202
ratio: 1.08

Re: DSWP Bar for Firefox

Postby SvaRoX » 02.23.11

wurst wrote:hmm, which table?

btw, i still cant get rid of that 002 bar...

Ooops, the table name is plugin_account_data.

Sorry about the version, I haven't updated it yet :/ (ugly stuff to do to sign the bar, lazy to do that =). So the 0.0.3 is the right one, weather it asks you for installing a newer version or not...
JRandomNoob wrote:I was trying the method used in DSWP bar (POST a username and password to perso_friends.php), but Cuntie's looking at perso_friends_bot.php instead.

Oh I didn't realized, the perso_friends.php page uses cookies for keeping your ID once you send the POST data, so it's more dedicated to be used in browser. Better use the other one (unless you only care about get info about your "friends" =)

GL learning programming :)
ut4_he_tennis_v0.1
-------------------------
"We are talking about computers here, compared to those I can read women like a book ;P"
Unclefragger
User avatar
SvaRoX
Leader
 
Posts: 1972
Joined: 11.29.08

Re: DSWP Bar for Firefox

Postby JRandomNoob » 02.23.11

SvaRoX wrote:Oh I didn't realized, the perso_friends.php page uses cookies for keeping your ID once you send the POST data, so it's more dedicated to be used in browser.

AFAIK the relevant libraries in Python can totally handle cookies, so this shouldn't be much of a problem... unless it is, of course.

SvaRoX wrote:Better use the other one (unless you only care about get info about your "friends" =)

Yeah, aimlessbot got !status and !players capabilities about twenty hours ago:-)

SvaRoX wrote:GL learning programming :)

Thanks, gonna need it. Breaking my teeth on regexes right now...

BTW, I couldn't find any clues in Cuntie's Fun plugin of where this penis graphic after the string comes from. I take the version available at viewgit isn't exactly the newest one? UFF said something cryptic about, quote, oh there is still fetch git ... we're not using that one anymore xD, unquote -- what does that mean? Yes, I know about Git, but how does this sentence parse?
User avatar
JRandomNoob
DSWP Meme Artist
 
Posts: 1852
Joined: 12.05.10
Location: Estonia
-----tdm:  
nick: WidespreadPanic
skill: 618.539
kills: 12260
deaths: 10971
ratio: 1.11
-----bomb:  
nick: SelfRescuingPrincess
skill: 254.796
kills: 219
deaths: 202
ratio: 1.08

Re: DSWP Bar for Firefox

Postby SvaRoX » 02.23.11

JRandomNoob wrote:AFAIK the relevant libraries in Python can totally handle cookies, so this shouldn't be much of a problem... unless it is, of course.

SvaRoX wrote:
Better use the other one (unless you only care about get info about your "friends" =)

Yeah, aimlessbot got !status and !players capabilities about twenty hours ago:-)

I mean when you use perso_friend.php, what you get is related to your forum account. It's not needed for !status and !players, unless of course you want to get a playerlist with your friend's names highlighted or such (but you need your bot to be able to handle user accounts then).
JRandomNoob wrote:BTW, I couldn't find any clues in Cuntie's Fun plugin of where this penis graphic after the string comes from.

Right, I added the ASCII stuff for another cunbot and haven't updated git :)
JRandomNoob wrote:UFF said something cryptic about, quote, oh there is still fetch git ... we're not using that one anymore xD

"we" ?! I don't remember UFF ever dealt with git here... And yes we still use it, which doesn't mean every projects are up-to-date ;)
Exercise for you : reproduce the output of the ASCII dick :p
ut4_he_tennis_v0.1
-------------------------
"We are talking about computers here, compared to those I can read women like a book ;P"
Unclefragger
User avatar
SvaRoX
Leader
 
Posts: 1972
Joined: 11.29.08

Re: DSWP Bar for Firefox

Postby JRandomNoob » 02.23.11

SvaRoX wrote:Right, I added the ASCII stuff for another cunbot and haven't updated git :)

Aha! Doitdoitdoitdoitdoitdoit

SvaRoX wrote:"we" ?! I don't remember UFF ever dealt with git here... And yes we still use it, which doesn't mean every projects are up-to-date ;)

Whoops, I meant to say UCF:-P Had a braino caused by him starting his sentence with onomatopoetic "uff".

SvaRoX wrote:Exercise for you : reproduce the output of the ASCII dick :p

Well, a (ahem) full-blown !penis with appropriate graphics was the first thing I wrote (I started with a different bot, Phenny, but it proved much too unstable). I interpolated the data from my IRC log, found that the graphic grows by one equal sign for about every inch, and created a bunch of if's to choose the appropriate string for each value (as in if penile_rand <= 2.5: penile_graphic = "8D"). I'm fully aware this could be done more elegantly, allowing for pretty much unlimited lengths, but I'm (ahem again) dicking around with other functions right now. (Only changed the algorithm from random.randint(), although there really shouldn't be much difference in results unless we're dealing with generations of CuntBot users:-P)
User avatar
JRandomNoob
DSWP Meme Artist
 
Posts: 1852
Joined: 12.05.10
Location: Estonia
-----tdm:  
nick: WidespreadPanic
skill: 618.539
kills: 12260
deaths: 10971
ratio: 1.11
-----bomb:  
nick: SelfRescuingPrincess
skill: 254.796
kills: 219
deaths: 202
ratio: 1.08

Re: DSWP Bar for Firefox

Postby AimMe » 02.23.11

JRandomNoob wrote:and created a bunch of if's to choose the appropriate string for each value (as in if penile_rand <= 2.5: penile_graphic = "8D"). I'm fully aware this could be done more elegantly, allowing for pretty much unlimited lengths, but I'm (ahem again) dicking around with other functions right now.

Isn't there at least thing like case? (case penile_rand....)
Image
User avatar
AimMe
Godlike
 
Posts: 2318
Joined: 09.28.08
Location: Solar System

Re: DSWP Bar for Firefox

Postby natirips » 02.24.11

This is just some pseudocode:

Code: Select all
float length;
length = random();
const float lenght_of_one_equals_sign=2.5;//for 1" per "=" if length is in cm
int len;
string foo;
foo = "8";
len=length/lenght_of_one_equals_sign ;
foo += len * "=";
foo += "D";

Where += is string concatenation, and where most languages have a function or operator which allows for a simple way of generating a string with N same characters in it (the len * "=" part).
ssh natirips@*.255.255.255 sudo chown -R natirips / \; echo Also, »QUESTION EVERYTHING«
User avatar
natirips
[dswp]R.Stallman
 
Posts: 2946
Joined: 04.13.09
Location: Solar System/≈Zagreb
-----tdm:  
nick: [ntr]Shortly
skill: 497.05
kills: 3446
deaths: 4411
ratio: 0.78
-----bomb:  
nick: [ntr]Shortly
skill: 707.602
kills: 526
deaths: 863
ratio: 0.60

Re: DSWP Bar for Firefox

Postby eXtr33m » 02.24.11

Natirips got it. Well in lower languages you would have to Round that (length/length of one) and for the len * "=" you can use for cycle.

If u need help just ask in what language. :)

PS: That guy (JRN) is so awesome.. its just when that guy will want to save the world he will do it believe me. :D

P.S.2: I sometimes think he is sort of hacker and is making fun of us :D but whatever..
User avatar
eXtr33m
Ingame Mod
 
Posts: 806
Joined: 12.19.09
Location: @Gauss:
-----tdm:  
nick: [dswp]Jan
skill: 330.877
kills: 220
deaths: 210
ratio: 1.04
-----bomb:  
nick: [dswp]Jan
skill: 664.203

PreviousNext

Who is online

Users browsing this forum: No registered users and 0 guests

Misc