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

0 Members and 1 Guest are viewing this topic.

piR

  • Hero Member
  • *****
  • Posts: 812
  • Respect: -144
    • View Profile

adarqui

  • Administrator
  • Hero Member
  • *****
  • Posts: 34034
  • who run it.
  • Respect: +9112
    • View Profile
    • Email
Re: ADARQ's journal
« Reply #4651 on: May 06, 2012, 04:22:47 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 actually didn't know about java/javascript either really, until i started building this site.. on that note, java is by far the ugliest language i've ever read/code ripped.. i absolutely hate reading java code. hideous

as for C, i try to keep it somewhat objective/modular, use recursion, minimize similar code into functions that can handle based on flags, separate my functions into different source files (.c's/.h's) etc.

im all self taught though so im sure it veers off the norm quite a bit.

pC man & stop waiting for your professor to teach you things :D i remember in C class, in college.. it took this ph.d professor like 2 months before he taught "pointers", and then when he did, it took 2 weeks on the topic, i was astonished.. it's funny how slow the class learned, i think it has alot to do with how the info is presented.. he presented the info as something "omg hard" when it's just so damn simple in reality. i know some kid who still can't figure out pointers, and it's been like 8 years.. every 1 he gets the urge to try and get back into coding, and when he does, pointers kill his quest every time.

*LMFAO*

adarqui

  • Administrator
  • Hero Member
  • *****
  • Posts: 34034
  • who run it.
  • Respect: +9112
    • View Profile
    • Email
Re: ADARQ's journal
« Reply #4652 on: May 06, 2012, 04:24:22 am »
0
fuck the tamarac police!

http://www.sun-sentinel.com/news/broward/fort-lauderdale/fl-cop-trial-wimberley-closings-20120504,0,6383161.story

haha how you find that? man tamarac police are pretty grimey.. lots of trashy tamarac cops.. i dont know why.. on the flipside, you go into coral springs and the cops are 10000x more vigilent yet they treat you much better/more respectful.

BSO is just too huge.. coral springs is a private police pd.. thats probably why they are so much better at policing and respecting people.

peace

adarqui

  • Administrator
  • Hero Member
  • *****
  • Posts: 34034
  • who run it.
  • Respect: +9112
    • View Profile
    • Email
Re: ADARQ's journal
« Reply #4653 on: May 06, 2012, 04:33:15 am »
0
int asmx86_strlen(const char *str) {
int ret;

__asm__(
"movl %1, %%edx\n"
"movl $0, %0\n"
"cmpb %0, (%%edx)\n"
"je out\n"
"redo:\n"
"inc %%edx\n"
"inc %0\n"
"movb (%%edx), %%eax\n"
"cmpb $0, %%al\n"
"jne redo\n"
"out:\n"
: "=r" (ret)
: "m" (str)
: "%eax","%edx","cc"
);

return ret;
}

darqbot now has an assembly module and hooks for overwriting  string functions.. eventually, i want to have EVERY SINGLE FUNCTION of my bot, become a function pointer and loaded to defaults right after main is run.. this will allow me to change the entire bot through modules, on the fly.. for example:

^fnsasmx86(on) will replace all function pointers that I code ASM routines for.. so in the above example, fn_strlen() throughout all of the code, can switch from normal (C) to asm (mod_fnsasmx86).. and then say i do another arch, i'd have mod_fnsasmsparc.. etc

this is just some fun stuff to allow me to work on my machine language coding.. i plan to code tons of stuff in assembly.. to start, all of the string functions: strstr,strcmp,strlen,islower,...etc

pretty cool... im kind of buying time before i have to refactor the protocol/communication layer code into gmodules.. im really dreading it, even though, once i get it done, itll be insane what i can do with the bot.

pc

Rix

  • Full Member
  • ***
  • Posts: 180
  • Respect: +8
    • View Profile
Re: ADARQ's journal
« Reply #4654 on: May 06, 2012, 09:06:26 am »
0
i actually didn't know about java/javascript either really, until i started building this site.. on that note, java is by far the ugliest language i've ever read/code ripped.. i absolutely hate reading java code. hideous

Why?

adarqui

  • Administrator
  • Hero Member
  • *****
  • Posts: 34034
  • who run it.
  • Respect: +9112
    • View Profile
    • Email
Re: ADARQ's journal
« Reply #4655 on: May 09, 2012, 06:23:26 am »
0
wrecked, 14 hours sleep last night..

brain was fried.

anyway got some major stuff done with the code im working on.. ive been planning this for a week, finally started doing it today.. got it working before sleeping tonight.

it basically uses up() and down() functions to pass data between protocol modules.. had to change up so much stuff..

need to clean it up tomorrow, it's crazy ugly.

pc

adarqui

  • Administrator
  • Hero Member
  • *****
  • Posts: 34034
  • who run it.
  • Respect: +9112
    • View Profile
    • Email
Re: ADARQ's journal
« Reply #4656 on: May 10, 2012, 06:29:56 am »
0
today is the weakest i've felt in a very long time.. body is wrecked.. probably from the sleep debt + 14 hour sleep stuff.

other than that, got alot of coding done.

entropy

  • Hero Member
  • *****
  • Posts: 1684
  • b00m!
  • Respect: +276
    • View Profile
Re: ADARQ's journal
« Reply #4657 on: May 10, 2012, 07:03:02 am »
0
lol java isn't too bad, it can be a bit verbose, esp when your average software engineer tries to be excessively 'professional' to a fault and obfuscates the program logic in a clutter of many classes and nested objects and unnecessary abstraction. But that's not the languages fault. Anyway the best thing about the language is the JVM which is a high quality, well implemented piece of software which you can use to build cool apps. The trick is just to use a JVM language other than basic Java.
Goals: Cutting to 6-8% bodyfat

adarqui

  • Administrator
  • Hero Member
  • *****
  • Posts: 34034
  • who run it.
  • Respect: +9112
    • View Profile
    • Email
Re: ADARQ's journal
« Reply #4658 on: May 11, 2012, 07:22:41 am »
0
lol java isn't too bad, it can be a bit verbose, esp when your average software engineer tries to be excessively 'professional' to a fault and obfuscates the program logic in a clutter of many classes and nested objects and unnecessary abstraction. But that's not the languages fault. Anyway the best thing about the language is the JVM which is a high quality, well implemented piece of software which you can use to build cool apps. The trick is just to use a JVM language other than basic Java.

well said, ya the language itself is not what annoys me.. it's when OO coders go nuts like you said, seems to happen with C++ coders as well.






realized one of my favorite parks nearby, is a great place to run with the dog.. massive sprints, 100-200 yards, chasing airborne ducks.. i'm gassing, yet gizmo is going full speed the entire time, he's a damn freak.. chasing them into the lake/flooded grass areas.. he loves running in those flooded grass areas now. he's not a princess, that's for sure.. we came back from the park, 1 hour of on/off sprints/jogs, completely muddied.


bot is now 38,000 lines word.. pretty clean too.. gotta chill modding the core for a few days, and work on some fun code.. need to get my ^quiz/^answer working, ^fortune, and who knows what else.. ^fortune will just be a rip of NIX fortune.. ^quiz will be a flashcard/quiz-like module, which i've already started building some db's for..

for example, i have mods/mod_quiz_files/intel* for intel processor related docs, instruction set etc.. formatting them will take a while, ongoing project, but i need to add more stuff to it, like RFC's that im reading, other processors (Sparc/arm) etc..

this thing is basically just becoming an extension of my brain and a way for me to learn a ton of sh*t.

peace

adarqui

  • Administrator
  • Hero Member
  • *****
  • Posts: 34034
  • who run it.
  • Respect: +9112
    • View Profile
    • Email
Re: ADARQ's journal
« Reply #4659 on: May 13, 2012, 07:30:36 am »
0
SOMETHING IS WRONG WITH MY BRAIN.

just got back from running a bunch of sprints and some jogs.

quads have been sore for ~2days, since the last time i did all of those sprints chasing ducks.

so tired why am i still up.

cowed77

  • Hero Member
  • *****
  • Posts: 1293
  • fall down seven times, get up eight
  • Respect: +63
    • View Profile
    • Email
Re: ADARQ's journal
« Reply #4660 on: May 13, 2012, 11:20:48 pm »
0
Hey man. Reckon it's oki if I ask u some training stuff?
BW: 74kg
Ht: 174cm, 5'8
reach: 220cm

adarqui

  • Administrator
  • Hero Member
  • *****
  • Posts: 34034
  • who run it.
  • Respect: +9112
    • View Profile
    • Email
Re: ADARQ's journal
« Reply #4661 on: May 14, 2012, 06:50:05 am »
0
big duck chase sprints tonight.


Hey man. Reckon it's oki if I ask u some training stuff?

sure but i probably won't be able to give good feedback, i can't even think about training right now.

adarqui

  • Administrator
  • Hero Member
  • *****
  • Posts: 34034
  • who run it.
  • Respect: +9112
    • View Profile
    • Email
Re: ADARQ's journal
« Reply #4662 on: May 15, 2012, 12:24:08 am »
-2
nice, ^quiz is coming along.. just need to keep track of winners now, that's easy.. this will allow me to move all of my note taking, into my bot.... which is just an incredibly awesome idea..

quick example

00:03 <@ng> ^quiz(setup) intel|^e
00:03 < uas> QUIZ (intel) question => Read from a port
00:03 <@ng> ^ans INP
00:03 <@ng> ^ans INS
00:04 <@ng> ^ans IN
00:04 <@ng> ^ans RSM
00:05 <@ng> ^quiz(setup) intel|^e

00:05 < uas> QUIZ (intel) question => Store global descriptor table (GDT) register
00:05 <@ng> ^ans SGDT
00:06 <@ng> ^ans SGDT|^e
00:06 <@ng> ^ans JPE|^e
00:06 < uas> WINNER (ng)! QUIZ (intel) question => Jump if greater/Jump if not less or equal
00:06 <@ng> ^ans JG|^e
00:06 < uas> WINNER (ng)! QUIZ (intel) question => Verify segment for writing
00:06 <@ng> ^ans BOUNDS|^e
00:07 <@ng> ^quiz(setup) intel
00:07 < uas> QUIZ (intel) question => Shift logical right
00:07 <@ng> ^ans SHR
00:07 < uas> WINNER (ng)! NEXT QUIZ (intel) question => Convert word to doubleword/Convert doubleword to quadword
00:07 <@ng> ^ans CDWQ
00:07 <@ng> ^ans CDQ
00:07 < uas> WINNER (ng)! NEXT QUIZ (intel) question => Load flags into AH register
00:13 <@ng> ^quiz(setup) intel|^e
00:13 < uas> QUIZ (intel) question => Decimal adjust after subtraction
00:13 <@ng> ^ans DAAS
00:14 <@ng> ^ans DAS
00:14 < uas> WINNER (ng)! NEXT QUIZ (intel) question => Byte swap
00:14 <@ng> ^ans BSWAP
00:14 < uas> WINNER (ng)! NEXT QUIZ (intel) question => Load access rights
00:14 <@ng> ^ans LAR
00:14 < uas> WINNER (ng)! NEXT QUIZ (intel) question => Move string/Move word string
00:14 <@ng> ^ans MOVS
00:14 < uas> WINNER (ng)! NEXT QUIZ (intel) question => Compare and exchange 8 bytes
00:14 <@ng> ^ans CMPXCHG8
00:14 <@ng> ^ans CMPXCHG8B
00:14 < uas> WINNER (ng)! NEXT QUIZ (intel) question => Undefined instruction
00:14 <@ng> wtf
00:14 <@ng> lmao
00:14 <@ng> ^ans UNDE
00:14 <@ng> ^ans UNDEF
00:14 <@ng> ^ans UN
00:14 <@ng> ^ans UND
00:14 <@ng> gah!@$
00:15 <@ng> ^ans WTF
00:15 <@ng> ^ans WTF!@$!@
00:15 <@ng> ^ans WTF!@$!@#%!@%!@!@
00:15 <@ng> ^ans WTF!@$!@#%!@%!@!@
00:15 < uas> NO WINNERS. NEXT ng
00:16 <@ng> ^quiz(list)
00:16 < uas> INTEL INTEL_VM INTEL_FPU INTEL_MMX_SSE INTEL_64 INTEL_SAFE
 
:D

adarqui

  • Administrator
  • Hero Member
  • *****
  • Posts: 34034
  • who run it.
  • Respect: +9112
    • View Profile
    • Email
Re: ADARQ's journal
« Reply #4663 on: May 16, 2012, 07:49:02 am »
0
did ~45 minutes of sprints today w/ dog, knee is sore.



adding some cool stuff to bot.. it's not pretty much immune to segv's/illegal instructions/bus errors etc.. because i catch the signals, and restore the stack to some safe/sanitized values, set way before any segvs.. pretty cool.. if it gets really wrecked, it still continues to try to live, and operates.. so far it's operating fine with segv's, until it encounters whatever is segv'n it.. so say a module segv's it, well, all others may be fine, so it's fine until it encounters the problematic module.

pretty sick

adding SO much info to ^quiz.. that is easily the best feature of the bot.. it's basically like a flashcard/note taking system for me (and whoever uses it).. i'm parsing intel instruction set, sparc instruction set, and the POSIX spec into the quiz to start.. also some other stuff like unix signals/error numbers etc.

need to work on my "keep alive" capability.. which will resume connections through a middle man daemon.. so say the bot does segv and crashes.. with this, it restarted, and re-links with whatever's it was previously connected too.. restoring that session... this is good because, i can literally restart the bot completely, with newer code, and have it relink with an existing connection..

people would have no idea it ever restarted.

sosiq.

peace

adarqui

  • Administrator
  • Hero Member
  • *****
  • Posts: 34034
  • who run it.
  • Respect: +9112
    • View Profile
    • Email
Re: ADARQ's journal
« Reply #4664 on: May 17, 2012, 06:45:56 am »
0
no sprints/small jogs or anything today, too much rain, plus too busy adding the POSIX api spec to this quiz module.

got that done, have to finish adding the POSIX 'glossary definitions' now.. then add intel arch, some crypto stuff, errno vals, and then on to network protocols etc.

this quiz mod is ridic fun.

the fault tolerance of this thing is getting nuts.. can sigsegv all day long, then continue to run fine..

once i get this middleman fd-reconnect thing working.. it will be crazy fault tolerant.. then when i add my recon lib from way back, itll be able to exist on say, shitty wifi cons which drop all of the time.. because the recon lib is a wrapper between normal tcp streams, allowing for re-estabilishment of the link.. only thing with that is, you need a daemon on some reliable server somewhere.

i need to get a smartphone eventually, so i can IRC/live chat from it and use the bot lmfao.

re-wrote the per-module parsing block, it used to be around 20 lines, now it's 3..

MOD_PARSE_TOP_HALF;
l_new_str = blah_change_string(l_str_ptr, opts...);
MOD_PARSE_BOTTOM_HALF;

and that's all there is to it, for proper multi line processing etc.

so much cleaner.



peace.. 3 hours sleep tonight fml.