Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View InNoHurryToCode's full-sized avatar
💻
Programming in ANSI-C

Merijn Hendriks InNoHurryToCode

💻
Programming in ANSI-C
View GitHub Profile

Programming languages and philosophy

After working with quite some programming languages, I feel the urge to write down my thoughts on the features they employ and how this affects the programmer's way of thinking. This is an opinion piece, but I know that the large majority of my friends / old classmates / collegues feel the same way when I discussed the topic with them.

Imperative programming

With this I mean C89 in particular.

The language encourages it's user to express it's thoughts as direct and precise as possible, while taking full responsibility of the concequences. The language rules are simple, it only provides the minimum you need to get started and the language doesn't hold your hand.

Inheritance

We have learned the computer to think in the way we view the world. It's not a bad thing per-se, as it now allows development tools to include auto completion and if the compiler is good enough, it can translate it properly back to C code (which results in similar performance as hand-written

@InNoHurryToCode
InNoHurryToCode / oop_in_c.md
Last active August 10, 2018 04:26
Object-Oriented Programming in C

Object-Oriented Programming in C

There are various reasons why one might want to emulate object-oriented programming (OOP) in C. Many could write such code, but only a few will master it. I won't discuss OOP in detail, as there are better resources for this. Thus, I assume that you already have knowledge of OOP and writing in an OOP language. What I will discuss in the document, is a quick rundown of several techniques to emulate OOP in C.

Table of Contents

  1. Inheritance
  2. Member hiding
  3. Method overloading

1. Inheritance

@InNoHurryToCode
InNoHurryToCode / notes_on_oop_in_c.md
Last active May 1, 2020 05:24
Some notes on object oriented programming in c

Notes on Object Oriented Programming in C

In this document, I'll discuss a few techniques that can be utilized to achieve object-oriented programming in C. This document is for educational use, and should be evaluated properly before using these techniques in commercial projects.

Note of the author

There isn't much use for object-oriented programming in C besides when one or multiple of these are true:

  1. you want to learn how object-oriented programming languages work
  2. your compiler doesn't support an object-oriented language
  3. object-oriented languages are not capable of utilizing the resources at hand efficiently enough
  4. your boss and/or client demands you to write object-oriented code
  5. alternatives are too complex to learn
@InNoHurryToCode
InNoHurryToCode / ClangOnWindows.md
Last active August 14, 2023 22:30
How to install clang on windows using the visual studio build tools

Clang on Windows (VS 2017 build tools)

There are plenty of tutorials online on how to install clang on windows with visual studioIDE and MinGW. However, there are none on clang with visual studio build tools.

Requirements:

  • 64-bit Windows 7 SP1 or newer with the latest updates installed
  • 6 GB of free space on the partition where Windows is installed
  • internet connection (for installation only)

1. Install VS 2017 build tools

%VS2017BuildToolsDir% = installation directory of VS 2017 build tools

@InNoHurryToCode
InNoHurryToCode / .txt
Last active August 2, 2021 06:25
HP laptop Linux
Quick notes installing linux (ubuntu + pantheon shell) on my HP Pavilion 13' laptop
* Ubuntu mini iso (16.04, 64 bits)
- doesn't get into installer without using acpi=off
- black screen with blinking cursor issue (due to eufi?)
* Elementary OS (0.4 Loki, 64 bits)
- doesn't get into installer without using acpi=off
- wireless card doesn't work?
- buy one from intel