Skip to content

Instantly share code, notes, and snippets.

View diegopacheco's full-sized avatar

Diego Pacheco diegopacheco

View GitHub Profile
@diegopacheco
diegopacheco / cuda-ubuntu-22.md
Created April 20, 2024 23:14
install cuda ubuntu 22
sudo apt install cuda-11-8 -y
@diegopacheco
diegopacheco / cudnn-ubuntu-22.04.md
Last active April 6, 2024 08:28
Install Nvidia: cudnn on ubuntu 22.04
wget https://developer.download.nvidia.com/compute/cudnn/9.0.0/local_installers/cudnn-local-repo-ubuntu2204-9.0.0_1.0-1_amd64.deb
sudo dpkg -i cudnn-local-repo-ubuntu2204-9.0.0_1.0-1_amd64.deb
sudo cp /var/cudnn-local-repo-ubuntu2204-9.0.0/cudnn-*-keyring.gpg /usr/share/keyrings/
sudo apt-get update
sudo apt-get -y install cudnn

sudo apt-get -y install cudnn-cuda-11
sudo apt-get -y install cudnn-cuda-12

@diegopacheco
diegopacheco / having-fun-with-typescript.md
Last active March 4, 2024 17:11
Having fun with Typescript

Tiny Typescript Essay

created: 20.FEB.2024

I love to learn new programing languages, it help to open the mind to new possibilities and compare different approaches. For instance, I learned Ruby and Scala in 2010, Clojure and Haskell in 2011, Go in 2015, Kotlin 2016, Rust in 2018 and Idris, TypeScript in 2019, 2020 Pandemic strike did a bunch of pocs but not with new langs(crazy year), Zig in 2021, 2022(coding in lots of langs but nothing new) - in 2023 I'm learning Nim and V. Learn at least one lang per year. This post is not complain, it's just to share some toughts, notes and impressions.

Why Typescript

  • Created in 2012 by Microsoft
  • Type System
@diegopacheco
diegopacheco / having-fun-with-rust.md
Last active March 4, 2024 08:50
Having Fun With Rust

Tiny Rust Essay

created: 20.FEB.2024

I love to learn new programing languages, it help to open the mind to new possibilities and compare different approaches. For instance, I learned Ruby and Scala in 2010, Clojure and Haskell in 2011, Go in 2015, Kotlin 2016, Rust in 2018 and Idris, TypeScript in 2019, 2020 Pandemic strike did a bunch of pocs but not with new langs(crazy year), Zig in 2021, 2022(coding in lots of langs but nothing new) - in 2023 I'm learning Nim and V. Learn at least one lang per year. This post is not complain, it's just to share some toughts, notes and impressions.

Why Rust

  • Secure
  • Fast, really fast
@diegopacheco
diegopacheco / having-fun-with-scala.md
Last active March 4, 2024 08:50
Having fun with Scala

Tiny Scala Essay

created: 15.FEB.2024

I love to learn new programing languages, it help to open the mind to new possibilities and compare different approaches. For instance, I learned Ruby and Scala in 2010, Clojure and Haskell in 2011, Go in 2015, Kotlin 2016, Rust in 2018 and Idris, TypeScript in 2019, 2020 Pandemic strike did a bunch of pocs but not with new langs(crazy year), Zig in 2021, 2022(coding in lots of langs but nothing new) - in 2023 I'm learning Nim and V. Learn at least one lang per year. This post is not complain, it's just to share some toughts, notes and impressions.

Why Scala

  • JVM Based
  • Functional Programing
@diegopacheco
diegopacheco / having-fun-with-zig.md
Last active March 4, 2024 08:51
Having Fun with Zig

Tiny Zig Essay

created: 12.FEB.2024

I love to learn new programing languages, it help to open the mind to new possibilities and compare different approaches. For instance, I learned Ruby and Scala in 2010, Clojure and Haskell in 2011, Go in 2015, Kotlin 2016, Rust in 2018 and Idris, TypeScript in 2019, 2020 Pandemic strike did a bunch of pocs but not with new langs(crazy year), Zig in 2021, 2022(coding in lots of langs but nothing new) - in 2023 I'm learning Nim and V. Learn at least one lang per year. This post is not complain, it's just to share some toughts, notes and impressions.

Why Zig

  • Lightning Fast, really!
  • No Hidden control flows
@diegopacheco
diegopacheco / having-fun-with-kotlin-lang.md
Last active March 4, 2024 08:51
Having fun with Kotlin lang

Tiny Kotlin Essay

created: 12.FEB.2024

I love to learn new programing languages, it help to open the mind to new possibilities and compare different approaches. For instance, I learned Ruby and Scala in 2010, Clojure and Haskell in 2011, Go in 2015, Kotlin 2016, Rust in 2018 and Idris, TypeScript in 2019, 2020 Pandemic strike did a bunch of pocs but not with new langs(crazy year), Zig in 2021, 2022(coding in lots of langs but nothing new) - in 2023 I'm learning Nim and V. Learn at least one lang per year. This post is not complain, it's just to share some toughts, notes and impressions.

Why Kotlin

  • JVM based - great interop with Java both ways
  • Created in 2011 by JetBrains(InteliJ company)
@diegopacheco
diegopacheco / Having.fun.with.Clojure.Lang.md
Last active March 4, 2024 08:51
Having fun with Clojure Lang

Tiny Clojure Essay

created: 10.FEB.2024

I love to learn new programing languages, it help to open the mind to new possibilities and compare different approaches. For instance, I learned Ruby and Scala in 2010, Clojure and Haskell in 2011, Go in 2015, Kotlin 2016, Rust in 2018 and Idris, TypeScript in 2019, 2020 Pandemic strike did a bunch of pocs but not with new langs(crazy year), Zig in 2021, 2022(coding in lots of langs but nothing new) - in 2023 I'm learning Nim and V. Learn at least one lang per year. This post is not complain, it's just to share some toughts, notes and impressions.

Why Clojure

  • Modern Lisp
  • JVM (full interop with Java)
@diegopacheco
diegopacheco / virtual-threads-summary.md
Last active February 9, 2024 00:07
Java 21 - Virtual Threads Summary

Summary JVM Threads vs Vritual Threads

Threads

  • Threads are wrapper around OS Threads
  • Have a cost and consume memory
  • Can't have many, need a thread pool
  • Good for CPU Bound, not good for IO Bound.
  • 2k metadata, 1MB stack, 1-10us context switch