Author Topic: ADARQ's journal  (Read 2586267 times)

0 Members and 1 Guest are viewing this topic.

T0ddday

  • Hero Member
  • *****
  • Posts: 1343
  • Respect: +1115
    • View Profile
    • Email
Re: ADARQ's journal
« Reply #4635 on: May 01, 2012, 12:39:43 am »
0
^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....

adarqui

  • Administrator
  • Hero Member
  • *****
  • Posts: 34034
  • who run it.
  • Respect: +9112
    • View Profile
    • Email
Re: ADARQ's journal
« Reply #4636 on: May 01, 2012, 02:31:22 am »
0
^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.

adarqui

  • Administrator
  • Hero Member
  • *****
  • Posts: 34034
  • who run it.
  • Respect: +9112
    • View Profile
    • Email
Re: ADARQ's journal
« Reply #4637 on: May 01, 2012, 02:36:57 am »
0
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

adarqui

  • Administrator
  • Hero Member
  • *****
  • Posts: 34034
  • who run it.
  • Respect: +9112
    • View Profile
    • Email
Re: ADARQ's journal
« Reply #4638 on: May 01, 2012, 03:02:13 am »
0
./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

adarqui

  • Administrator
  • Hero Member
  • *****
  • Posts: 34034
  • who run it.
  • Respect: +9112
    • View Profile
    • Email
Re: ADARQ's journal
« Reply #4639 on: May 02, 2012, 01:22:09 pm »
0
1 mile run yesterday and somme small sprints with gizmo.

man i am wrecked today, so tired.. another day with 5 hours sleep, somehow im toast today.

as for programming: i've been modularizing the bot even more, removed parser code (code that handles the ^trigger|^triggers) and put it into modules.. so now there's a parser stack..

so i've got pmod_parse1.c, about to work on pmod_parse2.c which will contain ^().

in the next few days, i need to move all of the sockets/irc/protocol stuff out of the bot and put that into modules too... gmods.. so there will be a gmod stack:

+gmodules irc,raw
+gmodules irc,ssl

etc

pc

darqbot

  • Newbie
  • *
  • Posts: 49
  • Respect: -4
    • View Profile
    • Email
adarq's-journal
« Reply #4640 on: May 03, 2012, 03:35:25 am »
-1
darqbot message from unknown:

my brain is fried trying to code pmod_parse2... wrecked.

adarqui

  • Administrator
  • Hero Member
  • *****
  • Posts: 34034
  • who run it.
  • Respect: +9112
    • View Profile
    • Email
Re: ADARQ's journal
« Reply #4641 on: May 03, 2012, 06:47:41 am »
0
just ran some sprints/quarters at 630am.. word

back on the valgrind tomorrow.

entropy

  • Hero Member
  • *****
  • Posts: 1684
  • b00m!
  • Respect: +276
    • View Profile
Re: ADARQ's journal
« Reply #4642 on: May 03, 2012, 07:20:14 am »
0
just ran some sprints/quarters at 630am.. word

back on the valgrind tomorrow.

nice.
Goals: Cutting to 6-8% bodyfat

T0ddday

  • Hero Member
  • *****
  • Posts: 1343
  • Respect: +1115
    • View Profile
    • Email
Re: ADARQ's journal
« Reply #4643 on: May 03, 2012, 09:23:08 am »
0
^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.

I had about a week.  Project shelved right now because we have a bug in our gateway system so working on that for now... much MORE boring. 

adarqui

  • Administrator
  • Hero Member
  • *****
  • Posts: 34034
  • who run it.
  • Respect: +9112
    • View Profile
    • Email
Re: ADARQ's journal
« Reply #4644 on: May 04, 2012, 02:26:09 am »
0
damn a week.. did OCRopus help any?


in other news, my brain is officially fried.. 2 days coding one small parser.. im not sure why it took so long but it was insanely difficult.. here's the irc log after i got it working:

02:12 <@nigeria> omg
02:12 <@nigeria> OMG
02:12 <@nigeria> OMG
02:12 <@nigeria> OMG
02:14 <@nigeria> 02:13 <@ng> ^e yo ^(yo ^(yo ^(^e a))) |hi
02:14 <@nigeria> 02:13 < xxx> yo yo yo ahi
02:14 <@nigeria> insane
02:15 <@nigeria> 02:15 <@ng> ^e yo ^(^e aaa ^(^caps(lowc) BBB ^(^sort(forc) isafjsifjasjfasinvoisdbvsaod))))
02:15 <@nigeria> 02:15 < xxx> yo aaa bbb aaaabddfffiiiijjjnoossssssvv
02:15 <@nigeria>
02:15 <@nigeria> fucking epic moment in my life
02:15 <@nigeria> lmfao
02:15 <@nigeria> that took some brain power
02:15 <@nigeria> god damn
02:16 <@nigeria> 02:16 <@ng> ^e ^(^caps(^(low)) AAA)
02:16 <@nigeria> 02:16 < xxx> aaa
02:16 <@nigeria>
02:16 <@nigeria> OMFG
02:16 <@nigeria> OMFG
02:16 <@nigeria> OMFG
02:17 <@nigeria> im dying right now


^() substitutes the text, no matter where it is in the line, and processes it, in inside-out order..

god that was brutal.. it probably has some bugs i need to find/work out but im pretty happy right now that i got that working..

^(a^(b^(c^(d^(...)))))

;F




it's not breaking, sick:

02:33 <@ng> ^e ^(^caps(^(low)) AAA))
02:33 < xxx> aaa
02:33 <@ng> ^e ^(^caps(^(low)) AAA)))
02:33 < xxx> aaa)
02:33 <@ng> ^e ^(^caps(^(low)) AAA)))((
02:33 < xxx> aaa)((
02:33 <@ng> ^e ^(^caps(^(low)) A)AA)))((
02:33 < xxx> aA)))((
02:33 <@ng> ^e ^(^caps(^(lo(w)) A)AA)))((
02:33 < xxx> A)AA)((
02:33 <@ng> ^e ^(^ca(ps(^(lo(w)) A)AA)))((
02:33 < xxx> ^ca(ps(lo(w) A)AA)((
02:33 <@ng> ^e ^(^c)a(ps(^(lo(w)) A)AA)))((
02:33 < xxx> (ps(A)AA)))((
02:33 <@ng> ^e (^(^c)a(ps(^(lo(w)) A)AA)))((
02:33 < xxx> ((ps(A)AA)))((
 




# wc -l *.[c,h] */*.[c,h] | tail -n 1
 34055 total

darqbot

  • Newbie
  • *
  • Posts: 49
  • Respect: -4
    • View Profile
    • Email
adarq's-journal
« Reply #4645 on: May 04, 2012, 02:31:57 am »
0
darqbot message from unknown:

from high to low.. the last thing i really need to do, to get the bot working the way i want, is refactor the protocol/comm code into modules, aka, gmods... after that, then i can pretty much work on fun modules etc, the bot will be how i want it..

adarqui

  • Administrator
  • Hero Member
  • *****
  • Posts: 34034
  • who run it.
  • Respect: +9112
    • View Profile
    • Email
Re: ADARQ's journal
« Reply #4646 on: May 04, 2012, 03:09:00 am »
0
03:02 <@ng> ^e |^^(^rand caps moby leet)) hi
03:02 < xxx> HI
03:02 <@ng> ^e |^^(^rand caps moby leet)) hi
03:02 < xxx> hi
03:02 <@ng> ^e |^^(^rand caps moby leet)) hi
03:02 < xxx> h1

so happy.. ;d

adarqui

  • Administrator
  • Hero Member
  • *****
  • Posts: 34034
  • who run it.
  • Respect: +9112
    • View Profile
    • Email
Re: ADARQ's journal
« Reply #4647 on: May 04, 2012, 06:29:30 am »
+1
ran a mile, then .5 mile, then some sprints later on.

ate so much tonight i almost puked.. soup/salad,margarita pizza,2 things of bread+olive oil, 2 pints of talenti gelato.

pc

adarqui

  • Administrator
  • Hero Member
  • *****
  • Posts: 34034
  • who run it.
  • Respect: +9112
    • View Profile
    • Email
Re: ADARQ's journal
« Reply #4648 on: May 05, 2012, 07:30:44 am »
0
just changed up bot_module.c bot_pmodule.c bot_gmodule.c , instead made wrapper funcs, and have everything in bot_xmodule.c now.. did all of this in 40min starting at 6:40am.. glad i got it done.

darqbot ASM project starts tomorrow..

im going to modularize the damn bot_misc/string func stuff, so i can have regular funcs ie C, and then ASM funcs..

ie, cmodule_c, cmodule_asm

they'd both act the same, except, one would be written in C, other would be written in intel asm.

odkopgkadsopgdpsojhdosp

Dreyth

  • Hero Member
  • *****
  • Posts: 3060
  • Respect: +1060
    • View Profile
    • Email
Re: ADARQ's journal
« Reply #4649 on: May 05, 2012, 10:37:12 am »
0
never understood the whole C/C#/objective C/C++ thing

wasnt even until this week that i figured out Java and Javascript are two different entities.
I'm LAKERS from The Vertical Summit