Frectonz
3.44K 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
I just heard someone say `Theoretical Computer Science` isn't that just `Math` 🀣
😁8
If you want to disable multiple form elements like buttons at once, you can use the <fieldset> element.
πŸ‘6
Frectonz
Tic-Tac-Toe just became cool again https://youtu.be/_Na3a1ZrX7c
Implemented Super Tic Tac Toe in Elm 🌳. It had been a long time since i programmed using it and i had forgotten how wonderful it is.

If you ignore the little bit of HTML/CSS/JS holding the Elm together, this project was completely built using functional languages. I set up my dev environment using Nix and built the thing using Elm. I guess i am embracing my inner functional programming zealot 😁.

You might find some bugs in the implementation, if you do report them to me, and the CSS is not completely responsive.

https://tic-tac-toe.frectonz.io/
https://github.com/frectonz/super-tic-tac-toe
πŸ”₯7πŸ‘4❀1
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.