My Dev Log

Table of Contents

About

Source Repo -> https://github.com/utsavdarlami/dlog

log to track my dev journey

print("hello world")
hello world

2024

2024-08 August

2024-08-03 Saturday

  • 07:24 PM - Log:

    how to set a type-hint for sub-classes in python

    my use-case

    from typing import Dict, Type
    
    class Operator:
    
        @abstractmethod
        def operate():
            raise NotImplementedError
    
    class Add(Operator):
        def operate():
            return +
    
    class Minus(Operator):
        def operate():
            return -
    
     # Dictionary \w the Operator's child as value
     operator_factory: Dict[str, Type[Operator]] = {
         "add": Add,
         "minus": Minus
     }
    
    

2024-07 July

2024-07-06 Saturday

2024-06 June

2024-06-28 Friday

2024-06-26 Wednesday

2024-06-24 Monday

2024-06-22 Saturday

  • 10:01 PM - Log:

    Was thinking about writing my own editor. Why you ask?

    • A fun and challenging project to work on

    I could write it down in python with help of blogs and videos. But i also want to learn new language so maybe i can try in rust.

    Found this good blogs on writing your or TUI based editor in C.

    And of course everything that is in C has a version in rust.

    Both seem to be great work.

2024-06-20 Thursday

Date: 2024-05-21 11:58

Author: felladog

Created: 2024-08-03 Sat 19:29

Validate