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
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
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
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)I was reading a book called
There is a shorthand for
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
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.
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.
Inverted Logic
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 IntegerCheckout Ruby From Other Languages to see more.
# You can, but please don't do this
def +(other)
self - other
end
end
Inverted Logic
if inverted is unless, ruby has that.while inverted is until, ruby has that.Ruby Programming Language
A Programmer's Best Friend
Frectonz
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.β¦
If you didn't believe me when i said everything is an object. π
π3π2