06:38
lucid_0x80 has joined #lowempire
06:59
macrus has joined #lowempire
08:35
lucid_0x80 is now known as suskun
10:07
<
macrus >
lucid necesen
10:07
<
macrus >
suskun deyende nese bir serail var idi deysen o yadima dusur ama xatirlamiram nese)
10:24
<
suskun >
shukur sen necesen?
10:24
<
suskun >
suskunlar :-D
10:24
<
suskun >
o seriali deirsen?
11:02
<
macrus >
brat uaxsitam
11:02
<
macrus >
he deysen nese ele birsey idi
14:51
xdxdxdxd has joined #lowempire
14:52
<
xdxdxdxd >
Cox tez cavab verdiy))) 🤣
14:52
xdxdxdxd is now known as nodee
14:52
<
suskun >
ahahah :-D
14:52
<
nodee >
Necesen mellim?))
14:52
<
suskun >
yaxsiyam shukur
14:52
<
suskun >
sen necesen aybrat
14:52
<
suskun >
hecne evdeyem
14:52
<
suskun >
shushani yaziram :-=D
14:52
<
suskun >
hemiseki kimi
14:52
<
nodee >
Salamatciligdi)) yaz e yaz shair, sennen shushaya yadigar)
14:55
<
suskun >
releasdan evvel bir error handler birdeki hashmap yazmaliyam :-D
14:56
<
nodee >
Inanirig yazarsan))
15:01
<
suskun >
sizde ne var ne yox
15:01
<
macrus >
ejdaha lucid yene mucizler yaradir ))
15:02
<
suskun >
ahahahah :-D abartiyorsun :_D
15:02
<
macrus >
salamtciliqdir sukur :)
15:02
<
macrus >
:D olani deyirem brat :D gorurukde :)
15:02
<
suskun >
helede semantic analyzerde ilisib qalmisame :-D
15:02
<
suskun >
variable redefinitioni
15:02
<
suskun >
check etmek ucun
15:03
<
macrus >
sene komek leiye bilsek etaga
15:03
<
suskun >
method yazmisdim
15:03
<
macrus >
istedyrdik elimzden geleni edek
15:03
<
suskun >
sonra ferqine vardim ki
15:03
<
suskun >
sen deme duz yazmamisam
15:03
<
macrus >
:d ciddisen?
15:03
<
suskun >
cunki her funksiyanin oz scopeu olur
15:03
<
suskun >
men global
15:03
<
suskun >
salmisdim variablelari
15:03
<
suskun >
eyni anda variable adini
15:03
<
suskun >
ikidene ferqli funksiyaya yazanda
15:03
<
suskun >
error olurdu :-D
15:03
<
suskun >
cunki variablelari global scope-da saxlayirdim
15:04
<
suskun >
halbuki her funksiyanin oz scopeunda saxlamali idim
15:04
<
suskun >
indi onu fixleyirem :-D
15:04
<
macrus >
localdinda olmadidlir yeni oz scopunda
15:04
<
suskun >
fn square() {let x = 1;}
15:04
<
macrus >
yeqin torgun olmsuan yazanda :D
15:05
<
suskun >
let square_new() { let x = 1; }
15:05
<
suskun >
bu halda error olacagdi :-D
15:05
<
suskun >
halbuki ikidene ferqli funksiya scopeudur
15:05
<
macrus >
)))he basa dusdum ))
15:05
<
macrus >
harda ferqine vardin
15:05
<
macrus >
ozun test eliyedn>?
15:05
<
suskun >
ele kodu fikirlesende
15:05
<
suskun >
aglima geldiki
15:05
<
suskun >
bu duz variant deyil axi
15:06
<
macrus >
can mellim :) bu bele islemeli deyil axi zad :d
15:06
<
suskun >
nodejs forever
15:06
<
macrus >
uy bile node js oxuyurma bu deyqe ))
15:06
<
suskun >
ahahahmezelenme
15:06
<
suskun >
niye python yox
15:06
<
macrus >
beli beli node js ejdahadire
15:06
<
suskun >
nodejs :-D
15:06
<
macrus >
node js cunki ejdahadir
15:06
<
suskun >
nodejsin babat optimizasiya mexanimzleri var
15:06
<
suskun >
ona gore menimde
15:06
<
suskun >
xosum gelir
15:07
<
macrus >
ne kimi meslen oz core-unda?
15:07
<
macrus >
libuv mene dehset lezzet eledi)
15:07
<
macrus >
he engine core soxmaqlari ele ozu biyuk temadir
15:07
<
suskun >
onlarda deyesen mark and sweep
15:07
<
suskun >
istifade edir
15:08
<
macrus >
mark sweep nedirki?
15:08
<
suskun >
garbage collection ucun
15:08
<
suskun >
bu obyektleri
15:08
<
suskun >
avtomatik deallocate edir
15:08
<
macrus >
hee basa dusdum
15:08
<
suskun >
pythonda da var
15:08
<
macrus >
node js qeder deyil
15:08
<
macrus >
men acigi bele basa dusudm ki node js
15:09
<
suskun >
pythonda da efficiency babatdir
15:09
<
macrus >
sirf stream isleri ucun cox idealdir
15:09
<
suskun >
javascriptde
15:09
<
suskun >
ona o giucu verir
15:09
<
macrus >
I/O operationlar file, db, netwok OS girsin dagitsinda
15:09
<
macrus >
mellim bu buffer sohbeti vare
15:09
<
suskun >
I/O bound olduguna gore
15:09
<
suskun >
ne bufferi
15:10
<
macrus >
file men oxuyanda o contetni buffer-de binary saxalyir, o bufferin size varda indi default 64 kb 1024 * 64 belede temxini
15:10
<
macrus >
file oxuyanda
15:10
<
macrus >
o birinci binary datani oxuyur file yazir bufferede duzdur?
15:11
<
macrus >
verillen encoding esasen onu encode edir qyatarir sene bufferden
15:11
<
macrus >
ve bufferin size-na eassen sene verir hisse hisse ,
15:11
<
suskun >
binary blob
15:12
<
macrus >
he ona blob deyirik biz?
15:12
<
suskun >
binary blob
15:12
<
suskun >
esas fayl osden gelene qederdir
15:13
<
macrus >
meselen menim file 100 kb dir-de tutaim tx file yada atiram 1MB, menim bufferin default size 64 kb-dir her defe oxuduqca bufferin size na eassen mene getiride contenti
15:13
<
macrus >
men bufferin size coxatlsam duzgundur ?
15:14
<
suskun >
sen buffere ne qeder versen o qeder allocate edecek
15:14
<
macrus >
men bunu async streming-le ama etdyimi tessvur elede, sync yox
15:14
<
macrus >
he heap-de he?
15:15
<
suskun >
artirsan hecne
15:15
<
suskun >
ne qeder versen
15:15
<
suskun >
o qeder goturecek fayli
15:15
<
suskun >
copy edecek o buffere
15:15
<
suskun >
nodejs bele edirde
15:15
<
macrus >
he basa dusdum yes,
15:15
<
suskun >
size = buffer.size()
15:16
<
nodee >
Bes tutalim 100 gb datadi, ramda 16gb ondw nece bash verir?
15:16
<
suskun >
copy(from_fd, to_buffer, size)
15:16
<
suskun >
onda olacaq out of memory killer
15:16
<
suskun >
ise dusecek
15:16
<
suskun >
alqoritm var
15:16
<
suskun >
os terefde
15:16
<
suskun >
OOM killer
15:16
<
suskun >
istifade edilmeyen
15:16
<
suskun >
yaddas zonalarini
15:16
<
suskun >
saxlayir diskde
15:16
<
macrus >
bu umumi mentiqdir bes yoxsa tek node aitdir?
15:16
<
nodee >
Bes sen fayl copy eliyende nece bash verir?
15:17
<
suskun >
eger sen onun treshold valueni kecsen
15:17
<
suskun >
onda crash olacaq
15:17
<
suskun >
umumi mentiqdir
15:17
<
nodee >
Trashhold valueni os teyin edir ya ozun??
15:17
<
suskun >
malloc(100* 1024 * 1024 * 1024 * 1024)
15:17
<
suskun >
malloc(10000 * 1024 * 1024 * 1024 * 1024)
15:17
<
suskun >
goreceksen
15:17
<
suskun >
allocate olmayacaq
15:17
<
suskun >
cunki yaddas ayrilanda
15:17
<
suskun >
birinci senin yaddasiva gore hesablanir
15:17
<
suskun >
vma olur struktur
15:18
<
suskun >
virtual memory area
15:18
<
suskun >
orda butun descritprolar olur
15:18
<
suskun >
yaddas haqqinda
15:18
<
suskun >
qederfree var
15:18
<
suskun >
C:\home\vmcs\Documents\shusha\src> cat /proc/meminfo
15:18
<
suskun >
MemFree: 675108 kB
15:18
<
suskun >
Buffers: 284804 kB
15:18
<
suskun >
MemAvailable: 5878068 kB
15:18
<
suskun >
MemTotal: 16322136 kB
15:18
<
suskun >
Cached: 6305596 kB
15:18
<
suskun >
SwapCached: 204 kB
15:18
<
suskun >
Active: 10265436 kB
15:18
<
suskun >
Inactive: 4824040 kB
15:18
<
suskun >
Active(anon): 8466340 kB
15:18
<
suskun >
Inactive(anon): 1340268 kB
15:18
<
suskun >
Active(file): 1799096 kB
15:18
<
suskun >
Inactive(file): 3483772 kB
15:18
<
suskun >
Unevictable: 192 kB
15:18
<
suskun >
Mlocked: 192 kB
15:18
<
suskun >
SwapTotal: 16670716 kB
15:18
<
suskun >
SwapFree: 16626684 kB
15:18
<
suskun >
Dirty: 3124 kB
15:19
<
suskun >
Writeback: 0 kB
15:19
<
suskun >
AnonPages: 8382524 kB
15:19
<
suskun >
Mapped: 1292432 kB
15:19
<
suskun >
Shmem: 1362080 kB
15:19
<
suskun >
Slab: 354232 kB
15:19
<
suskun >
SReclaimable: 255700 kB
15:19
<
suskun >
SUnreclaim: 98532 kB
15:19
<
suskun >
KernelStack: 19200 kB
15:19
<
suskun >
PageTables: 62040 kB
15:19
<
suskun >
NFS_Unstable: 0 kB
15:19
<
suskun >
Bounce: 0 kB
15:19
<
suskun >
WritebackTmp: 0 kB
15:19
<
suskun >
CommitLimit: 24831784 kB
15:19
<
suskun >
Committed_AS: 18893464 kB
15:19
<
suskun >
VmallocTotal: 34359738367 kB
15:19
<
suskun >
VmallocUsed: 0 kB
15:19
<
suskun >
VmallocChunk: 0 kB
15:19
<
suskun >
Percpu: 1488 kB
15:19
<
suskun >
HardwareCorrupted: 0 kB
15:19
<
suskun >
AnonHugePages: 1415168 kB
15:19
<
suskun >
ShmemHugePages: 0 kB
15:19
<
suskun >
ShmemPmdMapped: 0 kB
15:19
<
suskun >
HugePages_Total: 0
15:19
<
suskun >
HugePages_Free: 0
15:19
<
suskun >
HugePages_Rsvd: 0
15:19
<
suskun >
HugePages_Surp: 0
15:19
<
suskun >
Hugepagesize: 2048 kB
15:19
<
suskun >
Hugetlb: 0 kB
15:20
<
suskun >
DirectMap4k: 246868 kB
15:20
<
suskun >
DirectMap2M: 6987776 kB
15:20
<
suskun >
DirectMap1G: 10485760 kB
15:20
<
suskun >
faylin ancaq
15:20
<
suskun >
birdene prinsipide var
15:20
<
suskun >
mmap ile olur o cox vaxt
15:20
<
suskun >
pagecache deyirler ona
15:20
<
suskun >
sen fayli oxuyanda
15:20
<
suskun >
diskden olumur
15:20
<
suskun >
copy etmirsen
15:20
<
suskun >
prosto oxuyursan
15:20
<
suskun >
memoryden oxuyacaq
15:20
<
suskun >
linux onu hemde memoryde saxlayir
15:20
<
suskun >
copy edende de
15:20
<
suskun >
nece bayt oxuyursansa
15:20
<
suskun >
o qeder olcude fayli goturub copy edir yaddasa
15:21
<
suskun >
copy edir deyende yazir
15:22
<
macrus >
bes men readable stream datani pipe eliyib writable yaziramsa, ve tezden pipe-la hemin teze fayli basqa yere yazirmsa burdan heresi ucun memory-de yer ayrilir he hemin erefede?
15:23
<
macrus >
coxlu requestler gelse nece olar eger bu webserverdise?
15:24
<
suskun >
fayllar descirptorlara gore onsuzda
15:24
<
suskun >
memoryde olur
15:25
<
macrus >
descirptor termini theorik olaraq file-dan basqa iselrde gorurde, onun esas megvi nedir?
15:26
dumenci has joined #lowempire
15:26
<
dumenci >
vma strukturunuda saxlayir butun fdleri
15:27
<
macrus >
etaga bugun dedim ki nese oyrenmisem :d osdurduda o oyrendiyim lucidi dediklerin yaninda hecnedirde )))
15:28
<
dumenci >
sene konkret hansi sual maraglidir?
15:28
suskun has quit [Ping timeout: 256 seconds]
15:28
<
macrus >
umumi streaming prosesi maraqli idi islemesi
15:28
<
dumenci >
hansi streaming>?
15:29
<
dumenci >
pipe deyirsen?
15:29
<
macrus >
file oxumaq yazamq, olsun, video dowload etmek wathc etmek zad, pipe ozude maraqlidir
15:29
<
dumenci >
sen nodejsin bufferi ile pipein bufferini qarisdirma a
15:29
<
dumenci >
onlar basqa basqa seylerdir
15:30
<
dumenci >
nodejsin bufferi
15:30
<
dumenci >
adi yaddasdir
15:30
<
macrus >
a onu bilmirdim men ele bilirdim eyni seydir
15:30
<
macrus >
pipe basqa yerde saxlayir he onda?
15:30
<
dumenci >
64 kb sen pipei deirdin?
15:31
<
macrus >
yox adi file oxumagi deyirdim, stdout versin. elebil oxuyub stoud elesin
15:31
<
macrus >
ama pipe-la bagli dediyim ise
15:31
<
macrus >
bir fayli oxuyub bir yere yazmaq, sonra hemin yazilan file bir basqa yere yazmaq
15:32
<
dumenci >
pipe deyirsense
15:32
<
dumenci >
pipe 16 dene pagedir
15:32
<
dumenci >
oda edir 64 kb
15:32
<
macrus >
page burda ne ifade edir?
15:32
<
dumenci >
yaddas bloku
15:32
<
dumenci >
bir page-de
15:32
<
dumenci >
4096 baytliq melumat olur
15:32
<
dumenci >
16 dene 4096 bayt tesevvur et
15:33
<
macrus >
azdirda cox
15:33
<
dumenci >
uje artiriblar
15:33
<
dumenci >
bu teze versiyalarda olub deyesen
15:34
<
macrus >
cox cetindir goresen ona ele mduaxile elemk artirmaq, bu qder niye az qoyurlar ki
15:34
<
macrus >
hede bele baxdna stanrt ucun
15:34
<
macrus >
qoyurlarda
15:35
<
dumenci >
allocation prosesi burda bas verir bax
15:35
<
dumenci >
pipe->bufs = kcalloc(pipe_bufs, sizeof(struct pipe_buffer),
15:35
<
dumenci >
GFP_KERNEL_ACCOUNT);
15:35
macrus is now known as patrikc
15:36
<
dumenci >
* be set by root in /proc/sys/fs/pipe-max-size
15:36
<
dumenci >
unsigned int pipe_max_size = 1048576;
15:36
<
dumenci >
* The max size that a non-root user is allowed to grow the pipe. Can
15:36
<
dumenci >
artura bilirsen
15:36
<
dumenci >
amma root user flan
15:36
<
patrikc >
ozun mudaxile ede bilirsen
15:36
<
patrikc >
onda proc-dan
15:36
nodee has quit [Read error: Connection reset by peer]
15:36
<
dumenci >
ancaq non-root user ancaq
15:36
<
dumenci >
ede biler
15:36
<
patrikc >
maralqidir
15:37
<
dumenci >
bu adi yaddasdir
15:38
<
patrikc >
basa dusdum
15:39
<
dumenci >
kernelde de slab allocation bas verir sen pipe ucun yaddas allocate etmek isteyende
15:39
<
patrikc >
node js ama cox babt eliyblerde v8 i oz corelarinda istifade etmelri. node ozunun os girmeyi , asinxronlugu temin elemesi v8 ile eyni anda cox ehdaja sohbetdirde
15:39
<
dumenci >
nodejs ise adi user prosesi ile
15:39
<
dumenci >
allocate edir
15:40
<
patrikc >
aa onda bular ferqli yanasiblarda
15:41
<
dumenci >
bax nodejsin allocationi burda bas verir
15:42
<
dumenci >
pipe kernele mexsusdur ona gore onu OS allocate edir
15:42
<
dumenci >
nodejsde buffer ise nodejsin prosesine mexsusdur
15:42
<
dumenci >
onuda nodejs ozu edir
15:42
<
patrikc >
hee onda pipe umumi olaraq shell-de necedirse node-da eynidirde
15:43
<
patrikc >
ela oldu))cox sagol elave melumata gore :)
15:43
<
patrikc >
aydinlatdin mellim
15:44
<
patrikc >
nese axtarirmisan ki kimi gelir men :D
15:44
<
patrikc >
eger ele deyilse men terpenirem ofisden eledirse gozleyim :)
15:44
<
patrikc >
sen nese axtarirsan kimi geldi
***
15:46
<
patrikc >
cixim birazdan gelecem onda eve gedirem
15:46
<
dumenci >
belke 200 setrlik
15:46
<
dumenci >
onlari fix edirem
15:46
<
dumenci >
gec yaziram
15:46
<
patrikc >
yorulmausan yox)))
15:46
<
patrikc >
narhata olma
15:46
<
dumenci >
sualin varsa yaz
15:46
<
dumenci >
problem yoxdur
15:46
<
patrikc >
yox dedim itdi lucid
15:47
<
dumenci >
<patrikc> hee onda pipe umumi olaraq shell-de necedirse node-da eynidirde : bu seyi tam basha dusmedim
15:47
<
dumenci >
nodejsdeki
15:47
<
dumenci >
stream.pipe
15:47
<
dumenci >
sen meselen
15:47
<
dumenci >
stdout.pipe yazanda
15:48
<
dumenci >
o stdout descriptoruna gonderir
15:48
<
dumenci >
verdiyin bufferi
15:48
<
dumenci >
oda adi write funksiyasidir
15:49
<
dumenci >
ssize_t write(int fd, const void *buf, size_t count);
15:49
<
dumenci >
birinci arqumente fd olaraq
15:49
<
dumenci >
stdout gonderirsen
15:49
<
dumenci >
bufferede de
15:51
patrikc has quit [Ping timeout: 246 seconds]
15:53
<
dumenci >
buda linux kernelin adi sys_write syscallidir
15:53
<
dumenci >
cat test.c
15:53
<
dumenci >
#include <stdio.h>
15:53
<
dumenci >
char buff[5] = "abcd";
15:53
<
dumenci >
void main(){
15:53
<
dumenci >
#include <unistd.h>
15:53
<
dumenci >
write(1, buff, 5);
15:53
<
dumenci >
bax meselen
15:54
<
dumenci >
C:\tmp> ./test
15:58
<
dumenci >
bax burdadir onun implementationida
15:59
<
dumenci >
struct fd f = fdget_pos(fd);
15:59
<
dumenci >
gelir burda fayl descirptoru axtarir
16:00
<
dumenci >
hemin lookup proseside
16:00
<
dumenci >
bu funskiya ile bas verir __fget_light()
16:00
<
dumenci >
daha sonra file descriptor table-da
16:00
<
dumenci >
senin verdiyin faylin descriptorun u axtarir
16:01
<
dumenci >
static inline struct file *__fcheck_files(struct files_struct *files, unsigned int fd)
16:01
<
dumenci >
struct fdtable *fdt = rcu_dereference_raw(files->fdt);
16:01
<
dumenci >
if (fd < fdt->max_fds) {
16:01
<
dumenci >
fd = array_index_nospec(fd, fdt->max_fds);
16:01
<
dumenci >
return rcu_dereference_raw(fdt->fd[fd]);
16:01
<
dumenci >
return NULL;
16:01
<
dumenci >
bax buda file descirptorun struktidir
16:02
<
dumenci >
sen stdout stdin verende
16:02
<
dumenci >
bunlar 0 1 2dir
16:02
<
dumenci >
default olaraq
16:02
<
dumenci >
kernel bufferi uygun descriptora gonderir
17:08
marlin has joined #lowempire
17:08
<
marlin >
sorry lucid eve gelirdim cixdim burdan gordum davam elemisen history-den
17:08
<
marlin >
oxuyum gelirem
17:08
<
dumenci >
okay bro isinde Ol
17:11
<
marlin >
he ela cox sagol lucid
17:11
<
marlin >
izaha gore ela idi
17:11
<
marlin >
tessekkur edirem
17:18
marlin is now known as macrus
17:19
<
dumenci >
buyur bro xosdur
17:20
<
macrus >
sehetin necedir bro>
17:20
<
dumenci >
sagalmisam :_D
17:20
<
dumenci >
dunen hercure derman icdim daha :-D
17:20
<
macrus >
:d yaxsi eledin)
17:21
<
dumenci >
siz innolanda
17:21
<
dumenci >
gedirsiz?
17:21
<
macrus >
biz artiq sbahadan gelmiyecyik
17:21
<
macrus >
case coxalibe
17:21
<
dumenci >
diqqetli olun
17:21
<
dumenci >
cox gezir
17:21
<
dumenci >
bu aralar
17:21
<
dumenci >
evden isleyin
17:21
<
macrus >
he ele qerar adliq
18:34
nodee has joined #lowempire
18:37
<
dumenci >
kimse var?
18:37
macrus is now known as patrikc
18:38
<
patrikc >
what happened
18:40
<
dumenci >
rust partladire
18:51
nodee has quit [Ping timeout: 240 seconds]
19:00
dumenci has quit [Ping timeout: 260 seconds]
19:32
patrikc has quit [Ping timeout: 272 seconds]
19:57
patrikc has joined #lowempire
20:00
patrikc has quit [Client Quit]