並び順

ブックマーク数

期間指定

  • から
  • まで

161 - 200 件 / 203件

新着順 人気順

asyncの検索結果161 - 200 件 / 203件

  • Bolt.js⚡ + Firebase🔥で技術投稿の指標を良い感じに集計してくれるSlack Botを作った

    いかに楽に入力できるか、いかに楽に自分の進捗を把握できるかに着目して作りました。 入力については、Slack アカウトごとに前回入力済みの内容を Firestore に保存し、初回以降は入力欄の初期値として入るようにしています。 進捗把握については、初回以降は前回の実行時からの差分を表示するようにしています。なので週 1 回とかコマンドを打てば前週との比較が手軽に出来ます。 構成 どのような構成かざっくり紹介します。 Bolt.js を Cloud Functions for Firebase で動かして Slack とのやりとりをしています。 そして、フォームの入力内容・指標データを Firestore に保存しています。 指標集計部分は自分で各サービスの API クライントを書いて使っています。 Zenn の API クライアント import { ZennArticle, Follo

      Bolt.js⚡ + Firebase🔥で技術投稿の指標を良い感じに集計してくれるSlack Botを作った
    • Different levels of async in Rust

      First there was cooperative multiprocessing. Then there were processes. An operating system could run multiple processes, each performing a series of sequential, blocking actions. Then came threads. A single processes could spawn off multiple threads, each performing its own series of sequential, blocking actions. (And really, the story starts earlier, with hardware interrupts and the like, but ho

        Different levels of async in Rust
      • use – React

        React フックとは異なり、use は if のようなループや条件文内でも呼び出すことができます。ただし React フックと同様に、use を呼び出す関数はコンポーネントまたはフック内でなければなりません。 プロミスを引数にして呼び出した場合、use API は Suspense やエラーバウンダリ (error boundary) と協調して動作します。use を呼び出すコンポーネントは、use に渡されたプロミスが保留中 (pending) である間、サスペンド (suspend) します。use を呼び出すコンポーネントがサスペンスバウンダリでラップされている場合、フォールバックが表示されます。プロミスが解決 (resolve) された時点で、サスペンスフォールバックは、use API から返されたデータを使用してレンダーされたコンポーネントの内容に置き換わります。use に渡さ

          use – React
        • useEffectに非同期関数を設定する方法

          useEffectで非同期関数を設定する際に落とし穴にハマったのでメモっておきます。 非同期関数をuseEffectに設定するとエラーになる useEffectフックで非同期関数を実行したい場合、以下のように設定するとエラーになります。 useEffect(async () => { const response = await fetch("https://www.googleapis.com/books/v1/volumes?q=AWS"); const data = await response.json(); console.log(data); },[]); なぜ非同期関数をセットするとエラーになるのか? なぜ、エラーになるのかというとuseEffectの第1引数の関数の戻り値にはクリーンアップ関数を設定する必要があるためです。 asyncを使って非同期関数にするとPromise

            useEffectに非同期関数を設定する方法
          • GitHub - bytedance/monoio: Rust async runtime based on io-uring.

            Monoio is a pure io_uring/epoll/kqueue Rust async runtime. Part of the design has been borrowed from Tokio and Tokio-uring. However, unlike Tokio-uring, Monoio does not run on top of another runtime, rendering it more efficient. Moreover, Monoio is designed with a thread-per-core model in mind. Users do not need to worry about tasks being Send or Sync, as thread local storage can be used safely. I

              GitHub - bytedance/monoio: Rust async runtime based on io-uring.
            • Async/Await | Writing an OS in Rust

              この記事は翻訳されたものです: この記事はAsync/Awaitをコミュニティの手により翻訳したものです。そのため、翻訳が完全・最新でなかったり、原文にない誤りを含んでいる可能性があります。問題があればこのissue上で報告してください! 翻訳者: @kahirokunn, @garasubo, @sozysozbot 及び @swnakamura. With contributions from @asami-kawasaki 及び @Foo-x. この記事では、Rustの協調的マルチタスクとasync/await機能について説明します。Rustのasync/await機能については、Future trait の設計、ステートマシンの変換、 pinning などを含めて詳しく説明します。そして、非同期キーボードタスクと基本的なexecutorを作成することで、カーネルにasync/awa

              • Rustの非同期ランタイムであるTokioが1.0に到達

                Spring BootによるAPIバックエンド構築実践ガイド 第2版 何千人もの開発者が、InfoQのミニブック「Practical Guide to Building an API Back End with Spring Boot」から、Spring Bootを使ったREST API構築の基礎を学んだ。この本では、出版時に新しくリリースされたバージョンである Spring Boot 2 を使用している。しかし、Spring Boot3が最近リリースされ、重要な変...

                  Rustの非同期ランタイムであるTokioが1.0に到達
                • Node.jsでTop-Level Awaitを試す - Qiita

                  Node.jsでTop-Level Awaitがサポートされ(て)たので、非同期通信と言えばなaxiosで試してみます。 Top-Level Await 今まではawaitを利用する際に、async関数内じゃないと使えませんでしたが、async関数を宣言せずにawaitを使えるようになります。 v14.3.0でサポート、v14.8.0でフラグなし v 14.3.0 Top-Level AwaitはNode.js v14.3.0でサポートされましたが、この時点だと--experimental-top-level-awaitのフラグを付けて実行する必要がありました。 v 14.8.0 v14.8.0以降でフラグ無しで利用できます。 axiosで利用してみる (一応)今回試した環境はNode.js v14.14.0です。 package.jsonに"type": "module"を追記して利用で

                    Node.jsでTop-Level Awaitを試す - Qiita
                  • Why asynchronous Rust doesn't work

                    In 2017, I said that “asynchronous Rust programming is a disaster and a mess”. In 2021 a lot more of the Rust ecosystem has become asynchronous – such that it might be appropriate to just say that Rust programming is now a disaster and a mess. As someone who used to really love Rust, this makes me quite sad. I’ve had a think about this, and I’m going to attempt to explain how we got here. Many peo

                    • Why Async Rust

                      Why Async Rust — 2022-09-26 language hierarchy async under the hood rust's async features ad-hoc cancellation ad-hoc concurrency combining cancellation and concurrency performance: workloads performance: optimizations ecosystem conclusion A lot of system design is about thinking of the nature of the domains we encounter. And only later, once we understand them, encoding this understanding in a way

                        Why Async Rust
                      • 図解でわかる asyncio 入門 - Qiita

                        前置き 業務で大量のWeb APIを並行で投げる必要があり、良い方法がないか探したところ、asyncio が良いソリューションだったため勉強した。勉強したことをまとめて、アウトプットするということで情報をここで公開する。これから asyncio を学習する人の役に立つとうれしい。 想定読者 並列・並行処理の概念はわかっているが、asyncio の処理がいまいち理解できてないので理解したい人 検証環境 Python 3.9.4 Jupyter Notebook 上で検証 asyncio とは asyncio (→公式ドキュメント) とはざっくり言ってしまうと、async/await 構文を使ってシングルスレッドで並行処理を行うためのライブラリ。 Python には並列処理・並行処理を行うためのライブラリがいくつかあるが、シングルスレッドで動くのがポイント。下記図のように、あるライブラリではマ

                          図解でわかる asyncio 入門 - Qiita
                        • plenary.nvim による非同期処理 - Qiita

                          Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article?

                            plenary.nvim による非同期処理 - Qiita
                          • FastAPI with Async SQLAlchemy, SQLModel, and Alembic

                            FastAPI with Async SQLAlchemy, SQLModel, and Alembic This tutorial looks at how to work with SQLAlchemy asynchronously with SQLModel and FastAPI. We'll also configure Alembic for handling database migrations. This tutorial assumes you have experience working with FastAPI and Postgres using Docker. Need help getting up to speed with FastAPI, Postgres, and Docker? Start with the following resources:

                              FastAPI with Async SQLAlchemy, SQLModel, and Alembic
                            • Overview - Emacs NG - A new approach to Emacs

                              Home Deno/Javascript Webrender Dynamic modules FAQ Native Hackers Handbook emacs-ng# A new approach to Emacs homepage • Deno/Javascript • webrender • ng-module • handbook • faq Intro# emacs-ng is based off of the master branch of emacs, and regularly merges using Github Actions(Runs at 00:00, only on Saturday). The last merged commit is 35d3927859 (01 26 2025). Motivation# The goal of this fork is

                              • スクリプト: async, defer

                                最近の web サイトでは、スクリプトは HTML よりも “重い” ことがしばしばです: ダウンロードサイズはより大きく、処理時間も長くなります。 ブラウザが HTML をロードし、<script>...</script> タグに遭遇すると、DOM の構築を続けることはできません。すぐにスクリプトを実行する必要があります。外部スクリプト <script src="..."></script> についても同じです: ブラウザはスクリプトをダウンロードし、それを実行するまで待つ必要があり、その後にページの残り部分の処理をすることになります。 これは2つの重要な問題につながります: スクリプトは、それ以降の DOM要素は認識することができないため、ハンドラーを追加したりすることはできません。 ページの先頭に重いスクリプトがあると、“ページをブロック” します。利用者はそれがダウンロードされ実行

                                  スクリプト: async, defer
                                • AsyncCacheのススメ(非同期処理の多重実行防止のための個人的ベタープラクティス)

                                  この記事は何? ボタンをタップすることでAPIコールなどの非同期処理を実行するような実装をしている場合に、ボタン連打によって非同期処理が何度も呼び出されてしまう問題を回避するため実装について、個人的なベタープラクティスを伝える記事です。 この記事が対象としている読者 Flutterを使い始めてまだ日が浅い開発者 「Flutterらしい書き方って何だろう」と考えるようになった開発者 「AsyncCacheって何?」と気になった開発者 結論 非同期処理を重複して実行させないような実装を行う際には、asyncパッケージの AsyncCache.ephemeral() を使うと手軽に多重実行を防止できるため便利でおすすめです。 cacheStrategy = AsyncCache.ephemeral(); ~ 省略 ~ ElevatedButton( onPressed: () async { a

                                    AsyncCacheのススメ(非同期処理の多重実行防止のための個人的ベタープラクティス)
                                  • FastAPIで非同期処理を理解する -FastAPIで安直にasyncしてはいけない- - Qiita

                                    自己紹介 初カキコども 医師でエンジニア?もどきのikoraです pythonについては今まで趣味程度しか触ったことがなく、またFastAPIをこの一ヶ月前くらいから触り始めました。 エンジニアの方々にとっては当たり前の非同期処理というものについてあまり理解できてなかったので、FastAPIの挙動と共に理解しようということで忘備録的に書きました。 一応後半では、真面目に実験しているのでなにかの参考になるかなと思います。 素人に毛が生えたようなものなので、もし間違い等あったら優しめにご指摘いただくと嬉しいです☺️ 始めての技術記事で拙いかもしれませんが、参考になりましたら幸いです。 まず結論 FastAPIのマルチタスク性能・高速性は非同期処理によって実現されている 従ってAPI Endpoint配下の関数(パスオペレーション関数)の書き方で速さが変わり 非同期処理 >>> 同期処理 >>>

                                      FastAPIで非同期処理を理解する -FastAPIで安直にasyncしてはいけない- - Qiita
                                    • Async Rust can be a pleasure to work with (without `Send + Sync + 'static`)

                                      Async Rust can be a pleasure to work with (without `Send + Sync + 'static`) Sep 04, 2024 Async Rust is powerful. And it can be a pain to work with (and learn). If you’ve used async Rust, you’ve almost certainly run into the need to add Send + Sync + ‘static bounds to functions, wrap variables in Arcs and Mutexes, clone those Arcs all over the place, and you've inevitably hit the "future is not Sen

                                      • How to think about `async`/`await` in Rust

                                        2023-06-30 async fn is an inversion of control Hand-rolling an explicit state machine Explicit state machines mean your caller has control Writing state machines with async fn await is a composition operator Summary (This is a section of the lilos intro guide that people seemed to like, so to increase its visibility, I’m lifting it up into its own post and expanding it a bit. I hope this is a usef

                                          How to think about `async`/`await` in Rust
                                        • 進化するPromiseオブジェクト [JS Modern Features no.2] | gihyo.jp

                                          こんにちは! サイボウズフロントエンドエキスパートチームの左治木です。 今回のテーマは「進化するPromiseオブジェクト」です。 Promiseは、非同期処理を管理するためのオブジェクトで、ECMAScript 2015 (ES6)で導入されました。ECMAScript 2017ではasync/await構文が追加され、非同期処理がより直感的に記述できるようになりました。現在では、async/await構文が非同期処理の主流となっています。 一方で、Promiseの機能はasync/await構文の登場後も進化を続けています。これにより、非同期処理がさらに扱いやすくなり、従来のPromiseでは難しかった細かい処理も可能になっています。今回は、ES2020以降で追加されたPromiseの新機能をユースケースを交えて解説します。 Promiseの基本を簡単におさらい Promiseは、非同

                                            進化するPromiseオブジェクト [JS Modern Features no.2] | gihyo.jp
                                          • eBayは非同期API契約としてAsyncAPIを採用

                                            Spring BootによるAPIバックエンド構築実践ガイド 第2版 何千人もの開発者が、InfoQのミニブック「Practical Guide to Building an API Back End with Spring Boot」から、Spring Bootを使ったREST API構築の基礎を学んだ。この本では、出版時に新しくリリースされたバージョンである Spring Boot 2 を使用している。しかし、Spring Boot3が最近リリースされ、重要な変...

                                              eBayは非同期API契約としてAsyncAPIを採用
                                            • Embassy

                                              The next-generation framework for embedded applications Write safe, correct and energy-efficient embedded code faster, using the Rust programming language, its async facilities, and the Embassy libraries. Rust + async ❤️ embedded The Rust programming language is blazingly fast and memory-efficient, with no runtime, garbage collector or OS. It catches a wide variety of bugs at compile time, thanks

                                              • A four year plan for async Rust

                                                Four years ago today, the Rust async/await feature was released in version 1.39.0. The announcement post says that “this work has been a long time in development – the key ideas for zero-cost futures, for example, were first proposed by Aaron Turon and Alex Crichton in 2016”. It’s now been longer since the release of async/await than the time between the first design work on futures and the releas

                                                • Asynchronous streams in Rust (part 1) - Futures, buffering and mysterious compilation error messages | Blog | Guillaume Endignoux

                                                  If you are already reading my blog, you may have noticed that I see a lot of potential in the Rust programming language. The safety and efficiency properties of Rust make it the programming language of “fearless concurrency”, and in particular the async/.await syntax that was stabilized about a year ago really make asynchronous programming a core feature of Rust. The downside of this new asynchron

                                                  • JavaによるAndroid非同期処理の基本

                                                    2020年9月8日にAndroid 11(APIレベル30)がリリースされました。このAPIレベル30で、AsyncTaskクラスが非推奨となりました。AsyncTaskは、Androidの非同期処理を行う際に非常に便利なクラスとして、様々な場面で利用されてきました。このクラスが非推奨になるということは、今後は代替の方法を採用していく必要があります。本稿では、全3回にわたって、非同期処理がよく登場する場面としてWeb API連携を題材に、AsyncTaskクラスを利用しないAndroidの非同期処理を紹介していきます。第1回である今回は、Javaによる非同期処理の記述方法を紹介します。 本稿の趣旨 このCodeZineでAndroidの非同期処理に関しての記事を公開するのは、今回が初めてではありません。「Android Studio 2で始めるアプリ開発入門」連載の第11回で紹介しています

                                                      JavaによるAndroid非同期処理の基本
                                                    • 【C#】マルチスレッドプログラミングとは?メリット・デメリットを比較して効果を検証する - LIGHT11

                                                      マルチスレッドプログラミングの概要と、そのメリット・デメリットについて簡単にまとめます。 マルチスレッドプログラミングとは? 効果1 処理時間が短縮される 効果2 画面のフリーズを防ぐ マルチスレッドで処理してみる 効果があるのはあくまでCPUの処理 参考 関連 Unity2018.3.9 (C#の記事ですがUnityを使って動作確認しています) マルチスレッドプログラミングとは? まずマルチスレッドでないプログラムでは、1つのCPUコアで処理を先頭から順番に行っていきます。 CPUコアを一つしか持たないシングルコアのCPUではもちろん、 マルチコアのCPUにであっても一つのCPUだけを使って処理を行います。並列では行いません。 ここでマルチスレッドのプログラムを書くと、マルチコアCPUではスレッド毎に別のCPUコアで別の処理を行います。 シングルコアのCPUでは、一つのCPUコアで処理を

                                                        【C#】マルチスレッドプログラミングとは?メリット・デメリットを比較して効果を検証する - LIGHT11
                                                      • How to Use Fetch with async/await

                                                        The Fetch API is the default tool for performing network operations in web applications. Although fetch() is generally easy to use, there are some nuances to be aware of. In this post, you'll find the common scenarios of how to use fetch() with async/await syntax. You'll understand how to fetch data, handle fetch errors, cancel a fetch request, and more. 1. Intro to fetch() The Fetch API accesses

                                                          How to Use Fetch with async/await
                                                        • How Async Functions in Traits could Work in Rustc

                                                          One of the major goals for the Rust Async Working Group is to allow async fn everywhere fn is allowed, especially in traits. In this post, I'd like to distill some of the proposed designs and show how async functions in traits could be implemented. We'll look at one possible way this could work, although I'd like to emphasize that this is not the only way, and many details of the design that we'll

                                                          • 【Javascript】非同期処理に慣れるための問題集 #1 - Qiita

                                                            Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article?

                                                            • はじめに - Rustで学ぶ非同期処理ランタイム

                                                              この本を手にとってくれたそこのあなた!はじめまして(あるいはお久しぶり!)本書の著者、nasa と申します。 まず、この本が生まれた背景をお話していきますね。本書はボクの「非同期処理の仕組みをなるべく隅から隅まで理解したい」という思いから生まれました。主に JavaScript を使う場面で、async/awaitを用いた非同期処理、非同期プログラミングをしています。しかし、その具体的な仕組みを知らないままで使っています。たとえば「アプリケーションサーバーにリクエストを投げる」という処理があったとします。このタスクはいつ実行されるのでしょうか?そして、実行のタイミングを誰が決めているのでしょうか? プログラマーである私でしょうか? どのタスクをいつ実行するかを決めているのはランタイムと呼ばれるものになります。本書ではこのランタイムの実際のコードを読んでいくことで非同期処理、非同期プログラミ

                                                              • The curse of strong typing

                                                                Contents Different kinds of numbers Conversions and type inference Generics and enums Implementing traits Return position Dynamically-sized types Storing stuff in structs Lifetimes and ownership Slices and arrays Boxed trait objects Reading type signatures Closures Async stuff Async trait methods The Connect trait from hyper Higher-ranked trait bounds Afterword It happened when I least expected it

                                                                  The curse of strong typing
                                                                • me/007-My-Thoughts-on-OCaml-vs-Haskell-Rust-2023.md at master · sidkshatriya/me

                                                                  Recently, osa1's My Thoughts on OCaml generated quite a robust conversation on Hacker News. Overall I felt the blog post was a bit too critical about OCaml. However, everyone has a right to their opinions and I respect whatever has been written. Except for a couple of points, the article didn't resonate with me, so I thought I should pen down my good/bad experiences with OCaml and see if others ha

                                                                    me/007-My-Thoughts-on-OCaml-vs-Haskell-Rust-2023.md at master · sidkshatriya/me
                                                                  • rust-magic-patterns/visual-journey-through-async-rust/Readme.md at master · alexpusch/rust-magic-patterns

                                                                    You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

                                                                      rust-magic-patterns/visual-journey-through-async-rust/Readme.md at master · alexpusch/rust-magic-patterns
                                                                    • The ultimate async setup: FastAPI, SQLModel, Alembic, Pytest

                                                                      FastAPI is a popular topic nowadays and I have decided to share my setup for an async web-server using this framework. Here is a short description of python packages used in the article (just to make a whole picture to save your time): Poetry (https://python-poetry.org) — is a tool for dependency management and packaging in Python. It allows you to declare the libraries your project depends on and

                                                                        The ultimate async setup: FastAPI, SQLModel, Alembic, Pytest
                                                                      • 1時間半で克服するJavaScriptの非同期処理/async_javascript_kokufuku

                                                                        モバイルアプリで機械学習入門/introduction-to-machine-learning-in-mobile-app

                                                                          1時間半で克服するJavaScriptの非同期処理/async_javascript_kokufuku
                                                                        • GitHub - danog/php-tokio: Use any async Rust library from PHP!

                                                                          You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

                                                                            GitHub - danog/php-tokio: Use any async Rust library from PHP!
                                                                          • GitHub - SeaQL/sea-orm: 🐚 An async & dynamic ORM for Rust

                                                                            You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

                                                                              GitHub - SeaQL/sea-orm: 🐚 An async & dynamic ORM for Rust
                                                                            • Background Tasks in FastAPI

                                                                              Before jumping into Celery. Let's start with the most straightforward tool to help us understand background tasks. FastAPI already has a BackgroundTasks class that can help us implement simple background tasks. Let's create a virtual environment to isolate our project requirements. python -m venv env Now, all we need is FastAPI and a web server e.g. Uvicorn or Hypercorn. Before installing these le

                                                                              • Pin and suffering

                                                                                Contents The Future type. We can leave our Box behind I'd like to think that my understanding of "async Rust" has increased over the past year or so. I'm 100% onboard with the basic principle: I would like to handle thousands of concurrent tasks using a handful of threads. That sounds great! And to become proficient with async Rust, I've accepted a lot of things. There are blue functions and red f

                                                                                  Pin and suffering
                                                                                • Announcing tokio-uring: io-uring support for Tokio | Tokio - An asynchronous Rust runtime

                                                                                  Announcing tokio-uring: io-uring support for TokioJuly 19, 2021 Today, we published the first release of the “tokio-uring” crate, providing support for the io-uring system API on Linux. This release provides asynchronous File operations, and we will be adding support for more operations in subsequent releases. To use tokio-uring, first, add a dependency on the crate: tokio-uring = "0.1.0" Then, st