Problem: We don't know what will happen if two commands are run against the same aggregate simultaneousy

This is an issue with race conditions. When two calls try to write to the event stream at the same time, one of them should fail. Otherwise your aggregate could end up in an invalid state.
Eg. a product added to the cart after it has been checked out

Cart\Created
Cart\ProductAdded
Cart\Checkout
Cart\ProductAdded

This should never happen.
Ideally, the event store should ensure that only one of them gets written at a time.
Due to the fact we're using SQLite, this is probably not an issue, but we should have a unit test that tests this case. We should make it abstract, and every future implementation has to extend it, to ensure they also meet the criteria.

This is tricky, we need to do two things.

Ensure the event stream hasn't changed since we fetched it

If it has, fail

Lock the stream to make sure no one else can access it

The locking aspect is hard to test with PHPUnit, since we're trying to test a race condition, which PHP is pretty bad at.
We can at least write a test for the first one, then we'll figure out the implementation.

Locking in SQLite won't work, we'd have to lock the DB for every transaction, from fetching the events, to processing, to writing them. This does not allow for a lot of concurrency, and it's not required, locking is only needed if multiple users are trying to access the same stream.

The easiest way might be to implement a basic lock. You lock the stream, which really just puts a value in shared memory. If another process tries to the same, sleep for half a second, try again, if its still locked, fail.

The above is an in progress solution. It has tests for the abstract class to ensure that locking works.
It's currently using a static var to track locks, which proves the concept, but won't work for cross process access.
If we wanted it to be cross process, we could us the following as shared memory

Redis
Memcached
SQLite

Regardless, I think it's clear the locker is it's own class, it uses none of the dependencies of the repo. If we extracted it, it also means that we don't have conflicting technologies in the same class, nice and clean.

The above PR extracted the class, and also added an SQLIte version of the locker, allowing for actual cross process locks.
Two things are left on this issue

Ensure it only locks for that stream id (need a test)
Ensure the dispatcher uses the locker, and unlocks when there is an exception

The final step now is to ensure the interpreter is using the event stream locker. This is a little trickier than anticipated, as we want to use interfaces, and not directly inject in the actual class.
One solution is to use the decorator pattern. Make an interface for the dispatcher, the actual version implements it as the core, then have another infrastructure version that wraps it, that gets injected in, which has access to the locker. Then we just test that.

Technically working, not happy with the name, or the way that it would end up being injected at the controller level, lot of extra work. We could make this simpler by having a dispatcher factory interface, then have a concrete version in infrastructure which does the actual creation.

There is now a lock version of the dispatcher, good enough for now. Closing the issue.


Tests don't work while making mvn test on CircleCI

Hello,
I encountered a problem. On my machine, when I create tests and run them with mvn test, all of them are passed, but when I build on CircleCI, project compiles, all dependencies are resolved, but all the tests are failed and instead of any results, I get:
testClientSexCounter(FlinkOperationsTest)  Time elapsed: 2.138 sec  <<< FAILURE!
java.lang.AssertionError:
Expected: output ( contains all <List((F,1), (M,1), (F,2))>)
     but: was <[]>

Is there an issue with tests from such services?
Best Regards
Sefirq

Hi,
We're running test on Jenkins and TravisCI. The only issue we've encounter so far is that tests run slower than on the local machine and we had to increase some timeouts.
But this doesn't seem to be the issue here.
As I've never used CircleCI I've tried to run some tests there and everything works fine.
Are you able to post the necessary steps to recreate this problem?

Never mind, actually I didn't change absolute path to relative in one file.


The web page width will exceed the phone's screen when URL is long

Gitea version (or commit ref): 1.11-rc1
Git version: latest
Operating system: Ubuntu 18.04
Database (use [x]):

[ ] PostgreSQL
[x] MySQL
[ ] MSSQL
[ ] SQLite

Can you reproduce the bug at https://try.gitea.io:

[x] Yes (provide example URL)
https://git.fanyangmeng.com/FanyangMeng/Coding-Interview-University
[ ] No
[ ] Not relevant

Log gist:

Description
Hi there,
First, thank you for making such excellent project. Gitea is really brilliant.
But there is serveral problems that make me frustrated for a long time.
To the first problem, I found that when I use my Android phone view the gitea, sometimes the web page width will exceed my phone's screen width. I found that this problem happens approximately on every page of try.gitea.io, would you please have a check on it and fix it? I think sometimes it is because the image's url is too long which cause this issue.
The second problem happens when I try to customize the gitea's template. I found that every time when I try to import a css/js file , which contains some changes, after restart the gitea, these changes can only display after I change the name of the css/js file and then reimport it again.
Although I know that the front end is not the vital part of gitea, but I sincerely hope that you can do some progress on it. It will be so much appreciated.
Screenshots

You may want to disable the service worker in app.ini so CSS files and others are not cached:
[ui]
USE_SERVICE_WORKER = false

In Firefox, I use this button (F12) to prevent caching when testing things:

I think I might actually have already fixed this...

Closing, please reopen if it is not fixed and can be reproduced in try.gitea.io


[Feature Request]: Mouse cursor bug prevention

What is your request?
I wonder if this feature has been removed permanently or it will come back sometime after? I don't see it in the settings right now. It was quite helpful for mouse and keyboard players if the feature can be turned on.  Thank you!!

I thought the mouse bug went away this season, but is it still there?

It is still happening but not so often.
Another issue I am having right now is if I have 'always on top' turned on, I can't click on anything when I pull out 'show hidden icons' in the task bar (as I get used to put the overlay at the right bottom corner). Is there a solution to that?

I need a more precise description. If possible, a screenshot or video would be great.

Here's the video showing the hidden icon blocked by the overlay. There was no issues locating at the corner before. https://github.com/ShootMe/FallGuysStats/assets/132220283/4c009e6e-e6c2-4735-9836-15faaf2e6a9e


fix: inject typesystem into context in benchmarks

Description
This fixes the ListObjects benchmarks by injecting the needed typesystem into the context before calling Execute.
References

Review Checklist

[ ] I have clicked on "allow edits by maintainers".
[ ] I have added documentation for new/changed functionality in this PR or in a PR to openfga.dev [Provide a link to any relevant PRs in the references section above]
[ ] The correct base branch is being used, if not main
[ ] I have added tests to validate that the change in functionality is working as expected

Codecov Report
Patch coverage has no change and project coverage change: -0.05 :warning:

Comparison is base (4ee63f0) 84.72% compared to head (e1a37d4) 84.67%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #614      +/-   ##
==========================================
- Coverage   84.72%   84.67%   -0.05%
==========================================
  Files          86       86
  Lines       13778    13782       +4
==========================================
- Hits        11673    11670       -3
- Misses       1731     1737       +6
- Partials      374      375       +1

Impacted Files
Coverage Δ

pkg/server/test/list_objects.go
75.46% <0.00%> (-0.57%)
:arrow_down:

internal/graph/check.go
90.18% <0.00%> (-0.69%)
:arrow_down:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

how did this break? this is passing on the latest main

how did this break? this is passing on the latest main: https://github.com/openfga/openfga/actions/runs/4359615923/jobs/7621593177

Main also broke - https://github.com/openfga/openfga/actions/runs/4359615923/jobs/7621593177#step:5:42
Unfortunately it does not mark as fail on CICD

Main also broke - https://github.com/openfga/openfga/actions/runs/4359615923/jobs/7621593177#step:5:42
Unfortunately it does not mark as fail on CICD

@adriantam can you mark it as fail please?

I don't understand what the 10 minutes have to do with it. The step will run no matter what, i'm saying we should fail the workflow if the return code is non-zero. Otherwise how are we going to detect problems?

I think we're not communicating clearly here.. I don't want to wait 10 minutes every PR build to finish waiting on the benchmark stage. If we can fail the benchmark workflow but not require it to pass, then that's fine. But let's not make it a required build stage to pass.


Documentation Update

The documentation for the re-write needs to be updated throughout the code base

closing as stale. It;s been 3 years


Doesn't work with private API access setting

When the API access under "Repository Security" in settings has been changed to "private".  There is a 401 response from Prismic, because the access token isn't passed

Hey @DaleWebb, I should have time to look at this in a few days. In the mean time, let me know if you find a fix. Thanks! 👍

I have a fix, I can push it tomorrow if you like?

On 14 Sep 2017, at 21:49, Angelo Ashmore<EMAIL_ADDRESS>wrote:
Hey @DaleWebb, I should have time to look at this in a few days. In the mean time, let me know if you find a fix. Thanks! 👍
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

Yup, sounds good. If you submit a PR I can take a look at it.

I kind of needed this feature now, so I just added the PR for it.

Thanks, don't know how I missed that. 🙄
Just published v0.1.2 with the fix: .


UIP-0108:  %yard, a developer commons

Current plans after discussion:

start as a standalone distribution to tune it first
consider a new base fakezod pill including it


ICSME Artifact: Utility scripts for Docker

In other replication packages, we provide bash and batch scripts for managing the replication with Docker. These scripts should be included in the replication package as well.

I added the scripts for Windows and Linux. For now, I have only tested the Linux scripts


Fixes to while loops

Description
Adds tests for the while loop patterns used in codes and fixes the toolchain to pass those tests.

The test in test_code_generation.py should probably be a stencil test suite, but I'm not sure how important the specific probability distributions are to the test, nor how to easily implement that logic in the test suites (uses hypothesis, which I'm not as familiar with).

bors try


Crash in World::update() when adding collision body, test if collides with world, removing collisionbody before calling World::update()

Hi,
I have one situation where I need to test a single time for collision with world, when trying to find out if a player can spawn on a position or not.
Therefor I add a collision body to a dynamics world, test for collision and remove it. There are no World::update() calls involved.
When I do it this way RP3D crashes on next World::update().
Please see attached the backtrace:
`#0  0x000000080efe9fc0 in ?? ()
#1  0x0000000000954f15 in reactphysics3d::CollisionDetection::broadPhaseNotifyOverlappingPair (this=0x8060c14a8, shape1=0x80efe98a0, shape2=0x80efea020) at ext/reactphysics3d/src/collision/CollisionDetection.cpp:338
#2  0x000000000093e3c5 in reactphysics3d::BroadPhaseAlgorithm::computeOverlappingPairs (this=0x8060c15b0, memoryManager=@0x8060c1008) at ext/reactphysics3d/src/collision/broadphase/BroadPhaseAlgorithm.cpp:291
#3  0x000000000095423a in reactphysics3d::CollisionDetection::computeBroadPhase (this=0x8060c14a8) at ext/reactphysics3d/src/collision/CollisionDetection.cpp:100
#4  0x00000000009541d9 in reactphysics3d::CollisionDetection::computeCollisionDetection (this=0x8060c14a8) at ext/reactphysics3d/src/collision/CollisionDetection.cpp:77
#5  0x000000000095e016 in reactphysics3d::DynamicsWorld::update (this=0x8060c1000, timeStep=0.0329999998) at ext/reactphysics3d/src/engine/DynamicsWorld.cpp:126
#6  0x000000000059dea3 in tdme::engine::physics::World::update (this=0x8060c1000, deltaTime=0.0329999998) at src/tdme/engine/physics/World.cpp:179`
BTW: This is the last bug I currently know of that helds me back to merge my TDME2 RP3D branch into master branch.
I am super excited how RP3D works with our game and engine.
You can see this bug using my PathFindingTest. Just remove the comment before "world->update();"
https://github.com/andreasdr/tdme2/blob/reactphysics3d-current/src/tdme/tests/PathFindingTest.cpp#L166
Best regards
Andreas

My path finding currently uses the same kind of logic. Check:
https://github.com/andreasdr/tdme2/blob/reactphysics3d-current/src/tdme/utils/PathFinding.cpp#L291
https://github.com/andreasdr/tdme2/blob/reactphysics3d-current/src/tdme/utils/PathFinding.cpp#L383

Thanks a lot for reporting this.
I will check this using your PathFindingTest when I have some time.

Sorry for the delay. I was on vacation.
I have pushed a fix with this commit into the "develop" branch.
Can you try if the bug is now fixed on your side ?

Hi,
no worries. Very nice!!! Will check tomorrow.
Many thanx and
Best regards
Andreas

Hi,
this seem to be fixed!!!
Many thanx and
Best regards
Andreas

Ok perfect. I have merged the fix into the "master" branch.
Thanks for reporting this bug.


[Flaky Test] snapshots_spec.js

Running:  plugins/index-management-dashboards-plugin/snapshots_spec.js                  (13 of 17)

  Snapshots
    Repository can be created
      ✓ successfully creates a new repository (10943ms)
    Snapshot can be created
      ✓ successfully creates a new snapshot (12009ms)
    Snapshot can be restored
      1) Successfully restores indices from snapshot
    Snapshot can be deleted
      ✓ deletes snapshot successfully (120ms)

  3 passing (1m)
  1 failing

  1) Snapshots
       Snapshot can be restored
         Successfully restores indices from snapshot:
     AssertionError: Timed out retrying after 60000ms: Expected to find content: 'Restore snapshot' but never did.
      at Context.eval (http://localhost:5601/__cypress/tests?p=cypress/integration/plugins/index-management-dashboards-plugin/snapshots_spec.js:1035:10)

https://github.com/opensearch-project/index-management-dashboards-plugin/actions/runs/6827404998/job/18569441857?pr=919

Hi @bowenlan-amzn
Please could you assign this issue to me?


Unexpected java.lang.IllegalStateException

OS name: Linux
OS version: 4.10.10-1-ARCH
OS architecture: amd64

JRE vendor: Oracle Corporation
JRE version: 1.8.0_121
JRE architecture: 64

Stack trace: java.lang.IllegalStateException: Component must have a valid peer
	at java.awt.Component$FlipBufferStrategy.flip(Component.java:4092)
	at java.awt.Component$FlipBufferStrategy.show(Component.java:4213)
	at net.clgd.ccemux.rendering.awt.TerminalComponent.render(TerminalComponent.java:117)
	at net.clgd.ccemux.rendering.awt.AWTRenderer.onAdvance(AWTRenderer.java:164)
	at net.clgd.ccemux.emulation.EmulatedComputer.lambda$advance$0(EmulatedComputer.java:161)
	at java.util.concurrent.CopyOnWriteArrayList.forEach(CopyOnWriteArrayList.java:890)
	at net.clgd.ccemux.emulation.EmulatedComputer.advance(EmulatedComputer.java:161)
	at net.clgd.ccemux.emulation.CCEmuX.lambda$advance$0(CCEmuX.java:125)
	at java.util.HashMap$KeySet.forEach(HashMap.java:932)
	at net.clgd.ccemux.emulation.CCEmuX.advance(CCEmuX.java:123)
	at net.clgd.ccemux.emulation.CCEmuX.run(CCEmuX.java:148)
	at net.clgd.ccemux.init.Launcher.launch(Launcher.java:318)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at net.clgd.ccemux.init.Launcher.main(Launcher.java:86)

yeah that happens

Either way this happens when you create a BufferStrategy on a Component that hasn't been added to a container, which shouldn't ever happen in this case.

This bug only happens when closing the emulator, so it's not that important that we fix it. Nonetheless, the JavaFX renderer does not have this issue.

Probably - once I get around to finishing the JFX config editor we should make the JFX renderer the default

Does this still happen

As far as I know, it still happens occasionally in the AWT renderer. Once JFX is more mature, we can phase AWT out completely, as it's been deprecated for several years now.

JFX 11 can be bundled and is available on maven, but it requires Java 10.


add the charging status automatically based on "charging" attribute

I don't know if it's possible but since I am using the "auto-entities" card to populate this card it would be nice if this card could automatically check to see if the entity has a way to check that the battery is charging or not.
Otherwise there is no way that I know of to use the "auto-entities" and then also set the charging status.
Right now I have two entities that show charging status - one uses a "Battery State: Charging/Not Charging" attribute (IOS mobile app) and the other uses an "is_charging: true/false" attribute (Android mobile app).

Hopefully this might help you, as I think that I was trying to do the same thing. My phone battery entity has the charge % listed as the State, and an "is_charging" attribute, a value of true / false.
What I wound up doing is creating a new sensor, and defining the state manually using a template:
configuration.yaml:
- platform: template
    sensors:
      battery_pixel:
        friendly_name: Pixel 4 XL Charging Status
        unit_of_measurement: '%'
        value_template: >-
          {%- if state_attr('sensor.pixel_4_xl_battery_level', 'is_charging') %}
            is_charging
          {% else %}
            not_charging
          {% endif %}
        device_class: battery

UI Card:
color_gradient:
  - '#ff0000'
  - '#ffff00'
  - '#00ff00'
entities:
  - charging_state:
      entity_id: sensor.battery_pixel
      state: is_charging
    entity: device_tracker.pixel_4_xl
    name: My Pixel 4 XL
title: Battery Levels
type: 'custom:battery-state-card'

In v1.2.0 you are able to set charging_state on card-level and you can use entity attributes for it. This should solve your problem.
Example in documentation:
https://github.com/maxwroc/battery-state-card#charging-state-indicators


[AIRFLOW-858] - Configurable database name for DB operators

Dear Airflow Maintainers,
Please accept this PR that addresses the following issues:

https://issues.apache.org/jira/browse/AIRFLOW-858

Testing Done:

Manual
Travis
There is missing test for MsSqlOperator. Unfortunately, I didn't manage to to test it locally either, because even docker container needs at least 4GB of RAM for MS SQL Server.

Codecov Report

Merging #2063 into master will decrease coverage by -0.02%.
The diff coverage is 62.5%.

@@            Coverage Diff             @@
##           master    #2063      +/-   ##
==========================================
- Coverage    67.7%   67.68%   -0.02%
==========================================
  Files         139      139
  Lines       10579    10588       +9
==========================================
+ Hits         7162     7167       +5
- Misses       3417     3421       +4

Impacted Files
Coverage Δ

airflow/hooks/base_hook.py
88.09% <ø> (-0.28%)
:x:

airflow/hooks/mssql_hook.py
6.66% <ø> (-1.67%)
:x:

airflow/operators/mssql_operator.py
0% <ø> (ø)
:white_check_mark:

airflow/operators/mysql_operator.py
100% <100%> (ø)
:white_check_mark:

airflow/hooks/mysql_hook.py
73.17% <100%> (+0.67%)
:white_check_mark:

airflow/hooks/postgres_hook.py
90% <100%> (+1.76%)
:white_check_mark:

airflow/operators/postgres_operator.py
100% <100%> (ø)
:white_check_mark:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update eea5ff8...5ffb700. Read the comment docs.

LGTM, thanks!


Fix typo in documentation of PartitionedOutputNode operator

@xiaoxmeng would you mind take a look? Maybe just a minor typo fix

Would you like to merge this or we should wait other to move forward @amitkdutta  ? Thanks!


Incorrect locking with uv --python-platform x86_64-apple-darwin

λ cat r.in
ray==2.10
λ uv pip compile r.in --python-platform x86_64-apple-darwin
  × No solution found when resolving dependencies:
  ╰─▶ Because ray==2.10.0 is unusable because no wheels are available with a matching Python ABI and you require ray==2.10, we can conclude that the requirements are
      unsatisfiable.

I don't know why uv's complaining about this. There are valid wheels: https://pypi.org/project/ray/2.10.0/#files

The problem is that we set the macos version to 10.12:
https://github.com/astral-sh/uv/blob/2ffb252498a9d452b3fe28e16abe2948cd21ec51/crates/uv-configuration/src/target_triple.rs#L79-L92
Should we set a higher default here @charliermarsh?

10.15 is like five years old, so higher default sounds good. For my use case, I'd be happy to set the right value explicitly too if there was a way to

I believe I chose 10.12 for a reason. I need to look back...
I experimented with adding a mechanism to specify exact versions. It added a lot of complexity and it wasn't clear how to display the candidate options on the CLI but I will revisit it. I was kind of waiting for someone to have a real need for it.

Bumping the default to 12.0 (last non-EOL version), and adding support for MACOSX_DEPLOYMENT_TARGET so that you can override it as needed.

Yeah, mostly because it's a standard environment variable read by other tools, so it's a little unusual for us to expose it as uv-specific configuration.


TODO: progress towards v0.3.0

It's all in the question's title!
I am of the opinion that this project if carried correctly would give a huge boost to arrayfire (using arrayfire from node that is).

Yeah, it's basically feature complete. But unfortunately it has a serious flaw: for the sake of performance we need deterministic scopes (https://github.com/arrayfire/arrayfire-dotnet/issues/8#issuecomment-209796428). But that implies that we will call destructors synchronously, and because destructors are synchronization points in ArrayFire, ArrayFire.js is synchronous despite my best effort to make it asynchronous. I'm thinking on a new approach, but that's gonna make every call and value access asynchronous for sure, which is kinda ugly, and hurts performance.
So it works, but it blocks the event loop at the current state.

@unbornchikken Thanks for the quick reply.
Please do keep us posted if you find ways to mitigate this!

@umar456 Please take a look at my previous comment. I'm thinking on a solution. What if, let's say, array's destructor implementation wouldn't block, instead it'd add up an asynchronous operation in the queue to free up array's resources once all previous operations gets completed?

@pavanky can give you more detail but the destructor shouldn't be a blocking call. It should be managing the reference counts for all arrays and should be marked for deletion once all of the work is done. Those objects will be deleted at a later time(if the memory of that size is not used or the garbage collector is called). That event needs to be blocking because the GPU drivers perform a synchronization on the device but we try to avoid that whenever possible.

Ok, I'm gonna work out a simple repro case with a code flow that - in theory - shouldn't block at all, but according to v8 performance data it does.

@mehdi-cit as you can see, this project is still active, but my life events prevented me to make significant progress on it in the last few months. But, since my pet ML project is still have and will have a dependency on ArrayFire.js (and on CMake.js), you can expect me to put my focus back to those eventually.

Not sure if this can help with the issue at hand but it could be a good alternative when it comes to "integrating" javascript and c++ code:
https://github.com/charto/nbind

@mehdi-cit unfortunately that's not that simple as nbind states. In ArrayFire there are a bunch of operations that act as synchronization point: constructors, complex operators, memory copy, etc. Which mean, if you wrap'em naive as-is, then you're gonna block the main loop on that point until all of previously enqueued AF operations completes. In Node.js you should never block the event loop.
Let's say, nbind supports asynchronous operations by the standard way. I mean by using nan's async workers: https://github.com/nodejs/nan/blob/master/doc/asyncworker.md (note: almost all of native library wrappers are doing this). But AsyncWorker uses libuv worker threads, so you gotta synchronize AF calls by some way. In current version you gotta use manual locks, but eventually thread safe ArrayFire will land and make that unnecessary. If you lock libuv workers then you'll serialize them, if there are more than one AF operations executing in parallel. Which means you'll kill libuv entirely and make Node. js totally synchronous, which really really is bad.
The only viable option is that you launch a separate libuv loop for AF and make your binding as a proxy for that. Well, this is where things will go really complicated especially if you're interacting v8 in C++, because verbosity and complexity of v8/nan.
That's why I'm creating fastcall. It will offer about the same performance that you could get with C++ based bindings (dyncall is really that fast, according to my benchmarks, it's overhead is negligible, 5%-ish), with the above mentioned separated libuv loop support.
Once fastcall stabilizes, I'll be back to this project. However I gotta invent something for proper RAAI in JS, because of https://github.com/arrayfire/arrayfire-dotnet/issues/8#issuecomment-209796428

I've been watching arrayfire.js for a few months now, and am in love with it.  I'm working on https://github.com/harthur-org/brain.js & its recurrent neural net and want to connect to arrayfire.jsat some future point in time when things line up.  I've spent a great deal of time researching before coding anything, and started here (amongst many research papers, how to articles, and many other libraries) for the most part:
https://github.com/karpathy/recurrentjs
After reviewing each of the major methods that are associated with the overall mathematical procedures, I found something that concerned me:

create a new matrix for each and every mathematical operation: https://github.com/karpathy/recurrentjs/blob/master/src/recurrent.js#L199
create a new closure for every mathematical operation: https://github.com/karpathy/recurrentjs/blob/master/src/recurrent.js#L211

The reason that this concerned me was that after reviewing the recurrent neural net in arrayfire.js, I see a similar approach (please note, I am very nieve to arrayfire.js still, and this isn't a slam against the library, but rather rethinking the semi normal) and it got me thinking, how could we greatly speed this up?  Or rather how can we use less resources to do the same thing?  One of the biggest bottlenecks of multi threading, is of course, memory to and from cpu -> gpu -> cpu -> repeat, garbage collecting, etc. but what if we could offload the entire operation of calculations to the gpu, so that there is only one input, and one output?
Tinkering with the idea, I came up with a few pseudo code sessions to try and wrap my head around what I was aiming for eventually, and yes, I'll say it was a yack shave at best.  This was how I saw the operation on the first go around ( (outlined here)[https://github.com/harthur-org/brain.js/issues/24] ), I thought: Really what we are trying to do is build a state tree, just like in parsing, so you'd have something like:
{
  left: leftMatrix,
  right: rightMatrix,
  into: intoMatrix,
  forwardFunction: forwardFunction,
  backpropagateFunction: backpropagateFunction
}

This would repeat over and over again, depending on the complexity of your math.  forwardFunction would be the math moving forward, say add or multiply.  So here if we send left and rightas arguments called withforwardFunction, where forwardFunctionusesinto` is where the values from the addition will go.  The state tree is a little odd & backward, but you get the jist:
left_state -\
                   \
                    >= next_state
state-/
-\
   \

In this scenario, rather than doing just in time operations on math, we'd actually setup a math equation in the gpu that could be fed a set of data  and would at some future point in time return the answer to it.
In the original neural net, the setup doesn't really exist, other than some tricky prev value checks to trigger backfeeding the neural net, however the just in time calculations look something like:
var h0 = this.multiply(hiddenMatrix.weight, inputVector, this);
var h1 = this.multiply(hiddenMatrix.transition, hiddenPrev, this);
var hiddenD = this.relu(this.add(this.add(h0, h1, this), hiddenMatrix.bias, this), this);

What I'm proposing is that with this new thinking, we'd setup a math problem that could be used, similar to:
var eq = new Equation();
return eq.relu(
      eq.add(
        eq.add(
          eq.multiply(
            hiddenModel.weight,
            input
          ),
          eq.multiply(
            hiddenModel.transition,
            previousInput
          )
        ),
        hiddenModel.bias
      )
    );

Which instantiates an equation that can be used like:
eq.run(input, function(output) {
  console.log('look ma!  no CPU!', output);
});

I accidentally hit enter before I was done.  So my question is, would this answer the problem are having of a blocking synchronous thread that ultimately is synchronous?  By giving the gpu the whole problem, with minimal in and out, would that address or even help so that we could have a full fledge multi threaded approach?

@UniqueFool, curious your thoughts here.

@robertleeplummerjr Just wait for the new fastcall based bindings to come out before making any serious dependency on AF.js, please. In this version I'm working on a fully asynchronous, declarative approach that you proposed, with just one huge exception: I wanna have control flow too not just expressions! Like:
const result = yield raii.scope(() => {
const arr1 = af.randu(42);
const arr2 = af.constant(0);
for (let i = 0; i < 10; i++) {
    arr2.set(Math.random() * 42, arr1.get(Math.random() * 42));
}
return arr1.host();
});

You'll get yer plain old JavaScript, but that doesn't get executed right away. It gets enqueued in a separate libuv loop, and you'll get a Promise that resolves asynchronously once all of the operations gets completed on the device. And there will be an asynchronous RAII mechanism that will do exactly the same RAM and VRAM resource management automatically that C++ bindings have.

What is the eta?  No rush on perfection :)

That's above just the trailer. Kinda No Man's Sky. :) ETA: when it's done. ;) I'll keep you posted in this thread about my progress.

Anything I can do to help?

Unfortunately nothing at this stage. Once I'm starting to add some actual methods to the new binding, you can help to add the others.

I love feedback, and brainstorming.  I'll be here to assist in the meantime.

Any updates?

On it. I've just reached the second milestone with fastcall, one major feature remains: callback support. Few weeks ahead.

Saweet!  As of this evening I got rnn, lstm, and gru networks up and running with unit tests!!!  Your audience is standing by to watch the master at work.

Bragging rights: https://github.com/harthur-org/brain.js/pull/29

Your code looks fantastic, by the way!

fyi: https://github.com/cmake-js/fastcall/milestone/3

(awesome!)

Work on the new version has been started: https://github.com/arrayfire/arrayfire-js/tree/fastcall
Sorry for the delay, I had to invent the wheel to make an efficient ArrayFire binding possible on Node.

How ironic, I just landed the rnn, lstm, and gru last night!
https://github.com/harthur-org/brain.js/pull/29
Ty for your hard work!

nearly ready?

It depends on what you mean on nearly. :) I'm working on the array class. Once it gets ready, only the function wrap grinding remains. Which is a lot of work, but repetitive and easy to do. That's where I would hope for a bunch of PRs, though.

In the post you had above, I would like to break it doesn't on the surface to better understand what will happen, once this is ready.  Here is an example I posted from above of how the neural net equation is composed:
var eq = new Equation();
return eq.relu(
      eq.add(
        eq.add(
          eq.multiply(
            hiddenModel.weight,
            input
          ),
          eq.multiply(
            hiddenModel.transition,
            previousInput
          )
        ),
        hiddenModel.bias
      )
    );

Will this give us, not processed numbers, but rather all the binary steps to achieve it at a later point in time.  Sometime later we do:
eq.run();

and then to run the equation backward (needed for backpropagation) we run:
eq.runBackpropagate();

The standard model is to perform equations on the gpu, and send them to the cpu, and the cpu sends them back to the gpu, and then again to the cpu.  What you end up with are tons of copies of arrays that are ultimately are not needed.  So my question is this: Is there any way to keep the values on the gpu, and completely processed there, so there is one (or much fewer) in(s) much less copying in and out?
To illustrate the standard model:
relu(
      add(
        add(
          multiply(
            hiddenModel.weight,
            input
          ), // send to gpu, process, receive on cpu
          multiply(
            hiddenModel.transition,
            previousInput
          ) // send to gpu, process, receive on cpu
        ), // send to gpu, process, receive on cpu
        hiddenModel.bias
      ) // send to gpu, process, receive on cpu
    ); // send to gpu, process, receive on cpu

Will we get something like this with your work?:
relu(
      add(
        add(
          multiply(
            hiddenModel.weight,
            input
          ),
          multiply(
            hiddenModel.transition,
            previousInput
          )
        ),
        hiddenModel.bias
      )
    ); // send to gpu, process, receive on cpu

You'll get something like that, but it's from work of @pavanky and co. not me. ArrayFire's JIT technology merges a bunch of operations into a single kernel, and launch them at once. It works on most operations, however there is much to be done for better coverage: https://github.com/arrayfire/arrayfire/milestone/16 (search for "JIT" there).

I've added a TODO list on top of this thread.

Well, sir...

The good news is that next week is holiday for me, so I can work on this module ... if my kids and my wife live me some breath. :)

Same exact situation here.

Unfortunately I couldn't come up with a solution in Node.js that is better (faster) than we have in the current version. ArrayFire's design could not fit very well with the Nature of Node's event queue, so it turned out, my first approach is the best that I can come up with. The good news is that already near feature complete, just check out the examples folder.


(WIP) very rough tooltip

Coverage decreased (-0.8%) to 98.705% when pulling 8d90814d967a583e44a590bb250451cbd1f6ac67 on mroytman/tool-tip into 6ad42ee210bf58c9889ed1ca7fdf7eb0c55db510 on master.

Coverage decreased (-0.8%) to 98.705% when pulling 5172db1a35f242f0d4209fbf8e27e2873b2b5d8c on mroytman/tool-tip into 6ad42ee210bf58c9889ed1ca7fdf7eb0c55db510 on master.

Closing this since it's very old and the much of the team is using react-tooltip.


Readonly not working

TypeScript Version:  3.3.0-dev.20181208

Search Terms:
Readonly
Code
const a: Readonly<number[]> = [1,2,3]
a[1] = 4

Expected behavior:
Should not let me write.
Actual behavior:
It does.
Playground Link:
http://www.typescriptlang.org/play/#src=const a%3A Readonly<number[]> %3D [1%2C2%2C3]
a[1] %3D 4

Related Issues:

@weswigham based on your labels, I suppose this is something that never worked the way I was expecting above?

Ah, I didn't know about ReadonlyArray, that works well:
const a: ReadonlyArray<number[]> = [1,2,3]
a[1] = 4

(playground)

It should be ReadonlyArray<number> btw :)


Rename assets to voyager-assets

So they dont conflict with custom BREADs named assets.
Fixes https://github.com/the-control-group/voyager/issues/4126

aaa


gosmore: fix build with gcc7

Motivation for this change
fix build with gcc7: https://hydra.nixos.org/build/70739382
cc ZHF https://github.com/NixOS/nixpkgs/issues/36453
cc @7c6f434c maintainer
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[x] Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[x] Fits CONTRIBUTING.md.

Thanks. Could it be cherry-picked to 18.03 as well ?


Support string as accessor?

Since plucking off a single property is likely a very common use case, it would be nice to support simply passing a string so that d3.set(stuff, 'name') would be equivalent to d3.set(stuff, x => x.name).
I'd be happy to submit a PR if this is a feature you'd accept.

Sorry, but I do not want to provide this convenience API; I’d rather favor parsimony and use x => x.name.


app=helloworld is right label

Please provide a description of this PR:

Hi @AbdullahBM. Thanks for your PR.
I'm waiting for a istio member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.
Once the patch is verified, the new status will be reflected by the ok-to-test label.
I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

/ok-to-test

@AbdullahBM: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name
Commit
Details
Required
Rerun command

release-notes_istio
5fc2a6410719ae1bb70c7d0af5e40ab6c41c10c0
link
true
/test release-notes_istio

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.