flat assembler
Message board for the users of flat assembler.

flat assembler > Heap > vivik's twitter

Goto page 1, 2, 3, 4, 5, 6  Next
Author
Thread Post new topic Reply to topic
vivik



Joined: 29 Oct 2016
Posts: 485
random stuff that doesn't matter

feel free to join

well, five pages in, most likely only I will post there. Changing the title from "twitter" to "vivik's twitter".


Last edited by vivik on 11 Oct 2018, 12:33; edited 2 times in total
Post 02 Sep 2018, 17:52
View user's profile Send private message Reply with quote
sleepsleep



Joined: 05 Oct 2006
Posts: 7630
Location: ˛                              ⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣ Posts: 6699
welcome you, hopefully our words would be useful for future generation, :pray:
Post 03 Sep 2018, 15:23
View user's profile Send private message Reply with quote
vivik



Joined: 29 Oct 2016
Posts: 485
D I C K B U T T
Post 08 Sep 2018, 07:05
View user's profile Send private message Reply with quote
vivik



Joined: 29 Oct 2016
Posts: 485
I need to add multithreading to my already quite complicated program, and I have 2 days to do that. I kinda want to just watch some trash instead, and delay that for a week.

The most required programming language in my city is 1C. I don't even know how to start learning this.
Post 08 Sep 2018, 07:28
View user's profile Send private message Reply with quote
vivik



Joined: 29 Oct 2016
Posts: 485
Tried to find some heroes 3 gameplay on youtube, found wayfarer. 6 or so videos, each 8 hours long. I watched 3 of them with great interest, and I use 4th one to fall asleep. It blocks external noise, it's interesting enough for me to just listen without looking, and no loud screams anywhere. I downloaded 4th part with youtube-dl, and split it with ffmpeg to 1 hour long pieces, so that my computer changes to sleep mode when the video ends (in 20 minutes after the video ends).

As some people say, it's the best game to bring on an uninhabited island with you. I intended to disable internet for quite some time, so maybe this is the thing to keep me company for a few years. I wonder what I should save too, maybe some music. Maybe wikipedia dump. Porn, but it's almost taken care of already. Can't wait for a day when I'll be able to write programs offline, without going to google every few minutes.
Post 08 Sep 2018, 07:40
View user's profile Send private message Reply with quote
vivik



Joined: 29 Oct 2016
Posts: 485
One thumbdown is enough to get me get myself banned, amazing. Well, it's not like I can even scream in real life, so I guess I'm compensating for that. It's so unnerving, it's like I'm having a gun to my head all the time, and can lose absolutely everything in seconds.
Post 08 Sep 2018, 07:47
View user's profile Send private message Reply with quote
vivik



Joined: 29 Oct 2016
Posts: 485
Not sure what's the difference between critical_section and mutex.
Post 08 Sep 2018, 07:48
View user's profile Send private message Reply with quote
sleepsleep



Joined: 05 Oct 2006
Posts: 7630
Location: ˛                              ⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣ Posts: 6699
never knew the existence of 1c programming language, cool,

not sure if it is open source, community edition or totally proprietary,


you probably need some ebooks in your hard drive, let say if you have no access to Google, and you need some samples code on how some api functions,
Post 08 Sep 2018, 09:33
View user's profile Send private message Reply with quote
Furs



Joined: 04 Mar 2016
Posts: 1260
vivik wrote:
Not sure what's the difference between critical_section and mutex.
Just the implementation. Critical Section is a so-called futex or a "lightweight mutex".

Basically, it first checks atomically with e.g. lock inc or lock cmpxchg if the lock is contended or not. And if it's not contended, it just does its thing as if there was no lock at all (obviously it releases it at the end).

Only if it's contended (held by another thread) does it actually go and use the Mutex API (which is expensive since it needs a system call).
Post 08 Sep 2018, 12:35
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 16057
Location: 112 Ocean Avenue, Amityville
IIRC a mutex is valid across processes, whereas critical sections are only valid within one process.

Since the critical section doesn't switch to kernel mode to do its check it is generally more efficient for synchronising threads within one process.
Post 08 Sep 2018, 12:50
View user's profile Send private message Visit poster's website Reply with quote
vivik



Joined: 29 Oct 2016
Posts: 485
Code:
struct temp_mem2vid {
        bool is_rgb;
        int width;
        int height;
        void* blocks_512x512x4_start;
};

        //malloc mem buffers
        int mem2vid_size = sizeof(struct temp_mem2vid);
        mem2vid_size += (texture_w_tiles * texture_h_tiles - 1) * 4;
        struct temp_mem2vid* mem2vid = (struct temp_mem2vid*) malloc(mem2vid_size);
        mem2vid->is_rgb = is_rgb;
        mem2vid->width = total_w;
        mem2vid->height = total_h;
        DWORD* blocks_512x512x4;
        blocks_512x512x4 = &(mem2vid->blocks_512x512x4_start);
    


This code doesn't quite work, the last line is wrong.

I'm allocating a bit more than the structure takes, and using the tail for 1 or more pointers.
Post 08 Sep 2018, 13:23
View user's profile Send private message Reply with quote
vivik



Joined: 29 Oct 2016
Posts: 485
@sleepsleep
proprietary

can't copypaste code from pdf, it's scrambled. Need to create my own library of things first.

Working with pdf in general is terribly uncomfortable for me, rendering and navigating is slow, can't make bookmarks, can't copypaste.

@Furs
@revolution
wonder if C++ has those critical sections.
Post 08 Sep 2018, 13:27
View user's profile Send private message Reply with quote
vivik



Joined: 29 Oct 2016
Posts: 485
How the hell people manage to program for 8 hours per day, I'm sure they just pretend to work most of their day. It's just impossible to keep focus this long.

I guess there are a lot of boring stuff to do as well, they just do something else for a bit.
Post 08 Sep 2018, 13:40
View user's profile Send private message Reply with quote
Furs



Joined: 04 Mar 2016
Posts: 1260
vivik wrote:
How the hell people manage to program for 8 hours per day, I'm sure they just pretend to work most of their day. It's just impossible to keep focus this long.

I guess there are a lot of boring stuff to do as well, they just do something else for a bit.
Well honestly I hate working for others when it comes to coding, unless I'm the boss of the code and they just hire me for that and they don't care of the code itself (no review or other bullshit management, maybe exception only if just to spots bugs, cause my style and my "hacks" are the best! no arguing about it).

8 hours isn't too much, since most time is spent thinking rather than typing, so it's pretty chill in most cases. That's unless you have to do boring boilerplate or unit tests, then it becomes a stressful chore Smile

When thinking about code I usually like to relax in chill places and listening to the birds singing and the wind and such. Also, I never recommend to listen to most music while coding, except for ambient music (and by ambient I really mean ambient, like the peaceful backgrounds in games or "space music" or stuff like that, NO LYRICS WHATSOEVER and almost no rhythm or slow BPM if any).

There's a place for other music but it's not when trying to concentrate!
Post 08 Sep 2018, 15:11
View user's profile Send private message Reply with quote
vivik



Joined: 29 Oct 2016
Posts: 485
I like to listen to swf loops for that. Keeps me from getting bored, and blocks all sounds too. Finding a good sounding one is a problem though.
Post 08 Sep 2018, 23:32
View user's profile Send private message Reply with quote
sleepsleep



Joined: 05 Oct 2006
Posts: 7630
Location: ˛                              ⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣ Posts: 6699
@vivik,

good luck with your excursion into no man island, living alone, cook alone, eat alone, no internet, no communication for long period, please stay healthy and write back once in a while, Smile
Post 09 Sep 2018, 04:11
View user's profile Send private message Reply with quote
vivik



Joined: 29 Oct 2016
Posts: 485
@sleepsleep, wouldn't happen soon though. I need to create an offline copy of msdn first, at least of all important topics.

>blocks_512x512x4 = &(mem2vid->blocks_512x512x4_start);

error C2440: '=' : cannot convert from 'DWORD **__w64 ' to 'DWORD *'

>blocks_512x512x4 = (DWORD*)&(mem2vid->blocks_512x512x4_start);

lol, type casting works like sudo. Good sleep helps thinking, I understood what I had to change without even turning pc on.
Post 09 Sep 2018, 06:45
View user's profile Send private message Reply with quote
DimonSoft



Joined: 03 Mar 2010
Posts: 420
Location: Belarus
vivik wrote:
@sleepsleep, wouldn't happen soon though. I need to create an offline copy of msdn first, at least of all important topics.

But it has already been freely downloadable as a ready to use package like for ages. I don’t even imagine how to use online MSDN for anything except linking to an article for those who don’t have one.
Post 09 Sep 2018, 10:54
View user's profile Send private message Visit poster's website Reply with quote
vivik



Joined: 29 Oct 2016
Posts: 485
This? Microsoft Help Viewer? https://docs.microsoft.com/en-us/visualstudio/ide/microsoft-help-viewer?view=vs-2015

By the way, I actually bought a new pc, and installed visual studio 2017. I heard it needs registering after a month of usage, does it accept any email? Last time I tried registering, it said "unknown error happened".
Post 09 Sep 2018, 11:53
View user's profile Send private message Reply with quote
DimonSoft



Joined: 03 Mar 2010
Posts: 420
Location: Belarus
Not sure if it will have an option to download necessary documentation but it might be what you’re looking for. I’ve never had need to look for the latest offline MSDN since my 2008 version is one of the last versions having compatibility information back to Win9x branch.
Post 09 Sep 2018, 12:12
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page 1, 2, 3, 4, 5, 6  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-2018, Tomasz Grysztar.

Powered by rwasa.