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
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
The popularity of stoicism

[tweet]
"Most people die at 25... we just don't bury them until they are 70."

― Benjamin Franklin
πŸ‘13
Any thoughts on once.
I think it's a good idea but i don't know how many people will go through the hassle of running their own servers.
Frectonz
I fucken did it. It works, I added a try statement to the go compiler
I am thinking of doing a demo of how i added try and unwrap to the go compiler tonight. So should i just walk through the diff explaining what each part does or should i do a live implementation of a new statement.
πŸ‘6
Live stream scheduled for
Frectonz
Missed opportunity 😒, I should have thought of this meme then. πŸ˜‚
btw don't forget to checkout better-go for your compiler design courses, i am sure you will learn a lot πŸ˜‚
Live stream started
Frectonz
Live stream started
Will start of at 4:10, anyone who is interested gather around until then.