Browse Source

About Rust

master
Ismael Arenzana 4 months ago
parent
commit
05008b4e76
Signed by: isma
GPG Key ID: D5586DE2A32CBC3C
  1. 1
      .gitignore
  2. 4
      content/posts/2013-05-22-esta-vivo.md
  3. 2
      content/posts/2013-06-01-bittorrent-y-la-nueva-nube.md
  4. 4
      content/posts/2021-02-01-bye-whatsapp.org
  5. 44
      content/posts/2022-01-11-emacs-rust.org

1
.gitignore vendored

@ -6,6 +6,7 @@
# Generated files by hugo
/public/
/resources/_gen/
.hugo_build.lock
# Executable may be added to repository
hugo.exe

4
content/posts/2013-05-22-esta-vivo.md

@ -16,14 +16,14 @@ categories:
- noticias
- wedding
date: "2013-05-22T00:19:00Z"
#publishDate: "2097-01-23T19:09:00Z"
publishDate: "2013-05-22T00:19:00Z"
id: 26
title: ¡Está vivo!
url: /2013/05/esta-vivo/
---
¡Está vivo!
En referencia a un clasicazo del cine, me llena de emoción presentar mi nueva web: <a href="http://arenzanaphotography.com/">arenzanaphotography.com</a>. Después de 5 meses de trabajo, lanzo la web que utilizaré de ahora en adelante para publicar mi trabajo y promocionar mi fotografía. Podéis seguir el blog (sólo en inglés) que se centrará en fotografía y negocios. Seguiré actualizando este blog con mi vida personal en la lengua de Cervantes.
En referencia a un clasicazo del cine, me llena de emoción presentar mi nueva [web](http://arenzanaphotography.com/). Después de 5 meses de trabajo, lanzo la web que utilizaré de ahora en adelante para publicar mi trabajo y promocionar mi fotografía. Podéis seguir el blog (sólo en inglés) que se centrará en fotografía y negocios. Seguiré actualizando este blog con mi vida personal en la lengua de Cervantes.
Os dejo con las épicas palabras del Dr. Frankenstein.

2
content/posts/2013-06-01-bittorrent-y-la-nueva-nube.md

@ -11,7 +11,7 @@ blogger_permalink:
categories:
- tecnologia
date: "2013-06-01T16:03:00Z"
#publishDate: "2097-01-23T19:09:00Z"
publishDate: "2013-06-01T16:03:00Z"
id: 25
title: Bittorrent y la nueva nube
url: /2013/06/bittorrent-y-la-nueva-nube/

4
content/posts/2021-02-01-bye-whatsapp.org

@ -30,7 +30,7 @@ Abandono WhatsApp, pero no de la noche a la mañana. Empezando en marzo, elimina
Pero seguiré aquí, en internet. WhatsApp no es internet, Instagram no es internet. Forman parte de internet, pero La Red es más profunda que todas estas empresas.
A partir de ahora, la mejor forma de ponerse en contacto conmigo será a través de [[https://signal.org][Signal]]. A diferencia de WhatsApp o Telegram, Signal es una organización sin ánimo de lucro (no tiene accionistas a los que rendir cuentas) que se sostiene a través de donaciones. Si eres usuario de Signal y lo utilizas regularmente, te animo a que [[https://signal.org/donate/][dones al proyecto]].
Si realmente prefieres no utilizar algo nuevo y tienes un dispositivo Apple, sigo disponible en iMessage y si eres usuario de Telegram, [[https://t.me/Arenzana][mantendré mi cuenta de Telegram]]. Al menos a corto plazo. Finalmente, para los más aventureros, sigo la evolución del protocolo decentralizado [[https://matrix.org][Matrix]], que realmente creo que es el futuro de las comunicaciones. Puedes encontrarme como ~@arenzana:matrix.org~.
Si realmente prefieres no utilizar algo nuevo y tienes un dispositivo Apple, sigo disponible en iMessage y si eres usuario de Telegram, [[https://t.me/Arenzana][mantendré mi cuenta de Telegram]]. Al menos a corto plazo. Finalmente, para los más aventureros, sigo la evolución del protocolo decentralizado [[https://matrix.org][Matrix]], que realmente creo que es el futuro de las comunicaciones. Puedes contactar conmigo [[https://matrix.to/#/@isma:matrix.mrcol.es][aquí]].
Igualmente, mi uso de Twitter se verá reducido con los meses. [[https://joinmastodon.org/][Mastodon]] es sin duda la mejor alternativa y puedes seguirme [[https://social.mrcol.es/@isma][aquí]].
@ -55,6 +55,6 @@ But I will remain on the internet. WhatsApp is not the internet, Instagram is no
The best way to get in contact with me, will be through [[https://signal.org][Signal]]. Unlike WhatsApp or Telegram, Signal is a 501c-3 (non profit organization) that has no shareholders to please. This also means that if you're a user that enjoys the service, I encourage you to [[https://signal.org/donate/][donate to the project]].
If you really don't want to use a new service and have an Apple device, I will still be available on iMessage and, if you're a Telegram user, [[https://t.me/Arenzana][I will keep my Telegram account]]. At least in the short term. Finally, for the adventurous ones, I'm keeping an eye on the evolution of the decentralized [[https://matrix.org][Matrix]] protocol, I truly believe it is the future of communications. You can find me as ~@arenzana:matrix.org~.
If you really don't want to use a new service and have an Apple device, I will still be available on iMessage and, if you're a Telegram user, [[https://t.me/Arenzana][I will keep my Telegram account]]. At least in the short term. Finally, for the adventurous ones, I'm keeping an eye on the evolution of the decentralized [[https://matrix.org][Matrix]] protocol, I truly believe it is the future of communications. You can find me [[https://matrix.to/#/@isma:matrix.mrcol.es][here]].
My use of Twitter will be reduced as well, potentially following the fate of WhatsApp. [[https://joinmastodon.org/][Mastodon]] is certainly the best alternative, and you can follow me [[https://social.mrcol.es/@isma][here]].

44
content/posts/2022-01-11-emacs-rust.org

@ -0,0 +1,44 @@
#+BLOG: arenzanaorg
#+POSTID: 438
#+DATE: [2022-01-11 Tue 16:30]
#+OPTIONS: toc:nil num:nil todo:nil pri:nil tags:nil ^:nil
#+CATEGORY: emacs,dev
#+TAGS[]: tech
#+DESCRIPTION:
#+TITLE: Emacs for Rust Development
* Emacs > Visual Studio Code
There's a good chance I'm a hater or that I don't know what I'm doing. After a couple of hours trying to set up VS Code for Rust development, I ended up frustrated not understanding how to simply call the compiler or the debugger from the interface. I looked for ~rust-mode~ on Github and 15 minutes later I was up and running on Emacs. Maybe it's my previous experience with [Go](https://arenzana.org/posts/2019-12-03-emacs-go-mode-revisited/) development set ups that made it all quite simple.
* Rust on Emacs
I approached this the same way I approached Go: let's get regular syntax highlighting, linting, formatting, and compiling first and we'll worry about debuggers later. I'm a bit old school when it comes to approaching debugging.
We end up with the following on the Emacs config (if you use ~use-package~):
#+begin_src emacs-lisp
(use-package rust-mode
:defer t
:ensure t
:init
(add-hook 'rust-mode-hook
(lambda () (setq indent-tabs-mode nil)))
(setq rust-format-on-save t)
(add-hook 'rust-mode-hook
(lambda () (prettify-symbols-mode)))
(add-hook 'rust-mode-hook #'lsp)
:bind (("M-," . rust-compile))
)
(use-package flycheck-rust
:ensure t
:hook (flycheck-mode-hook . flycheck-rust-setup))
#+end_src
Here, we load the mode for Rust development. Auto-indent with spaces, run ~rustfmt~ on save (needs to be installed via [rustup](https://rustup.rs/). Prettify symbols (cause why not), and use language server protocol. I'm binding "M-," to compile; I know it's an odd keybinding, but I'm used to it by now. Feel free to make it your own.
In addition to this, I'm hooking ~flycheck~ for linting.
* Conclusion
IntelliJ made it very easy to set up as well, but that's a multi-hundred dollar application. If you're on a budget, Emacs, vim, or VSCode should bet viable options as well.
I'm still getting started with Rust and I don't know how much it will stick, since I've been writing Go for a number of years; but I'm happy I have a familiar environment to get started from. By now I should know Emacs should *always* be my first option.
Loading…
Cancel
Save