Networking engineer, C++ Programmer, Uses Linux by default.
Working on my own open source Web Framework / Web Server.
See my Github Page for more details.
@alirezashirazi
کافیه رنج آیپیهای ایران رو با لیست آیپیهای سایتهایی که نیمبها استفاده میشن رو cidr کنی (که کار سختی نیست)، بعد روی روتری مثل میکروتیک بری لیست آدرس ایران بنویسی، بعد درخواست ها به آیپی های ایران رو از اینترنت معمولی، و بقیه درخواست ها رو از استارلینک یا وی پی ان رد کنی.
@alirezashirazi
فقط یه نکته داره که اونم اینه که دولت اگه واقعا بخواد، میتونه نرم افزار های داخلی رو مجبور کنه یه درخواست کوچولو و ناقابل همراه با شماره تلفن به یه سایتی که سرورش خارجه بزنن. به همین سادگی میشه پیدا کرد استفاده کننده رو.
C23: a slightly better C
One of the established and most popular programming languages is the C programming language. It is relatively easy to learn, and highly practical.
Maybe surprisingly, the C programming language keeps evolving, slowly and carefully. If you have GCC 23 or
Without AI:
- 4hrs of code
- 4hrs of debugging
With AI:
- 5 mins of AI
- 2hrs of debugging AI
- 1 mins of deleting everything
- 4hrs of code
- 4hrs of debugging
@Digiato
من برنامهنویس به شخصه به هیچ وجه از چنین اینترنتی استفاده نخواهم کرد.
ما برنامهنویسا فقط برای دور زدن فیلترینگ نیست که از ویپیان استفاده میکنیم، برای دور زدن تحریمای اون ور هم هست. فیلترینگ چه باشه چه نباشه ماها بالاخره باید ویپیان استفاده کنیم.
@balemessenger
ما که مطمئنیم مردم «عزیزی گل» و «اها» و «اوک» رو گزارش نمیکنن، پس یعنی اون «الگوریتم خودکار»ی که اون بالا گفتین در این حد بیخاصیت هستش که اینها رو هم فلگ کرده؟
بعد تو عکس که idها همه هست، دیگه گفتن اینکه اطلاعات خصوصی و آیدی و شماره فرستنده مشخص نیست دیگه چیه؟
No, it's Microsoft and CrowdStrike's fault.
People are always quick to make it C++'s fault; from what I've read so far, it's the lack of tests, engineers being lazy, and also the need for more performance that made them hand-craft stuff instead of using battle-tested utilities.
Crowdstrike Analysis:
It was a NULL pointer from the memory unsafe C++ language.
Since I am a professional C++ programmer, let me decode this stack trace dump for you.
@alirezashirazi
واقعا یه جاهایی غیرقابل تحمل شده.
سایت باز میکنیم بدون ویپیان تحریمیم، با تور باز میکنیم، کلودفلر گیر میده، با ویپیان باز میکنیم سایتای ایرانی باز نمیشه، route مینویسیم که سایتای ایرانی از تو ویپیان رد نشه، خود ویپیانو میزنن، ۲ ساعت میگردی ویپیان جدید، لیمیت داره، و ...
@d3c0der
البته تا اونجایی که چک دارم توضیح درستتر اینه که با extract کردن فایل archive، فایل payload رو میریزه توی آدرس وب سرور، بعد از طریق وب میشه اجراش کرد.
اینم به خاطر یه باگ قدیمیه که توی cpio هست که اگه روی دیسترویی (مثل ubuntu) باشین که pax نصب باشه، zimbra از اون استفاده میکنه.
Look, we can now set a breakpoint in our code in C++26.
No compiler yet supports this, but it shouldn't be hard to implement since all of them support some custom way of doing this already; like __builtin_debugtrap in llvm.
JavaScript has similar thing too.
@alirezashirazi
مشکل خونههای خالی رو با مالیات گرفتن میشه حل کرد، ولی متاسفانه ریشه مشکلات مسکن اینجاها نیست. این جماعت فقط بلدن سامانه بزنن و بعدشم هیچ!
هک کردن سامانه کوچکترین خلافهایی هست که تو حوزه مسکن داره انجام میشه.
@rasputin52
دکتری که بعد از ای�� همه کتاب خوندن نتونه جواب شبهات مریض رو بده به درد خودش میخوره خوندنش.
من برنامهنویس همین الانش حداقل ۲ برابر این مطلب خوندم ولی هنوز ۱۰ تا رفرنس دم دستمه و هنوز در حال یاد گیریم هر روز.
بعد بعضی دکترا میان یه چوب میکنن تو حلقت، بهتم نمیگن چته آخر!
liburing for C++:
I've forked liburing to:
- Header Only
- No Undefined Behaviours
- Standard compliant (No compiler-specific features)
- pedantic friendly
- C and C++ compatibility without any extern "C" or extern "C++"es
I easily lose respect of the "library" and the people involved in the project when I see "telemetry" code built into the library.
My users are my responsibility, not yours, and you don't get to gather information on them.
It's a bad trend.
@MilaDnu
درد بزرگتر از نوت برداشتن اینه که هیچکس اونجا صداش در نیومد یه تذکری بده بگه حرفت مفته، حتی یه لبخند هم کسی نزد که بفهمیم حداقل یه نفر اونجا فهمیده که این داره حرف مفت میزنه!
سقوط حدود ۵۵ درصدی ترافیک کلودفلر از ایران نسبت به ۲۴ ساعت گذشته نشون دهنده تلاش جدید ایران برای از دور خارج کردن فیلترشکنهایی هست که از سرویسهای مختلف کلودفلر مثل workerها، CDNهاش، سرورهاش و ... استفاده میکردن، هست.
@_n0p_
@campuscodi
Most systems are not vulnerable unless the application is somehow allowing 1GB of a string to be sent to SQLite's printf C functions.
Won't cause too much damage fortunately.
@Purple_Elf
This is not how we do it in C++,
this is: 😅🤣
(also, there are other features like providing the starting index and multiple function arguments that I haven't added)
Be aware of using <ranges> in performance issues.
This simple snippet, produces different assemblies for -Os, -Og, -O0, -O1, -O2, and -O3 flags.
Ranges relies too much on the compiler's optimizer. Don't use ranges where you can't have a "wildcard" to play a role in performance.
@JakeArkinstall
All loops, Ifs, Switches, Whiles, and even Functions, are all glorified gotos.
The surprising part is that "case" statements are just labels and not blocks; that's why it's recommended to wrap case body with a pair of {}.
#100DaysOfCode
Day 070/100:
I just implemented setInterval from javascript inside c++. I was just learning boost::asio and end up doing this!
Oh, I just remembered I have to make it multi threaded to actually be the same as the setInterval. I'm just gonna go do that very quickly!
# create a gif with linux:
cd $(mktemp -d)
for i in {1..25}; do convert ~/Pictures/cover.jpg -resize 384x384 -fill black -colorize $((100*$i/25))% "$i.png"; cp $i.png $((25*2-$i+1)).png; done
ffmpeg -i %d.png -r 30 -b 512 animated-cover-384x384.gif
@vahidrezazadeh5
یه ساعته انجام میدم براش.
ساختن توئیتر کار خاصی نداره (نمونه سادهاش البته). ارزش توئیتر به کدهاش نیست، به کاربراشه.
بفرما، اینجا 150 تا توئیتر ریخته:
@freeman_ir29
مدیر بودن به همون سرعت که اومد به همون سرعت هم میتونه بره.
مدیر بودن هدف نیست، پولدار شدن هم هدف نیست. هر دو وسیلهان برای رسیدن به چیز بهتری.
همه اهداف تموم شدنیان، این اون مسیر هست که مهمه. مسیر مهمتر از هدفه.
شاید برا اون برنامهنویس، مسیر با ارزشتر بوده.
@MilaDnu
یعنی خود قاضی هم میتونه بیاد لینک گروه/کانال رو برداره و تبلیغ کنه و بعد بگه خوب پیامها خصوصی نیست دیگه.
ای کاش پیشنیاز نوشتن قانون/ToS/... «داشتن عقل» میبود!
Although this bug may be difficult to reach in deployed applications, it's an example of a vuln that is made easier to exploit by “divergent representations” that result from applying compiler optimizations to undefined behavior.
I want to randomly line up C++ committee members and see if they can distinguish between these on the top of their mind 😅🙃:
- std::launder
- std::start_lifetime_from(_array)
- new (ptr) ...[size]
- reinterpret_cast
#100DaysOfCode
Round 4 Day 82:
I was learning Spanish by watching TV series with English and Spanish subtitles.
I had to spend 2mins between each episode to merge srt files; so I instead spent 2 month
#coding
a command line tool to do the whole TV series in one go!
Am I smart?😅
@mohmahdavian
هک شخص با هک اداره فرق میکنه.
کدوم یکی از این ادارارات و سازمانها و شرکتهایی که هک شدن تو ایران اومدن حتی معذرتخواهی بکنن؟ حتی یه اطلاعیه نمیدن که آره ما هک شدیم.
هنوز صدای هیچکس در نیومده تو مملکت بعد از هک internet[dot]ir
@vahidrezazadeh5
چوب اتحادیه اروپاست که تو پاچه ما داره میره.
به جا این مسخره بازیا، به مرورگرها میگفتن یه چهار تا گزینه برای فعال کردن یا غیر فعال کردن این تکنولوژیها بذارن کاربردی تر بود.
جالب اینجاست الان حداقل ۳، ۴ تا جایگزین بهتر و راحتتر داره که فکر نمیکنم جزو GDPR باشن!
Lack of parenthesis is what wasted 4hrs of my life.
auto length = cur & mapped_mask >> 24U;
vs
auto length = (cur & mapped_mask) >> 24U;
Operator precedence has got me real good this time.
I'm at a point, where I'm debugging my tests, by correctly implementing a linear search, so I later can fix my binary-search-like algorithm with those tests. 😐
The tests are now more complicated than the algorithm! 🙃
Lower level languages teach you a certain mental model of how computers work that it is really hard for a programmer who only has skills in higher level langs to grasp.
I got to C++ from a range of higher programming languages, so I can clearly pinpoint that exact milestone.
@AliKahaei
پس یارو اومده مصاحبه اونجا چیکار؟ اومده ببینه شما ارزشش رو دارین یا نه دیگه! پس فک کردی مصاحبه فقط برای اینکه که کارفرما بفهمه کارمند به درد میخوره و اصلا کارمند حق نداره کارفرما رو محک بزنه؟
اکثر شرکتها هم که سایتشون وضعیتش مشخصه حقیقتا!
#100daysofCode
Day 032/100:
Oh man, I did not understand today's practice. I just jumped from beginner stuff to advanced stuff. Why I can't find a good tutorial on c++ that teaches the non-advanced and non-beginner stuff?
#cpp
#cpplus
#cplusplus
#coding
#CodeNewbie
#100DaysOfCode
R3D94,95:
I really like TDD. It helps you write loads and loads of un-compilable code and then be sure that you'll eventually debug it after a couple of years 😁. No biggie!
This is how I route everything that I want to my v2ray proxy (which I only enable when my actual VPN connections are failing).
This is called "Transparent Proxying" among other names like "Traffic Steering", "Traffic Hijacking", and "Intercepting Traffic" just to name a few.
@Rfnmt
درباره تسنیم نمیتونم نظر بدم، ولی خیلی از مصاحبهکنندهها سوالای عجیب غریب اینجوری زیاد میپرسن، هدفشونم این نیست که فقط در صورتی که جواب بدی حرف رهبری رو قبول میکنم، قبولت کنن. هدف آشنایی با طرز فکر و نحوه برخورد با سوال و نحوه برخورد با سوالای عجیب غریب و تحمل و ... هست.
1. Extract the audio with ffmpeg;
2. Extract each frame into jpg with ffmpeg;
3. Convert JPGs into ASCII with jp2a;
4. Play the audio with aplay;
5. Print the ASCIIs in a loop;
This is how you play a video in
#Linux
.