{"version":"https:\/\/jsonfeed.org\/version\/1","title":"My Feed Title","home_page_url":"https:\/\/blog.zykino.net\/en","feed_url":"https:\/\/blog.zykino.net\/en\/blog.json","description":"Blog de Zykino, Jeux vid\u00e9os et technique","author":{"name":"Zykino"},"items":[{"title":"New syntax for async\/await in Rust","date_published":"2019-05-10T19:28:00+02:00","id":"https:\/\/blog.zykino.net\/en\/nouvelle-syntaxe-pour-lintroduction-de-async-await-dans-rust","url":"https:\/\/blog.zykino.net\/en\/nouvelle-syntaxe-pour-lintroduction-de-async-await-dans-rust","content_html":"
I did not (yet) described Rust in my blog. So to be quick, Rust is a programming language (and no I will never talk about the game with the same name.) which aim at providing high level ecosystem and functionalities to low level languages. That is if you come from a low level language background. If you come from a scripting\/high level language Rust aim at bringing you low level execution speed while keeping you in your usual ecosystem (npm, pip, \u2026).<\/p>\n
After this quick introduction to Rust, I should briefly point out that I'm learning Rust \"for fun\" since last summer by reading \"the book\"<\/a>. I'm creating a crate that should be close to it's publication\u2026 when I find some motivation to do so \ud83d\ude05.<\/p>\n I have glanced over the uses of So, to come back to this post's subject: the Rust lang team proposed to introduce a new syntax to use the Future Even if I'm more used to prefix syntax ( I don't think the When reading I thought of I like the idea of reserving the By the way please, do not create If you want that one of the next keywords to have parameters, then I would prefer you go to one of my proposed method like syntax and put the arguments in the parenthesis. This way the postfix keywords enforced by the compiler keep a consistent syntax with or without parameters.<\/p>\n To prevent you from creating an account just to comment on my blog, I invite you to comment this post on its Fediverse announcement<\/a>, Reddit \/r\/rust<\/a>.<\/p>\n You can subscribe to the RSS<\/a>, Atom<\/a>, or JSON<\/a> flux.<\/p>","tags":["Rust"]},{"title":"Welcome to my new blog","date_published":"2019-04-22T17:42:00+02:00","id":"https:\/\/blog.zykino.net\/en\/bienvenue-sur-mon-nouveau-blog","url":"https:\/\/blog.zykino.net\/en\/bienvenue-sur-mon-nouveau-blog","content_html":" I created this blog to talk about technology and video games that are worth my time.<\/p>\n I became a developer because I love technology. I will talk about programming languages, gadgets, tips and free\/libre software. I may do tutorials but they will most likely stay in French since most documentation and tutorials are already in English.<\/p>\n I like to discover video games. I stream them often and upload the stories on Youtube and Peertube.<\/p>\n I don't think I will translate in English this kinds of posts but just in case, I will use 1 to 5 \ud83c\udfae to grade games but even 1\ud83c\udfae will be above the average. Maybe I'll use \ud83c\udf45 when I disliked the game.<\/p>\n Obviously this is still my place, it will evolve with my desires and discoveries.<\/p>\n If you don't like technical stuffs or self hosting, I'm letting you here. Hopefully see you soon on an other article or the Fediverse.<\/p>\n We start immediately with the technical choices I've maid to host this website.<\/p>\n It's been multiples years already that I'm using Yunohost<\/a> and it is pure bliss. We follow the tutorial and it \u201cjust work\u201d. There are a lot of apps to choose from and before installing, any we can know if it is well integrated inside Yunohost, in a working state and maintained. I know it is more known in the French community but they do a lot of efforts to have all of their publication in both French and English, so you should try it.<\/p>\n Multiples things directed me toward Grav<\/a> instead of an other CMS, in no particular order:<\/p>\n So if you don't know what the Fediverse is it would require an article for itself\u2026 so here is not the right place to talk about it. Just know the federated network is constituted with multiples types of website: microblogging (Mastodon<\/a>\/Pleroma<\/a>), video (Peertube<\/a>), image (Pixelfed<\/a>), audio (Funkwhale<\/a>), blog (Plume<\/a>\/Write freely<\/a>)\u2026 For more infos I suggest you this video created with Mastodon as an example<\/a>, to expand on it this wiki (in French)<\/a> from a service host, or this video<\/a> from the user point of view of the interactions between multiples websites.<\/p>\n Now that I spent too much time on the explanations of what is the Fediverse, why did I choose Grav instead of a federated blog like Plume? I did this choice because those inside the Fediverse are not as mature as the others and are not as well integrated in Yunohost.<\/p>\n I choose the Hypertext<\/a> template to go against the current Internet norm of doing websites. The trend today is to use complex themes with a lot of CSS and JavaScript. This theme suggest to take the opposing view of this tendency, it achieve being smallest, lighter and faster. That is what brutalist design<\/a> is promoting. Even before choosing this theme I decided to not have a comment section on this website but putting a link to the Fediverse announcement. This way you can comment with your Fediverse account instead of registering on yet another blog.<\/p>\n This point is really simple: I'm in the \u201cdark theme\u201d team but I'm not an artist. So I copied a beautiful theme, while keeping the minimalist template's philosophy.<\/p>\n To prevent you from creating an account just to comment on my blog, I invite you to comment this post on its Fediverse announcement<\/a>.<\/p>\n You can subscribe to the RSS<\/a>, Atom<\/a>, or JSON<\/a> flux.<\/p>"}]}
async\/await<\/code> in some languages but never used it myself. So I will not pretend to have a strong opinion on the proposed syntax by the lang team, I use it as a starting point.<\/p>\n
The proposed await syntax<\/h1>\n
await<\/code> keyword. It is the
dot await<\/code> syntax as they call it<\/a>.<\/p>\n
match {}<\/code>,
if {}<\/code>, \u2026) than the postfix one, I don't think I'm competent to judge this debate.<\/p>\n
My problem with it<\/h2>\n
dot keyword<\/code> syntax is perfect as is. Sure if you compare it to the method syntax it's like a parenthesis less version, and why not. But on the other hand it's exactly the property syntax. If a function return a struct:
fn get_foo -> struct<\/code>, I may want to use only one property of it like
get_foo().bar<\/code>\u2026 and that look too much like the
dot await<\/code> notation. It may not be the idiomatic use, but I know that I'm doing it when hacking some JS.<\/p>\n
My proposition<\/h2>\n
commas await<\/code>:
foo(),await<\/code> but it may not be practical nor doable because commas are already separating arguments, even without space.<\/p>\n
!<\/code> for magic elements. Anytime you want to do some ways but need the help of some (compiler?) magic:<\/p>\n
\n
macro!()<\/code>.<\/li>\n
!modifiers<\/code> or more generally
!keywords<\/code>.<\/li>\n
.keyMethods!()<\/code> or
!keyMethods()<\/code> some days.<\/li>\n<\/ul>\n
!match<\/code> or any normal control flow with this syntax. Keep this syntax exclusively without argument. You want to introduce
!await<\/code> as a keyword because we can't create this functionality as a function\/macro\/method. Then stay true to your words: a keyword cannot have parameters. Maybe a
!loop<\/code> for infinite loop on a function on even
!panic<\/code> or
!unwrap<\/code> if we need it for\u2026 something. I'm not sure I really want that either.<\/p>\n
Comments<\/h1>\n
PS: Syndication<\/h2>\n
Objectives<\/h1>\n
Technologies<\/h2>\n
Video games<\/h2>\n
Others<\/h2>\n
Technical choices<\/h1>\n
Yunohost<\/h2>\n
Grav<\/h2>\n
\n
Outside the Fediverse?<\/h3>\n
Template: Hypertext<\/h2>\n
Theme close to Mastodon<\/h3>\n
Comments<\/h1>\n
PS: Syndication<\/h2>\n