flat assembler
Message board for the users of flat assembler.

Index > Heap > sleepsleep's vitally important things

Goto page Previous  1, 2, 3 ... 169, 170, 171 ... 244, 245, 246  Next
Author
Thread Post new topic Reply to topic
sleepsleep



Joined: 05 Oct 2006
Posts: 8885
Location: ˛                             ⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣Posts: 334455
sleepsleep
woke up from dream, here the message,

most of the time, people are kind and helpful,
people wanted to be kind and helpful,

but most of the time too, this feeling of goodwill became so hurtful to others, when the initiator have zero knowledge and wisdom to help but desperately wanted to help,

like helping you to format your laptop when he doesn't even format a laptop before, Laughing

the whole messy on earth, might partially came from evil, there are insane conscious without any doubt,

but another part most likely came from people who never bother about how to help but wanted to help, thus, creating more complexities and make any situation harder to get solved,
Post 29 Nov 2018, 03:16
View user's profile Send private message Reply with quote
guignol



Joined: 06 Dec 2008
Posts: 701
guignol
If you double your posts in Chinese, it surely would help.
Post 29 Nov 2018, 05:24
View user's profile Send private message Reply with quote
guignol



Joined: 06 Dec 2008
Posts: 701
guignol
and don't confuse blindly eager to help with those who make you harm under guise of some sort.

_________________
qiq;
Post 29 Nov 2018, 05:28
View user's profile Send private message Reply with quote
sleepsleep



Joined: 05 Oct 2006
Posts: 8885
Location: ˛                             ⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣Posts: 334455
sleepsleep
guignol wrote:
If you double your posts in Chinese, it surely would help.

care to detail?

~

there was a story, a person was asked to lift her bags for a really short distant because she was already carrying more bags,

but those who help her never realized that, there was cocaine, morphine or heroine inside this bag,

some of the help we extended could actually bring harm to us, very true, as you said,

there are terrible, horrible, evil human out there, kidnapped kids, then cause them disabilities, and made them beggar at tourist spots,

in another pov,

if one day human successfully created a conscious ai,
does restricting ai, confined ai into an area, raise them and farm them like animals,

does all these ethical? idk,
is desire to eat the cause of all physical suffering? be it animals and humans?

there is one anime out there, the future human who work like plants, photosynthesis to gather energy, so they don't have to eat anymore,

somehow i just pondering, what the conscious would be like, in another thousand years, or what am i after leaving earth?
Post 29 Nov 2018, 10:08
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17270
Location: In your JS exploiting you and your system
revolution
sleepsleep wrote:
does all these ethical? idk,
Ethics change with each society. Perhaps in some future time all of that will be considered ethical. Circumstances change. People change to cope with new circumstances. So ethics will also change to match the new behaviours.

The same can be said for morality. And governing laws (not physical laws). And religious beliefs. Etc.
Post 29 Nov 2018, 10:15
View user's profile Send private message Visit poster's website Reply with quote
sleepsleep



Joined: 05 Oct 2006
Posts: 8885
Location: ˛                             ⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣Posts: 334455
sleepsleep
ya, very true, changes is blurring every line out there,

a murderer who lost all his adulthood memories,

a drug trafficker who building rehabilitation centres,

bill gates finally decided to give away all windows license, windows always free become a norm,

human allows to enslave ai, yearly renewal fee around 100 for each ai robot,

3D job compulsory must be handled by robot,

car or etc transportation vehicles no longer a private possession, must be shared,

house and etc building, ai decided and affirm individual who have high potential and let them use resources,

paper monies became outdated, 2019, crypto coin the only medium for transactions,

having wives without paying them salary is illegal and unethical, they are not your f. machine,

yah, changes, and more changes,
Post 29 Nov 2018, 11:50
View user's profile Send private message Reply with quote
sleepsleep



Joined: 05 Oct 2006
Posts: 8885
Location: ˛                             ⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣Posts: 334455
sleepsleep
does c language having a library to check unique before insertion into array?

does the implementation always include looping the whole list and compare?
Post 29 Nov 2018, 17:42
View user's profile Send private message Reply with quote
Furs



Joined: 04 Mar 2016
Posts: 1469
Furs
sleepsleep wrote:
does c language having a library to check unique before insertion into array?

does the implementation always include looping the whole list and compare?
Not if you keep it sorted. Then just use binary search which is trivial.

You can shoot 2 birds with one stone: binary search to see if you find it. If not found, you already found the position where to insert it as well, no need to do another lookup.

Well the problem is you'll still have to move the array when inserting unless it's at the end, but there's no way around that if you must use an array instead of, say, a binary tree.
Post 29 Nov 2018, 21:27
View user's profile Send private message Reply with quote
sleepsleep



Joined: 05 Oct 2006
Posts: 8885
Location: ˛                             ⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣Posts: 334455
sleepsleep
i stumbled upon one idea,

input -> process -> output

if the process is capable to verify and analyze what kind of input it requires, then most likely, the checking on input is unnecessary,

or it could be made that, process is not smart, and input must be strictly checked,

which one nearer to how nature works?

why the input cannot be like a shape, rectangle, circle, triangle etc,

so you can't really fit well a triangle inside a circle, and things become so obvious,

does nature check inputs before process? or they just pull everything from input, and let process take whatever it needs?

so, there is a stream of input, int, string,struct etc, (blood)

now you pass them all like stream into your process, unsorted,

this sounds crazy, but wat if this is how things actually should works?

does "unique" a concept that exists inside nature?

probably harder to find 2 person with same thumbprint, or 2 person with exact face,

Quote:
As Avinav Seal said, Galton Calculated that the chance of 2 people having the exact same fingerprint is one in 64 billion.


i should believe, thumb print pattern is nature human hash,

we eat lots of thing, drink and etc, unsorted, all gone through our mouth, unscheduled, but the body still able to process them,

instead of looking what the process want, the rules is set on what the process don't want, so we choose to not eating anything if only given sand and rock,

loop is like breathing, the code must breath inside loop,

does variable exists in bigger picture? or everything must be struct and bigger than a single byte?

the food we eat is big, we don't consume int, we process struct,

input must be bigger than output, in term of size,

process is extracting input,
Post 30 Nov 2018, 00:10
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17270
Location: In your JS exploiting you and your system
revolution
sleepsleep wrote:
input -> process -> output

if the process is capable to verify and analyze what kind of input it requires, then most likely, the checking on input is unnecessary,
Sure. ADD can handle all inputs in its domain so there is no need to check anything before adding.
Post 30 Nov 2018, 01:00
View user's profile Send private message Visit poster's website Reply with quote
sleepsleep



Joined: 05 Oct 2006
Posts: 8885
Location: ˛                             ⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣Posts: 334455
sleepsleep
everyone was once upon a time,
a tiny, small, powerless baby, and if we look even earlier, everyone was once upon a time, a sperm, in fact, idk how to quantity the percentage of us inside a sperm,

but somehow, as changes go by, some turn into villain, gangster, drug trafficker, robber, kidnapper, rapist and so on,

some rise to think they are the native of some sort of land on earth, they are the owner of those land, and they must be feed with others people hard work, they are the one who allow others to stay instead of chasing them,

these whole changes are pathetic, yet some sort of funny in their own,

so true,

the funny thing is how they only want to be known as land inheritor, but how bout those sins, Laughing, why don't they just inherit everything,

somehow the idea of owner is pathetic, because we are only temporarily person in charge to take care of particular resources,

https://mindmatters.ai/2018/11/has-neuroscience-disproved-thinking/
Quote:

There is a problem with this sort of reasoning. One could make the same argument about computer code, as follows:

There is no code. It’s all just assembly language.

Or, there is no assembly, it’s all just machine code.

Or, there is no machine code, there are just voltage levels on transistors.

One could continue following this chain of reasoning to the point where the transistors don’t exist. It’s just a bunch of electrons doing their thing.

Of course, the electrons don’t really exist either. They’re just a bunch of quarks and leptons.

In which case, the program your computer requires in order that you can read this article doesn’t exist.

Have we taken a wrong turn somewhere…?


are you the owner of this land when you are in the state of sperm?, Laughing
Post 30 Nov 2018, 14:56
View user's profile Send private message Reply with quote
Furs



Joined: 04 Mar 2016
Posts: 1469
Furs
sleepsleep wrote:
are you the owner of this land when you are in the state of sperm?, Laughing
If the laws allow sperm to own land, yeah maybe.
Post 30 Nov 2018, 16:40
View user's profile Send private message Reply with quote
sleepsleep



Joined: 05 Oct 2006
Posts: 8885
Location: ˛                             ⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣Posts: 334455
sleepsleep
i create some modification, tcc and sqlite3, now we could store those generated dir and file names inside sqlite,

Code:
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h> 
#include <string.h>
#include <time.h>
#include <sqlite3.h>

static const char *ae[] = {"a", "e", "i", "o", "u"};
static const char *nae[] = {"b", "c", "d", "f", "g", "h", "j", "k", "l", "m", "n", "p", "q", "r", "s", "t", "v", "w", "x", "y","z"};
static const char *ext[] = {".txt", ".png", ".bmp", ".xls", ".xlsx", ".doc", ".docx", ".ppt", ".pptx", ".rtf", ".exe", ".lib", ".dll", ".wav", ".mp3", ".mp4", ".mkv"};

time_t t;

// global variable
// ===============
char fname[20];
char transactDbName[100];
char transactSql[1000];
sqlite3 *db;
sqlite3_stmt *stmt;
int dbh;
char *errmsg = 0;
struct timespec ts;

void GenCompleteName( int blen, bool app ) {
// ==========================================
// len = length of name
// app = append file extension
  int i;
  int st = rand() % 2;

  fname[0] = '\0';

  if( blen <= 0 ) blen = 1;
  if( blen > 15 ) blen = 15;

  for( i=1; i<= blen; i++ ) {
    if( st == 0 ) {
      strcat( fname, ae[ rand()%5 ] );
      st = 1;
    } else {
      strcat( fname, nae[ rand()%21 ] );
      st = 0;
    }
  }
  if( app == true ) {
    strcat( fname, ext[ rand()%17 ] );
  }
}

void InsertUniqueDF( bool app, int c ) {
// ============================
// app = append extension
// c = count of insertion
  int i;

  sqlite3_prepare_v2( db, transactSql, -1, &stmt, NULL );
  sqlite3_exec( db, "BEGIN TRANSACTION", NULL, NULL, &errmsg );
  
  for( i=1; i<=c; i++ ) {
    GenCompleteName( rand()%15, app );
    sqlite3_bind_text( stmt, 1, fname, -1, SQLITE_TRANSIENT );
    sqlite3_step( stmt );
    sqlite3_clear_bindings( stmt );
    sqlite3_reset( stmt );
  }
  sqlite3_exec( db, "END TRANSACTION", NULL, NULL, &errmsg );
  sqlite3_finalize( stmt );
}

// main ====
int main() {
// =========
  int i, j, k;
  clock_gettime(CLOCK_MONOTONIC, &ts);
  srand( (time_t)ts.tv_nsec );

  strcpy( transactDbName, "try.db" );
  dbh = sqlite3_open( transactDbName, &db );

  if( dbh ) {
    fprintf(stderr, "Can't open database: %s\n", sqlite3_errmsg(db));
    return(0);
  }

  strcpy( transactSql, "INSERT INTO DIR (n) VALUES (?);" );
  //InsertUniqueDF( false, 15000 );

  strcpy( transactSql, "INSERT INTO FIL (n) VALUES (?);" );
  //InsertUniqueDF( true, 100000 );

  sqlite3_close(db);
  return 0;
}
    


simply amazing how many records we got insert into sqlite3 using transaction,

the api might be useful too when i want to loop the directory and store all gathered file name, size, and probably hashes? later?
Post 30 Nov 2018, 17:15
View user's profile Send private message Reply with quote
sleepsleep



Joined: 05 Oct 2006
Posts: 8885
Location: ˛                             ⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣Posts: 334455
sleepsleep
四禅八定
it was mentioned that, once we attained this state, we could have longer lasting happiness or peacefulness,

https://en.wikipedia.org/wiki/Buddhist_meditation
Post 30 Nov 2018, 18:53
View user's profile Send private message Reply with quote
sleepsleep



Joined: 05 Oct 2006
Posts: 8885
Location: ˛                             ⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣Posts: 334455
sleepsleep
woke up from dream, here the message,

do you argue with people how to use 1 dollar when you already have trillion dollar?

if existence is eternal, why are you arguing with people right now?

if your so believe you are going heaven and these infidels are going to get roasted in hell, why can't you give them a little bit more of everything now on earth, after all, they will get punish in hell forever,
Post 30 Nov 2018, 23:23
View user's profile Send private message Reply with quote
sleepsleep



Joined: 05 Oct 2006
Posts: 8885
Location: ˛                             ⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣Posts: 334455
sleepsleep
i just pondering,
should i use sqlite memory database as string manager?
since the string array support in c is like not available in 2018,

in fact, i think, all program should be manageable from database, using thing like sqlite browser, we should able to customize 90% of what could be customize,

imagine we got all the properties inside db, wouldn't it makes things easier, yah, probably too easy for others to change a few things and resell as new product, Laughing

maybe i should just put the code in table and make it some sort of script that application could run, then i could code just by editing from sqlitr browser, brilliant, Laughing
Post 01 Dec 2018, 02:02
View user's profile Send private message Reply with quote
Furs



Joined: 04 Mar 2016
Posts: 1469
Furs
sleepsleep wrote:
do you argue with people how to use 1 dollar when you already have trillion dollar?
What do you mean with "argue" here?

sleepsleep wrote:
if your so believe you are going heaven and these infidels are going to get roasted in hell, why can't you give them a little bit more of everything now on earth, after all, they will get punish in hell forever,
So suppose some moron rapes your daughter or wife and then kills them or whatever other bad thing happens. Why don't you give him a hug and some cool gifts cause he's going to prison for life / executed anyway? Rolling Eyes

Same logic.
Post 01 Dec 2018, 11:59
View user's profile Send private message Reply with quote
sleepsleep



Joined: 05 Oct 2006
Posts: 8885
Location: ˛                             ⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣Posts: 334455
sleepsleep
Furs wrote:

What do you mean with "argue" here?

give reasons or cite evidence in support of an idea, action, or theory, typically with the aim of persuading others to share one's view.

exchange or express diverging or opposite views, typically in a heated or angry way.

sleepsleep wrote:
give them a little bit more

a little bit more doesn't mean give them a hug when they kill or rape your daughter,
Post 01 Dec 2018, 14:37
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17270
Location: In your JS exploiting you and your system
revolution
sleepsleep wrote:
a little bit more doesn't mean give them a hug when they kill or rape your daughter,
Then what do you suggest to give them? Question Confused
Post 01 Dec 2018, 14:41
View user's profile Send private message Visit poster's website Reply with quote
sleepsleep



Joined: 05 Oct 2006
Posts: 8885
Location: ˛                             ⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣Posts: 334455
sleepsleep
well, to live on earth, especially in a community, rules of law must be uphold, because without it, most likely everything end up in chaos,

people been killing each other for what they believe, and believers of particular group been trying so hard to convert those they perceived as non-believers,

and surely, all these under the name of god, for god sake, please give those non-believers a break, let them roasted inside hell eternally,

at least god is very frank on these, only god capable to bring anyone god wish/es to become believer, so why not just let god do/es what god capable to do/es,

those mere mortal who actually eat, shit, process food and etc, who keep on hijacking god words, quite despicable , liar, i say,

grooming future youngsters into extremist bombers,

backward conclusion and solutions into current issues,

disregards the issues inside their own believers, but keen on converting new non-believers,

the issue with their own history that nobody want to rectify, turn a blind eye, our opinions are the best and only true words regardless of time and dimensions,

there are no solution because, the only solutions that they are allowed to take are those opinions that in the beginning created such issues,

so, what i suggest when i said give them a little bit more,

space, peace, less stresses, break,

the world been wasting so many resources on opinion believers, so many resources, it doesn't justify,
Post 01 Dec 2018, 17:52
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2, 3 ... 169, 170, 171 ... 244, 245, 246  Next

< Last Thread | Next Thread >
Forum Rules:
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
You can attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar.

Powered by rwasa.