Skip to content

Instantly share code, notes, and snippets.

View thetalmid's full-sized avatar
🙏
ברוך הבא בשם יהוה

Marcelo Sampaio thetalmid

🙏
ברוך הבא בשם יהוה
View GitHub Profile
@ityonemo
ityonemo / test.md
Last active May 1, 2024 15:37
Zig in 30 minutes

A half-hour to learn Zig

This is inspired by https://fasterthanli.me/blog/2020/a-half-hour-to-learn-rust/

Basics

the command zig run my_code.zig will compile and immediately run your Zig program. Each of these cells contains a zig program that you can try to run (some of them contain compile-time errors that you can comment out to play with)

Interview Questions

Kotlin

Q1: What is a primary constructor in Kotlin? ☆☆

Answer: The primary constructor is part of the class header. Unlike Java, you don't need to declare a constructor in the body of the class. Here's an example:

@seansawyer
seansawyer / vim-eclim-scala.md
Last active May 26, 2021 02:58
Vim + Eclim for Scala development

Vim + Eclim + Scala

WARNING! Do not install anything from update sites before installing Eclim! This is because Eclim determines available project natures (android, scala, etc) by trying to discover them at install time. If they are installed on a per-user basis, it won't find them. If you're installing Eclim for use with an existing Eclipse install

You're also better off not to install any plugins via your package manager. Eclim will give you the option to install plugins associated with each project nature from its install wizard.

Install Eclipse Luna. On Arch Linux, it's available in extra.

pacman -Sy eclipse

@gatlin
gatlin / imperative.lhs
Last active April 20, 2023 00:51
Imperative Programming in Haskell
How to add imperative programming to a pure functional language
===
Many people bemoan languages such as Haskell for not supporting imperative
programming; they decry the need for math in their computer science.
![Math? In my computer? Yeah right.](http://i.imgur.com/YDIaEPB.jpg)
I'm here to tell you that not only does Haskell make imperative programming a
cinch, but safe and correct as well. Follow along! This post is written in
@23Skidoo
23Skidoo / IntermHaskell.hs
Last active April 10, 2021 23:53
20 Intermediate Haskell Exercises
-- https://haskell.fpcomplete.com/user/DanBurton/20-intermediate-exercises
-- Originally from http://blog.tmorris.net/posts/20-intermediate-haskell-exercises/
class Fluffy f where
furry :: (a -> b) -> f a -> f b
-- Exercise 1
-- Relative Difficulty: 1
instance Fluffy [] where
furry = fmap