split map and typedMap

Addressing this comment.
One tiny additional thing we could do is make Float64Array the default, since we only ever use this specific type when calling typedMap. But, I don't know, it feels a bit noisy.

Does this mean we retire the type argument from the public API of Plot.valueof?
Internally we use it once, in https://github.com/observablehq/plot/blob/fd1837179bb7a19f83e306c0a293b2caaf9154a2/src/transforms/stack.js#L84
and we miss an opportunity to use it in https://github.com/observablehq/plot/blob/fd1837179bb7a19f83e306c0a293b2caaf9154a2/src/transforms/dodge.js#L76

No, I don’t think we should retire it if it’s part of the public API.

I want to think about this one a little more and push a few commits. In a case like this
floatMap(X2, (x2, i) => Math.abs(x2 - X1[i]))

we are doing too much work because we are coercing the result of the accessor even though we already know that it can only return a number.

In 0e74a1e I reverted the addition of floatMap, and instead isolated the implicit number coercion to valueof. Well, and arrayify, but I actually think that’s a bit of mistake since it’s only needed when arrayify is used to create a typed array, and that only happens via valueof. So I’d like to follow this up with another slight change. This change avoids unnecessary coercion when we call map and we know that the provided accessor is already number-safe.

Overall it's a good cleanup. I'm still a bit nervous with all the changes, but hopefully the tests have good coverage.


R&D: Deploy Whisper

Deploy a Speech-to-Text model
These works are focused on Whisper.
What's whisper?
Whisper is a Transformer-based model developed by OpenAI, specializing in Speech-to-Text (STT) tasks, also known as Automatic Speech Recognition (ASR).

Whisper was among the biggest breakthroughs in the field. Released by OpenAI in 2022, it has gained significant attention for its accuracy and versatility in speech recognition.

(source). For more information, you can explore the official Whisper page by OpenAI.
The latest release, Whisper-large-v3 on Hugging Face, is the most advanced version provided by the OpenAI team.
Hugging Face is a popular platform for sharing and collaborating on AI models. It functions as a repository where developers and researchers can publish, discover, and utilize machine learning models.
How does it work?
It takes an audio source, and processes the sound to identify and transcribe spoken words into text. The model was trained on either English-only data or multilingual data. It's capable of automatic language detection to ensure accurate transcription across multiple languages.
In Python, you can load the model directly from HF using their Transformers library. This library leverages state-of-the-art deep learning frameworks to load models and perform inferences efficiently. (it also supports training or fine-tuning pre-trained models, but that's out of scope).
PoC
I've wrapped a whisper-large-v3 model in a FastAPI api, and deployed it to the cloud. My POC has a single endpoint /transcribe which accepts a file. The file is copied to a temporary one in the container, and then processed by the Whisper model. The model's output is returned to the client.
I was forced to add a visual interface to post data to /transcribe endpoint. Don't pay attention to the static files served by FastAPI they are definitely dirty.
It takes roughly 8s with a small T4 GPU to process a 3-min-long audio.
The code is "quick-and-dirty", same goes for the commits' history; Everything is versioned to a repo managed by HF here. I enable the T4 hardware whenever I need to avoid paying too much.
Building the correct Docker image was quite challenging. The container needs to use the appropriate version of CUDA based on the available hardware, along with the corresponding version of PyTorch. Consequently, PyTorch is installed directly from its wheel rather than through the requirements.txt file.
I added more layers than necessary to my Docker image to cache installations and troubleshoot the steps that were breaking. However, having so many layers is not a good practice.
My afternoon cost me only $0.13.
Hardware considerations
GPUs are the standard choice of hardware for machine learning because they are optimized for memory bandwidth and parallelism, unlike CPUs.
Running Transformer or AI models on a CPU often results in suboptimal performance, both in terms of accuracy and latency, as CPUs are not well-suited for the parallel computations required by these models, leading to slower inference times.
In contrast, GPUs excel at parallelism, providing significant acceleration during model inference due to their ability to handle multiple operations simultaneously. While GPUs are available through most cloud providers (such as AWS, GCP, etc.), they can be expensive. Additionally, securing GPUs on smaller private cloud providers, like Outscale, can be more challenging.
For my researches, I leveraged Hugging Face Spaces
Hugging Face "Spaces" allows you to build and deploy custom Docker containers to serve a FastAPI server. FastAPI is a rapidly growing framework for developing lightweight, asynchronous Python APIs, and is particularly popular for deploying AI models via simple APIs.
On Hugging Face Spaces, you can access various GPU types and pay on an hourly basis (e.g., small T4 GPUs are approximately $0.40/hour). This flexibility is excellent for prototyping and deploying APIs in the short term.
Looking ahead, our goal is to deploy our AI services on Kubernetes (K8s). To achieve this, we will need to discuss setting up new K8s nodes on virtual machines equipped with sufficiently powerful GPUs.
(Scaling AI models on K8s can be challenging, we should not underestimate it).
Inference optimizations
Two famous Whisper optimizations share the world:

insanely-fast-whisper by Hugging Face
faster-whisper

While working on my POC, I've discovered recent works from the creator of insanely-fast-whisper, which offer new optimizations to try, especially using Distillation technics. Stay tuned.
Insanely-fast-whisper is based on Flash attention 2, which optimizes data manipulation in memory when making inference. Unfortunately, Flash Attention 2 is not implemented for all type of GPUs. It supports only Ampere ones (e.g. A100) and not Turing GPUs (e.g. T4, the cheapest one).
My next steps would be to deploy a distilled Whisper with the few optimizations recommended by Vaibhavs10 in his latest works.
Next steps
To-do:

[ ] Investigate recent works from Vaibhavs10.
[ ] Try deploying the PoC on Dieter's Hardware.
[ ] Follow-up with Jacques / Outscale / Léo Guillaume on deploying a PoC on K8s.
[ ] Push a clean version of my code and Docker Image.

Discussion with Fun:
They use Softcatala/whisper-ctranslate2, which is the CLI of faster whisper.
Whisper is used as a CLI by the Peer Tube runner.
Peertube has made a package.
Everything run ONLY on CPU. It's not yet in production, still WIP. They use C2-30 machines from OVH (30Go Ram 8 vCore 200Go SSD)

A POC was deployed by the German team, accessible on a VM through ssh. It builds a transcription + summarization pipeline and exposes it though API.

Live streaming example  to be investigated.


Dependency injection

Ok, so this is a big PR. The main thing I wanted to introduce was the concept of dependency injection. We can pull common logic into separate classes and then inject those classes into other classes that need them. By doing this, we can add unit tests around common logic which will help maintainability moving forward. There's other refactorings here and there too.
Let me know what you think about these changes. I use dependency injection a lot in my day-to-day job and it helps keeps code separated, small, and testable, and it's a huge help in the long run.

Hi. Sorry for the very very late reply. I appreciate the effort put into this change, however after reviewing it I don't think this project is a good fit for this kind of change. If we were to ever consider a ground-up rewrite, perhaps in a different framework this would be one of the discussion topics in the design but as it stands right now, I believe effort is better spent on addressing issues currently being listed in the issue tracker.
Thank you again for the support and effort.


Attempt to fix #103

My attempt to fix #103

Netlify is currently busy so I'm giving it time to do its work lol

This doesn't seem to work, idk


fail on error true

closes #10

PR-Codex overview
Detailed summary

Enabled the sa-tan plugin in the pom.xml file.
Added configuration for the sa-tan plugin to set failOnError to false.
Added an execution goal for the sa-tan plugin.
No changes to the maven-checkstyle-plugin.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

@h1alexbel thank you for your Pull Request. I'll assign someone to review it soon.
If this PR solves a todo from the code, please don't forget to remove it.

@h1alexbel please review this Pull Request. Deadline (when it should be merged or closed) is 2023-07-07T14:39:05.863498.
You should check if the requirements have been implemented (partially or in full), if there are unit tests covering the changes and if the CI build passes. Feel free to reject the PR or ask for changes if it's too big or not clear enough.
Estimation here is 30 minutes, that's how much you will be paid. You will be paid even if this PR gets rejected.

@rultor merge

@rultor merge

@h1alexbel OK, I'll try to merge now. You can check the progress of the merge here

@rultor merge

@h1alexbel Done! FYI, the full log is here (took me 2min)

@h1alexbel thank you for resolving this ticket. I've just added it to your active invoice. You can always check all your invoices and more on the Contributor Dashboard.


Suggestion: Use comparable benchmarker

There exists a benchmarking tool. It would be great if you could use that, which would allow your benchmark to be comparable.
https://github.com/ebdrup/json-schema-benchmark

Yikes! That's supprising!
Can you determine which tests were much slower?

@Relequestual All the tests, because the call of napi take huge overhead

OOOOh I understand. Damn.
Still, doesn't mean it's not useful for allowing different implementations to be testable!


Fixes #65: Update developer guide with feature contribution

Pull Request Test Coverage Report for Build 118

0 of 0 (NaN%) changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 78.087%

Totals

Change from base Build 112:
0.0%

Covered Lines:
1600

Relevant Lines:
2049

💛  - Coveralls


Updating components and resources

Looks better now - but how can I select one of the predictions to serve as an annotation?

Also minor but panel text is slightly truncated


git conflict

Hi @florent-lamiraux ,
I found those commits on gitlab, and they are conflicting with those which were on github, especially on the pdf files from c07fc22ab89a3a74c9ab9e61f85157ce14337271 and a9de313416254dd2b8338d51f5ac87dc57aa51f6. Can you double-check this ?

I think you can merge. Thank you.

I merged into devel. Thank you.


Polytone for custom colors

Polytone us available 1.18-1.20.4 and allows for otpifine custom colours as well as for a bunch more customisation features like biome effects, particle modifiers, biome variant textures, custom sounds and way more

To additive maintainer: Wait for sodium 0.5.6 before adding this to additive
https://github.com/MehVahdJukaar/polytone/issues/7#issuecomment-1892830092

That issue is only relevant to custom colormaps. Each and every of all the mod resource pack features still work

Should be added once I update, thanks!

Will polytone support 1.19.4 or 1.20.2 at any point? It's completely understandable if not, I'm just saying this because Additive supports those versions. If not, I can probably just use Bismuth and Vanadium on those versions

No there's really no point in backporting to these intermediary snapshot versions (Mojang can call them how they want, they remain snapshots) as basically nobody uses them. I already backported to many old versions I usually wouldn't have tho like 1.18 just because of the nature of this mod but going over all the minor one would be just a waste of time

Additive and Adrenaline are both dropping support for all versions other than current Sodium LTS (1.20.1 and 1.20.4) anyway, so this should no longer be an issue. This change was done after a discussion in the Discord server.
I'll test this mod with the modpack soon :)


update Deno to upcoming 1.29

Fixes https://github.com/littledivy/deno_sdl2/issues/55
Fixes https://github.com/littledivy/deno_sdl2/issues/57
Fixes https://github.com/littledivy/deno_sdl2/issues/54

1.29 is released


It's Multimegaymander, please fix wiki

Please describe the problem you are having in as much detail as possible:
Include a reproducible code sample here, if possible:

Further details:

[x] I have read the wiki

Priority this issue should have – please be realistic and elaborate if possible:

If you have self hosted my code please go through the following options

[ ] I have self hosted the code for Ribbon
[ ] I use yarn

yarn version:

[ ] I use npm

npm version:

node.js version:
typescript version:
Operating system:
[ ] I am on the latest commit of the bot

Commit Hash:

It's literally unreadable, until you fix that...

Please either kys or elaborate on what page multimegacuck

My software is not a meme like the stuff you normally bother people on. I aim to have a high production value because unlike those others I'm a software developer by profession. If you continue to make issues like these I will block you from creating any issues on my repos altogether


Send SATS fails and lands on unknown route

I was testing this issue and encountered a bug when trying to send SATS.
I have SATS in one account and wanted to transfer them to another. I am not sure if this is supposed to work, any ideas @markmhendrickson ?
It seems weird as

the route for send/brc20/sats/error page I land on isn't defined
when I am doing a Send and choosing SATS it doesn't ask me where I want to send them

https://github.com/leather-wallet/extension/assets/2938440/f6b65e74-703f-4dde-b155-d28918d8c602

It seems it fails at creating the inscription which is the step before choosing a recipient?

Sending BRC-20 is unique in that it's a 2-step process, in which during the send flow, the only thing that really happens is the creation of an inscription via the OrdinalsBot API. No recipient is indicated within the send flow at this time.
Then later, the user comes back to the home screen and sends the inscription via the normal flow, indicating the recipient at that point.

I checked this out and after choosing a fee we get a 400 Bad Request error from https://blockstream.info/api/tx
It complains about:
sendrawtransaction RPC error: {"code":-26,"message":"non-mandatory-script-verify-flag (Witness program hash mismatch)"}

Then we crash unhandled.
This method fails in bitcoin-client.ts:
  async broadcastTransaction(tx: string) {
    // TODO: refactor to use `axios`
    // https://github.com/leather-wallet/extension/issues/4521
    // eslint-disable-next-line no-restricted-globals
    return fetch(`${this.configuration.baseUrl}/tx`, {
      method: 'POST',
      body: tx,
      headers: {
        'Content-Type': 'application/x-www-form-urlencoded',
      },
    });
  }

We added this functionality in this release
I think it may have been broken in #4316) by these refactors of useGenerateUnsignedNativeSegwitSingleRecipientTx :

this commit
this commit

Going back further to commit e9da65164273476ae4ba0c2de185dc07c7230d34 and it was working so it's something on our side. Any ideas here @kyranjamie ?

Thanks for the help here @kyranjamie . I think I have fixed it here as I submitted some things successfully.
@markmhendrickson in my fixing of this I had to spend ~ $70 on fees, sending a couple of transactions:

I saw what I think is another bug also where if I sign out of my wallet and then into our test wallet, my Pending BRC-20 transfers showed in the other wallet. This could be some weird caching issue.
https://github.com/leather-wallet/extension/assets/2938440/42c4a13f-a738-4470-a73a-5c3e1e28c54c
This bug is fixed but I'm confused what the next step for moving these tokens is

I think we can have a better UX for where we show the Pending BTC-20 transfers - maybe it should be in Activity?
The Pending part is gone from my wallet now, as is the cost of the fees but I don't know what I'm supposed to do next. After some time should an Ordinal Inscription show up in my collectibles? If so, maybe we can add a placeholder entry there as a visual queue


God Of War 2 issues

Heavy random frame drops during gameplay, without any overheating or lack of processing power

this should actually be closed, but my 2 cents. had those issues but fixed it with EE core underclocking. it seems like for some reason the EE thread is not fully utilized but still bleeds a lot of performance.


Add crc cleanup to basic troubleshooting docs

In docs/source/topics/proc_basic-troubleshooting.adoc, following the step to delete the VM via crc delete, revert DNS changes with crc cleanup. This is done before running crc setup again to ensure that the state is as clean as we can get it before retrying.
Note: the crc cleanup command removes an existing CRC virtual machine and reverts DNS changes across all platforms. Some platforms make additional changes. Not all changes made by crc setup are reverted when running crc cleanup.

Fixed by #1165.


wonky in corners

should check distance to an edge, not "distance from the edge", as this results in unpleasant side-to-side scrolling at inappropriate times

Hello @4strid  from the future
I had some unexpected effects implementing your library, so I decide to make small modifications to fit my case.
  var scrollByX  = 0
  var scrollByY = 0

  if (this.clientX <= radius || (this.innerWidth - this.clientX) <= radius) {
    scrollByX = Math.round(velocityX * elapsed / 1000)
  }
  if (this.clientY <= radius || (this.innerHeight - this.clientY) <= radius) {
    scrollByY = Math.round(velocityY * elapsed / 1000)
  }

  window.scrollBy(scrollByX, scrollByY)

Basically, I did an extra check to make sure mouse cursor is inside the radius area. It worked well for my case.

do you want to just make a pull request 😅 i haven't programmed a computer in a few years so im not certain , but this definitely seems like exactly what i prescribed .

@4strid Hey I created a PR to address the issue. Could you take a look?


Fix clippy lints for Rust 1.54

Fixes the CI errors that pop up on new pull requests since Rust 1.54 was released.

@cmyr Assuming this passes CI, I intend to merge it in 24h if nobody has objected in the meantime.


WIP Move from controller specs to request specs

Review app deployed to https://teaching-vacancies-review-pr-2916.london.cloudapps.digital


Detection support for Modrinth

Extend packwiz cf detect to Modrinth, ideally with a unified API and command interface that allows:

Bulk reverse hash lookup
Selecting which mod platforms to prefer or exclude
Conversion of existing metadata files?

With this change I could require a --from (directory) or --in-place argument, and emphasize the fact that it will delete jars with the latter.

A (separate?) command that just imports an existing instance (including copying files, possibly MMC settings?) would be useful, particularly for people that have an existing modpack and want to modify it with packwiz.

This could be integrated directly with CF/Modrinth export commands, automatically looking up unsupported external files?


incorrect demoman info

float CTFPipebombLauncher::GetProjectileSpeed( void )
{
float flForwardSpeed = RemapValClamped( ( gpGlobals->curtime - m_flChargeBeginTime ),
0.0f,
GetChargeMaxTime(),
TF_PIPEBOMB_MIN_CHARGE_VEL,
TF_PIPEBOMB_MAX_CHARGE_VEL );
return flForwardSpeed;

}
https://github.com/OthmanAba/TeamFortress2/blob/1b81dded673d49adebf4d0958e52236ecc28a956/tf2_src/game/shared/tf/tf_weapon_pipebomblauncher.cpp // the function above me
#define TF_PIPEBOMB_MAX_CHARGE_TIME	 4.0f  // (his is for normal stickies obv, otherwise it's 1.2 for quickie
// hard code these eventually
#define TF_PIPEBOMB_MIN_CHARGE_VEL 900 // wiki lies?
#define TF_PIPEBOMB_MAX_CHARGE_VEL 2400 // wiki lies?
https://github.com/OthmanAba/TeamFortress2/blob/1b81dded673d49adebf4d0958e52236ecc28a956/tf2_src/game/shared/tf/tf_weapon_grenade_pipebomb.cpp // this also could be used for sticky trajectory
https://github.com/OthmanAba/TeamFortress2/blob/1b81dded673d49adebf4d0958e52236ecc28a956/tf2_src/game/shared/tf/tf_weapon_pipebomblauncher.h // speed and max charge.
#define TF_WEAPON_PIPEBOMB_GRAVITY		0.5f //unsure if it effects charge.
https://github.com/OthmanAba/TeamFortress2/blob/1b81dded673d49adebf4d0958e52236ecc28a956/tf2_src/game/shared/tf/tf_weapon_grenadelauncher.cpp // this has also interesting information on The Loose Cannon
https://github.com/OthmanAba/TeamFortress2/blob/1b81dded673d49adebf4d0958e52236ecc28a956/tf2_src/game/shared/tf/tf_weapon_grenadelauncher.h
#define TF_ARROW_MAX_CHARGE_TIME 5.0f //this is weird
https://github.com/OthmanAba/TeamFortress2/blob/1b81dded673d49adebf4d0958e52236ecc28a956/tf2_src/game/shared/tf/tf_weapon_compound_bow.cpp
float CTFCompoundBow::GetProjectileSpeed( void )
{
return RemapValClamped( GetCurrentCharge(), 0.0f, 1.f, 1800, 2600 ); // wiki lied here aswell
}
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
float CTFCompoundBow::GetProjectileGravity( void )
{
return RemapValClamped( GetCurrentCharge(), 0.0f, 1.f, 0.5, 0.1 );
}
// also very weird
str8 from sdk and tf2 leak
enjoy this public information, should correct some stuff on demoman  -fourteen

I hate this post.
The compound bow info is done correctly, TF_ARROW_MAX_CHARGE_TIME is in reference to the point when "extreme" spread is added to the arrow. The wiki also doesn't lie about the compound bow, you can't fire the weapon with 0 charge time.
The gravity for fully charged stickies is almost definitely wrong, but that's not something you properly talk about here.
also you can send link to lines, you don't need to send the entire page for each source, and please learn markdown.


Add publisher/observer by primary key even if object doesn't exist in Realm yet

Problem
Common pattern I'm facing is setting up observer for single object then fetching and saving it from API. There are few difficulties I have when I use valuePublisher(object) / object.observe { }:

changes to relationship properties wont trigger observation block, it's mentioned in this comment but afaik there is no option to opt-in to deep changes notifications yet

If object doesn't exist in realm yet, observation won't be set up since it's nil, causing few additional steps each time:

check if object exists and add observer
fetch from api
check if observation was added already, if not, add it to newly added object

Current existing workaround is using collection observer which requires using Results, .filter and .first:

extension Results where Element: Object {
    func objectPublisher<KeyType>(for primaryKey: KeyType) -> AnyPublisher<Element, Error> {
        var objects = self
        if let shema = Element.sharedSchema(),
           let primaryKeyProperty = shema.primaryKeyProperty {
            objects = filter("\(primaryKeyProperty.name) = %@", primaryKey)
        }

        return objects
            .collectionPublisher
            .compactMap(\.first)
            .eraseToAnyPublisher()
    }
}

Solution
The idea here is to have something similar to what code snippet above achieves, but without the use of filtered Results collection publisher. I'm wondering if this can be achieved with realm internal stuff and made as separate publisher/observer. Though it's preferred to work more like collectionPublisher since it's triggered for nested properties changes also.
Basically, it could look something like:
class Dog: Object {
@Persisted(primaryKey: true) var id: String
@Persisted var name = ""
}

objectNotificationToken = Dog.observe(withPrimaryKey: "123") { change in
switch change {
    case .created:
     // Object with this id was added to realm
    case .change(let object, let properties):
    // Properties changed, including nested properties
    case .error(let error):
    // Error
    case .deleted:
    // Object object was deleted
    }
}

// Publisher
Dog.publisher(withPrimaryKey: "123")

How important is this improvement for you?
I'd like to see it, but have a workaround

I don't know if this^ addresses the "even if object doesn't exist in realm" part though.

but afaik there is no option to opt-in to deep changes notifications yet

The comment you linked was correct at the time. There is now an option to filter via key paths, where you can see observations on nested properties, including change in relationship. See here.
Let me know if I'm misunderstanding and this doesn't do what you need.

Yeah filtering by keypath triggers nested properties changes, but then if we wanted to trigger notification on each property and nested property change, we'd have huge array of keypaths we want to observe. I think it would be useful if there's an observe call on Object which works similarly to Results, as mentioned in linked comment:
 Results notifications do notify when it is a linked object which changed (up to 4 levels deep).

I don't know if this^ addresses the "even if object doesn't exist in realm" part though.

Yup, it doesn't. That part is kinda unrelated to nested change notifications, it's more about having .created/.added notification for object with primary key we want to observe