Иван Закутний про
196 subscribers
132 photos
3 videos
162 links
Авторский канал про инженерию умных систем.
По всем вопросам: @m0n0x41d
Download Telegram
So, basically, now I'm studying a theoretical course about the fundamental concepts of Functional Programming.
In a few next days, I'll be sharing this knowledge with you.

First things first, and the first thing today is 'First-Class Citizen.' T
his is a characteristic of objects.
This concept applies to functions (yes, functions are indeed objects).

But what the heck are First-Class Citizen functions?

This means that such a function can:

- Be assigned to a variable
- Be passed as an argument to some other function
- Be returned as a return value from another function
- Be stored in data structures, such as a list, array, etc.

Freaking awesome, isn't it? 🤨

First-Class Citizen functions can be very handy in capable hands.
Just imagine how beautiful and reusable, yet completely incomprehensible and ugly your code could become with them (If hands are not capable) 🤣

A pretty simple example of such a function:
Please open Telegram to view this post
VIEW IN TELEGRAM
👍1
Type hints here are pretty strict here. Keep in mind that in the real world, such functions will probably be more generic.

Of course, we can create more sophisticated things like map, reduce, filter functions, and beloved closures, but we won't cover them today.

Here's another example:
No matter what function we pass to triple_me, it will be applied three times to the passed value.

Last example for today. Take a deep breath. We are now engaging in function composition, a common trick in FP:
Enough for today 🙂
We will take a look at currying, pros of immutable structures and few other functional programming concepts that we all should know to be able to call ourself a R E A L M A N 🫥
Please open Telegram to view this post
VIEW IN TELEGRAM
Andrey told me that I am dumbass not using Telegraph. I'll do, sorry for spam 🙂
😁1🙈1
Enums might be very helpful for organizing constants in your code, but this is not their only use. Take a look.
https://telegra.ph/Python-Enums-09-22
🔥1
New cool axe as the site favicon :) Though it would be nice to use it as the channel thumbnail as well :)
Oh, hello there. Yeah, I am not sleeping again.
But here is a new blog for you. It is huge, I am sorry, but I believe in you!

Click -> Levels of reasoning about software system
Small talk about python out of box debugger - PDB
Take a look -> https://ivanzakutnii.com/blog/Debugging-Python-Code
🔥2
GitHub Pages has been performing really poorly lately. I'm not exactly sure what the exact problem is; it might be something strange with Azure DNS or a glitch with the auto Jekyll rebuild script on their site. Regardless, it's just not handling things well. It's not building new posts or adding tags to them – meh...

But, as we developers often say, "Everything works perfectly on my laptop!" 😁

I've finally had enough of it, so it's time for some changes that I've been contemplating for a while:

1. Moving my domain to a CloudFlare (Godaddy sucks).
2. Changing my nickname on GitHub (because I can). Anyway, my page is broken now, so it's the perfect time!
3. Ditching GitHub.io and hosting my blog on a VDS or even at home via an Orange Pi Zero 😂

Stop laughing – no one can stop me from using Ngrok + Cloudflare's free CDN, NO ONE!

---

So, yeah, I wrote a new blog post, but github.io pages wont update it even after an hour after "deploy".

Keep in touch, it wont take long 🙂 I am only need to find this orange pi and blow the dust off it
Please open Telegram to view this post
VIEW IN TELEGRAM
🔥2🤔1
Oh sheesh, we might not even need coudflare there days, lol 🤨
https://ngrok.com/docs/guides/how-to-set-up-a-custom-domain/
Please open Telegram to view this post
VIEW IN TELEGRAM
🤯1
Did not find the old orange pi.
Bought raspberry 3b.
This little bastard won't fire over wifi.
keep fighting.
This piece of garbage is online. There are some troubles with DNS, and I have also decided not to use ngrok. This story, along with some instructions, will definitely be written as a post later on 😂
Please open Telegram to view this post
VIEW IN TELEGRAM
🔥3🌭2
Do not say nothing. The site is back online... from GitHub Pages 😱


Yeah, it is a huge pain in the ass to serve your blog from home NAT.
Okay, it is not a pain, and it might even be cheap enough, but I feel that it is starting to take a lot more time than I thought.
I'll talk about it later in a separate blog post, I believe.


Anyway, the new small post is online now.
https://ivanzakutnii.com/blog/Immutability-is-the-key

I am pretty sure that the problem was either in Azure CDN or in the default Jekyll build flow (now it lives behind Cloudflare).
Fortunately, there is now an option to configure your own GitHub Actions for the building process; I might be checking it out later.

I am not sorry for buying Pi3b because it cost me less than the market price, and as a bonus, I met a nice guy 🙂
There are a bunch of cool things I might build with this little bastard; probably the next purchase will be a soldering iron 😂
Please open Telegram to view this post
VIEW IN TELEGRAM
🌭2👏1
Few words about concurrency in general, and about concurrency in Python:
https://ivanzakutnii.com/blog/Python's-concurrency
🌭2🔥1