This page in English

Inlägg taggade ”rust”

Skriverier då och då, på webben sedan 1994.

Rsass 0.26.0 released

Posted 2022-09-18 20:04. Tagged , , , , .

More than three months after the last release, is is now the time to announce rsass 0.26.0. There is a bunch of breaking changes and a bunch of improvements. The changelog has the whole (too long) list.

But this time, some of the changes may go a bit deeper. As usual, the breaking changes is breaking mainly to users who in some way modify the global context from rust code, maybe by providing their own builtin functions or maybe just by inserting a global variable.

Also this time, there is an improved way of calling ructe from a cargo build.rs program, see the Cargo section below.

Read whole Rsass 0.26.0 released.

Tracker-free youtube embedding

Posted 2022-04-03 18:04. Tagged , , , , , .

Sometimes I want to embed a video on my site. Most of the videos I want to embed are on youtube. Klicking “share” on a video and choosing embed, I get a bunch of html code I can copy into a post. Something like this, for example:

<iframe width="560" height="315" src="https://www.youtube.com/embed/3St1CoH1rKU"
  title="YouTube video player" frameborder="0"
  allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"

Read whole Tracker-free youtube embedding.

Gästföreläsning om Rust

Publicerad 2022-03-01 22:56. Taggat , .

I går fick jag hålla en gäst­föreläsning om program­språket Rust på kursen programmerings­paradigm på KTH. Jag är inte en van föreläsare (och helt klart inte på-minuten-deltagare), så det är ganska mycket tvekan och stakningar i början, men jag lämnar i alla fall inte rummet förrän efter föreläsningen, och så småningom kommer jag igång lite.

Läs hela Gästföreläsning om Rust.

Ny blogmjukvara

Publicerad 2022-01-16 22:07. Taggat , , , , .

Jag har skrivit ny blogmjukvara igen! Den förra hette r5, som i Rasmus (utan 5 bokstäver). Den nya är skriven i Rust (källkodsfilerna heter .rs), så det kändes naturligt att kalla den r4s, också som i Rasmus (men utan 4 bokstäver 😎).

Nu får vi se om ett nytt kul blogprogram får mig att skriva fler blogposter.

Läs hela Ny blogmjukvara med 1 kommentarer.

Web frameworks in Rust

Posted 2020-09-09 20:48. Tagged , , .

When doing a web application server, one of the first things to decide is which “web application framework” or “request handler library” to use. In Rust, there are more alternatives for that question than in most programming languages, and anyone who has ported some code from tomcat jsp to play framework or from flask to django may dread making the wrong choice. On the other hand, Rust being very strict on static typing makes it very easy to do major refactorings, and I have switched existing projects from iron to nickel to gotham to warp myself without too big problems.

Read whole Web frameworks in Rust.

Julia fractals in Rust wasm

Posted 2019-07-26 19:12. Tagged , , , , .

I like to write programs to render fractals, and especially Julia set fractals. I also like the Rust programming language. Among other advantages it happens to be great for compiling to wasm, the new format for executing code in a web browser. And I like to code stuff for the webb. So how come I haven’t written a wasm Julia renderer in Rust yet?

Well, now I have.

Read whole Julia fractals in Rust wasm with 2 comments.

Rust and me in 2019

Posted 2019-01-26 16:25. Tagged , , , .

There is A Call for Community Blog posts over at the Rust Programming Language Blog. This is my entry, briefly describing my hopes and expectations for Rust, it’s eco-system and my own participation in 2019.

Read whole Rust and me in 2019.


Publicerad 2018-02-11 21:10. Taggat , , , , , , , .

Jag har inte lagt upp någon propagandacykling här på bloggen på ganska länge. Naturligtvis cyklar jag fortfarande till jobbet de flesta av de dagar jag inte jobbar hemifrån, och jag brukar ta en bild och lägga ut på twitter.

Men jag har ett projekt för att organisera mitt bildarkiv på gång också.

Det har kommit så långt att det är smidigare att lägga upp mina bilder där än här. Så vill du se mina samlade cykelbilder så finns de där!

Men jag får väl inkludera tre ganska färska bilder här också.

Bli först att kommentera.

Rust and the web in 2018

Posted 2018-01-07 22:50. Tagged , , , .

There is A Call for Community Blogposts over at the Rust Programming Language Blog. This is my entry.

I mainly do “server-based” web service development. The server sends html, css, images, and javascript to the browser. The javascript implements progressive enhancement for the content, but the site should be usable and as nice as possible even with javascript disabled. So while I certainly do RESTful json API:s, I also do server-side html templateing, css (and scss) minification, etc. I think Rust has great potential here, partly because of optimization and execution speed, but mainly because the type safety and fearless concurrency make it easy to actually get things right and avoid unpleasant surprises at runtime.

Read whole Rust and the web in 2018.

A compiling template system in Rust

Posted 2016-10-07 18:32. Tagged , , , .

When developing web applications, it is often useful to have a template system. Something that lets you write generic versions of web pages, that the application can fill with the specific content for each page it should show.

There exists lots of “languages” to write such templates, such as mustache, jinja2, and play 2 scala templates (twirl). Most fits very well with a dynamic language, where you can get properties from an object, or even call a method, by its name in a plain string. In a statically compiled language, the actual names of fields and methods are not relevant, and generally not present, after compilation. This makes a “dynamic” template language a hard match for a compiling language such as rust. So why not try to create a better match?

Read whole A compiling template system in Rust with 3 comments.