There's also std::execution, which — if I understand correctly — contains a standard equivalent to Qt's signal/slot system?

#programing #cpp

Reflection: C++’s decade-defining rocket engine — Herb Sutter @ CppCon 2025

https://www.youtube.com/watch?v=7z9NNrRDHQU

If I understand this correctly, this is going to be good news for Qt/Plasma's performance as Qt basically reimplemented a reflection/metaprogramming system with QMetaObject.

#programing #cpp

iPhone版 Pre-Babel Lens 発売(なるか?)

先日から作っていたApple Intelligenceのデバイス内LLM、Foundation Modelsを使うローカル翻訳アプリケーション、Pre-Babel LensのiPhone版をApp Store Connectに登録しました。21:55現在、初めてのビルドが審査に入ったところです。何事もなければ明日にはApp Storeに並んでいることでしょう。

https://taiyolab.com/ja/pre-babel-lens/

Pre-Babel Lensはちょっと古典的な見た目の翻訳アプリです。上フィールドにに原文、翻訳ボタンを押すと下のフィールドに訳文が登場します。

iPhone版のインターフェイス

原文側はエディターになっているのでタイプすることもペーストすることもできますし、他のアプリケーションから共有でテキストを送ることもできます。また、テキストを抽出できるファイルを共有するとその中身を入れることも可能です(Mac版にもいずれ搭載しますね)。

翻訳にデバイス内LLMを使っているので、通信環境がなくても動作するのが最大の特徴です。飛行機でも、洋上のフェリーでも、東海道新幹線のトンネルが続く区間でも、送られてきたメールや書類の中身をざっと把握できます。国外に持って行ったことはないのですが、インターネット接続が制限される国でも安心して使えることでしょう。通信しないので、秘密にしておかなければならない文書も安心して翻訳できます。Google Translateのような人生に紐づいているようなサービスに、繰り返し、これは大丈夫かな、と思うような文書を投げ続けるのは怖いかもしれませんが、Pre-Babel Lensなら大丈夫。一文も漏らしません。そのために作ったアプリです。

もっとも制限がないわけではありません。Apple Intelligenceの基準はちょっと厳しいのです。

まず未成年の行為に関する翻訳ができません。また、暴力、虐待、差別に関する翻訳もしてくれません。政治的なコンテンツでも特定の国家を貶めるような表現は翻訳してくれません。イスラエルも中国もロシアも、アメリカも日本も、その属性を元にした嘲笑的な、あるいは侮辱的な表現、記述を翻訳しない傾向にあります。

制限はモデルそのものに強固に含まれているのでアプリ開発者ではどうにもなりません。対象となる単語を削れば翻訳してくれることもあるのですが、今のバージョンではその推察まで行ってはいません。この制限はApple Intellligence本体にとっても大きな負担となるようで、制限を出すと処理が遅くなったり、タグをこぼしたりという性能低下が見られました。ストレスのかかる仕事をさせると疲れてしまうあたり、全く違う成り立ちなのに人間らしくて感心してしまうのですが、笑ってばかりもいられません。公開するアプリでは、制限が出たところで翻訳セッションを立ち上げ直して、性能低下を防ぐようにしています。

興味のある方は、どんな制限があるのかリトライしてみるのもいいでしょう。通信しないアプリなので、それが原因でサービスからBANされるようなことがないのももローカルアプリのいいところです。ちょっと試したところでは、単語レベルではなく文脈を見て制限を決めているようです。さすがLLMと言いたいところですが、翻訳アプリとしては困っちゃうので、Pre-Babel Lensには、翻訳できなかった原文をハイライトして挿入する機能を搭載しました。

戦争に関する国際ニュースでこの制限は頻発します。もっともリアルタイムなニュースが見れるような通信できる環境なら、標準の翻訳やクラウドAIを使う方がいいでしょう。回避する方法を探ってみます。

AppleのOSにはTranslation Frameworkという、翻訳専用の機能が備わっています。ブラウザーの翻訳や「翻訳」アプリで使われるものです。確率的モデルを使った翻訳なので、2010年ごろまでのアルゴリズム翻訳よりは大体なんでも翻訳してくれますが、大規模言語モデルほどニュアンスや文脈を考慮してはくれません。ただ、この制限を回避するために、落ちたところだけTranslation Frameworkを使うのもありかなあとは思っています。今後の課題です。

制限の話を続けます。Apple Intelligenceは15言語しかサポートしていません。翻訳できるのはデンマーク語、ドイツ語、英語、スペイン語、フランス語、イタリア語、日本語、韓国語、ノルウェー語、オランダ語、ポルトガル語、スウェーデン語、トルコ語、ベトナム語、中国語です。これは私の努力では増やせません。ロシア語やアラビア語、タイ語、ベトナム語、ベンガル、ヒンディーあたりは欲しいところです。

実は自力で全て作るiOSアプリはこれが初めてです。Swiftも(Hello, World!であんなこと書いたのに)初めて。Codexで開発したのですが、コードそのものよりもツールの準備と開発環境の整備がとにかく大変ですね。App Storeへの登録も15年前とは大違い。便利になったところもありますが、コード署名などのツールチェーンは初見殺しというか、専門家が必要なレベルになりつつあることを実感しました。TestFlightなんてサードパーティーツールの頃は胡散臭さ満点のサイドロード環境だったのに、立派になりました。手間もすごいけど。しかしCodexなら(きっとClaude Codeでも)そのあたりの事務手続きを突破してくれる。世界が変わるのを感じました。

このブログを書いている途中で、初めて登録したバージョンが審査を通過しました(!)。おそらく夜の間には、公開バージョンが出て、App Storeで買えるようになっていると思います。Pre-Babel Lensには、無料のMac版と、有料(150円)のiPhone版があります。GitHubにはソースコードもありますので、自分で開発してみたい方は遠慮なくフォークしてビルドしてみてください。

このブログをMastodonまたはFediverseでフォローして、フィードに直接更新を受け取ってください.

#ai #programing

I'm not fond of introducing a new keyword as it can often clash with existing codebases and especially since this one is highly specific. But this was designed by people far more competent that me so let's trust.

Furthermore, it opens the possibility of using for lazy initialization in the future, a bit like what Kotlin proposes: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/lazy.html.

#programing #Python #Django

lazy | Core API – Kotlin Programming Language

Kotlin Help

The story of Python's lazy imports: why it took three years and two attempts

https://techlife.blog/posts/the-story-of-pythons-lazy-imports-why-it-took-three-years-and-two-attempts/

Oh that's good news, especially for Django developers as it is not rare to come across circular imports and resort to locally import.

#programing #Python #Django

Hey, mom, look! I'm on TV! 🤩

https://thunderbird.topicbox.com/groups/planning/Ta3065e59e35711c4/tmdd-03-25-thunderbird-monthly-development-digest#:~:text=Linux%20System%20Tray%20%2D%20Contributor%20Spotlight

"Linux System Tray - Contributor Spotlight

We’d like to give a special shoutout this month to Christophe Henry, who has gone above and beyond with an ambitious contribution to improve Thunderbird’s system tray integration on Linux."

Many thanks to the @thunderbird devs for guiding me through this. They have been of infinite kindness and patience. It's a pleasure to contribute 🥰

#programing #cpp #rust #js #thunderbird

Topicbox

I've just made a very important update to the Auto-Dubber script for eleven labs, on the final step before processing the file, it will check your account balance and tell you how many credits you have remaining so you can make a decision particularly with longer bits of Audio of what you want to do.
It's really important for people like me who accidentally go way over there free credits for the month and end up paying huge amounts of money.
You can find the dropbox link here:
https://www.dropbox.com/scl/fi/3wfgp468dbls8lwbsddul/Auto-Dubber-for-ElevenLabs.zip?rlkey=4z9kb097v7it53mc607b9riqx&dl=0
There is now also a donate.TXT file for anyone who feels so inclined that wants to throw a couple of bucks my way.
It is not mandatory, the script is free for you to use but I've put it there just in case.
#AI #vibecoding #elevenlabs #Accessibility #programing
Auto-Dubber for ElevenLabs.zip

Shared with Dropbox

Dropbox

I got humbled by my bachelor's thesis trying to communicate over UART with HAL, it's strangely not as easy as I thought it would be... 🥲

If anybody has tips on how to approach an ORE (overrun) error on an #stm32f407 chip with DMA and idle line detection I'm all ears.

#programing #embeded

And freaking good news for Typelevel Foundation. Congratulations everyone 🎉🎉. Very well deserved 

--

Discord announcement by Arman (https://github.com/armanbilge):

«Exciting news: the Typelevel Foundation was determined to be a 501(c)(3) public charity! 🎉 ... Read more on the blog [1]»

[1] https://typelevel.org/blog/charity.html

#scala #FunctionalProgramming #FP #plt #programing

armanbilge - Overview

Executive Director of Typelevel Foundation. (Distracted) computational evolutionary biologist. I write Scala, read DNA, and speak in conditional probabilities. - armanbilge

GitHub
Been working on learning how to make a desktop pet so I can do a write up and share the process #maker #programing #wip