惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Engineering at Meta
Engineering at Meta
The GitHub Blog
The GitHub Blog
博客园_首页
T
The Blog of Author Tim Ferriss
H
Hackread – Cybersecurity News, Data Breaches, AI and More
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
腾讯CDC
I
InfoQ
量子位
J
Java Code Geeks
P
Proofpoint News Feed
有赞技术团队
有赞技术团队
Webroot Blog
Webroot Blog
Martin Fowler
Martin Fowler
D
Docker
F
Fortinet All Blogs
云风的 BLOG
云风的 BLOG
V
Vulnerabilities – Threatpost
罗磊的独立博客
P
Proofpoint News Feed
T
The Exploit Database - CXSecurity.com
Cyberwarzone
Cyberwarzone
P
Privacy & Cybersecurity Law Blog
Last Week in AI
Last Week in AI
爱范儿
爱范儿
The Hacker News
The Hacker News
S
SegmentFault 最新的问题
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 三生石上(FineUI控件)
V
V2EX
Simon Willison's Weblog
Simon Willison's Weblog
AI
AI
Y
Y Combinator Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
GbyAI
GbyAI
V
Visual Studio Blog
H
Heimdal Security Blog
S
Secure Thoughts
B
Blog RSS Feed
雷峰网
雷峰网
T
Tenable Blog
C
Check Point Blog
G
Google Developers Blog
大猫的无限游戏
大猫的无限游戏
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
A
About on SuperTechFans
Recent Commits to openclaw:main
Recent Commits to openclaw:main

Hub's wlog

Hub's wlog - Dia with GTK 3 Hub's wlog - Dev Log August 2023 Hub's wlog - libopenraw Rust with C API Hub's wlog - Niepce July 2023 updates Hub's wlog - Niepce June 2023 updates Hub's wlog - Life update Hub's wlog - Niepce May 2023 updates Hub's wlog - Niepce April 2023 updates Hub's wlog - Niepce March 2023 updates Hub's wlog - Integrating the RawTherapee engine Hub's wlog - Niepce February 2023 updates Hub's wlog - Implementing i18n-format, a Rust procedural macro Hub's wlog - i18n-format for Rust Hub's wlog - Introducing Toot That! Hub's wlog - Niepce December 2022 updates Hub's wlog - Niepce November 2022 updates Hub's wlog - Fall of releases Hub's wlog - Introducing Compiano Hub's wlog - RTKit, portals, and Pipewire Hub's wlog - Release day Hub's wlog - Update on Niepce Hub's wlog - New Again
Hub's wlog - Niepce January 2023 updates
:: Hubert Figuière · 2023-02-02 · via Hub's wlog

2023.02.02

This is the January 2023 update.

We start the year by a Rust implementation of the file import. It landed very early as the final stretch of work in 2022.

Then a lot of cleanups, removing no longer needed cxx bindings and no longer used C++ code. This also allow removing some "wrapper" type used in the Rust code base.

The other gphoto2-rs patch has also been merged.

Import work

Fixed some bugs ported over, like improper logic for the camera import: properly use the storage. It was just a matter of properly using the API.

Also I'm working on improving (finishing) the whole import workflow, as I want to be able to automatically sort image into folder by date, I started adding support for getting the date from files being imported. Some of the work in progress led to more patches:

All in all, fixing the stack distract from the core work, but it has to be done, and everybody wins.

I also wrote code to support automatically sorting files into folders based on the date. It will be about connecting the dots and making a UI for it.

Previews

I started looking at generalizing the thumbnailing, to become previewing. In the end it's the same thing with different processing parameters and size. And then caching all of that. Here are a few ideas:

  • back the cache with a sqlite3 database. (it needs to be persistant, but I don't think it should be part of the main database for the catalog)
  • establish a mechanism to invalidate the cache based on processing parameters.
  • make the fetch process take note of the last access.
  • finally make this totally asynchronous.

This is just conceptual as I write this. The idea is that if we ever rendered that image, we'll get it from cache the next time. Currently we do that for the thumbnails that are extracted from the EXIF, but the cache is very primitive, not cleaned up, and doesn't handle the fact that we'd want the processed image. Mind you we only have some primitive rendering of the raw image..

This leads to cleaning up the a bit the current thumbnail cache. I removed some old code that implemented the queue to just use mpsc channels from the Rust library, and added rayon to trigger the renders in parallel. It doesn't seem to make a huge difference with the thumbnailing (libopenraw extract the thumbnail from the fast and it relatively fast), but it should be better when we start rendering the whole image.

i18n

I also added my new macro crate for gettext format, i18n-format.

Build

I added the "Development" profile, which cause the development version to use a different config. The only goal here is to be able to use development snapshots independently from the development code, i.e. not risking opening a good catalog with broken development code as the database schema will evolve over time.

Cleanup

I also took a pass at removing a lot of the cxx bindings related to the import code as they are no longer necessary. Less is more.

This feels like I wrote that code for nothing, but my permanent objective on rewritting to Rust is to not lose features or introduce bugs. So the bindings were a necessary scaffolding, and I didn't really know for how long.

I also removed more old bits of C++ code that never got used, which allowed me to remove another set of bindings and will help porting more of the UI code, possibling inverting the language stack and finally having the entry point in Rust, ie. Rust will link to the C++ code instead of the other way.

Side projects

While porting libopenraw to Rust, I have implemented a small GUI app to render files for debugging. It's written with Relm, and trying to make it more usefull, I had to learn how to make component. I had to fix the documentation that was still on the older API.

This led me to think whether I could use Relm in Niepce for the UI code. Not sure how easy it is to mix, I wouldn't want to rewrite it all.

Furthermore

In the near future, I'll want to be able to automate testing the app functionality, and I think the best is to embed a scripting language. I think it will be Python. pyo3, the Rust python binding crate seems to have everything I need, the longer plan is to be able to use it for automation at a later stage. The idea came from the way FreeCAD implement their test suite.

Thank you reading.