Frectonz
3.45K subscribers
1.91K photos
82 videos
32 files
1.64K 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
One of the coolest things about using Elm (or functional languages in general) is how it makes the logic for your app clear.

The enabled function is used to check if a single tic-tac-toe board out of the whole should be disabled. Essentially the rules of the game are those 3 checks.

1. the last cell move corresponds to the current board's position and the game has not ended
2. or the board corresponding to the last cell has ended (in which case all the unfinished boards should be enabled hence the use of or)
Added PWA support
πŸ‘2
Forwarded from ilo sona
can your windows do this?
⚑5
I was reading a book called The Art of PostgreSQL and i found out this.

There is a shorthand for select * from <the_table>, it is just table <the_table>.

select * from users == table users
πŸ‘Œ4
Opening a file edited on windows be like.

^Ms everywhere 😁
πŸ”₯10
There is another entry in the hazarda collection.

I have started learning ruby (the chosen language of the unicorns 😁). I implemented a random number generator game in it only started learning last night. btw i am curious is there anyone here who does Ruby.

Somethings i have noticed

Conventions

There are a lot of conventions. Ruby devs don't like rules, most of the stuff i have learned till now are convention as in you could do them but ruby will not yell at you if you don't. Maybe that's how the ruby unicorn revolution started, most successful founders are contrarians who like to do things their own way, and they wanted to use a language that will let them do what they wanted without complaining, and they found that in ruby.

One example of a convention, you should put a question mark at the end of a function name to indicate that it returns a boolean, ex. integer?.

OOP is highly favored

Ruby is often called a "pure object-oriented language" since everything is an object. Classes can be modified at runtime. You can extend any class builtin into the language and ruby won't say anything.

class Integer
# You can, but please don't do this
def +(other)
self - other
end
end

Checkout Ruby From Other Languages to see more.

Inverted Logic

if inverted is unless, ruby has that.
while inverted is until, ruby has that.
Forwarded from ForwardingServiceRepositoryImpl (Archive)
wow... did they actually create a github repo for it? damn! sillicon valley is cool

https://github.com/Stitchpunk/atari-ai
πŸ”₯2
People always say, python is a good language for beginners, it's actually not. The idea that indentation is used to define a particular block of code is the hardest thing to get past for people new to the language.
πŸ‘2πŸ‘Ž1πŸ—Ώ1
Frectonz
I am going to be taking notes on this one 😁
Watching Sam Altman's talks is increasingly becoming one my favorite things to do.

https://youtu.be/4SlNgM4PjvQ
⚑3πŸ‘1
There's no such thing that can be called an untyped programming language. Every language has types, what varies is the number of types they have.

Python is not untyped, it's just that everything is a type called PythonObject. Same goes for JavaScript.

Languages like TypeScript and Rust, which we would call typed languages have an infinite number of types because they allow you to create types of your own.

So we should call them single type vs infinite type languages.
😁1
If I had the infinity gauntlet, I would snap away everyone that cuts in line, those people are the cancers of society. They should be eliminated by any means possible. 😀
😁3⚑2
Frectonz
If I had the infinity gauntlet, I would snap away everyone that cuts in line, those people are the cancers of society. They should be eliminated by any means possible. 😀
After some reflection in the comments, we have found the root problem. The problem is not that people who cut in line exist, It's that I am not rich.

So yeah don't get angry over queues, get rich so that you will never be in one.
😁4πŸ’―2