solc-select: init at 0.2.1

Motivation for this change
Things done

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

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

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

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[ ] Fits CONTRIBUTING.md.

Result of nixpkgs-review pr 131943 at 83c3f03d run on aarch64-linux 1

2 packages built successfully:

python38Packages.solc-select
solc-select (python39Packages.solc-select)

1 suggestion:

warning: python-include-tests
Consider adding a checkPhase for tests, or if not feasible, pythonImportsCheck.
Near pkgs/development/python-modules/solc-select/default.nix:19:0:
   |
19 |     description = "Manage and switch between Solidity compiler versions";
   | ^


Add gitSignOff preset

This just appends
{
  "commitBody": "Signed-off-by: {{{gitAuthor}}}"
}

to the config, which should IMO be enabled for all managers regardless.

/lgtm
/approve

/approve
/lgtm


Remove most deprecated APIs

Bring back this change after fixing SourceKit-LSP's use of deprecated API. I had accidentally merged this in #5756 without merging https://github.com/apple/sourcekit-lsp/pull/643 first. Since that has now landed, we can bring this back.

@swift-ci please smoke test


I might as well add my own Left Trigger issue

Controller: Original Xbox S controller.
Issue: Left trigger isn't recognized.
Fix: Manually added the left stick in the config file.
Result: I can only use the left stick while using the right stick or triggers.
Result of fix: Not Fixed.
Looking at the age of the rest of them it's doubtful this will be fixed for quite a long long while. Sadly I was even using a very old version of xoutput that recognized it fine until it suddenly stopped being able to emulate the controller...
Edit: After doing a little downloading I found out that version 3.12 is where it breaks.

I think I know where it broke. It should be 0cb5799 where I tried to separate the slider and axis functionality. I cannot promise any ETA but will post here if I have a test version for you.

Can you test the latest development release?

Can you test the latest development release?

Just tested it and it's fixed :D.

Can you check the #83 issue as well, as it changes the axis detection as well?

Can you check the #83 issue as well, as it changes the axis detection as well?

I don't have a Dualshock 3 controller sadly to test if it fixed that guys issue.

Released in v3.18


Create repo for ibm-blockchain/ansible-collection to be a new lab

The PR to approve a new labs has been merged see https://github.com/hyperledger-labs/hyperledger-labs.github.io/pull/227
The existing repo is https://github.com/ibm-blockchain/ansible-collection/ - however, I'd like that to remain where it is and create the hyperledger labs repo by forking that.  (having considered the implications a bit more from my comment in the PR a direct transfer will cause issues)
Reason is that there is IBM/IBM Blockchain Platform code that needs to stay available IBM side, but will be removed in the lab.
If we can fork it, the original can stay and I can then cleanup the labs repo.
Hope that makes sense!

here you go!


Call to undefined function Pelecard\t()

I guess that t() function is from Drupal.
It would be nice to remove Drupal dependency for people who use this package with other CMS or plain PHP.
Script:
$terminal = 'XXXXXXXXX';
$user = 'XXXXXXXXX';
$password = 'XXXXXXXXX';

$PelecardTransactionId = 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX';
$PelecardStatusCode = '000';
$ConfirmationKey = 'XXXXXXXXXXXXXXXXXXXXXXXXXX';
$Total = 100;

$PaymentResponse = new \Pelecard\PaymentResponse(
    $PelecardStatusCode, $PelecardTransactionId, '', '', $ConfirmationKey, $Total
);

$payment = new \Pelecard\PelecardPayment();
$payment->setPaymentResponse($PaymentResponse);
$transaction = new \Pelecard\PelecardTransaction(
    $terminal, $user, $password, $PelecardTransactionId
);
$clearerName = $transaction->getClearerName();

Output
Fatal error: Uncaught Error: Call to undefined function Pelecard\t()
in \vendor\dofinity\pelecard\src\Pelecard\PelecardTransaction.php:178

@ybelenko You are right about it, it was a mistake, and it shouldn't be in the library.
Fixed and pushed. :)
Thanks for letting us know.


Introduce DetectorDatabase and needed helpers

This PR introduces a DetectorDatabase class to manage detectors.
WIP: more details on the PR.

To demonstrate part of what is working right now:
from tqec.compile.specs.base import CubeSpec
from tqec.compile.specs.library.css import CSS_SPEC_RULES
from tqec.computation.block_graph.enums import CubeType

# Getting a cube to facilitate Template and Plaquettes creation.
spec = CubeSpec(CubeType.ZXZ)
# TODO: why do we have to repeat `spec` twice here?
cube = CSS_SPEC_RULES[spec](spec)

# Getting the plaquettes in the right type.
plaquettes = cube.layers
# We just want to try with the first (initialisation) layer.
plaquettes_tup = (plaquettes[0],)

database = DetectorDatabase()

detectors = compute_detectors_for_constant_template_and_fixed_radius(
    template=cube.template,
    k=2,
    plaquettes_at_timestep=plaquettes_tup,
    fixed_subtemplate_radius=1,
    database=database,
)
# detectors should be valid here.
# They should also be registered in the database:
urls = database.to_crumble_urls(cube.template.get_increments())
for i, url in enumerate(urls):
    print(f"- [Crumble link for subtemplate {i}]({url})")

prints the following (Markdown formatted) URLs:

Crumble link for subtemplate 0
Crumble link for subtemplate 1
Crumble link for subtemplate 2
Crumble link for subtemplate 3
Crumble link for subtemplate 4
Crumble link for subtemplate 5
Crumble link for subtemplate 6
Crumble link for subtemplate 7
Crumble link for subtemplate 8
Crumble link for subtemplate 9
Crumble link for subtemplate 10
Crumble link for subtemplate 11
Crumble link for subtemplate 12
Crumble link for subtemplate 13
Crumble link for subtemplate 14
Crumble link for subtemplate 15
Crumble link for subtemplate 16
Crumble link for subtemplate 17
Crumble link for subtemplate 18
Crumble link for subtemplate 19
Crumble link for subtemplate 20
Crumble link for subtemplate 21
Crumble link for subtemplate 22
Crumble link for subtemplate 23
Crumble link for subtemplate 24
Crumble link for subtemplate 25
Crumble link for subtemplate 26
Crumble link for subtemplate 27
Crumble link for subtemplate 28
Crumble link for subtemplate 29
Crumble link for subtemplate 30
Crumble link for subtemplate 31
Crumble link for subtemplate 32
Crumble link for subtemplate 33

Detectors are annotated on each link.

It looks cool! Just to note here in case anyone does not aware it, from Crumble's documentation:

j+#: Picks a DETECTOR or OBSERVABLE_INCLUDE declaration touching the current selection and converts it into a tracked Pauli product.

You can easily convert the detector into stabilizer flow annotation by pressing j+1.

I had to perform a few additional changes to make sure that the database was behaving as expected. The main one being that the Collection in Plaquettes is now a custom type FrozenDefaultDict. This was needed because the database needs to be able to reliably compute hashes for Plaquettes instances, and defaultdict defaults to inserting the missing key/value on an access that triggers the default_factory.
Also, I changed back GridQubit to using int instead of Fraction due to the large overhead that Fraction was adding. Even with int, most of the current overhead in compute_detectors_for_constant_template_and_fixed_radius is due to the repetitive calls to Measurement.offset_spatially_by that in turns calls GridQubit.__add__.
Benchmarking the approach shows exactly what's written above (here, the database is empty and is only populated, never used to retrieve detectors):

In terms of raw performances, on my computer, using the following code
from time import perf_counter

from tqec.compile.specs.base import CubeSpec
from tqec.compile.specs.library.css import CSS_SPEC_RULES
from tqec.computation.block_graph.enums import CubeType

# Getting a cube to facilitate Template and Plaquettes creation.
spec = CubeSpec(CubeType.ZXZ)
# TODO: why do we have to repeat `spec` twice here?
cube = CSS_SPEC_RULES[spec](spec)

# Getting the plaquettes in the right type.
plaquettes = cube.layers
# We just want to try with the first (initialisation) layer.
plaquettes_tup = (plaquettes[0],)

k = 200
for k in [10, 50, 100, 150, 200, 250, 300]:
    start = perf_counter()
    detectors = compute_detectors_for_constant_template_and_fixed_radius(
        template=cube.template,
        k=k,
        plaquettes_at_timestep=plaquettes_tup,
        fixed_subtemplate_radius=1,
    )
    end = perf_counter()
    print(
        f"[{k:>3}] Computed {len(detectors)} detectors in {end-start:.2f} seconds."
    )

I get the following timings:
[ 10] Computed 220 detectors in 0.20 seconds.
[ 50] Computed 5100 detectors in 0.39 seconds.
[100] Computed 20200 detectors in 1.04 seconds.
[150] Computed 45300 detectors in 2.26 seconds.
[200] Computed 80400 detectors in 4.18 seconds.
[250] Computed 125500 detectors in 6.90 seconds.
[300] Computed 180600 detectors in 10.72 seconds.

Several things to note:

this is only detectors from the initial layer of a Z-initialized memory experiment, so there is only half of the measurements that should form detectors.
the needed time scales with the number of detectors (which is expected as the main bottleneck is with offsetting measurements from detectors and in this case each detector is only composed of one measurement).
timings seems reasonable, but we might have to optimize calls to Measurement.offset_spatially_by in order to be really fast.

One interesting thing to note is that the main overhead (Measurement.offset_spatially_by) is outside of the database caching, meaning that even with a filled database of detectors I do not expect detector computation to be significantly more efficient. Nevertheless, having the possibility to look at all the computed/used detectors is a nice feature, and adding the possibility to only use detectors from the database should be quite easy.

I'll do the review at tomorrow.


deprecate<EMAIL_ADDRESS>›<EMAIL_ADDRESS>Please upgrade to Chalk 2.1.0 - template literals in this version (2.0.1) are quite buggy.

I got this error at npm install
This error can be ignored?
Will it have any impact?

+1

+1

There are no release notes between chalk v2.0.1 and v2.1.0. To close the issue, the changes available at https://github.com/chalk/chalk/compare/v2.0.1...chalk:v2.1.0 must be reviewed.

I tried updating the version and running the script in my project and it still doesn't add template literals

Chalk is not used in the next release, closing.


Password/Data Protection

Please create a new branch for this work.
Think about how we can encrypt/secure users' credentials and data.

Meteor's Account package implements bcrypt algorithm to store passwords securely. We don't have to do anything else.


Unable to dispatch action to store using @itwin/appui-react packages

Unable to store data using "ReducerRegistryInstance", "StateManager" from "@itwin/appui-react".
However the same codes will run as expected using packages from "@bentley/ui-framework".

⚠ Do not edit this section. It is required for imodeljs.github.io ➟ GitHub issue linking

LINK: State---iTwin.js-link-to-docs
TAG: imodeljs-docs-question
SOURCE: https://www.itwinjs.org/learning/ui/appui-react/state/

@sachinrajesh Could you drop a code snip showing how you're trying to use the store?

// STORE AND REDUCER
import { ActionCreatorsObject, ActionsUnion, createAction, ReducerRegistryInstance, StateManager, UiFramework } from "@bentley/ui-framework";
import { Task } from "../interfaces/Task";
interface ITasksState {
bimTaskElements: Task[]
}
export class TasksStateManager {
public static packageStateManagerLoaded = false;
private static _initialState: ITasksState = {
bimTaskElements: [],
};
private static _reducerName = "tasksState";
public static SET_BIM_TASK_ELEMENTS = TasksStateManager.createActionName("SET_BIM_TASK_ELEMENTS");
private static _packageActions: ActionCreatorsObject = {
setDialogVisible: (packageUiVisible: boolean) =>
createAction(TasksStateManager.SET_BIM_TASK_ELEMENTS, packageUiVisible),
};
private static createActionName(name: string) {
return ${TasksStateManager._reducerName}:${name}.toLowerCase();
}
public static reducer(
state: ITasksState = TasksStateManager._initialState,
action: any,
): ITasksState {
type PackageActionsUnion = ActionsUnion;
const packageActionsParam = action as PackageActionsUnion;
switch (packageActionsParam.type) {
  case TasksStateManager.SET_BIM_TASK_ELEMENTS:
    return { ...state, bimTaskElements: action.payload };
  default:
    return state;
}

}
public static initialize() {
ReducerRegistryInstance.registerReducer(
TasksStateManager._reducerName,
TasksStateManager.reducer,
);
TasksStateManager.packageStateManagerLoaded = true;
}
public static get bimTaskElements(): Task[] {
if (StateManager.isInitialized()) {
return StateManager.store.getState().tasksState.bimTaskElements;
} else {
return [];
}
}
public static set bimTaskElements(value: Task[]) {
UiFramework.dispatchActionToStore(TasksStateManager.SET_BIM_TASK_ELEMENTS, value, true);
}
}
// SETTING bimTaskElements
TasksStateManager.bimTaskElements = taskElementsFromApi;
// GETTING bimTaskElements
const taskElementsFromStore = TasksStateManager.bimTaskElements;

The above mentioned is a working snippet.
Previously I had trouble implementing this only because the packages were imported from "@itwin/appui-react" instead of "@bentley/ui-framework".

The above mentioned is a working snippet. Previously I had trouble implementing this only because the packages were imported from "@itwin/appui-react" instead of "@bentley/ui-framework".

I'm confused -- the above snippet works in 3.x or it worked in 2.x and doesn't work now?  (The name of the package changed from @bentley/ui-framework to @itwin/appui-react in 3.0.)

My problems went away now since I started using packages from @bentley/ui-framework.
I just wanted to point out that the package @itwin/appui-react doesn't work as expected.


Move from GitLab to GitHub

Description
I just pushed the code that was on https://gitlab.com/beenje/jupyterlab-gitlab to this GitHub repo.
To finish the transition we should:

replace the home url to point to the new repo
setup CI using GitHub workflow instead of gitlab-ci

It will be nice if you could set up the GitHub CI and Binder - I would advice executing python -m jupyterlab.upgrade_extension . to bring those in from the extension template. Do hesitate to ping me on PRs if you get trouble doing so.

Yes, I am planning on setting up both CI workflows and binder. I will try to do it before the weekend!

no pressure on the timeline :wink:  - just wanted to trace it somewhere
Thanks a lot @mahendrapaipuri for the reactivity.


Need to guarantee each special

i.e., guarantee at least one upper, one lower, one number, and one symbol

consider a rangeslider


prometheus instrumentation on front-end

I would like to be able to demonstrate prometheus metrics for the front-end. In particular, latency to the different microservices that it connects to.
Relates to https://github.com/microservices-demo/microservices-demo/issues/422

Let's start with basic RED (request rates, error rates, latency) metrics for requests to the frontend and perhaps the requests that it makes to its backend services.

@lukemarsden cool, looking into that at the moment.

@lukemarsden Just checking requirements

the requests that it makes to its backend services

All the backend services have (in one form or another that we will improve shortly) metrics in prom. I can appreciate that having a duplicate metric that measures the latency from the catalogue service  (for example) from the front-end, which would basically be the standard catalouge latency + network overhead.
This would highlight any network specific issues that could occur between services.
But, considering that the likelihood of that occuring is very low, it would be simpler to keep metrics contained to their own service. I.e. front-end would only measure front-end latencies. This would cut down the number of required metrics.
Am I correct in saying this is what you wanted? Or did you not know that the other services already have metrics?


Keyboard not appearing on Edge browser

Hey,
Many thanks for getting this working with Edge! Thanks so much.
I noticed that the latest version of master works in Edge but that the keyboard does not appear when you click on the text boxes. Not sure if I am doing something wrong here?
I have attached a screenshot.
Best regards,
Andrew

I think the keyboard is there but is invisible.

https://github.com/etiennepinchon/aframe-material/issues/20 fixes


Too Slow!

when it comes to augmentation of the images...outputs are processed very slow.
eg . 1024 sec for just 10 images

i think you cant change that...the pictures must be processed


Add pgweb to db devbox

https://github.com/sosedoff/pgweb/

https://github.com/azavea/ansible-pgweb


Element type is invalid error using most recent version

Do you want to request a feature or report a bug?
Report a bug
What's the current behavior?
I am running into an error when using the most recent version of react-big-calendar (^0.20.2), but not seeing the error on older versions (^0.19.2).
I am getting the following error:
Uncaught Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object
This sandbox has the code that reproduces the issue, but CodeSandbox's error handling shows a cross-origin error rather than the real one: https://codesandbox.io/s/5z60jx4p3x
You can see though that reducing the react-big-calendar version resolves the issue. Using this code locally should allow you to reproduce with the actual error.
Package Versions:

react: ^16.4.2
react-big-calendar: ^0.20.2 (works with ^0.19.2)
moment: ^2.19.2

What's the expected behavior?
No error when rendering.

I don't believe this is stale.


privatize deprecated method

@kolea2  one of last two deprecated methods to clean up before releasing 1.0
see https://github.com/googleapis/google-auth-library-java/pull/238
Can we take care of this now? I think https://www.github.com/googleapis/google-auth-library-java/issues/350 means we can do this now.

[ERROR] 7009: com.google.auth.oauth2.ServiceAccountJwtAccessCredentials: Accessibility of method 'public ServiceAccountJwtAccessCredentials(java.lang.String, java.lang.String, java.security.PrivateKey, java.lang.String)' has been decreased from public to private
is expected and this library is pre-1.0


fix: removed extra blank between sections

this change is made for how to participate in open source project

Thanks for your PR. Can you please sign CLA, and rename the commit message to build: remove extra blank between sections in gitignore

I'm closing this PR since the CLA hasn't been signed for over a month and there hasn't been any activity. If it gets resolved, the PR can be reopened.


Handle cases with bogus wikidata entry

I noticed cases where "name:etymology:wikidata" was not starting with Q number, so skip those

Nice !
I added a warning to know I should check (and probably fix) the name:etymology:wikidata tag.


Cant Login to eWeLink via HA Add-On

The Add-On has been installed just fine and is up and running, but when I open the Web UI through HA it asks to login to ewelink with a Phone Number and Password. I can't create an account using my phone number and there is no way to add my phone number to my eWeLink account????????

Sometimes I'm not smart.

same here, also, can't login w/ the email account created using the app


Moved deregister lb retry to clause creation.

Moved deregister lb observer retry to clause creation.

@ewiseblatt PTAL.


In CSM mode, only operator 1 is keyed on

While I'm adopting ymfm to PC-8801 (YM2203 / YM2608B) emulator, I found that in CSM mode, only operator 1 is keyed on.
As in CSM mode, F-Numbers are set for all 4 operators independently, so keying on only operator 1 makes little sense.
Created a PR:
https://github.com/aaronsgiles/ymfm/pull/56

Thank you for this. I cannot remember why I changed it, but your fix does seem to be correct, so I have accepted the pull request.


Missing description for the -DomainName parameter

Hi Team - appears to be a missing parameter description in this article for parameter DomainName.  Can this be corrected?  Please reach out to my MS alias if you have any questions.  Thanks!

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: bdb1bcd1-e164-db1e-e45a-dd0accd8afa6
Version Independent ID: e08ff564-4170-905c-9e97-edf37e860b3f
Content: Set-AuthServer (ExchangePowerShell)
Content Source: exchange/exchange-ps/exchange/Set-AuthServer.md
Service: exchange-powershell
GitHub Login: @chrisda
Microsoft Alias: chrisda

Dean, per our email conversation, if you don't have any input about this parameter, I'm closing the issue. It's a known fact that this (and many other parameters) are not documented. See the end of https://github.com/MicrosoftDocs/office-docs-powershell/issues/7429 about available vs. undocumented vs. missing.
Thanks for the feedback.
Closing


be able to resolve iglu schemas in validator

The underlying library support uri resolving for custom schemes.
Attached is a possible patch that can enable this feature
circevalidator.patch

This is a very interesting idea!  If I understand it right, this means we can have schemas with properties like this:
"properties: {
  "xyz": { "$ref": "iglu:com.snowplowanalytics.iglu/anything-a/jsonschema/1-0-0" }
}

Until now, I have always discouraged people from using the $ref keyword in iglu schemas.  And it was for three reasons:

If the ref is a non-versioned url (e.g. http://example.com/path/to/schema) then it bypasses Iglu's strict versioning rules.  It is a principle of Iglu that schemas are static once published, and that means we should not allow them to point to just any url.
Snowplow's repo schema-ddl contains the code we use for converting from json schemas into warehouse table definitions.  Currently that repo does not support the $ref keyword.  It means if a schema uses $ref then for events in a Snowplow pipeline, the fields will not get loaded into the warehouse.
When json-schema-validator looks up a $ref, it blocks the jvm thread.  In your patch, this happens on the line where you call dispatcher.unsafeRunSync(...).  In Snowplow apps, which are required to be high throughput, we have to be very careful about which threads get blocked and when.

Your patch addresses problem 1, and I think that is a huge improvement.  It is a big step in the right direction.
But I think we need to properly address problems 2 and 3 before we can claim that Iglu fully supports this type of external lookup.

A couple of smaller implementation comments:
I don't think you need the ValidatorF trait.  I think your new validator implementation could simply implement the old Validator trait.
If we add this feature, I would prefer to amend the old validators instead of adding a new validator.  It would be much simpler if we can say that all iglu validators support external refs, instead of saying that some do and some don't depending on how you use it.  This might need a breaking change to the code, so it would be a new major release of the library (version 3).

If iglu-client substitutes $ref for its contents when  json body is returned, it would solve the point 2.

@voropaevp that's a good idea.  It would solve the point 3 too, because if we do it in the resolver then we have better control over how threads/fibers get used.

A way to fix the blocking issue is to change Sync[F].delay to Sync[F].blocking or Sync[F].interruptable if this is a cancelable operation.

Hi @hamnis, I like how this brings us closer to JSON Schema compatibility, although it would be interesting to understand the use cases behind this feature. That would help us think through if any changes are needed in our UI flows as well.
I assume you’d like to reuse the same “subschema” in a set of schemas? Would this be primarily for event schemas or for entity schemas? Could you give some examples? In particular, if the goal is to add the same “subschema” to multiple event schemas, it’s already possible just add that “subschema” as an entity/context to all such events. But I imagine there is something you prefer in the $ref approach?

This would be reuse in other entity schemas.
A particular use case is that we have a concept called Plugs, each plug displays a Content item.
There may be multiple plugs visible plugs on a page, which also May represent a Content item.
We would typically attach a set of plugs to an impression event.
For now we have embedded the Content definition within our Plug definition.
I can see other usecases, but this is what we currently have.

Hey!
Any updates on this?
Our use cases:

Attach same set of reusable, required fields to events. I know we could use contexts, but we would really like to have those fields as non-optional and contexts are actually optional AFAIK.
Be able to extend events with additional fields.


how to disable transactions

it seems like every database call is wrapped in a transaction. The options I appear to have are either implicit or explicit transactions, but no option for simple atomic sql commands.
Option 1:
SQLiteConnection conn = (SQLiteConnection) DriverManager.getConnection("jdbc:sqlite:".concat(databaseFile));
conn.setBusyTimeout(5000);
conn.setAutoCommit(true);

PreparedStatement stmt = conn.prepareStatement("DELETE FROM events WHERE id = ?");
stmt.setInt(1, 10);
// sqlite-jdbc wraps this statement in `begin;`, `commit;` calls
stmt.executeUpdate();
stmt.close();

Option 2:
SQLiteConnection conn = (SQLiteConnection) DriverManager.getConnection("jdbc:sqlite:".concat(databaseFile));
conn.setBusyTimeout(5000);
conn.setAutoCommit(false); // sqlite-jdbc calls `begin;` here

PreparedStatement stmt = conn.prepareStatement("DELETE FROM events WHERE id = ?");
stmt.setInt(1, 10);
stmt.executeUpdate();
stmt.close();
conn.commit(); // my changes are not committed until this is called.

Is it possible to write to a sqlite database without transactions? I am seeing lots of SQLITE_BUSY errors cropping up in my application that has inserts from another process. I believe unless I am misunderstanding something fundamental about sqlite, I can increase speeds and avoid some of the busy errors I see by removing transactions. My database is in WAL mode.

From the SQLite documentation:

No reads or writes occur except within a transaction.

The driver will always start a transaction, so all transactions will be explicit transactions, instead of implicit transactions.

I am seeing lots of SQLITE_BUSY errors cropping up in my application that has inserts from another process. I believe unless I am misunderstanding something fundamental about sqlite, I can increase speeds and avoid some of the busy errors I see by removing transactions. My database is in WAL mode.

You're touching a point that is not directly related to this driver, but more generic to SQLite. There are some good resources you can find about it, like this.

Thank you for the clarification


fix(Checkbox): handle click properly on label

Fixes #3683.

Codecov Report

Merging #3692 into master will not change coverage.
The diff coverage is 100%.

@@           Coverage Diff           @@
##           master    #3692   +/-   ##
=======================================
  Coverage   99.83%   99.83%
=======================================
  Files         175      175
  Lines        3116     3116
=======================================
  Hits         3111     3111
  Misses          5        5

Impacted Files
Coverage Δ

src/modules/Checkbox/Checkbox.js
100% <100%> (ø)
:arrow_up:

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 8f83dad...9b3c2ec. Read the comment docs.

Codecov Report

Merging #3692 into master will not change coverage.
The diff coverage is 100%.

@@           Coverage Diff           @@
##           master    #3692   +/-   ##
=======================================
  Coverage   99.83%   99.83%
=======================================
  Files         175      175
  Lines        3116     3116
=======================================
  Hits         3111     3111
  Misses          5        5

Impacted Files
Coverage Δ

src/modules/Checkbox/Checkbox.js
100% <100%> (ø)
:arrow_up:

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 8f83dad...9b3c2ec. Read the comment docs.


feat(helper): add unmanifested pack tag helpers

Resolves #21

This change is

I'm not clear on this one. A small example would be very helpful.
This sounds a bit like hot reloading in that there's no hash and special handling.
Could we do this with more options to the javascript_pack_tag rather than new helpers?

Review status: 0 of 3 files reviewed at latest revision, 1 unresolved discussion.

lib/webpacker_lite/helper.rb, line 46 at r1 (raw file):

  #   # In production mode:
  #   <%= javascript_pack_tag 'calendar', 'data-turbolinks-track': 'reload' %> # =>
  #   <script src="/public/webpack/production/calendar.js" data-turbolinks-track="reload"></script>

I don't get how you output a non-hashed file in production mode.

Comments from Reviewable

I'm not clear on this one. A small example would be very helpful.

I wrote a detailed explanation in the issue (#21). Did you read that?

Could we do this with more options to the javascript_pack_tag rather than new helpers?

Yes, this is a style thing. We could either have a new method or keep the same method with a boolean flag. Usually, I get yelled at by the guys for doing boolean flags as that's considered a bit of a code smell, but I suppose we could do manifested: false or some such and default it to true? But then we'd have to pick it out of the rested named params which would be annoying.

Review status: 0 of 3 files reviewed at latest revision, 1 unresolved discussion.

lib/webpacker_lite/helper.rb, line 46 at r1 (raw file):
Previously, justin808 (Justin Gordon) wrote…
I don't get how you output a non-hashed file in production mode.

Well, that's easy, just don't tell webpack to do it. I think you mean why would  you? You probably wouldn't since you would have major caching problems. I can remove that part of the documentation, but technically, it is possible.

Comments from Reviewable

@robwise any comments on #20?

@justin808 What do I need to do to get this merged? Switch to a flag?

Closing because you can use the cache option for the manifest plugin to share a manifest between configs. See https://github.com/rails/webpacker/issues/464#issuecomment-313024512


[Refactor] CupertinoSlidingSegmentedControl not compatible with flutter 3.27.0

lib/_ui/components/controls.dart line 63 CupertinoSlidingSegmentedControl
throws an error using flutter latest stable release 3.27.0, no deprecation notice or error on the previous stable 3.24.5
Couldn't infer type parameter 'T'.

Tried to infer 'T' for 'T' which doesn't work:
  Type parameter 'T' is declared to extend 'Object' producing 'Object'.
The type 'T' was inferred from:
  Parameter 'groupValue' declared as     'T?'
                         but argument is 'T'.
  Parameter 'children'   declared as     'Map<T, Widget>'
                         but argument is 'Map<T, Widget>'.

Consider passing explicit type argument(s) to the generic.

@mocodesmo fixed it d32378125d73ef0e73670323fed08c344ea3b31e


Investigate if we can transfer objects in Web without serialization

See https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage transfer argument

fyi @dbaeumer - I have experimented with this in anycode: https://github.com/microsoft/vscode-anycode/commit/16e53ec04893d4416693418db9985603d1ad1d19. The change is quite simple more or less a special message type that can be used to mark transferable data. I see a 10 to 20% speed-up when send file replies

Cool. I will have a look!

Nevermind - my commit wasn't actually doing it... This needs further work and I have undone my changes for now

Reading through the specification I think the only thing we can look into is the following: serialize the JSON RPC data into a uint array and then transfer the array instead of a string. To my understanding the string is really sent where the array would stay in memory.

I read through the spec again and there is only a limited number of object types that can be transferred. For LSP this would mean that we need to invent our own binary format (we could use wit) and transfer the data in arrays. Given that JSON is highly optimized I am not sure that we gain a lot here. I will close this for now. Please ping if I have overlooked something.


manuallyAddFile() Cannot read property 'dontSubstractMaxFiles' of undefined

Vue2-dropzone Version: 2.3.5
Node Version: 6.11.0
NPM Version: 3.10.10
OS: Windows 8

Description:
When I use manuallyAddFile() inside a forEach() to add multiple files, the first one is displayed successfully but the rest are not. And I get this error in the console:
"Uncaught (in promise) TypeError: Cannot read property 'dontSubstractMaxFiles' of undefined"
Steps To Reproduce:
That's my vue method. It's called when the component is mounted.
populate: function () {
          var vue = this;
          axios.get('/get-images')
                .then(function (response) {
                  response.data.forEach(function(image, index) {
                    console.log(image);
                    vue.$refs.myVueDropzone.manuallyAddFile({name: 'filename', size: 2222}, image['tmpPath']);
                  });
                });
        },

HI @DavHanna
Unfortunately this code has got a bit unweildly and poorly documented sorry
   vue.$refs.myVueDropzone.manuallyAddFile({
         name: 'filename', size: 2222
     },
     image['tmpPath'],
     null,
     null,
    {
     dontSubstractMaxFiles: false,
     addToFiles: true
 }
);

That fixed it.
Thank you @rowanwins

Thanks @rowanwins. I bumped into this very issue and your example fixed it 🎉


Push to Pypi

To publish excludarr on pypi we either have to rename the project or publish it under another name. (unless we already have access to the original repo but I don't think that's the case)
Thoughts?
TBH I don't ever really think that publishing on pypi is necessary but maybe someone could like to have it on there + the original was there so idk what's the best option

Maybe we could name it something like py-excludarr? I don't know.
For it to have the same name we would need @haijeploeg either to set up a token, or release the name for us to use

Tbh I'm more keen on renaming it to something like "xcludarr", we could even base the logo on the X itself, or maybe "excludarr-reborn". But idk. Changing to something like "py-excludarr" to me feels like we are creating a library to do something, so I'm not sure.
We could even ditch the idea of publishing on there too, like what's the purpose anyway? I don't think there would be many people pulling it from there anyway, most people either run the docker or run it from source to change stuff.
I think the best option is to just ignore the problem for now and see if someone asks for excludarr to be published there and deal with it later

agree, I dont think there is a practical benefit to publishing it to pypi, and can redirect efforts to improving on the app itself.
so then I'm guessing we can repurpose this https://github.com/excludarr/excludarr/blob/main/.github/workflows/release.yml
to automate tagging of release to github?!

Yea, we could, I'm not a big fan of bumping version at every merge to main, but it's not a big deal.
I personally prefer to manually tag PRs because we could need more than one PR for each feature so it wouldn't be that useful to bump version at each merge IMHO.
But it's more of a personal preference so whatever

Yea, we could, I'm not a big fan of bumping version at every merge to main, but it's not a big deal.
I personally prefer to manually tag PRs because we could need more than one PR for each feature so it wouldn't be that useful to bump version at each merge IMHO.
But it's more of a personal preference so whatever, we should at least make a development branch then, so we merge to development first and when a feature is stabilized we merge to main without removing the branch

I'm fine with manual releases, time can be better spent elsewhere.  Point taken on needing a dev branch, keeping it as simple as required sounds good.


⚠ Bofrost.be has degraded performance

In 8060ea6, Bofrost.be (https://www.bofrost.be) experienced degraded performance:

HTTP code: 200
Response time: 1708 ms

Resolved: Bofrost.be performance has improved in 0429518 after 7 minutes.


Can't display carla information just frontend, using Carla <IP_ADDRESS>

Similar to issue 5 at https://github.com/wx9698/carlaviz/issues/5, except we are using Carla <IP_ADDRESS>. Just like in Issue 5, we navigate to localhost:8083 but still have the "Launch the backend and refresh" issue.
Output is below, noting that we don't have the same error that closes the backend:
Make sure you have launched the carla server.
Launching backend.
2020-08-04 14:56:01 [INFO]     Connecting to Carla Server on localhost:2000...
2020-08-04 14:56:01 [INFO]     Connected to Carla Server, Server version is: 4dc4cb81
WARNING: Version mismatch detected: You are trying to connect to a simulator that might be incompatible with this API
WARNING: Client API version     = 0.9.9
WARNING: Simulator API version  = 4dc4cb81
2020-08-04 14:56:03 [INFO]     Waiting for a drawing client to connect. Listening to port 8089....
2020-08-04 14:56:03 [INFO]     Waiting for a frontend to connect. Listening to port 8081....
Backend launched.
Launching frontend
yarn run v1.22.4
warning package.json: No license field
$ webpack-dev-server --host <IP_ADDRESS> --disable-host-check --env.live --progress --hot --open
10% building 1/1 modules 0 activeℹ ｢wds｣: Project is running at http://<IP_ADDRESS>:8083/
ℹ ｢wds｣: webpack output is served from /
ℹ ｢wds｣: Content not from webpack is served from /home/carla/carlaviz/frontend
ℹ ｢wdm｣: Hash: 24084e845cfb1f730fbb
Version: webpack 4.42.0
Time: 6970ms
Built at: 08/04/2020 2:56:16 PM
                               Asset      Size  Chunks                   Chunk Names
573fe91c6c748074195655e1f0159864.png  7.61 KiB          [emitted]
                           bundle.js  9.36 MiB     app  [emitted]        app
                       bundle.js.map  11.5 MiB     app  [emitted] [dev]  app
Entrypoint app = bundle.js bundle.js.map
[0] multi (webpack)-dev-server/client?http://<IP_ADDRESS>:8083 (webpack)/hot/dev-server.js ./src/app.js 52 bytes {app} [built]
<EMAIL_ADDRESS>2.78 KiB {app} [built]
<EMAIL_ADDRESS>1.01 KiB {app} [built]
<EMAIL_ADDRESS>560 bytes {app} [built]
[./node_modules/react-dom/index.js] 1.33 KiB {app} [built]
[./node_modules/react/index.js] 190 bytes {app} [built]
[./node_modules/streetscape.gl/dist/esm/index.js] 78 bytes {app} [built]
[./node_modules/strip-ansi/index.js] 161 bytes {app} [built]
[./node_modules/webpack-dev-server/client/index.js?http://<IP_ADDRESS>:8083] (webpack)-dev-server/client?http://<IP_ADDRESS>:8083 4.29 KiB {app} [built]
[./node_modules/webpack-dev-server/client/overlay.js] (webpack)-dev-server/client/overlay.js 3.51 KiB {app} [built]
[./node_modules/webpack-dev-server/client/socket.js] (webpack)-dev-server/client/socket.js 1.53 KiB {app} [built]
[./node_modules/webpack-dev-server/client/utils/createSocketUrl.js] (webpack)-dev-server/client/utils/createSocketUrl.js 2.91 KiB {app} [built]
[./node_modules/webpack-dev-server/client/utils/log.js] (webpack)-dev-server/client/utils/log.js 964 bytes {app} [built]
[./node_modules/webpack/hot/dev-server.js] (webpack)/hot/dev-server.js 1.59 KiB {app} [built]
[./src/app.js] 10.6 KiB {app} [built]
    + 1454 hidden modules
ℹ ｢wdm｣: Compiled successfully.
Frontend launched. Please open your browser

I can confirm the version using apt-cache, as follows:
$ apt-cache policy carla-simulator
carla-simulator:
  Installed: <IP_ADDRESS>-1
  Candidate: <IP_ADDRESS>-1
  Version table:
 *** <IP_ADDRESS>-1 500
        500 http://dist.carla.org/carla-0.9.9 all/main amd64 Packages
        100 /var/lib/dpkg/status

Is it possible that this <IP_ADDRESS>-1 is somehow different than <IP_ADDRESS>? Has anyone else had this issue and found a way to fix it? I should also note that the simulator version is listed as 4dc4cb81, which I found strange. If anyone else is having this issue, we may be able to find a solution together here

Hi, it seems that the backend does connect the frontend. Could you provide the command when launching the docker and what is your system os?

Hi, we're on Ubuntu 18.04 using the command docker run -it --network="host" -e CARLAVIZ_HOST_IP=localhost -e CARLA_SERVER_IP=localhost -e CARLA_SERVER_PORT=2000 mjxu96/carlaviz:0.9.9
This also happens when we run it with carlasim/carlaviz:latest

Are you using it in the local machine?

We're running both Carla and the CarlaViz Docker on a remote server, and ssh tunneling the port to our local machines to use CarlaViz in the browser.

Have you tunnelled the 8081 and 8089 ports. They are the ports used for the communications between frontend and backend.
Also, if your remote server has the external ip, you can replace the env CARLAVIZ_HOST_IP's value with your server's ip when launching the docker.
Please let me know if this work for you.

Hi, I've tried again, forwarding ports 8080, 8081, and 8089, but we still have this issue.
Notably, we got it to work one time (when only forwarding ports 8080 and 8081), but we don't know why it worked

That is wired. Have you tried setting the env value when starting the docker?

We've found the issue -- it seems that we need to start Carla before CarlaViz-- starting Carla after CarlaViz leads to this issue! Thank you


"istioctl x describe" reports incorrect ingress port number

istioctl x describe service productpage
reports
...
Exposed on Ingress Gateway http://<IP_ADDRESS>:8080
...

The actual port is 80.  Using IBM Cloud
Istio installed with default profile, daily build latest, and --set values.global.pilotCertProvider=kubernetes

We change this so 8080 is the application port, 80 is the service port. So it should show :80 as you mentioned

@howardjohn The port is suppressed from the output if it is 80.

Closing because https://github.com/istio/istio/pull/22129 fixed it.


Unable to cast object of type SimpleNavTypeSymbol to IDotNetTypeSymbol

Getting this while compiling extension. Any thoughts what might be causing it?
Internal error: System.InvalidCastException: Unable to cast object of type 'Microsoft.Dynamics.Nav.CodeAnalysis.Symbols.SimpleNavTypeSymbol' to type 'Microsoft.Dynamics.Nav.CodeAnalysis.IDotNetTypeSymbol'.
   at Microsoft.Dynamics.Nav.CodeAnalysis.ConversionDotNet.ClassifyByRefConversion(TypeSymbol source, TypeSymbol byRefTarget) in C:\a\459\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Binder\Semantics\Conversions\ConversionDotNet.cs:line 579
   at Microsoft.Dynamics.Nav.CodeAnalysis.OverloadResolution.GetVarArgumentCompatibility(HashSet`1& useSiteDiagnostics, TypeSymbol argType, TypeSymbol parameterType) in C:\a\459\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Binder\Semantics\OverloadResolution\OverloadResolution.cs:line 602
   at Microsoft.Dynamics.Nav.CodeAnalysis.OverloadResolution.CheckArgumentForConversionApplicability(BoundExpression argument, ParameterSymbol parameter, HashSet`1& useSiteDiagnostics) in C:\a\459\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Binder\Semantics\OverloadResolution\OverloadResolution.cs:line 580
   at Microsoft.Dynamics.Nav.CodeAnalysis.OverloadResolution.IsApplicable(EffectiveParameters parameters, AnalyzedArguments arguments, BoundExpression receiverOpt, HashSet`1& useSiteDiagnostics) in C:\a\459\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Binder\Semantics\OverloadResolution\OverloadResolution.cs:line 373
   at Microsoft.Dynamics.Nav.CodeAnalysis.OverloadResolution.IsApplicable[TMember](TMember member, AnalyzedArguments arguments, EffectiveParameters effectiveParameters, BoundExpression receiverOpt, HashSet`1& useSiteDiagnostics) in C:\a\459\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Binder\Semantics\OverloadResolution\OverloadResolution.cs:line 332
   at Microsoft.Dynamics.Nav.CodeAnalysis.Binder.ResolveDefaultMethodGroup(BoundMethodGroup node, AnalyzedArguments analyzedArguments, HashSet`1& useSiteDiagnostics) in C:\a\459\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Binder\Binder_Expressions.cs:line 2155
   at Microsoft.Dynamics.Nav.CodeAnalysis.Binder.ResolveMethodGroup(BoundMethodGroup node, AnalyzedArguments analyzedArguments, HashSet`1& useSiteDiagnostics) in C:\a\459\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Binder\Binder_Expressions.cs:line 2124
   at Microsoft.Dynamics.Nav.CodeAnalysis.Binder.BindMethodGroupInvocation(SyntaxNode syntax, SyntaxNode expression, String methodName, BoundMethodGroup methodGroup, Boolean isStatement, AnalyzedArguments analyzedArguments, DiagnosticBag diagnostics) in C:\a\459\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Binder\Binder_Invocation.cs:line 142
   at Microsoft.Dynamics.Nav.CodeAnalysis.Binder.BindInvocationExpression(SyntaxNode node, SyntaxNode expression, String methodName, BoundExpression boundExpression, Boolean isStatement, Boolean asProperty, AnalyzedArguments analyzedArguments, DiagnosticBag diagnostics) in C:\a\459\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Binder\Binder_Invocation.cs:line 98
   at Microsoft.Dynamics.Nav.CodeAnalysis.Binder.BindInvocationExpression(InvocationExpressionSyntax node, DiagnosticBag diagnostics, Boolean isStatement) in C:\a\459\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Binder\Binder_Invocation.cs:line 31
   at Microsoft.Dynamics.Nav.CodeAnalysis.Binder.BindExpressionStatement(SyntaxNode node, ExpressionSyntax syntax, Boolean allowsAnyExpression, DiagnosticBag diagnostics) in C:\a\459\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Binder\Binder_Statements.cs:line 521
   at Microsoft.Dynamics.Nav.CodeAnalysis.Binder.BindStatement(StatementSyntax node, DiagnosticBag diagnostics) in C:\a\459\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Binder\Binder_Statements.cs:line 83
   at Microsoft.Dynamics.Nav.CodeAnalysis.Binder.BindStatements(SyntaxList`1 syntaxStatements, DiagnosticBag diagnostics, Binder binder) in C:\a\459\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Binder\Binder_Statements.cs:line 53
   at Microsoft.Dynamics.Nav.CodeAnalysis.Binder.BindBlock(BlockSyntax node, DiagnosticBag diagnostics, Binder blockBinder) in C:\a\459\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Binder\Binder_Statements.cs:line 33
   at Microsoft.Dynamics.Nav.CodeAnalysis.Binder.BindStatement(StatementSyntax node, DiagnosticBag diagnostics) in C:\a\459\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Binder\Binder_Statements.cs:line 80
   at Microsoft.Dynamics.Nav.CodeAnalysis.Binder.BindIfStatement(IfStatementSyntax node, DiagnosticBag diagnostics) in C:\a\459\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Binder\Binder_Statements.cs:line 554
   at Microsoft.Dynamics.Nav.CodeAnalysis.Binder.BindStatement(StatementSyntax node, DiagnosticBag diagnostics) in C:\a\459\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Binder\Binder_Statements.cs:line 92
   at Microsoft.Dynamics.Nav.CodeAnalysis.Binder.BindStatements(SyntaxList`1 syntaxStatements, DiagnosticBag diagnostics, Binder binder) in C:\a\459\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Binder\Binder_Statements.cs:line 53
   at Microsoft.Dynamics.Nav.CodeAnalysis.RepeatBinder.BindRepeatParts(DiagnosticBag diagnostics, Binder originalBinder) in C:\a\459\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Binder\RepeatBinder.cs:line 24
   at Microsoft.Dynamics.Nav.CodeAnalysis.Binder.BindStatement(StatementSyntax node, DiagnosticBag diagnostics) in C:\a\459\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Binder\Binder_Statements.cs:line 101
   at Microsoft.Dynamics.Nav.CodeAnalysis.Binder.BindIfStatement(IfStatementSyntax node, DiagnosticBag diagnostics) in C:\a\459\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Binder\Binder_Statements.cs:line 546
   at Microsoft.Dynamics.Nav.CodeAnalysis.Binder.BindStatement(StatementSyntax node, DiagnosticBag diagnostics) in C:\a\459\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Binder\Binder_Statements.cs:line 92
   at Microsoft.Dynamics.Nav.CodeAnalysis.Binder.BindStatements(SyntaxList`1 syntaxStatements, DiagnosticBag diagnostics, Binder binder) in C:\a\459\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Binder\Binder_Statements.cs:line 53
   at Microsoft.Dynamics.Nav.CodeAnalysis.Binder.BindBlock(BlockSyntax node, DiagnosticBag diagnostics, Binder blockBinder) in C:\a\459\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Binder\Binder_Statements.cs:line 33
   at Microsoft.Dynamics.Nav.CodeAnalysis.MethodCompiler.BindMethodBody(MethodSymbol method, DiagnosticBag diagnostics) in C:\a\459\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Compiler\MethodCompiler.cs:line 482
   at Microsoft.Dynamics.Nav.CodeAnalysis.MethodCompiler.CompileMethod(MethodSymbol methodSymbol) in C:\a\459\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Compiler\MethodCompiler.cs:line 404
   at Microsoft.Dynamics.Nav.CodeAnalysis.MethodCompiler.CompileMembers(ContainerSymbol containingType) in C:\a\459\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Compiler\MethodCompiler.cs:line 328
   at Microsoft.Dynamics.Nav.CodeAnalysis.MethodCompiler.CompileObject(ObjectTypeSymbol containingType) in C:\a\459\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Compiler\MethodCompiler.cs:line 218
   at Microsoft.Dynamics.Nav.CodeAnalysis.MethodCompiler.<>c__DisplayClass14_0.<CompileObjectAsTask>b__0() in C:\a\459\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Compiler\MethodCompiler.cs:line 202
   at Microsoft.Dynamics.Nav.CodeAnalysis.Utilities.UICultureUtilities.<>c__DisplayClass5_0.<WithCurrentUICulture>b__0() in C:\a\459\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Utilities\UICultureUtilities.cs:line 152
   at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Dynamics.Nav.CodeAnalysis.MethodCompiler.WaitForWorkers() in C:\a\459\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Compiler\MethodCompiler.cs:line 162
   at Microsoft.Dynamics.Nav.CodeAnalysis.MethodCompiler.CompileMethodBodies(Compilation compilation, ModuleBuilder moduleBeingBuiltOpt, Boolean hasDeclarationErrors, DiagnosticBag diagnostics, Predicate`1 filterOpt, CancellationToken cancellationToken) in C:\a\459\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Compiler\MethodCompiler.cs:line 146
   at Microsoft.Dynamics.Nav.CodeAnalysis.Compilation.GetDiagnostics(CompilationStage stage, Boolean includeEarlierStages, CancellationToken cancellationToken) in C:\a\459\s\source\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\Compilation\Compilation.cs:line 624

Versions:

AL Langauge: 2.0.48254

Best Regards,
Gintautas

Hi @gintuoklis ! Could you try installing the latest-latest extension distributed through Collaborate and let me know if you still see the failure?

I tried it using
Extension language from bcinsider.azurecr.io/bcsandbox latest build. Pull it 6 days ago. There's no newer one. Let me know if I should use extension from different image.

I think that should be good enough. Is there any chance you can find the code causing the issue? It seems to be inside a repeat statement and you are calling a method taking a .NET parameter.

Can you tell me how can i do it? I've been asking this question for so many time and still did not receive clear answer. Is it possible to debug or trace where AL Language compiler is crashing? I see no way to identify an issue when you have thousands of files within an extension.

On the latest version of AL Language you can enable a setting:
"al.editorServicesLogLevel": "Verbose"
This will log detailed information about the compilation process into EditorServices.log file in the AL Language extension folder. You can then inspect that log file to see which application object and which symbol is potentially causing the crash.

Hey @StanislawStempin,
I did as you adviced. Enabled verbose logging, and checked the log file. I see no any additional information that could help me to identify which file compiler is crashing on. It basically gives the same error message as in the output window. Please check the file attached.
EditorServices.log

Hey @gintuoklis,
We have a bug in the logger, so it should have given you more information but unfortunately it doesn't at the moment.
From looking at the StackTrace it seems like you are invoking a .net function and we guess the type incorrectly, and it seems like it might be a Ref parameter.
It is a construct that goes something like:
Procedure
If Block
Repeater Block
If Block
.net Function invocation

Did logger worked before? Perhaps i could use older version of AL where logging functionality works?
Thanks for tip how to the find the problem, but I already went through similar journey on different case and don't want to repeat. It just takes way too much time, and honestly that's not development experience should be. If you want to try it for yourself, I could share code with you guys.

@gintuoklis I thought it didn't work until I discovered that we initialize the loggers when we start-up the VSCode extension, so you need to change the configuration, save the file, and then restart VSCode and after that you should see more information in the log file.

I'm pretty sure, I restarted VSCode multiple times after changing this setting. If you look at the log file I attached, you should be able to see verbose messages. So it seems logging works, but it's not detailed enough. Unless there should be another log messages
30-10-2018 11:28:45 [VERBOSE] - Method "Process" at line 53 of C:\a\459\s\source\Prod\Microsoft.Dynamics.Nav.EditorServices.Protocol\Endpoints\RequestRegistry.cs

    Process:

    al/createPackage

There should have been more messages in there about parsing, binding and what not of objects, but I can't get it to work on the version in the VSCode marketplace either so I unfortunately think you need to wait for the next version to be released.
If you are part of the ReadyToGo program then the docker image contains daily builds of the VSCode extension which you could try with.

hey @thpeder,
Parsing works fine with the latest daily build. It shows information about parsing & binding. But it does not really help. If i understand correctly it's all done in parallel and you cannot tell which file cause the failure. If you would like, i could share the log file. I don't want to upload it here publicly, please let me know how i could do it in private.

Hi @gintuoklis ! Could you compile using the alc with the parallel build disabled and verbose logging enabled? This should help narrow down the problem. You should pass: /loglevel:Verbose /parallel- to the alc

Thanks for the tip @atoader , managed to find the problem using your method.
Had few functions that were passing XmlNode type to function that it's using System.Xml.XmlNode types. Apparently they are not compatible.
Here's the code how you could replicate the issue:
page 50101 TestDummyFunction
{
    var
        XMLDOMgt: Codeunit "XML DOM Management";
    local procedure DummyFunction(var TargetString: Text; var CriteriaXMLNode: XmlNode; var TargetXMLNode: XmlNode)
    begin
        XMLDOMgt.AddElement(TargetXMLNode, 'criteria', TargetString, '', CriteriaXMLNode);
    end;
}

Of course, it's not over yet and it just leads to another problem. Will make another request for it.

I tried compiling the sample and I get the following errors:
Compilation started for project 'ALProject5' containing '1' files at '9:53:26.217'.

c:\Users\altoader\Documents\AL\ALProject5\HelloWorld.al(8,29): error AL0133: Argument 1: cannot convert from 'XmlNode' to 'DotNet "System.Xml.XmlNode"'
c:\Users\altoader\Documents\AL\ALProject5\HelloWorld.al(8,74): error AL0133: Argument 5: cannot convert from 'XmlNode' to 'DotNet "System.Xml.XmlNode"'

Compilation ended at '9:53:26.370'.

Error: The package could not be created.

but with no crash. Can you repro with that code in an new extension?

Your scenario is not officially supported:
From the change log of the extension:
... This means that in the near future you will be able to install the AL Language extension from the Visual Studio Code marketplace and use it to develop solutions for:

Microsoft cloud sandbox
Business Central, April 2018 release
Business Central, Fall 2018 release
And more
Please note that at the moment there are no plans to make this AL Language extension version backwards compatible with Dynamics NAV. For Dynamics NAV development, the traditional method should be used – install the VS Code extension from the ALLanguage.vsix file shipped on the DVD.

A bit more context:
There are two parts to the development process:

Development and compilation locally, in VSCode
Server publishing

No. 1 benefits from the monthly updates of the extension and any fixes we make to the compiler. When you install the extension, you get the latest version of the compiler and extension installed in your VSCode extension folder. This will let you try out the latest features and benefit from the latest bug fixes. The extension does not depend on any NAV dlls and it does not install any other dependencies on your system.
No 2. is the one where things get complicated. When you publish an extension to the server, the whole package gets recompiled with the compiler that is bundled with the server. This means that even if we fix a crash in the AL Language Extension that is released to the marketplace, the fix does not get automatically applied to the compiler that is bundled with your server. That fix comes only through CUs for on-prem or monthly updates for the cloud and only if we get a request through support for fixing the issue.
What abou the "runtime" flag? That helps prevent you from using features that are not available in your targeted environment. For example, if we add a function Foo that is available only from runtime 3.0, and you set your runtime to 2.0, you will get a compile time error saying that you cannot use that function.

thanks @atoader for the explanation. I guess we can close the case then.

Thanks!


Exception thrown when modifying object with Symbol

🐛 Bug Report
I am using immer for state transformation in React, and I have a data object with a Symbol property. However, when modifying this type of data, an exception is thrown.

Link to repro
https://codesandbox.io/s/immer-with-symbol-7n5nhn?file=/src/symbolImmer.ts
or here is a test file
import {produce} from "../src/immer"

describe("change state contain symbol", () => {
	const sym = Symbol("coordinate")

	type Card = { name: string; [sym]?: {streamId: string} }

	type State = { card: Card }

	const state: State = { card: { name: "a", [sym]: {streamId: "1"} } }

	it("will crash when extends object contain symbol", () => {
		const s1 = produce(state, draft => {
			const card = draft.card
			const newCard = produce(card, draftCard => ({...draftCard, name: "b"}))
			draft.card = newCard
		})
		expect(s1.card.name).toBe("b")

		const s2 = produce(s1, draft => {
			const card = draft.card
			const newCard = produce(card, draftCard => {
				// crush here
				return {...draftCard, name: "c"}
			})
			draft.card = newCard
		})

		expect(s2.card.name).toBe("c")
	})
})

To Reproduce
open the codesanbox and you will see the error
Observed behavior
when I change the state again, it throw an error in my console
Expected behavior
it's not error
Environment
We only accept bug reports against the latest Immer version.

Immer version: 9.0.21 (and main branch also)
[x] I filed this report against the latest version of Immer
[x] Occurs with setUseProxies(true)
[x] Occurs with setUseProxies(false) (ES5 only)

Immer uses by default an object reflection that is fast but skips special members like Symbols, getters etc. You can set the flag setUseStrictShallowCopy(true); to get the slower behavior that also picks up Symbols.

Okay, I have decided to avoid using Symbol properties in my project.
However, I tried using setUseStrictShallowCopy(true) in the main branch, but the exception still occurs.
I'm not sure if this is the final solution.


Questions about input and output

Can earthformer be used for multivariate prediction of univariate? For example, my input variable is [T,H,W,5], and my output variable is some other quantity [T,H,W,1]？

Sure. You may want to have a try in our simplest test case to set different values for the input channels and target channels via input_shape and target_shape.


Remove misk web task from misk in favor of native builds

What's a native build?

What's a native build?

We'll be running the relevant npm commands to install web tabs when publishing the artifact. This task current doesn't actually provide anything towards the final artifact (nor does it give true feedback on if tabs can build or not)
I'll also be following up with a travis CI change to build tabs via npm (as a way to prevent regressions).


Update README.md with integrations messaging

Description

Related Issues

Checklist

[ ] Is this code covered by new or existing unit tests or integration tests?
[ ] Did you run make test successfully?
[ ] Do new classes, functions, methods and parameters all have docstrings?
[ ] Were existing docstrings updated, if necessary?
[ ] Was external documentation updated, if necessary?

Additional Notes or Comments

Codecov Report
Patch and project coverage have no change.

Comparison is base (c64259e) 79.65% compared to head (212978c) 79.65%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #685   +/-   ##
=======================================
  Coverage   79.65%   79.65%
=======================================
  Files          79       79
  Lines        4950     4950
=======================================
  Hits         3943     3943
  Misses       1007     1007

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


How can i get the 2D mask

I want to get a 2D mask as depth img, but generating deep is time-consuming. How can i get the 2D mask as the depth img?

has anyone found a solution?


Convert rivine/research/stellar/examples to python

in progress https://github.com/threefoldtech/rivine/tree/feat/stellarpy

Closed in: https://github.com/threefoldtech/rivine/commit/05647c7ad7dd51f1a4ff581f7d17cf0f8fa93d5b


New Ramp gradient editor doesn't have "Fixed" mode option

Describe the bug / 描述你遇到的Bug
Old version of LWGUI used the default gradient editor which has an option to set gradient mode to "Fixed", this is very useful to create cel shading ramp maps.
The new version, while being absolutely amazing, doesn't have this option.
It causes a problem when you try to open a gradient created in older version in LWGUI, it resets all keys to smooth interpolation
Work around is to select all keys, right-click any key and set mode of both tangents to constant. You will get a fixed gradient:

To reproduce

Create a a RampMap in a version of LWGUI with old gradient editor
Update LWGUI
Try to edit the same rampmap

Screenshots / 截图
Old gradient editor with mode set to fixed:

Unity Version / Unity版本
6000.0.24f1
Perhaps it is not something that needs to be fixed, but I thought I will leave it here in case someone else runs into this problem
Thank you for your work on LWGUI!

Details have been added to the documentation


Packaging resources in an extension.

Hey I was hoping to include an executable as part of my VsCode extension but can't see any documentation as to if this is possible.
Is it? and if so do you have some guidance?
Thanks in advance

It should just work, unless you have .vscodeignore rules configured

@mat-mcloughlin did this work in the end?

Yes it did. Thanks


Enforce OOP style of code

You may be thinking why I am insisting OOP style in such a small script. So I start off answering the question
Why OOP ?
One of the reason I am proposing OOP is to keep the code more readable and maintainable, but the most important one is to implement Option parser.
Currently the script does 3 things

Follows 100 followers of the user (optional can be disabled by --no-follow flag)
2, Retweets and Likes the tweet
Retweet with comment (optional can be disabled by --no-comment flag)
Follow the user who made the tweet (optional can be disabled by --no-friendship flag)

Since we intend volunteers to use this as well, we should make everything optional since it is upto the user if he/she wants to follow a particular person or retweet with a comment. We should give the flexibility of usage.
Making the script Object Oriented is the first step towards making the code more modular.
How to implement OOP in this script ?
Just make a class named ReTweeter and move the above 4 things in separate methods. The class will look like
class ReTweeter:
  def __init__(self):
    auth= tweepy.OAuthHandler(consumer_key, consumer_secret)
    auth.set_access_token(access_token, access_token_secret)
    self.api = tweepy.API(auth)

  def follow(self):
    pass

  def retweet(self):
    pass

  def retweet_with_comment(self):
    pass

  def make_friend(self):
    pass

def main():
  retweeeter = ReTweeter()
  retweeter.follow()
  retweeter.retweet()
  ...

Note: You don't have to use the same structure. I am just proposing an initial template

Yeah, please check the OOP branch

I'm good w/ making script modular by using OOP but looks like @ananyo2012 you were not clear on the requirements when you wrote this, I guess by the discussion we had on discord yesterday cleared the requirements.
@Rohithgilla12 @vipulgupta2048 - please refer to the discord discussion as well in case you have any doubts.
So here is what we need to do -

PyConIndia Generic bot -
Let that bot do whatever it is doing right now but change the structure of the code to OOP and make it re-usable as @ananyo2012 suggests.

Volunteer Specific bot -
Since above code would be in OOP so it can be re-used and configured for a specific volunteer to do the following:

A volunteer can set his/her twitter auth credentials
Bot Likes every tweet for @pyconindia[only] twitter handle
Bot retweets every @pyconindia tweet with comment -  "#PyConIndia, #PyConIndia2018, #CFP, #Tickets, #PyCon, #Python"

Note - Use this module for argument parsing.

Okay Sanchit will work on it :)

Is anyone working on this


Crash when Opening Ship Inventory [1.7.10]

If the ship collides with certain blocks when attempting to open the ship inventory (regardless if there is a chest or engine on the boat-airborne or otherwise), the client crashes. This does not seem to happen every time but is pretty frequent. I tried testing on flower and grass/tall grass blocks. When there is no collision, the ship inventory opens without issue and shows the disassemble/align buttons.
Crash Report: http://pastebin.com/uZ8fkdUa
The issue also exists when only Archimedes' Ships Plus and Moving World are installed without other mods, but does not result in a crash report. Rather than closing the client, it kicks me out of the single player world and back to the title screen after the error. It results in the error "A fatal error has occurred, this connection is terminated".
This occurs both in singleplayer and multiplayer. If the ship is partway through a solid block (tried on sand) it also seems to crash if I try to open the ship inventory.
Items tested that resulted in crashes/disconnects most of the time include sugar cane, grass, tall grass, dead bush, sand, spruce plank. When the ship is an entity, it doesn't seem to know when it runs into corners or singular blocks or non solid blocks like plants. The crash only occurs when opening the ship inventory though.

It's an issue that I had thought I had fixed but apparently not, I'll look into it some mode.


Profiles with no profile image are not loading

Expected Behavior
When loading a profile with no profile image, it should load fine.
Actual Behavior
When loading a profile with no profile image, doesn't load properly or at all. It also shows joined date as invalid and no account value. In some cases clicking on other tab doesn't work either.
Steps to Reproduce the Problem

Find a profile with no image by going into comments of a post.
Click on the profile. This will open profile in new window
A loader will show up with no joined date and account value as blank. In some cases, you can't access any other tabs either.

Specifications
Profiles used for testing:
https://steemit.com/@feju
https://steemit.com/@asadxp55
Recording of Issue
https://www.youtube.com/watch?v=UqUU-amUYZM

Version:0.0.5
Device : Samsung S8
System Operating : 8.0.0 Oreo

Hi mightypanda-x , I think it's same with this  [106]https://github.com/Steemia/Steemia/issues/106)

It is different, if u see the video, issue only happens with profiles with no image, other profiles work fine


Updates for GM release of Swift 3

Remove parens for method call to get threads.
NSExceptionName can no longer be created via conversion from String,
so all usage must be converted into explicit constructors.

Hi Joe, first off, thank you for the pull request!  I wanted to apologize that I didn't respond to this earlier.  I only realized today that Github isn't emailing me for events like this.  I think this is out of date, so I'm going to close it w/o a merge.  If you have a chance, please chime in on https://github.com/jmfieldman/Mortar/issues/9 as well!


Accept the cy locale as a web component prop

:tada: This PR is included in version 1.0.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Update free-courses-en.md

What does this PR do?
Add resource(s)
For resources
Youtube
Description
This is a playlist in which people can learn to build an iOS App in 8 days!
Why is this valuable (or not)?
This is pretty useful for those wanting to get into iOS Development
How do we know it's really free?
This is a youtube playlist of tutorials
For book lists, is it a book? For course lists, is it a course? etc.
Checklist:

[x] Read our contributing guidelines.
[x] Search for duplicates.
[x] Include author(s) and platform where appropriate.
[x] Put lists in alphabetical order, correct spacing.
[x] Add needed indications (PDF, access notes, under construction).
[x] Used an informative name for this pull request.

Follow-up

Check the status of GitHub Actions and resolve any reported warnings!

duplicate


calling get before first add_word crashes

There is no root in the trie until add_word is called therefore  trienode_get_next fails its assert.
import ahocorasick
a = ahocorasick.Automaton()
a.get('foo', None)

results in
trienode.c:trienode_get_next:33 - node failed!

Ahh sorry I seem to be running an older version.

@Snucker  It's a bug, unfortunately.


Research: Make backend connectionstatus (top right) more clear & update correctly

Currently there is an icon on the top right which is indicating the connection status:

This currently has some issues:

it doesn't update correctly
the user doesn't know what it means

=> Think about how to make it clear that it is the connection to the backend. Could also be transformed to a status / health icon (maybe for a tooltip menu which displays stuff like app installing etc?)

it doesn't update correctly

You have an idea when this is the case?

the user doesn't know what it means

=> Think about how to make it clear that it is the connection to the backend. Could also be transformed to a status / health icon (maybe for a tooltip menu which displays stuff like app installing etc?)

Maybe let's go for a clearer icon first and expand to something bigger when needed?
Could imagine combining the icon with a label or a tooltip might work already. What do you think?

You have an idea when this is the case?

The object is forwarded as input to the component and not the values. The object doesn't update => no change in the component.

Maybe let's go for a clearer icon first and expand to something bigger when needed?
Could imagine combining the icon with a label or a tooltip might work already. What do you think?

Don't know yet. This is a Research issue after all :)


[bug] Reparenting of nodes can get wrong namespaces when prefixes are reused

If I reuse namespace prefixes for different nodes (such as when I use a blank XML namespace, i.e. xmlns=), I can get the wrong namespace when the node is reparented.
Code that Causes the Error
#! /usr/bin/env ruby

require 'nokogiri'

doc = Nokogiri::XML("<root xmlns=\"urn:something\"><child1 xmlns=\"urn:something_else\"/><child2/></root>")

node = doc.at_xpath("//ns:child2",{"ns" => "urn:something"})
new_parent = doc.at_xpath("//ns:child1",{"ns" => "urn:something_else"})
new_parent.add_child(node)

puts doc.to_xml

Note that this will now output incorrect namespaces on the "child2" node, like the following:
<?xml version="1.0"?>
<root xmlns="urn:something">
  <child1 xmlns="urn:something_else">
    <child2/>
  </child1>
</root>

Note that the "child2" node has now been incorrectly 'moved' into the "urn:something_else" namespace.
A more correct output would be something similar to:
<?xml version="1.0"?>
<root xmlns="urn:something">
  <child1 xmlns="urn:something_else">
    <child2 xmlns="urn:something"/>
  </child1>
</root>

Source of the Behaviour
I've tracked this down to static void relink_namespace(xmlNodePtr reparented) in ext/nokogiri/xml_node.c.
It seems this code doesn't check for nodes above the current node possibly 'squatting' on a namespace, for example:

The node being relinked has an ancestor node that has a matching, 'correct', namespace definition.
The node being relinked also has an ancestor node that has a namespace definition that matches by prefix, but NOT by href.
The node with the with the incorrect definition is not only an ancestor of the node being relinked, it is also a descendent of the node with the 'correct' definition - meaning that traversing up the tree you will hit the node with the incorrect definition first.

Tests and PRs
A test which reproduces this issue an an associated correction are provided in PR #2495.

Thank you for opening this as well as submitting a PR for it!
I want to spend some time understanding the bug report and re-building context around the reparenting code, which has always been complex and tricky to get right. Please give me a day or two! Thanks.

@flavorjones NP!  Thanks for getting back to me.  This is my first major C submission here and understand I might not have gotten everything exactly right - so take as much time as you need.

For whatever it's worth, I think the behavior we should be striving for is described in https://github.com/sparklemotion/nokogiri/issues/1200#issuecomment-279725275
And I think we probably need to make whatever fix we adopt be in v2.0 and call it a breaking change (which it will be for some use cases).


Release @google-cloud/logging-bunyan v0.9.4

This pull request was generated using releasetool.

Release is at https://github.com/googleapis/nodejs-logging-bunyan/releases/tag/v0.9.4


m1n1: 1.2.3 -> 1.2.4

Is there a specific reason this is needed? This version has not made it to the Asahi stable releases yet.

The version in the stable releases has leapfrogged the version here.


Use block to trap INT instead of trap.

I was actually running powder 0.2.x when I noticed ^C caused an Interrupt exception when using powder log and powder app log. When I went to fork and submit a pull request, I noticed that SIGINT handling had already been implemented, but figured I'd send this over anyway. I, of course, understand completely if you decide to ignore this PR as well.
Everything I know about signal handling, I learned from Jessie Storimer. He is has been a tremendous asset as I write more and more Unix-friendly scripts! Hope you find this interesting/helpful! :) Really happy to have powder for managing my pow.
Signal::trap is global. Once it is called, the specified signal is always trapped, regardless of what code follows. Using a block ensures that the signal is only trapped at the point we need the behavior. This has very little impact in executables, because one wouldn't normally load or require this code elsewhere, but it affords us two opportunities:

To avoid having any "infectious" code around, should someone copy/paste it elsewhere (all of the sudden the app prints "\nExiting log..." any time SIGINT is received).
Allows us to provide an exit code that will play well with other shell scripts that might sniff for exit codes.

More info on exit codes: http://tldp.org/LDP/abs/html/exitcodes.html

Sorry for just returning to this now, I like the idea of the change and for the reasons for it. I particularly like the detail of the 130 exit code.
I'm going to merge this together with my original work in #105 to reduce duplication. Thanks!

Just cleaning up my old PRs. Thanks, everyone!


Convert colors from srgb to linear srgb automatically

As per this Discord conversation and https://github.com/bevyengine/bevy/issues/419#issuecomment-691532199, assume people are providing raw color values in the non-linear srgb colorspace.  Bevy should then convert the provided colors to linear srgb for internal use, for example in the constructors in bevy_render/src/color.rs), and automatically convert the colors to linear srgb when it makes sense under the hood.
We could have constructors for both non-linear and linear sources as long as we document them wherever there could be ambiguity.
Workaround
Right now this can be worked around by manually converting the colors to linear srgb colorspace before using them with the engine like this:
// # Cargo.toml
// [dependencies]
// palette = "0.5.0"

use palette::Srgb;
use bevy::prelude::Color;

fn some_function() {
    // (0.592, 0.337, 0.157) is a dark brown in the non-linear srgb colorspace
    // Use `palette` to convert from non-linear to linear
    let color_intermediate = Srgb::new(0.592, 0.337, 0.157).into_linear();
    // Convert to Bevy's `Color` struct
    let color_linear = Color::rgb(color_intermediate.red, color_intermediate.green, color_intermediate.blue) ;
    // Now use `color_linear` with Bevy
}

Here's some helper workaround functions I made for my little project to make things more ergonomic:
use bevy::prelude::Color;
use palette::Srgb;

/// Take a color in non-linear srgb and convert it to the linear srgb format Bevy currently needs
pub fn color_from_f32(r: f32, g: f32, b: f32) -> Color {
    let l = Srgb::new(r, g, b).into_linear();
    Color::rgb(l.red, l.green, l.blue)
}

/// Take a color in non-linear srgb and convert it to the linear srgb format Bevy currently needs
pub fn color_from_u8(r: u8, g: u8, b: u8) -> Color {
    color_from_f32(r as f32 / 255.0, g as f32 / 255.0, b as f32 / 255.0)
}

I would say we make the default color constructors sRGB aware, and offer additonal linear color constructors.
I'm not sure on adding a palette dependency, as this would mean +10k lines of addtional dependencies. The features it offers don't come across as something you need in every day game-dev, at least from my experience. 🤔

The formulas for linear to sRGB and vice-versa aren't much code. A full dependency on palette isn't needed.
Here's an (untested) transcription of the formulas from the Wikipedia article about sRGB:
fn linear_to_srgb(u: f32) -> f32 {
    if u <= 0.0031308 {
        12.92 * u
    } else {
        1.055 * f32::powf(u,0.416666) - 0.055
    }
}

fn srgb_to_linear(u: f32) -> f32 {
    if u <= 0.04045 {
        u / 12.92
    } else {
        f32::powf((u + 0.055) / 1.055, 2.4)
    }
}

I agree that the needed formula is simple enough to not warrant a dependency on an external crate.
Here follows an example solution with a macro (using the same formula from wikipedia). I like this solution because the needed code change is very clear and minimal.
use bevy::prelude::*;
use bevy::render::pass::ClearColor;

macro_rules! color_rgb {
    ( $( $x:expr ),* ) => {
        Color::rgb( $(
            // Without converting srgb to linear
            //$x
            // With converting srgb to linear
            if $x <= 0.04045 {
                $x / 12.92
            } else {
                ((($x as f32) + 0.055) / 1.055).powf(2.4)
            }
        ),* )
    };
}

fn main() {
    App::build()
        .add_default_plugins()
        //.add_resource(ClearColor(Color::rgb(0.83, 0.474, 0.206)))
        .add_resource(ClearColor(color_rgb!(0.83, 0.474, 0.206)))
        .run();
}

Oh good, to be clear I didn't want an additional dependency -- but I also didn't want to figure out the math myself when I was tired. 😄  I'm glad the math ended up being so simple.

I found one possible problem with my solution above. Using GIMP colorpicker on the resulting color gives me the equivalent of 0.831, 0.475, 0.208, with differ slightly from the values in the code: 0.83, 0.474, 0.206.
Maybe this is a precision/rounding problem? Or maybe hardware specific? For reference I'm using an Nvidia graphics card in Linux.

I think we can close this out now that #616 landed

As per this Discord conversation and #419 (comment), assume people are providing raw color values in the non-linear srgb colorspace. Bevy should then convert the provided colors to linear srgb for internal use, for example in the constructors in bevy_render/src/color.rs), and automatically convert the colors to linear srgb when it makes sense under the hood.
We could have constructors for both non-linear and linear sources as long as we document them wherever there could be ambiguity.
Workaround
Right now this can be worked around by manually converting the colors to linear srgb colorspace before using them with the engine like this:
// # Cargo.toml
// [dependencies]
// palette = "0.5.0"

use palette::Srgb;
use bevy::prelude::Color;

fn some_function() {
    // (0.592, 0.337, 0.157) is a dark brown in the non-linear srgb colorspace
    // Use `palette` to convert from non-linear to linear
    let color_intermediate = Srgb::new(0.592, 0.337, 0.157).into_linear();
    // Convert to Bevy's `Color` struct
    let color_linear = Color::rgb(color_intermediate.red, color_intermediate.green, color_intermediate.blue) ;
    // Now use [jamesmichaeltate1/mikeytate](url)
}


JSON serialization with custom json encoder

Hi there,
I have a Pydantic class that inherits another Pydantic class that allows for custom handling of function serialization:
class ConfigModel(BaseModel):
    class Config:
        extra = Extra.forbid
        use_enum_values = True
        json_encoders = {
            Callable: lambda fn: ".".join(
                [fn.__module__, fn.__name__]
            ),
            FunctionType: lambda fn: ".".join(
                [fn.__module__, fn.__name__]
            ),
        }

class TextConfig(ConfigModel):
    symbols: Symbols = Field(default_factory=Symbols)
    cleaners: List[Callable] = [lower, collapse_whitespace, nfc_normalize]

    def __init__(self, **data) -> None:
        """Custom init to process cleaners"""
        with contextlib.suppress(KeyError):
            cleaners = data["cleaners"]
            for i, c in enumerate(cleaners):
                cleaners[i] = string_to_callable(c)
        super().__init__(**data)

With this configuration, I can do the following:
>>> tc = TextConfig()
>>> tc.json()
'{"symbols": {"silence": ["<SIL>"], "pad": "_", "punctuation": "-\';:,.!?\\u00a1\\u00bf\\u2014\\u2026\\"\\u00ab\\u00bb\\u201c\\u201d "}, "cleaners": ["smts.utils.lower", "smts.utils.collapse_whitespace", "smts.utils.nfc_normalize"]}'

But when I try to autodoc TextConfig, I get the following:
Exception occurred:
  File "pydantic/json.py", line 90, in pydantic.json.pydantic_encoder
TypeError: Object of type 'function' is not JSON serializable
The full traceback has been saved in /home/aip000/aip000/tmp/sphinx-err-u13_waob.log, if you want to report the issue to the developers.

There are ways to ignore this seemingly, but how can I get autodoc_pydantic to just use the models json serialization?

Hi @roedoejet,
thanks for reporting this bug! I agree, autodoc_pydantic should be able to use custom json encoders for generating the schema JSON.
As you've pointed out, it's possible to ignore it which should serve as a workaround in the meantime.
At moment, I'm short on time and won't be able to provide a quick fix. However, I'm more than happy to help with code review and guidance if you want to provide a PR.


Add commands list in readme

I think we should add a table of available commands in readme so that anyone suggesting a new command doesnt suggest a duplicate
also it will be good to keep track of the commands

Seems like a good Idea

and i want to do this one

Sure thing!


Create a newer DirectX Context than DirectX9

To be able to debug with Nsight, it would be great if the created DirectX - Context is at least a DirectX11 Context. Otherwise Nsight is not able to help with the debugging.

I've concluded that is this infeasible as WPF uses DirectX 9 internally and trying to get a DirectX11 context running in tandem with that is either going to go nowhere or be way to much effort.
If anyone wants to try to implement that they are free to do so, but I've already wasted time trying to get thing to happen without luck. But if someone knows something I don't then I'm all ears.


[BUG] Incorrect iter_reverse function for range

Bug Description
The iter_reverse function for range seems to only work for step = 1.
https://github.com/NVIDIA/warp/blob/3b00f16a3e2a96415625eeb22139c8476e4170fe/warp/native/range.h#L96-L107
I think it needs to be something like the following? (Not thoroughly tested)
    rev.start = r.start + (r.end - r.start - sign(r.step)) / r.step * r.step;
    rev.end = rev.start - r.end + r.start;

System Information
No response

Hi @fbxiang, thank you for reporting this issue and apologies for any inconvenience caused!
Your proposed fix is correct and we've prepared a MR internally to address it.

It's been merged as part of commit c0dbdf9 and will be part of the next release of Warp, thanks again!


clFFT Cmake not able to find OpenCL_INCLUDE_DIRS

Hello I tried to build the clFFT library from the sources however I encountered a Problem as shown in the attached snapshot  "clfft_cmake"
I tried to set the path env but still Cmake could not identify the opencl includes.
I have installed a opencl1.2 Version which Comes as a package with the Intel Media Server Studio.
Kindly let me know a Workaround.

Its a cmake thing that you need to figure out on your platform, try searching online/forums; this is not library related.


Black screen when importing pymunk

When I import pymunk in my game, it showed the black screen, and this is the traceback:
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/pymunk/_chipmunk_cffi.py", line 3, in <module>
    import _cffi_backend  # type: ignore # for PyInstaller, py2exe and other bundlers
    ^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named '_cffi_backend'

try adding that to top of your main
# /// script
# dependencies = [
#  "pygame-ce",
#  "cffi",
#  "pymunk",
# ]
# ///
import cffi
import pymunk


In the default dark mode, the "Class Index" table style uses a hard to read background color.

Hey there, thanks for making this so my documentation doesn't look like it was published in the 90s. I've noticed a problem with the default dark theme where the class index uses a super white background color on every other row of the list:

I think it would be much easier to read if it used a gray background instead of the white like here:

The live page where I'm seeing this issue is here if that helps: https://apeira.github.io/Torch/classes.html

Thanks for reporting! I will fix this in the next release.

Pls resolve if release v1.3.0 fixes this for you.

Confirmed fixed, thanks for the update.


init commit of ansible playbooks

This PR is dependent on the following other PRs that should be merged first

https://github.com/integr8ly/grafana-operator/pull/101
https://github.com/integr8ly/grafana-operator/pull/102

A start at adding Ansible playbooks for deploying and maintaining the operator.

That looks awesome, thanks! Ansible might also be a good solution for #90 where the user hit problem because the namespace is currently hardcoded in the rbac files. It would be good if the ansible scripts allowed to choose the namespace in which to install Grafana and also make sure that the roles and cluster roles are set up to wirk with this namespace.
I can test this against OpenShift 4 and vanilla Kubernetes once i'm back at work on January 10th.

@pb82 the Ansible proposed here already designed to take namespace as a parameter and allow cluster admins to run their bit and project self provisioniers to run their bit with all the correct RBAC. Let me know if the doc needs any work after you go through it.

Fixed the spelling issue.
Fixed an idempotency issue. Before if you supplied any of the operator args every time the playbook ran it would re-create the operator and then re-create the args because the operator.yaml specified args: [] but by just removing that line the merge doesn't try to overwrite the args which means we can still have operator.yaml work stand alone and idempotently with the ansible code.

added another commit to this PR which adds a playbook for exposing openshift-monitoring prometheus data so that an external Grafana (such as the one deployed by this operator) can access that data. I know this isn't strictly a grafana thing, and is specific to OpenShift but I saw there was a couple other openshift specific things in this repo and it would seem a common enough use case of this operator that I thought it belonged here as there doesn't seem any worthy place on the internet to put it. If you want it somewhere else let me know.

@pb82 now a good time to review this?

@itewk Yes, i'm planning to get this verified and merged this week.

@pb82 sweeeeet. let me know if you need anything.


Repo sync for protected CLA branch

The pull request is created from master637406469746575846 to master to fix git push error for protected CLA branch

@cmcclister : Thanks for your contribution! The author(s) have been notified to review your proposed change.


Make 'delete_hosted_service' async

As https://msdn.microsoft.com/en-us/library/azure/gg441305.aspx says, delete_hosted_service should be async.
I came up with this when I saw in our logs:
e92f0d00-amegianeg: Terminating...
e92f0d00-amegianeg: Terminating deployment: tutum-e92f0d00
e92f0d00-amegianeg: Termination of deployment is: InProgress
e92f0d00-amegianeg: Termination of deployment is: InProgress
e92f0d00-amegianeg: Termination of deployment is: Succeeded
e92f0d00-amegianeg: Terminating cloud service: tutum-e92f0d00
e92f0d00-amegianeg: Deleting disk: tutum-e92f0d00-tutum-e92f0d00-0-201505061921270606
e92f0d00-amegianeg: Disk tutum-e92f0d00-tutum-e92f0d00-0-201505061921270606 cannot be deleted yet. Waiting...
e92f0d00-amegianeg: Disk tutum-e92f0d00-tutum-e92f0d00-0-201505061921270606 cannot be deleted yet. Waiting...
e92f0d00-amegianeg: Disk tutum-e92f0d00-tutum-e92f0d00-0-201505061921270606 cannot be deleted yet. Waiting...
e92f0d00-amegianeg: Disk tutum-e92f0d00-tutum-e92f0d00-0-201505061921270606 cannot be deleted yet. Waiting...
e92f0d00-amegianeg: Disk tutum-e92f0d00-tutum-e92f0d00-0-201505061921270606 cannot be deleted yet. Waiting...
e92f0d00-amegianeg: Disk tutum-e92f0d00-tutum-e92f0d00-0-201505061921270606 cannot be deleted yet. Waiting...
e92f0d00-amegianeg: Disk tutum-e92f0d00-tutum-e92f0d00-0-201505061921270606 cannot be deleted yet. Waiting...
e92f0d00-amegianeg: Disk tutum-e92f0d00-tutum-e92f0d00-0-201505061921270606 cannot be deleted yet. Waiting...
e92f0d00-amegianeg: Disk tutum-e92f0d00-tutum-e92f0d00-0-201505061921270606 cannot be deleted yet. Waiting...
ERROR: e92f0d00-amegianeg: Azure returned an error: Unknown error (Bad Request)
<Error xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">BadRequest<Message>A disk with name tutum-e92f0d00-tutum-e92f0d00-0-201505061921270606 is currently in use by virtual machine tutum-e92f0d00 running within hosted service tutum-e92f0d00, deployment tutum-e92f0d00.</Message></Error>

The deployment was successfully terminated, but the disk could not be deleted because of the hosted service.

Thanks!  This is actually part of this other pull request:
https://github.com/Azure/azure-sdk-for-python/pull/353
I've been running tests against it in the past couple of days, and should be able to merge it very soon.  I added the necessary changes to the tests to wait for create/delete cloud service to complete.

Thank you!


⚠ Bofrost.fr has degraded performance

In b9851c4, Bofrost.fr (https://www.bofrost.fr) experienced degraded performance:

HTTP code: 200
Response time: 1343 ms

Resolved: Bofrost.fr performance has improved in a420817 after 14 minutes.


feature request: include site change data

Good afternoon!
Just some thoughts after using this for a bit. If it is possible, it would be nice to have other pump data included such as cartridge replacements, and fill cannula. With "fill cannula" a nice option would be have some sort of flag that allows that step to populate the site change log entry in NightScout, something like:
--site-change-when-fill-cannula
Ha, maybe that's a little wordy, just a thought though.
Battery level would be awesome too, I'm just not sure how much data is out there that can be pulled in from TConnect, so the "feature request" is just blind, more of a "wish list" I suppose.
Thanks!

Great ideas. I've created a structure of "synchronization features" which can be enabled or disabled by the user, which should allow us to iterate on adding in new data which can be synced to Nightscout without impacting existing users.
Cannula/cartridge data should definitely be possible -- I am hoping to work on this soon. I don't think battery is, at least as far as I know. Battery stats is trending more in the land of features which the community would likely need to build its own Android app that communicates with the pump with in order to extract -- e.g., we have xDrip which is an open-source implementation of the Dexcom android app (and in fact predates it!), this would be an open-source implementation of the Tandem app.

Very cool! I appreciate the work you've put into this, it has been very useful in the week or 2 that I've been using it so far!

@t1diotac Hot off the presses -- please take a look at the new PUMP_EVENTS feature!
It can detect the following types of pump events:

Site/Cartridge Change (occurs for both a site change and a cartridge change)
Empty Cartridge/Pump Shutdown (from my investigation, occurs either when the cartridge runs out of insulin OR you hard-shut off the pump)
User Suspended (occurs when you manually disable insulin delivery)
Exercise Mode
Sleep Mode
AutoBolus and CarbOnly events -- I'm not entirely sure what these do, but they exist as event types in tconnect

To try this out, update to the latest version of tconnectsync and enable PUMP_EVENTS using the --features flag. The feature options default to --features BASAL BOLUS IOB, so if you want to add pump events to what is already being synchronized you would run with --features BASAL BOLUS IOB PUMP_EVENTS.

@jwoglom : Great work on this!  I tried to use the PUMP_EVENTS feature but got an error:
tconnectsync: error: argument --features: invalid choice: 'PUMP_EVENTS' (choose from 'BASAL', 'BOLUS', 'IOB')
Is there something I need to do?  I'm running version 0.5.
Thanks so much!

@rehudson sounds like you just need to upgrade to the latest version which is 0.6

This works like a champ for me in the latest version! Very much appreciated!


Implement date_trunc() function

Note: migrated from original JIRA: https://issues.apache.org/jira/browse/ARROW-12391
Implement the date_trunc function, as described in this PostGres manual:
[https://www.postgresql.org/docs/current/functions-datetime.html#FUNCTIONS-DATETIME-TRUNC]

This would allow for the following use cases to be solved:

casting of timestamps to other resolutions, such as millis and micros
rounding dates/timestamps

It also allows the user to explicitly allow the truncation of timestamp precision.

Looks like this was implemented in e5d147178ed64bb4b60a1b7fbf5ee6ad209a7368
datafusion/src/physical_plan/datetime_expressions.rs:311
:)

Agreed :)

Thanks @jwdeitch !