چرا در cpp نباید مثل جاوا مرتب از new استفاده کرد.
https://stackoverflow.com/a/21735823
https://stackoverflow.com/a/21735823
Stack Overflow
Why should C++ programmers minimize use of 'new'?
I stumbled upon Stack Overflow question Memory leak with std::string when using std::list<std::string>, and one of the comments says this:
Stop using new so much. I can't see any reason you ...
Stop using new so much. I can't see any reason you ...
Forwarded from memealloc
نیم ساعت (یا بیشتر) با تور راسط
https://fasterthanli.me/articles/a-half-hour-to-learn-rust
https://fasterthanli.me/articles/a-half-hour-to-learn-rust
fasterthanli.me
A half-hour to learn Rust
In order to increase fluency in a programming language, one has to read a lot of it.
But how can you read a lot of it if you don’t know what it means?
In this article, instead of focusing on one or...
But how can you read a lot of it if you don’t know what it means?
In this article, instead of focusing on one or...
نوشتههای ترمینالی
برای کامپایل برنامه گو از لینوکس به مقصد ویندوز GOOS=windows GOARCH=amd64 go build (دقت کنید همش تو یه خط باشه) مطالعه بیشتر: https://dave.cheney.net/2015/08/22/cross-compilation-with-go-1-5
برای کامپایل برنامه rust از لینوکس به مقصد ویندوز
مطالعه بیشتر:
https://stackoverflow.com/questions/31492799/cross-compile-a-rust-application-from-linux-to-windows
#one time
rustup target add x86_64-pc-windows-gnu
rustup toolchain install stable-x86_64-pc-windows-gnu
#every time
cargo build --target x86_64-pc-windows-gnu
مطالعه بیشتر:
https://stackoverflow.com/questions/31492799/cross-compile-a-rust-application-from-linux-to-windows
Stack Overflow
Cross-compile a Rust application from Linux to Windows
Basically I'm trying to compile the simplest code to Windows while I am developing on Linux.
fn main() {
println!("Hello, and bye.")
}
I found these commands by searching the internet:
rustc --
fn main() {
println!("Hello, and bye.")
}
I found these commands by searching the internet:
rustc --
ساپورت کرنل لینوکس از binaryها با فرمت غیر طبیعی با
مثلا .class جاوا رو میتونین با
./MyClass.class
اجرا کنید!
https://www.kernel.org/doc/html/latest/admin-guide/binfmt-misc.html
binfmt_misc
مثلا .class جاوا رو میتونین با
./MyClass.class
اجرا کنید!
https://www.kernel.org/doc/html/latest/admin-guide/binfmt-misc.html
کرنل لینوکس و توضیحات/راهحل ها برای باگهای سخت افزاری مثل spectre
https://www.kernel.org/doc/html/latest/admin-guide/hw-vuln/index.html
https://www.kernel.org/doc/html/latest/admin-guide/hw-vuln/index.html
سختیهای یادگیری rust
(مطلب جذابیه، بخونید به نظرم)
https://fasterthanli.me/articles/frustrated-its-not-you-its-rust
(مطلب جذابیه، بخونید به نظرم)
https://fasterthanli.me/articles/frustrated-its-not-you-its-rust
fasterthanli.me
Frustrated? It's not you, it's Rust
Learning Rust is… an experience. An emotional journey. I’ve rarely been more frustrated than in my first few months of trying to learn Rust.
What makes it worse is that it doesn’t matter how much p...
What makes it worse is that it doesn’t matter how much p...
یادگیری RUST به عنوان برنامهنویس cpp/c#/java
https://fasterthanli.me/articles/i-am-a-java-csharp-c-or-cplusplus-dev-time-to-do-some-rust
https://fasterthanli.me/articles/i-am-a-java-csharp-c-or-cplusplus-dev-time-to-do-some-rust
fasterthanli.me
I am a Java, C#, C or C++ developer, time to do some Rust
As I've said before, I'm working on a book about lifetimes. Or maybe it's just a long series - I haven't decided the specifics yet. Like every one of my series/book things, it's long, and it starts...
چگونه فایل را باز کنیم و بخوانیم؟ از راه سخت
تو این مطلب در مورد زبون های مختلف و سیستم کالهای کرنل و ابزار strace و ... بیشتر یاد میگیریم و بسیار توصیه میشه.
https://fasterthanli.me/series/reading-files-the-hard-way/part-1
خیلی مطلب عمیقیه. البته توی درس سیستم عامل تا حدی پوشش داده میشه. باز توصیه میکنم بخونیدش.
تو این مطلب در مورد زبون های مختلف و سیستم کالهای کرنل و ابزار strace و ... بیشتر یاد میگیریم و بسیار توصیه میشه.
https://fasterthanli.me/series/reading-files-the-hard-way/part-1
خیلی مطلب عمیقیه. البته توی درس سیستم عامل تا حدی پوشش داده میشه. باز توصیه میکنم بخونیدش.
fasterthanli.me
Reading files the hard way - Part 1 (node.js, C, rust, strace)
Everybody knows how to use files. You just open up File Explorer, the Finder, or a File Manager, and bam - it’s chock-full of files. There’s folders and files as far as the eye can see. It’s a genu...
❤3
چرا cpp بلوک فاینالی نداره و کلی سوال و جواب جالب دیگه از سازنده زبان
https://www.stroustrup.com/bs_faq2.html#finally
https://www.stroustrup.com/bs_faq2.html#finally
قواعد کدنویسی cpp از زبان خالق زبان
https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md
https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md
GitHub
CppCoreGuidelines/CppCoreGuidelines.md at master · isocpp/CppCoreGuidelines
The C++ Core Guidelines are a set of tried-and-true guidelines, rules, and best practices about coding in C++ - isocpp/CppCoreGuidelines
Forwarded from آرچ لینوکس پارسی
برای دیدن فایلهای man به صورت رنگ بندی شده میتوانید از برنامه bat استفاده کنید. برای اینکار بعد از نصب بسته
export MANPAGER="sh -c 'col -bx | bat -l man -p'"
bat
خط زیر را به فایل تنظیمات شل پیش فرض خود (bashrc و غیره) اضافه کنید:export MANPAGER="sh -c 'col -bx | bat -l man -p'"
موتیکس یا دستور اتمیک؟
https://jvns.ca/blog/2014/12/14/fun-with-threads/
https://jvns.ca/blog/2014/12/14/fun-with-threads/
Julia Evans
Diving into concurrency: trying out mutexes and atomics
I hadn’t written any threaded programs before yesterday. I knew sort of abstractly about some concurrency concepts (mutexes! people say compare-and-swap but I don’t totally get it!), but actually understanding a Thing is hard if I’ve never done it. So yesterday…
برای اینکه برنامهنویس خوبی بشید، یاد بگیرید چیزها چطور کار میکنن.
https://jvns.ca/blog/learn-how-things-work/
https://jvns.ca/blog/learn-how-things-work/
Julia Evans
Get better at programming by learning how things work
When we talk about getting better at programming, we often talk about testing, writing reusable code, design patterns, and readability.
کارنامه فعالیت من در ویرگول در سال ۱۳۹۹
نکته جالب اینکه جزو ۴ درصد فعال ترین نویسندگان بودم.
https://virgool.io/@rsharifnasab/share/annual-report/1399/cizitmbr6beh-aLEWz
نکته جالب اینکه جزو ۴ درصد فعال ترین نویسندگان بودم.
https://virgool.io/@rsharifnasab/share/annual-report/1399/cizitmbr6beh-aLEWz
ویرگول
آمار مطالعه مطالب roozbeh Sharifnasab در سال ۹۹
میزان بازدید و مطالعه مطالب منتشر شدهی roozbeh Sharifnasab در ویرگول
منطق کد رو به شکل json بنویسید و بتونید راحت بین فرانت و بکاند بفرستیدش! حتی به شکل داده توی دیتابیس ذحیرهش کنید!
https://jsonlogic.com/
https://jsonlogic.com/
Jsonlogic
JsonLogic
Build complex rules, serialize them as JSON, share them between front-end and back-end