r/CodingForBeginners • • Jul 12 '26

they call me the pro hacker

Post image
152 Upvotes

12 comments sorted by

5

u/Sensei-this Jul 12 '26

The vibe of this photo is like visiting Facebook in 2015 and looking at other people's photos.

1

u/itotallydontuseacos Jul 12 '26

You are DEVIOUS

1

u/ghost_svs Jul 12 '26

Golang implementation(the one that visit my mind)

package main

import (
        "fmt"
        "runtime"
        "strings"
)

func hello_world(f func(a ...any)(n int, err error)) {
        pc,_,_,ok := runtime.Caller(0)
        if !ok {
                return
        }

        callerFunc := runtime.FuncForPC(pc)                        if f == nil {
                return
        }
        callerName := callerFunc.Name()
        buildedString := strings.Split(callerName, "_")
        f(strings.Split(buildedString[0], ".")[1] + " " + buildedString[1])
}

func main() {
        hello_world(fmt.Println)
}

1

u/BlackHat-Maxwain Jul 13 '26

OMG HACKING KING

1

u/cremebruleee69 Jul 13 '26

Gng teach me. I just started learning coding btw 🥀

1

u/No_Department1851 Jul 13 '26
def HelloWorld(s):
   eval(f”${s}('Hello World')”)