Frectonz
3.47K subscribers
1.91K photos
85 videos
32 files
1.65K links
A place for me to talk about my projects, stuff i find on the internet and what I am currently thinking about.

By @frectonz
Download Telegram
πŸ‘2
Forwarded from logos the coder from down the street
if Linux so good why they didn't made Linux 2???
See, there Windows 11(eleven) not just one silly version...
πŸ‘1
I fucken did it.
It works, I added a try statement to the go compiler
πŸ‘28πŸŽ‰3
Frectonz
I fucken did it. It works, I added a try statement to the go compiler
i am literally shaking, my hands are shaking
πŸ‘1
Frectonz pinned a photo
Frectonz
This thing is so close to working but the typecheck is failing, after i transform the try statement to a regular if statement. from this try c or string = ioutil.ReadFile(filename) to this content, err := ioutil.ReadFile(filename) if err != nil { var…
So the syntax is not the same as the one i used last time, changed it up a bit to make things easier. Here is the current version, that's working.

content, err := ioutil.ReadFile(filename)
try err or string


so the try statement expects two values

1. the error variable
2. the type of the return value (this is needed because go has this convention of returning the zero value of a type incase of an error)

so the above syntax gets expanded into the following

if err != nil {
return make([]string, 1)[0], err
}
πŸ‘4
Frectonz
I fucken did it. It works, I added a try statement to the go compiler
I have ascended beyond the mortal plain.
And golang devs you are welcome.
Frectonz
a story of pain
This is what watching Jonathan Blow clips telling you to do hard stuff does to a person. πŸ˜‚
πŸ‘1
Frectonz
I fucken did it. It works, I added a try statement to the go compiler
Also implemented an unwrap statement that panics when the error is not nil.

from this
unwrap err


to this
if err != nil {
panic(err)
}
πŸ‘8
Frectonz
a story of pain
Take pride in your effort, not your talents.
πŸ‘11
πŸ‘€
πŸ‘11