I’m assuming you already know what is GraphQL and Swoole, so what about getting started right straight to the code, shall we?

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 we can focus on using GraphQL and Swoole through Siler instead of solving hard domain and business logic problems, so we are going to implement a gold-old to-do list. …


Image for post
Image for post

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 is the C Major scale: C D E F G A B C. It’s a common scale because doesn’t any accidentals: flats (♭) or sharps (♯). A good way to see this is by making a reference to the white keys and black keys of a piano…


Image for post
Image for post

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?

Freya seams to be an awesome purely functional high-level way to go, but few maintainers and months without updates. …

About

Leo Cavalcante

Living-standards of my ideias and opinions. Programming, Music, Tech & Arts.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store