What you maybe doesn’t know yet is about Siler! It is a set of general purpose high-level abstractions aiming an API for declarative programming in PHP.
With Siler we can abstract way “hard” parts from popular tools like GraphQL and recently Swoole. And yes, I’m the author, so feel free to file any issues or make any questions about it.
“Talk is cheap, show me the code”. Let’s go!
I want to make it simple as possible so…
When I’m not in front of a “soup of colored letters” (people say this when they see my screen on VS Code) or “jumpy green text” (yeah, this one is for the terminal); I like to play and study music! Diving into my journey on F#, this is my attempt to mix this new and old passions.
As you maybe already know, music has a lot of ways to get things done, harmonic fields, chord progression, scales and much more. But let’s keep this simple, everybody knows about a least one scale, the Major scale:
This one in particular…
I have just a couple years in functional programming, just a couple weeks in F# and no background or experience with .NET, so don’t take this as a reference from an expert, it’s just me documenting what I’ve learned so far.
You can start by building a very raw-vanilla-bare-bones HTTP server using the HttpListener from .NET, but is very low-level in terms of having few abstractions, like: you have to write on stream buffers to output something.
There is ASP.NET Core, but is is very object-oriented, it’s constructions aren’t functional and hey, we’re using F# for a reason, right?
One the of the hardest things in development - IMHO - after naming, is handling State, at least handling it reactively without overs (over-building, over-rendering, over-painting and overhead!).
flutter create geo_tag_diary
Open it in your favorite editor, I personally like VSCode, so
code geo_tag_diary, then add
flutter_redurx in your
dependencies key at
pubspec.yaml. Let you editor get the dependencies again or run in the project folder:
flutter packages get.
Now let’s create a very basic app just to see it working in the device/emulator/simulator (you name it).
É comum as pessoas defenderem que hash não é criptografia; fazem isso veemente a ponto de ridicularizar quando leem algo como “Fiz criptografia com MD5”. É tão errado assim falar isso?
Você já viu algum artigo em inglês comentando algo do tipo? Algo como “Hash is not Cryptography”? Agora pesquisa por “Hash não é Criptografia”. Interessante, não é? Parece que é uma constatação apenas brasileira.
Essa observação me fez levantar a hipótese de que a culpa é da tradução. …
I used to love everything about object oriented programming, ignoring everything else, when I finally got it, I thought that every piece of software should be developed using OO and if it is not, it is wrong.
Here we are going to build a chat app using:
Since neither Siler or Ratchet require us to have a predefined folder structure, we can start working with
create-react-app then nicely mix our back-end code within.
$ create-react-app $(codename --slug)
If you have naming problems like me, check out Intel Codenames Picker.
Here I got
downey (DowneyChat looks good), so let’s
cd to it:
$ cd downey
Here we magically got a running React app with its dependencies and front-end development facilities already loaded. …
Zero config. Zero boilerplate. Zero unnecessary stuff.
Make a new directory and enter it
λ mkdir siler-n-redbean-rocks && cd siler-n-redbean-rocks
Bring the kids to the playground:
λ composer require leocavalcante/siler dev-master \
&& composer require gabordemooij/redbean dev-master
<?phprequire_once __DIR__.'/vendor/autoload.php';use Siler\Route;
use RedBeanPHP\Facade as R;R::setup('sqlite:dbfile.db');
Not much to talk about it. You probably now what FP is and if you don’t, I’ll not be explaining it right now.
Here is it.
I really encourage you to see the previous mentioned samples to get it. And you can see this sample above running on Babel Repl:
I’m using this “one letter arguments” ’cause I’m on my to Go, so.
Vi uns 3 ou 4 posts nessas últimas semanas sobre: “o mundo tá f#da, o hype tá complexo”. Certo, não exatamente com essas palavras, mas nessa pegada. Posts falando sobre como as novidades que temos visto são “coisas difíceis demais”, principalmente no front-end.
React tem sido a menina dos olhos ultimamente, mas também tem sido bem controverso, as pessoas estão há gerações (da Internet) aprendendo que HTML…
Living-standards of my ideias and opinions. Programming, Music, Tech & Arts.