flat assembler
Message board for the users of flat assembler.

flat assembler > Heap > vivik's twitter

Goto page Previous  1, 2, 3 ... 13, 14, 15
Author
Thread Post new topic Reply to topic
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 16778
Location: In your JS exploiting you and your system
revolution wrote:
revolution wrote:
vivik wrote:
No posts exist for this topic
It will soon.
It will soon.
It does now.

The counter is off by three.
Post 14 Feb 2019, 09:50
View user's profile Send private message Visit poster's website Reply with quote
vivik



Joined: 29 Oct 2016
Posts: 671
sleepsleep's thread should be off by 8, if I did things correctly.
Post 14 Feb 2019, 12:20
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 16778
Location: In your JS exploiting you and your system
vivik wrote:
sleepsleep's thread should be off by 8, if I did things correctly.
Do you mean this thread?

https://board.flatassembler.net/topic.php?t=14301

Because it is fine right now.
Post 14 Feb 2019, 12:24
View user's profile Send private message Visit poster's website Reply with quote
vivik



Joined: 29 Oct 2016
Posts: 671
https://www.geeksforgeeks.org/advanced-data-structures/

remind me to read this later. May be a bit easier to swallow than Knuth.
Post 14 Feb 2019, 17:11
View user's profile Send private message Reply with quote
vivik



Joined: 29 Oct 2016
Posts: 671
0FW23bamIZI
Dwarf Fortress Review | Strike The Earth™ | Praise ᚨᚱᛗᛟᚲ

it takes genocide to make me laugh

6rEkKWXCcR4
Harry Potter except it's written by an AI

well, this works too
(some said it's either fully written by human, corrected by human, or human chose which variant to accept)

boo_Ii2Iam4
Two Adults read an Adult Story 2: Shagging me Nan
age restricted

how those two understand each other?

0Iqr0L4bUms
someBODY

---
Code:
                        if (wParam == VK_ESCAPE /*|| wParam == 'Q'*//* || wParam == VK_NUMPAD0*/) {
                                /* ExitProcess(0); */
                                DestroyWindow(hWnd);
                        }    


---
int size
>Nowadays, it's most often 4 bytes on a 32-bit as well as 64-bit systems.
huh... I thought it's 8 bytes on 64-bit systems...

no reason to use DWORD then...

huh, so char = 1 byte, short = 2 bytes, int = 4 bytes, long = 4 bytes, long long = 8 bytes. Okay.

---
i'm still not ready to split my program into different classes/files.

but you know what? I will split them into 2 .h files.

text_newlines_vars.h
text_newlines_func.h

.cpp files will speed up compilation, but it's fast enough right now anyway. My bigger problem is that I can't find anything.

>identifier "memget" is undefined
f*ck

keep it in one file a bit longer. Soon text editor will be done, and soon I'll be able to parse source code.

---
http://www.asciitable.com/
all codes from 0x00 to 0x1f are some strange trash, readable stuff starts from 0x20 onward. And 0x20 is space.

so, I probably can make linewrap by searching for the next character that is between 0x00 and 0x20 inclusivly, instead of searchng for '\n' '\t' ' ' individually.

There are only 0x80 one byte utf8 characters, and 0x20 out of those are wasted on this. Compression probably fixes this mostly.

---
apparently the thing I'm doing is called https://en.wikipedia.org/wiki/Unrolled_linked_list

https://github.com/ennorehling/quicklist/blob/master/quicklist.c

#define ql_true 1
#define ql_false 0

ugh... why they do this...

---
zn240HWmnvE
LS-1_Indies_animation/自主制作アニメ

here's that animation


Last edited by vivik on 18 Feb 2019, 18:57; edited 3 times in total
Post 14 Feb 2019, 18:20
View user's profile Send private message Reply with quote
vivik



Joined: 29 Oct 2016
Posts: 671
non-lazy word wrap

Code:
                        if (cur_wrap == 0) {
                                char* cur_osd_backup = cur_osd;
                                //cur_osd++; //LATER: test this properly, newline at the beginning of file
                                int length = 0;
                                int last_space = 0;
                                char* last_space_cur = 0;
                                while (true) {
                                        char c = *cur_osd;
                                        cur_osd++;
                                        length++;
                                        if (c == '\n' || c == 0) {
                                                cur_wrap = cur_osd;
                                                break;
                                        }
                                        else if (c == ' ' || c == '\t') {
                                                if (c == '\t') {
                                                        length += 3;
                                                }
                                                last_space = length;
                                                last_space_cur = cur_osd;
                                        }
                                        if (length > 100) {
                                                if (last_space == 0) cur_wrap = cur_osd_backup;
                                                else cur_wrap = last_space_cur;
                                                break;
                                        }

                                }
                                cur_osd = cur_osd_backup;
                        }    


now do actual movement up down.

moving to the next/previous \n symbol is quite simple, but word wrap complicates things...

I thought about keeping the list of newlines, but this means updating it every time I add/remove a new line break... And I got confused with data structures... I'll just waste a bit of cpu time for now, maybe I'll redo it properly later. Maybe it's good enough already anyway...

I'm dumb. Your screen is fixed size, fixed number of lines. Thus, you need an allocation of fixed size to store all newlines on current screen. (the same ugliness you are trying to avoid will appear the moment you try to move beyond this screen, so nope).

I can do this 100%. It will just be horribly ugly, but it will work eventually.
Post 15 Feb 2019, 15:54
View user's profile Send private message Reply with quote
vivik



Joined: 29 Oct 2016
Posts: 671
phew, scrolling up:

Code:
void text_scroll_up() {
        if (screen_start == 0) return;
        g_display.need_redraw_not = 0;
        
        char *cur_osd = textfilebuf + screen_start;
        char *original_location = cur_osd;
        char *last_newline = 0;
        char *lastn = 0;
        cur_osd--;

        //find the previous newline
        //find if you are 1 or more lines away from it
        //go to the previous line


        while (true) {
                cur_osd--;
                char c = *cur_osd;
                if (cur_osd <= textfilebuf) {
                        cur_osd = textfilebuf;
                        break;
                }
                if (c == '\n') {
                        cur_osd++;
                        break;
                }
        }

        lastn = cur_osd;
        last_newline = lastn;

        while(true){
                char* cur_wrap;

                char* cur_osd_backup = cur_osd;
                int length = 0;
                int last_space = 0;
                char* last_space_cur = 0;
                while (true) {
                        char c = *cur_osd;
                        cur_osd++;
                        length++;
                        if (cur_osd == original_location) {
                                cur_wrap = cur_osd;
                                goto last_newline_found;
                        }
                        else if (c == ' ' || c == '\t') {
                                if (c == '\t') {
                                        length += 3;
                                }
                                last_space = length;
                                last_space_cur = cur_osd;
                        }
                        if (length > 100) {
                                if (last_space == 0) cur_wrap = cur_osd_backup;
                                else cur_wrap = last_space_cur;
                                break;
                        }

                }
                cur_osd = cur_wrap;
                last_newline = cur_osd;
        }

last_newline_found:


        screen_start = (int)(last_newline - textfilebuf);

        
}    


now add 7 times as much of this. I told it's gonna be ugly. But it's probably still instantanious no matter what. Also the rest is mostly copypaste, with small changes.

The problem with wordwrapped text, is that you can go from previous line to next, but not back. When you search for \n, you can do this in both directions, but when you need to make sure that text fits on the screen, you can move only forward.

So, to move anywhere, you need to count how many lines are there in the paragraph first, and then count out the line you need.

Sorry, I'm pretty much talking to myself here.
Post 16 Feb 2019, 12:16
View user's profile Send private message Reply with quote
vivik



Joined: 29 Oct 2016
Posts: 671
magic

Code:
void text_scroll_down() {
        if (screen_start == textfilesize) return;
        g_display.need_redraw_not = 0;


        int whereshouldigo = 1; //where i should go
        int whereami = -1; //where i am now

        char *cur_osd = textfilebuf + screen_start;
        char *original_location = cur_osd;
        char *last_newline = 0;
        char *lastn = 0;
        cur_osd--;

        //find the previous newline
        //find if you are 1 or more lines away from it
        //go to the previous line


        while (true) {
                cur_osd--;
                char c = *cur_osd;
                if (cur_osd <= textfilebuf) {
                        cur_osd = textfilebuf;
                        break;
                }
                if (c == '\n') {
                        cur_osd++;
                        break;
                }
        }

        //count the amount of newlines between cur_osd and original_location
        //if 0, go to the previous paragraph
        //else, stay in this paragraph
        //make it more general, it's easier that way

        int current_line = 0;

        while (true) {

                char* cur_osd_backup = cur_osd;
                int length = 0;
                int last_space = 0;
                char* last_space_cur = 0;
                while (true) {
                        char c = *cur_osd;
                        cur_osd++;
                        length++;

                        if (c == '\n' || cur_osd >= textfilebuf + textfilesize) {
                                break;
                        }
                        else if (c == ' ' || c == '\t') {
                                if (c == '\t') {
                                        length += 3;
                                }
                                last_space = length;
                                last_space_cur = cur_osd;
                        }
                        if (length > 100) {
                                if (last_space == 0) {
                                        FUCK(); //LATER
                                        cur_osd = cur_osd_backup;
                                }
                                else cur_osd = last_space_cur;
                                break;
                        }

                }
                current_line++;
                last_newline = cur_osd;

                if (whereami < 0) {
                        if (cur_osd >= original_location) {
                                whereami = current_line;
                        }
                } 
                if (whereami >= 0) {
                        if (current_line == whereami + whereshouldigo) {
                                goto done;
                        }
                }
        }


done:

        screen_start = (int)(cur_osd - textfilebuf);

}    


next step is scrolling more than one line up or down at once. Everything needs to be in another while loop.
Post 16 Feb 2019, 17:18
View user's profile Send private message Reply with quote
Lost_Ghost123



Joined: 12 Feb 2019
Posts: 29
Do you mind telling what is it that you are doung, why are you doing this? Is this C?
Post 16 Feb 2019, 17:48
View user's profile Send private message Reply with quote
vivik



Joined: 29 Oct 2016
Posts: 671
@Lost_Ghost123
text editor. I'm too dumb for git and such, so I just drop pieces of code here.

yep, c.

textfilebuf is the start of text
textfilesize is the size of text
screen_start is "from where the drawing of text will begin", if 0 then from beginning. This is how I do scrolling.
g_display.need_redraw_not = 0; is "please redraw".

i do it because emacs is too laggy, and notepad++ isn't customizable enough. For some reason I decided that writing it from scratch is easier than understanding internals of those two. You know, I did crazy things with my emacs that I can't live without now, like pressing ';' to open the file address under cursor.

i'll use it as a base for a few crazy things in the future as well. If I'll stop being this slow and lazy, that is.

---
qE0hoDmpEuA
SMW Hack - Cool Or Cruel (C | C) Stage 11 - Gnarly

DtXmV4F8W14
[Touhou Danmakufu] 85diant Hybridgun Stage 1A

---
so, i thought it was invalid input that causes this thread to glitch (No posts exist for this topic), but i couldn't replicate it. Oh well.

---
voodoo programming full force
Post 16 Feb 2019, 18:44
View user's profile Send private message Reply with quote
vivik



Joined: 29 Oct 2016
Posts: 671
change things at random, until it works

and use debugger

Code:
void text_scroll_down_where() {

        if (screen_start == textfilesize) return;
        g_display.need_redraw_not = 0;


        int whereshouldigo = 0; //where i should go
        int whereami = -1; //where i am now

        char *cur_osd = textfilebuf + screen_start;
        char *original_location = cur_osd;
        char *last_newline = 0;
        char *lastn = 0;
        //cur_osd--;

        //find the previous newline
        //find if you are 1 or more lines away from it
        //go to the previous line


        while (true) {
                cur_osd--;
                if (cur_osd <= textfilebuf) {
                        cur_osd = textfilebuf;
                        break;
                }
                char c = *cur_osd;
                if (c == '\n') {
                        cur_osd++;
                        break;
                }

        }

        //count the amount of newlines between cur_osd and original_location
        //if 0, go to the previous paragraph
        //else, stay in this paragraph
        //make it more general, it's easier that way

        
        int current_line = 0;

        while (true) {

                while (true) {

                        char* cur_osd_backup = cur_osd;
                        int length = 0;
                        int last_space = 0;
                        char* last_space_cur = 0;
                        while (true) {
                                char c = *cur_osd;
                                cur_osd++;
                                length++;

                                if (cur_osd >= textfilebuf + textfilesize) {
                                        cur_osd = cur_osd_backup;
                                        goto done;
                                }
                                if (c == '\n') {
                                        break;
                                }
                                else if (c == ' ' || c == '\t') {
                                        if (c == '\t') {
                                                length += 3;
                                        }
                                        last_space = length;
                                        last_space_cur = cur_osd;
                                }
                                if (length > 100) {
                                        if (last_space == 0) {
                                                FUCK(); //LATER
                                                //cur_osd = cur_osd_backup;
                                        }
                                        else cur_osd = last_space_cur;
                                        break;
                                }

                        }
                        


                        if (whereami < 0) {
                                if (cur_osd > original_location) {
                                        whereami = current_line;
                                }
                        }
                        if (whereami >= 0) {
                                if (current_line == whereami + whereshouldigo) {
                                        goto done;
                                }
                        }

                        current_line++;
                        last_newline = cur_osd;
                        
                }
        }


done:

        screen_start = (int)(cur_osd - textfilebuf);

}    


next is scroll up multiple lines.
after that, move cursor up and down.
Post 16 Feb 2019, 20:17
View user's profile Send private message Reply with quote
vivik



Joined: 29 Oct 2016
Posts: 671
sleep is the best thing ever

Code:
void text_scroll_up_where() {
        //almost like text_scroll_down_where
        //first find whereami
        //then iterate till whereshouldigo
        //if not in this paragraph, search previous one

        if (screen_start == textfilesize) return;
        g_display.need_redraw_not = 0;


        int whereshouldigo = -2; //where i should go

        int current_line_top = 0;


        char *cur_osd = textfilebuf + screen_start;
        char *original_location = cur_osd;
        //char *last_newline = 0;
        //char *lastn = 0;
        //cur_osd--;

        //find the previous newline
        //find if you are 1 or more lines away from it
        //go to the previous line


        while (true) {
                cur_osd--;
                if (cur_osd <= textfilebuf) {
                        cur_osd = textfilebuf;
                        break;
                }
                char c = *cur_osd;
                if (c == '\n') {
                        cur_osd++;
                        break;
                }

        }

        //count the amount of newlines between cur_osd and original_location
        //if 0, go to the previous paragraph
        //else, stay in this paragraph
        //make it more general, it's easier that way


        //1) find whereami

        int whereami;
        int current_line = 0;
        char* cur_osd_backup_backup = cur_osd;

        while (true) {

                char* cur_osd_backup = cur_osd;
                int length = 0;
                int last_space = 0;
                char* last_space_cur = 0;
                while (true) {
                        char c = *cur_osd;
                        cur_osd++;
                        length++;

                        if (cur_osd >= textfilebuf + textfilesize) {
                                //cur_osd = cur_osd_backup;
                                //goto done;
                                break;
                        }
                        if (c == '\n') {
                                break;
                        }
                        else if (c == ' ' || c == '\t') {
                                if (c == '\t') {
                                        length += 3;
                                }
                                last_space = length;
                                last_space_cur = cur_osd;
                        }
                        if (length > 100) {
                                if (last_space == 0) {
                                        FUCK(); //LATER
                                        //cur_osd = cur_osd_backup;
                                }
                                else cur_osd = last_space_cur;
                                break;
                        }
                }

                if (cur_osd > original_location) {
                        whereami = current_line;

                        cur_osd = cur_osd_backup_backup;



                        goto goto_whereami;
                }

                current_line++;

        }

goto_whereami:

        if (whereami + whereshouldigo == 0) goto done;

        else if (whereami + whereshouldigo > 0) {
                //seek in this paragraph

                char* cur_osd_backup_backup = cur_osd;
                int current_line = 0;

                while (true) {
                        

                        char* cur_osd_backup = cur_osd;
                        int length = 0;
                        int last_space = 0;
                        char* last_space_cur = 0;
                        while (true) {
                                char c = *cur_osd;
                                cur_osd++;
                                length++;

                                if (cur_osd >= textfilebuf + textfilesize) {
                                        //cur_osd = cur_osd_backup;
                                        //goto done;
                                        break;
                                }
                                if (c == '\n') {
                                        break;
                                }
                                else if (c == ' ' || c == '\t') {
                                        if (c == '\t') {
                                                length += 3;
                                        }
                                        last_space = length;
                                        last_space_cur = cur_osd;
                                }
                                if (length > 100) {
                                        if (last_space == 0) {
                                                FUCK(); //LATER
                                                //cur_osd = cur_osd_backup;
                                        }
                                        else cur_osd = last_space_cur;
                                        break;
                                }

                        }

                        if (whereami + whereshouldigo == current_line) {
                                cur_osd = cur_osd_backup;
                                goto done;
                        }

                        current_line++;

                }

        }

        //seek in previous paragraph

        whereshouldigo += whereami;

        while (true) {

                //go to the previous paragraph

                if (cur_osd == textfilebuf) goto done;

                cur_osd--;
                while (true) {
                        cur_osd--;
                        if (cur_osd <= textfilebuf) {
                                cur_osd = textfilebuf;
                                //break;
                                goto done;
                        }
                        char c = *cur_osd;
                        if (c == '\n') {
                                cur_osd++;
                                break;
                        }
                }

                //goto done;







                //count lines

                int current_line = 0;
                char* cur_osd_backup_backup = cur_osd;

                while (true) {


                        char* cur_osd_backup = cur_osd;
                        int length = 0;
                        int last_space = 0;
                        char* last_space_cur = 0;
                        while (true) {
                                char c = *cur_osd;
                                cur_osd++;
                                length++;

                                if (c == '\n') {
                                        current_line++;
                                        goto find_the_needed_line;
                                        //break;
                                }
                                else if (c == ' ' || c == '\t') {
                                        if (c == '\t') {
                                                length += 3;
                                        }
                                        last_space = length;
                                        last_space_cur = cur_osd;
                                }
                                if (length > 100) {
                                        if (last_space == 0) {
                                                FUCK(); //LATER
                                                //cur_osd = cur_osd_backup;
                                        }
                                        else cur_osd = last_space_cur;
                                        break;
                                }

                        }
                        current_line++;
                }

        find_the_needed_line:

                int lines_total = current_line;
                cur_osd = cur_osd_backup_backup;

                current_line_top -= lines_total;

                if (current_line_top > whereshouldigo) {
                        continue;
                }
                

                //find the needed line

                current_line = current_line_top;
                cur_osd_backup_backup = cur_osd;

                while (true) {


                        char* cur_osd_backup = cur_osd;
                        int length = 0;
                        int last_space = 0;
                        char* last_space_cur = 0;
                        while (true) {
                                char c = *cur_osd;
                                cur_osd++;
                                length++;


                                if (c == '\n') {
                                        //whereshouldigo += current_line;
                                        //current_line++;
                                        break;
                                        //break;
                                }
                                else if (c == ' ' || c == '\t') {
                                        if (c == '\t') {
                                                length += 3;
                                        }
                                        last_space = length;
                                        last_space_cur = cur_osd;
                                }
                                if (length > 100) {
                                        if (last_space == 0) {
                                                FUCK(); //LATER
                                                //cur_osd = cur_osd_backup;
                                        }
                                        else cur_osd = last_space_cur;
                                        break;
                                }

                        }
                        current_line++;
                        if (current_line - 1 == whereshouldigo) {
                                cur_osd = cur_osd_backup;
                                goto done;
                        }
                        
                }


                //whereshouldigo += lines_total;

        }


done:

        screen_start = (int)(cur_osd - textfilebuf);

}    


it keeps growing, i'm kinda scared of it.

next step is moving cursor up and down.

the problem with c, is, the difference between < and <= can be the difference between the program that always works and the program that crashes 0.01% of the time and makes you lose all your data. Especially if you like to just edit your code randomly until it works as intended.

okay, now need to clean it up just a bit.

---
wtf is going on in sleepsleep's thread. Sounds like a waste of time.
Post 19 Feb 2019, 06:01
View user's profile Send private message Reply with quote
DimonSoft



Joined: 03 Mar 2010
Posts: 572
Location: Belarus
Spent a minute looking through the code to find the usage of Sleep() function. Need to sleep more.
Post 19 Feb 2019, 07:46
View user's profile Send private message Visit poster's website Reply with quote
vivik



Joined: 29 Oct 2016
Posts: 671
>not using ctrl-f

---
tried to login into skype with my microsoft account, but it's suspended for some reason. Asks for a phone number. Never used it for skype, only for visual studio.

probably my pc is full of malware right now. I'm 60% sure because one game I downloaded contained a txt file with a link to the site I downloaded it from. And game refused to run when I removed that txt file. If these fags meddle with exe, it must be doing something else as well.

will purge everything once I'm done with my text editor. Edit and continue isn't as useful as I hoped anyway.

---
youtube keeps shitting down my throat. It's utter trash 75% of the time. This is NOT an entertainment, it's a hunt.

https://gadgets.ndtv.com/internet/features/how-to-block-any-website-on-your-computer-phone-or-network-588357

C:\Windows\System32\drivers\etc

hosts

127.0.0.1 www.youtube.com

restart to apply

---
heroes 3 opensource
https://github.com/vcmi/vcmi
NOT_NOW

---
i keep typing youtube in address bar, 20 times already. Glad I blocked it.

---
okay, now add selection and copypaste, and it's actually usable, sorta.

---
huh, tea contains caffeine? I didn't knew that.

---
let's add flatassembler in hosts too...

---
hm, this code is so old, it doesn't compile.

https://docs.microsoft.com/en-us/windows/desktop/dataxchg/using-the-clipboard

Code:
                                        HGLOBAL   hglb = GetClipboardData(CF_TEXT);
                                        if (hglb != NULL)
                                        {
                                                LPTSTR    lptstr = GlobalLock(hglb);
                                                if (lptstr != NULL)
                                                {
                                                        // Call the application-defined ReplaceSelection 
                                                        // function to insert the text and repaint the 
                                                        // window. 

                                                        ReplaceSelection(hwndSelected, pbox, lptstr);
                                                        GlobalUnlock(hglb);
                                                }
                                        }    


E0144 a value of type "LPVOID" cannot be used to initialize an entity of type "LPTSTR"

---
done with cursor movement and copypaste. It's almost actually usable.

---
42mReV74VUM
[Kikaki] Потусторонний мир [RUS]

---
25.02
took a bit of rest, 4 days...

Okay, my thinking is, if something doesn't lag, don't touch it.

I want to get rid of undo_committed, because honestly it works just fine without it. Rather, I'll change the way it works a bit.

---
i often need to shift data around, this is how I do it:

Code:
                char* cursor_to = text->textfilebuf + min;
                char* cursor_from = text->textfilebuf + max;
                char* cursor_end = text->textfilebuf + text->textfilesize;
                while (cursor_from != cursor_end) {
                        *cursor_to++ = *cursor_from++;
                }    


I'm making it so those 3 go from smallest to biggest. Easier to figure out this way.

memcpy? Never heard of it. I sometimes need to go backwards, *cursor_to-- = *cursor_from--;, don't think memcpy can do that.

---
I need to hold open more than one text file at once, so I'm moving all related globals into one structure. Now I'm just adding text-> to everything that once was a global.

---
i'm finally starting to use git.

git add .
git commit

can't just copy the entire folder anymore, too many files.

everything is local though, not using any external sites. My goal is to get offline anyway.

---
how about you start writing though as vou, and vow as vau?

---
i wish i could say "i don't care" every time i didn't care. I'd be banned for spam.

---
>I'm actually fine with big tits, the problem is that 90% of the time, the artstyle for those girls are not cute and round altogether, but long faced, narrow eyed, sharp featured and long torsoed abominations (in my eyes), and that's why usually cowtit girls are ugly to me.

>I know more or less what you mean. There's a close and very strong link between loli and the bishoujo art movement in general; loli has pretty much been central to it since the very beginning and most of the features you see in anime characters these days are derived from that. This is also why you get SJWeebs and dumb cucks like Jason Schreier calling out even big-breasted characters as 'pedophilic' or mislabelling them as lolis, because a lot of neotenous 'pretty' traits have been passed through nip artstyles due to the lolicon/bishoujo boom since the 80s. You still see remnants of the old realism-oriented gekiga style a lot more often in artists that draw milfs/matures. There's a lot of contrast when big-titted characters are drawn in those contrasting styles, pics related shows just how much.

Image Image

wow, this guy is a man of culture, for real

dunno, picture on the right seems more like an exception, majority of characters nowadays has stupidly big eyes.

also, big eyes came from disney and that astroboy manga. But that's 1950, I have little info on what happened at 1980.

---
07.03
hm, let's make "to the right end", "to the left end", "save file"
after that, navigation

---
https://docs.microsoft.com/en-us/windows/desktop/inputdev/virtual-key-codes

interesting, for most letters just 'A' 'B' 'C' works, but for ';' i need to use VK_OEM_1
Post 19 Feb 2019, 07:51
View user's profile Send private message Reply with quote
vivik



Joined: 29 Oct 2016
Posts: 671
11.03
I'm making it so that you can view more than one file at once.

I shouldn't try to do anything overly smart with the memory, just your usual kinda-oop.

You know, Bla bla = new Bla() is so much shorter than struct bla* bla = (struct bla*)malloc(sizeof(struct bla)), but i still prefer c for now.

---
well, i did relatively good today. Doesn't change the fact that i'm a utter slug, but still. Everyone is a slug anyway, this is what an average programmer can do in a day, probably.

my notes are in c:/shared/debug.txt

PLAN:
make it so ';' actually reads the line under cursor
make it so '4' opens the top file
navigation history ('P' 'N')
remake how paths work, full paths everywhere
make 'U' button

struct text_buffer {
wchar_t path[200];
Post 11 Mar 2019, 09:31
View user's profile Send private message Reply with quote
vivik



Joined: 29 Oct 2016
Posts: 671
Hello, haven't wrote here in half a year, and this thread is still on the first page. Bless this place.

I made my text editor, kinda. It could be better, but it's comfortable enough to edit javascript code in it.

Lesson I learned: It doesn't matter if your program is one millisecond faster than it could be if you are afraid to use it because of bugs that appear once a blue moon. It actually trimmed my text file once, glad I had a backup.
Post 23 Sep 2019, 15:48
View user's profile Send private message Reply with quote
DimonSoft



Joined: 03 Mar 2010
Posts: 572
Location: Belarus
I’ve always wondered how on earth can people who build houses live in those houses. If I knew all the possible places where the building can break one day…

Nevertheless, it seems to get better with every piece of software written. At least, I do use a multimedia player I’ve written once. It doesn’t have chance to lose my data though.
Post 23 Sep 2019, 17:41
View user's profile Send private message Visit poster's website Reply with quote
vivik



Joined: 29 Oct 2016
Posts: 671
@DimonSoft

It's better to have your life in your hands, than in hands of some rando.
Post 24 Sep 2019, 15:17
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 ... 13, 14, 15

< 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-2019, Tomasz Grysztar.

Powered by rwasa.