LogoSudip
  • Tags
  • Series
  • Categories
  • Archives

Finding nth Prime number

Jul 17, 2021 3 min read #technical#algorithm#programming#numerical

Sieve of Eratosthenes is one of the most adopted algorithm to extract the list of prime number. To get the nth prime number however we can do a bit better than just to return the nth from Eratosthenes list.

Default argument in Rust

Jul 14, 2021 3 min read #technical#learning-rust#rust#programming#default-argument#rust-macro

Default argument allows us to call function omitting some paramater. When a argument is omitted provided default paramater is used. While rust does not support default argument we can make use of macro to achive similar functionality.

Function overloading in rust based on number of argument

Jul 12, 2021 5 min read #technical#learning-rust#rust#rust-macro#function-overloading#programming

Explore the basic idea of function overloading based on number of arguments in rust. For this purpose we make use of declarative macros to implement a basic overloaded add function.

Using Rc in Rust - Simplified

Jul 2, 2021 4 min read #technical#learning-rust#rust#programming#smart-pointers#std-rc

The type Rc<T> provides shared ownership of a value of type T, allocated in the heap. Here we are going to look why we need Rc in Rust and using it to write a very simple example.

C++ Idiom – Attorney | Filtered Access to friend members

Oct 14, 2020 2 min read #technical#learning-cpp#programming#cpp-idom
Intent Grant access to only selected member function to the friend class. Motivation C++ provide no way to Control the granularity of access to the implement details of class. Friend declaration in gives complete access to the internals of class. Friend decleration follow Nothing-or-Everything proposition. Which is …
  • ««
  • «
  • 1
  • 2
  • 3
  • »
  • »»
Sudip Ghimire
Sudip Ghimire
Rising developer
Self-learning
Pokhara, Nepal
About Me

Recent Posts

  • Success - bringing luck & hardwork together
  • Offchain worker and transactions in polkadot substrate
  • Rust Workshop - iBriz academy 2022
  • include! macro in rust
  • Fundamental Idea locality of reference in compiler optimization

Categories

technical 9 draft 1 lifestyle 1

Series

learning-rust 6 learning-cpp 2 algorithm 1 compiler-optimization 1

Tags

programming 6 rust 5 rust-macro 3 blockchain 2 compiler-optimization 1 cpp 1 cpp-idiom 1 cpp-idom 1 default-argument 1 function-overloading 1 lifestyle 1 locality 1 numerical 1 philosophy 1 polkadot 1 principle-of-locality 1 smart-pointers 1 std-rc 1 substrate 1 success 1 sudip 1 workshop 1
  • Copyright © 2021-2022 Sudip ghimire. All Rights Reserved.