Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - adarqui

Pages: 1 ... 986 987 [988] 989 990 ... 1505
14806
Progress Journals & Experimental Routines / Re: ADARQ's journal
« on: May 01, 2012, 03:02:13 am »
./bot(bot_test_stuff_init+0) [0x8050390]:returned
 ./bot(bot_global_signal_hooks+0) [0x805a2d0]:entered
./bot(bot_global_signal_hooks+0) [0x805a2d0]:returned
 ./bot(bot_global_defaults+0) [0x805ac30]:entered
./bot(bot_global_defaults+0) [0x805ac30]:returned
 ./bot(bot_global_conf_parse+0) [0x805a640]:entered
  ./bot(bot_global_conf_dir+0) [0x805a400]:entered
   ./bot(str_unite+0) [0x8052dd0]:entered
    ./bot(bot_strdup_fmt+0) [0x805c140]:entered
     ./bot(strstrip_nl+0) [0x8051f60]:entered
    ./bot(strstrip_nl+0) [0x8051f60]:returned
     ./bot(dlist_Dinsert_after+0) [0x8055c50]:entered
      ./bot(dlist_Dinsert_after+0) [0x8055c50]:entered
     ./bot(dlist_Dinsert_after+0) [0x8055c50]:returned
      ./bot(dlist_Dinsert_after+0) [0x8055c50]:entered
     ./bot(dlist_Dinsert_after+0) [0x8055c50]:returned
    ./bot(dlist_Dinsert_after+0) [0x8055c50]:returned
   ./bot(bot_strdup_fmt+0) [0x805c140]:returned
  ./bot(str_unite+0) [0x8052dd0]:returned
   ./bot(bot_global_conf_dir+0) [0x805a400]:entered
  ./bot(bot_global_conf_dir+0) [0x805a400]:returned
   ./bot(bot_free_fmt+0) [0x805bf60]:entered
    ./bot(dlist_next_retarded+0) [0x80550d0]:entered
   ./bot(dlist_next_retarded+0) [0x80550d0]:returned
    ./bot(dlist_remove+0) [0x8055280]:entered
   ./bot(dlist_remove+0) [0x8055280]:returned
 
# ./trace_print /darqbot/.darqbot/debug/trace |wc -l
401743

lul.

i wish their code set flags to tell you what type of 'function' you're in.. would help.

that output is from a small "trace_print" program, which takes a raw trace file, and prints it out tree'd..

i log the 'time()' to the raw file, so, eventually when im bored, i can add the ability for trace_print to tell me how long each function took to complete.. that will be kind of cool but we're talking nanoseconds here for the most part.

peace

14807
Progress Journals & Experimental Routines / Re: ADARQ's journal
« on: May 01, 2012, 02:36:57 am »
improved my 'prologue/epilogue tracer' since my last post.. this one is WAY better, absolutely sick never knew until now, that i could do this..

using gcc -finstrument-functions, you can add a hook to the prologue and epilogue of EVERY function/call/inline function/macro that you actually compile.... so now i dont even need to edit the source code to include my debugging info.. this trace resulted in a 500MB file within 1 minute of running my bot, lmao.. so i added a "trace only" config option, which means, i can trace based on a per-bot basis... such as:

efnet trace on

so now, all processing specific to that bot struct, will get logged to the trace file.. ill post some of the trace later.. here's an example code to illustrate how beast -finstrument-functions is..

Code: [Select]
#include <stdio.h>


void __cyg_profile_func_enter (void *this_fn, void *call_site)
  __attribute__ ((no_instrument_function));

void __cyg_profile_func_exit (void *this_fn, void *call_site)
  __attribute__ ((no_instrument_function));

void
__cyg_profile_func_enter (void *this_fn, void *call_site)
{

  printf ("enter: addr=%p\n", this_fn);
  return;
}

void
__cyg_profile_func_exit (void *this_fn, void *call_site)
{
  printf ("exit: addr=%p\n", this_fn);
  return;
}


void
foo (void)
{

  puts ("foo called");

  return;
}

int
main (int argc, char **argv[])
{

  puts ("main called");

  foo ();
}

the __cyg name is apparently based on cygnus, who developed that code which was implemented into gcc...

thankful something like that exists, really gives you a TON of new options regarding debugging etc.

peace

14808
Progress Journals & Experimental Routines / Re: ADARQ's journal
« on: May 01, 2012, 02:31:22 am »
^Not exactly. I'm working with a client to develop an app so that payment information is loaded into a QR code.

Basically phone 1 makes the QR code, phone 2 takes a picture and money is transferred. The OCR thing is another functionallity they want for those who don't download the app.

I haven't tried OCRopus. I have downloaded and played with tesseract and a million other libraries and they all sorta break on some of the cards. Tomorrow I will give OCRopus a try.... If that doesn't work I am gonna have to convert to Pgm and do this by hand (really don't want to!). So we will see....

sounds fun.. just wondering, how long do you have, to deliver that solution? sounds ilke an intense project, given the variety of card's.

maybe OCRopus will save the day.. g'luq.

14809
Progress Journals & Experimental Routines / Re: ADARQ's journal
« on: April 30, 2012, 10:34:19 pm »
http://www.adarq.org/forum/lets-nerd-the-f-out/random-nerdout-programs-written-by-adarq-org-members/msg70003/

got alot done today, so tired..

Your really diving in head-first into programming! You know anything about OCR? I have to write a OCR credit card reader for a client! Make that your next project!

nope, no experience with OCR.
Quote
"  The next step of using OCR for payments is apparently in the Credit Card payments sector. Mobile Credit Card payments are
  becoming quite popular in recent months with hardware scanners/swipe accessories. AisleBuyer is now using the same
  methodology as mobile banking apps do with depositing checks. By taking a picture of the customer's credit card, the app
  uses OCR to extract the credit card number and use that to process the transaction. With no need for potentially expensive
  hardware accessories, the barrier for entry to mobile credit card payments is drastically lowered.

  As a tech enthusiast, I think this is an awesome idea and will make life so much easier for people that want to take
  mobile credit card payments.
"

pretty cool.. that's what you're planning to do?




Quote
"            I have successfully used ocropus (The best open source OCR software sponsored by Google) for similar
            tasks. http://code.google.com/p/ocropus/

            Beyond character recognition, it can also analyze the layout of the image and locate the name.

 "


perhaps that may help?

pc man

14811
Boxing / Re: Bernard Hopkins vs Chad Dawson
« on: April 29, 2012, 11:48:44 pm »
Predictions for the rematch?

Hopkins by UD. I feel Dawson will go for some knockouts though which will also make him vulnerable to a knockout, but idk how much power Hopkins has left.

lol..

burnart hopkins, *snooze*

he did fight good though, i mean, good for what he does.. he looked sharp, great shape, fast.. hard to imagine he's like 80 years old..

dawson seemed genuinely impressed in the post fight interview.. he gave bhop tons of props.. i think dawson thought he would hurt him.

god damn @ burnttart's head, cannon ball head.

14812
Progress Journals & Experimental Routines / Re: ADARQ's journal
« on: April 29, 2012, 02:44:48 am »
sick, i've separated the "protocols" from the "communication" layers.. so i can have the bot connect via:

+proto irc
+comm raw

^^ IRC protocol, raw layer, just normal send/recv's/connect etc..

or i could do this:

+proto irc
+comm ssl

now it uses ssl :F

sick..

darqbot has been transitioning from an irc bot into a full fledged "bot bot".. it's going to be able to do so much more now that i've added a bunch of function pointers in the bot_t struct.. this allows for other services to be utilized, such as http, icecast/shoutcast, file operations, etc... it's becoming versatile but damn is it growing..

i wish i had gone this route initially, it's been tough reorganizing all of this code, and i'm still not happy with it.. i doubt i'll modify it exactly how i want though, that will take a bit longer than i'm willing to accept for the time being.

/* hooks based on conf */
int (*fn_init)(struct bot *);
int (*fn_fini)(struct bot *);
void (*fn_defaults)(struct bot *);
int (*fn_connect)(struct bot *);
int (*fn_connect_init)(struct bot *);
int (*fn_disconnect)(struct bot *);
ssize_t (*fn_recv)(struct bot *);
ssize_t (*fn_recv_actual)(struct bot *, char *, int);
int (*fn_send)(struct bot *);
ssize_t (*fn_send_actual)(struct bot *, char *, int);
int (*fn_handle_text)(struct bot *);
int (*fn_listen)(struct bot *);
void (*fn_evhook)(int, short, void *);
void (*fn_evhook_accept)(int, short, void *);
void * fn_data_proto;
void * fn_data_comm;

so now with those function pointers, you can override the "default irc behavior" and completely separate it from irc..

i'm going to create an ircd.conf for it, so that i can irc directly into the bot to control it and/or watch ALL communications that it is processing, via this 'sink' thing im writing.

every send function has to support 'sinks', which allow me to tap into raw sent/recv'd data and send it wherever i want.

peace

14813
Boxing / seth mitchell prediction
« on: April 28, 2012, 10:42:53 pm »
22:25 < ng_> relax
22:25 < ng_> nope
22:25 < Southpaw> id laugh
22:25 < ng_> mithell going to ko 3rd oun
22:25 < ng_> round
22:25 < Southpaw> mitchell aint shit
22:25 < ng_> u aint shit

:D

crazy come back.. he was so wrecked in round 1.

14814
Progress Journals & Experimental Routines / Re: ADARQ's journal
« on: April 26, 2012, 07:11:07 am »
finally figured out how i'm going to do nesting/recursive parsing.. using ^().. ^() will substitue the resulting string, whereever it is used.. unlimited nesting, anywhere in a line.

previously, you could only use pipes or the alias command..

ie

^echo hi my name is |^echo Mike

or to modify the name mike:

^echo hi my name is |^:|^caps mike

so the issue there is 'separators', the ^: command.. it works but, you can't nest and you always have to pipe..

with this, i'll be able to do..

^echo hi my name is ^(^echo mike)

or for the second example

first level nesting:
^echo hi my name is ^(^caps mike)

2nd level nesting:
^echo hi my name is ^(^echo ^(^caps mike))

that's a very basic example, but as you can see, much more versatile.. i can now substitue text into the function parameter of the trigger, such as:

^sort(^(^rand forc backc randc)) hi my name is mike

which will sort "hi my name is mike" randomly, forward, backward, or random, (per char)..

end trainer-mike example.




just wrote this func up real quick, pretty cool too, ^rf = random function

06:52 <@z> ^e hello bro what the hell is up|^rf(^echo:::^sort:::^leet(3):::^reverse:::^moby)
06:52 < KoC> hello bro what the hell is up
06:52 <@z> ^e hello bro what the hell is up|^rf(^echo:::^sort:::^leet(3):::^reverse:::^moby)
06:52 < KoC> nod bro what the lower world is distend
06:52 <@z> ^e hello bro what the hell is up|^rf(^echo:::^sort:::^leet(3):::^reverse:::^moby)
06:52 < KoC> h31|_() ]3/2() \\'}{4+ +h3 ]-[31|_ !$ |_|p
06:52 <@z> ^e hello bro what the hell is up|^rf(^echo:::^sort:::^leet(3):::^reverse:::^moby)
06:52 < KoC> pu si lleh eht tahw orb olleh
06:52 <@z> ^e hello bro what the hell is up|^rf(^echo:::^sort:::^leet(3):::^reverse:::^moby)
06:52 < KoC> pu si lleh eht tahw orb olleh
06:52 <@z> ^e hello bro what the hell is up|^rf(^echo:::^sort:::^leet(3):::^reverse:::^moby)
06:52 < KoC> pu si lleh eht tahw orb olleh
06:52 <@z> ^e hello bro what the hell is up|^rf(^echo:::^sort:::^leet(3):::^reverse:::^moby)
06:52 < KoC> hello bro what the hell is up
06:52 <@z> ^e hello bro what the hell is up|^rf(^echo:::^sort:::^leet(3):::^reverse:::^moby)
06:52 < KoC> smile bro what the noise is prefer
 

small example.. picks a random func based on the list wthin the parameter brackets ().



ok other than that.. fixed alot of little bugs today.. started a slight framework for a more robust mongodb add/get system, using stdarg..

bot_mongo_add(bot, "name", "ADARQ", "age", 50, "vert", 51.5) ... this creates structures inside the mongodb in a more dynamic manner, much more versatile.. i need this because i need to use mongodb more, for storing info that module need.. i have a bunch of modules storing info, but, they have their own routines for the most part.. now i can just use one function.

ok finally, i need to figure out how to sift through stack frames/arguments/local variables, there must be a way.. im compiling with -ggdb after all.. so there must be some sort of api/library i can use to access that data, i want to print it out with the ^frame or ^stack or ^reg or ^examine triggers.

peace

14815
Progress Journals & Experimental Routines / Re: THE DREAM JOURNAL
« on: April 26, 2012, 03:36:11 am »
since i've stopped training, i havn't really been able to remember my dreams. when i was training hard, every night i'd dream up some crazy ish and remember it, very vivid stuff.

14816
Basketball / Re: new name, same animal
« on: April 25, 2012, 02:24:19 pm »
the bigger problem, in my opinion, is that there is nobody in the nba that will teach artest a lesson.. i mean, this guy does dirty shit all the time and gets away with it.

you think he'd get away with that if barkley/lambier/rodman etc were around?

that elbow was criminal, he could have inflicted much more damage if it had landed flush on his eye socket for example.

artest is a bum.

14817
Progress Journals & Experimental Routines / Re: ADARQ's journal
« on: April 25, 2012, 05:01:46 am »
ran 1 mile today.



ircd char limit cut me off.. "i plan to attach this thing to tons of servers".

nice, lines of code & file listing for the bot at this point:

# wc -l *.[c,h] */*.[c,h]
   284 bot_alloc.c
  1871 bot.c
   483 bot_conf.c
   344 bot_environ.c
   441 bot_global.c
  1104 bot_misc.c
   328 bot_module.c
   447 bot_mongo.c
   228 bot_network.c
    81 bot_protocol.c
     2 bot_reaper.c
     9 bot_safe.c
    42 bot_stat.c
    82 bot_tokenize.c
   320 bot_unix.c
   661 dlist.c
   134 main.c
   205 matchchar.c
   195 randchar.c
   318 bin/extract_quotes.c
   354 bin/script_extract2.c
   319 bin/script_extract.c
    71 include/bot_alloc.h
    16 include/bot_conf.h
    16 include/bot_environ.h
    26 include/bot_global.h
   332 include/bot.h
    61 include/bot_misc.h
    42 include/bot_module.h
    25 include/bot_mongo.h
    13 include/bot_network.h
    38 include/bot_protocol.h
     6 include/bot_safe.h
     7 include/bot_stat.h
    63 include/bot_text.h
    14 include/bot_tokenize.h
    35 include/bot_unix.h
   132 include/dlist.h
    30 include/matchchar.h
    29 include/randchar.h
   382 mods/mod_alias.c
   220 mods/mod_auto_rejoin.c
   303 mods/mod_bgcolor.c
   180 mods/mod_bold.c
   243 mods/mod_caps.c
   812 mods/mod_chan.c
   238 mods/mod_char.c
    90 mods/mod_comment.c
   138 mods/mod_dice.c
    99 mods/mod_echo.c
   540 mods/mod_emot.c
   284 mods/mod_fgcolor.c
   424 mods/mod_guile.c
   243 mods/mod_help.c
   580 mods/mod_howie.c
   286 mods/mod_hun.c
   438 mods/mod_identify.c
   464 mods/mod_leet.c
   179 mods/mod_md5.c
   526 mods/mod_moby.c
    93 mods/mod_multi.c
   451 mods/mod_nop.c
    92 mods/mod_output_modify.c
   213 mods/mod_packmulti.c
   382 mods/mod_pcre.c
    94 mods/mod_pmme.c
    96 mods/mod_prepend.c
   566 mods/mod_quote.c
   621 mods/mod_rainbow.c
   242 mods/mod_rand.c
   180 mods/mod_reverse.c
   180 mods/mod_rot13.c
   176 mods/mod_roulette.c
   620 mods/mod_rss.c
   109 mods/mod_sep2.c
   106 mods/mod_sep.c
   426 mods/mod_shake1.c
  1143 mods/mod_smf.c
   357 mods/mod_sort.c
   203 mods/mod_space.c
   736 mods/mod_sp.c
   368 mods/mod_sysvbanner.c
   238 mods/mod_tiny.c
   268 mods/mod_tinypaw2.c
   260 mods/mod_tinypaw.c
   519 mods/mod_to.c
   183 mods/mod_underline.c
   400 mods/mod_var.c
   167 mods/mod_wc.c
    97 mods/mod_whoami.c
    93 mods/mod_zero.c

 25883 total

beast mode.


segregating the connector code took a bit of work, but damn does it work good.. can just let the connectors go to war with servers lmao, finally connecting and passing the fd back.. not having to worry about threading/libeventing for those connectors, is peace of mind..

tomorrow i need to get ^to working with those lists, creating temporary lists in bot_t to allow for piping to multiple channels/servers.. an example would be:

^nop(ina) \|^e\|^to(local) #darqbot    <-- that would pipe every message from any server/channel to my local ircd/channel..

^alias(add) wall \|^e\|^to efnet#jumping freenode*

then i'd go:

^a wall A MESSAGE HERE

which would then send "A MESSAGE HERE" to everything defined by ^to in the alias command.

nice..

other than that, need to start my banner generator, more comprehensive than the simple ^sysvbanner module.. this one will have tons of fonts.

peace

14818
Progress Journals & Experimental Routines / Re: ADARQ's journal
« on: April 24, 2012, 04:04:41 pm »
question: if we don't challenge our brains, are we using them at 100%?

let's say i watch jersey shore all day long, then go to a club, then come back home and do some pushups.

am i utilizing my brain at 100%?

if i know one language and am capable of learning 8-10, am i using my brain at 100%?

if i can't control my dreams, ie, lucid, am i using my brain at 100%?

if all i do is walk, am i using my body at 100% of what it is capable? so if i am capable of running 22mph, yet, i never surpass 8mph on a slow jog, what percent of my body "am i using"?

if all i do is eat 1 cheese doodle, yet im still hungry, have i used my intestines at 100% of their capability? perhaps, 100% of being empty?

then i think you are correct lbss, if we are only using ~10% of our brains, then we can say we are not using 90% of our brains, which still classifies itself as "using".

so, if you add the 10% use of my brain, to the 90% NOT use of my brain, then I am actually using 100% of my brain.

lbss good point ;f

Your brain is split up into different areas that handle different functions. It's not like any section can be used to learn a new language for example.

If you're not in pain, the sub-section of your brain that controls pain isn't active but it can't be used to learn calculus. It is however being used. If you get kicked in the nuts you'll feel it immediately (hopefully). Other areas are responsible for things like memory and cognitive function among other things. They are solely responsible for those tasks.

You are capable of learning an infinite number of languages if you had the time. Knowing them doesn't use your brain so much as learning them does. If you're fluent in a language you don't have to think much at all when speaking it. In the moment, whether you know 1 language or 50, all sections of your brain are firing and being used (hopefully).

That cheese doodle example...really? What do your intestines have to do with hunger? Ignoring that, they are either being used or they aren't. You could argue that only the sections with food in them are being used but the truth is it's an organ that functions as a whole. If some section were inactive the food would get stuck there. Also, comparing your brain to your intestines is retarded.

fyi, you're retarded rix.

pC

14819
Progress Journals & Experimental Routines / Re: ADARQ's journal
« on: April 24, 2012, 05:21:21 am »
question: if we don't challenge our brains, are we using them at 100%?

let's say i watch jersey shore all day long, then go to a club, then come back home and do some pushups.

am i utilizing my brain at 100%?

if i know one language and am capable of learning 8-10, am i using my brain at 100%?

if i can't control my dreams, ie, lucid, am i using my brain at 100%?

if all i do is walk, am i using my body at 100% of what it is capable? so if i am capable of running 22mph, yet, i never surpass 8mph on a slow jog, what percent of my body "am i using"?

if all i do is eat 1 cheese doodle, yet im still hungry, have i used my intestines at 100% of their capability? perhaps, 100% of being empty?

then i think you are correct lbss, if we are only using ~10% of our brains, then we can say we are not using 90% of our brains, which still classifies itself as "using".

so, if you add the 10% use of my brain, to the 90% NOT use of my brain, then I am actually using 100% of my brain.

lbss good point ;f






ok so gizmo got into a crazy fight at the dog park today.. lasted all of 2 seconds before i broke it up.. he got bit on his eyelid, tore a little piece out of it.. so lucky he didnt get fanged in his eye..




as for coding news:

added ^sysvbanner to the bot, and ^char which can invert chars/color codes/etc.. makes for some sick ascii'ing on irc.

then i added a 'fd pass' compoent to my bot..

- the parent now spawns forked children "connectors", which loop trying to connect to a server, sleep for a little upon failure, or if they succeed, the child contacts the parent over a unix domain socket and sends the connected file descriptor as control data, in a sendmsg() call

- then the parent recvmsg's() that descriptor, and re-links it into the bot_t structure, adding the fd/event to libevent dispatch loop, and all is good.


i spent 2 hours debugging something that turned out to be so damn simple... totally retarded... this happened before.. i spent time modifying the core code of the bot, then kept running it, and it kept crashing.. but that's because i forgot to recompile the modules, derp.. when i modify the main bot_t struct, the modules depend on it, and if they are already compiled, then their structures are off, missing or having too many bytes etc.. so pointers get mangled and it crashed.





in other news, my neighbor actually shot himself, suicide.. it's crazy, trying to think of why he would do that when from all accounts he seemed like a decently happy guy.. just got married ~1 year ago.. had kids, and step kids he raised.. was big into boxing,we always talked boxing.. had dogs, he'd walk all the time..

so then somehow he goes from a seemingly decent life, to shooting himself in the house while his wife and her brother were there.. mind-cannot-comprehend..

perhaps i could comprehend it if i used more than 10% of my brain.

peace

14820
Progress Journals & Experimental Routines / Re: ADARQ's journal
« on: April 23, 2012, 07:35:37 am »
darqbot is now 24,000 lines of code, beast.

Pages: 1 ... 986 987 [988] 989 990 ... 1505