Update opam config file

I propose to add conf-graphviz as a post dependency to frama-c to unify dependencies over OSes.

Patches already incorporated (whenever possible), I'm closing this issue since it is outdated.


Dawn 3 Basic Account Creation Fails

TLDR; Using eosio as the creator account allows me to create a user though i'm receiving an error after every transaction
Fresh build from source on Ubuntu 16.  I'm trying to do a basic account creations but there's a problem with the key permissions.  I've followed every guide I can find but nothing is working.
config.ini contains producer-name and private/public keys.
producer-name = inita
private-key = ["EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV","5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3"]

Create default wallet.
user@userbox:~/src/eos/build/programs/cleos$ ./cleos wallet create
Creating wallet: default
Save password to use in the future to unlock this wallet.
Without password imported keys will not be retrievable.
"PW5JqhUMgrounYXjuzUAy6cLWoVDWj1HpSqf72B5MfiiZ992ekAkc"

Wallet contains private and public key from config.ini
user@userbox:~/src/eos/build/programs/cleos$ ./cleos wallet keys
[[
    "EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
    "5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3"
  ]
]

Create two keys.
user@userbox:~/src/eos/build/programs/cleos$ ./cleos create key
Private key: 5JjmzgBmTWDf2887JVNaX5T5LpJ2edm6oHJ6xFJ6KDxtpqyUn8J
Public key: EOS5KghxrybYZGHhSBgCAK7QMY3akBwphdUq9kMDZ7xQBVHun4a11
user@userbox:~/src/eos/build/programs/cleos$ ./cleos create key
Private key: 5JjwxoGxx32rZfbJHZKshGK5aii8ezSJsMyhWy36fsyQGDiB3Sv
Public key: EOS7LFctsWKomrkQGAWJCmgtFy87P4QMGy4689bdTHC2oHRtHhzLu

Import keys.  All keys should be accessible from wallet.
user@userbox:~/src/eos/build/programs/cleos$ ./cleos wallet import 5JjmzgBmTWDf2887JVNaX5T5LpJ2edm6oHJ6xFJ6KDxtpqyUn8J
imported private key for: EOS5KghxrybYZGHhSBgCAK7QMY3akBwphdUq9kMDZ7xQBVHun4a11
user@userbox:~/src/eos/build/programs/cleos$ ./cleos wallet import 5JjwxoGxx32rZfbJHZKshGK5aii8ezSJsMyhWy36fsyQGDiB3Sv
imported private key for: EOS7LFctsWKomrkQGAWJCmgtFy87P4QMGy4689bdTHC2oHRtHhzLu
user@userbox:~/src/eos/build/programs/cleos$ ./cleos wallet keys
[[
    "EOS5KghxrybYZGHhSBgCAK7QMY3akBwphdUq9kMDZ7xQBVHun4a11",
    "5JjmzgBmTWDf2887JVNaX5T5LpJ2edm6oHJ6xFJ6KDxtpqyUn8J"
  ],[
    "EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
    "5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3"
  ],[
    "EOS7LFctsWKomrkQGAWJCmgtFy87P4QMGy4689bdTHC2oHRtHhzLu",
    "5JjwxoGxx32rZfbJHZKshGK5aii8ezSJsMyhWy36fsyQGDiB3Sv"
  ]
]

Every possible permutation of public key combinations fails.
user@userbox:~/src/eos/build/programs/cleos$ ./cleos create account inita user EOS5KghxrybYZGHhSBgCAK7QMY3akBwphdUq9kMDZ7xQBVHun4a11 EOS7LFctsWKomrkQGAWJCmgtFy87P4QMGy4689bdTHC2oHRtHhzLu
Error 3030002: signatures do not satisfy declared authorizations
Ensure that you have the related private keys inside your wallet and you wallet is unlocked.
Error Details:
transaction declares authority '{"actor":"inita","permission":"active"}', but does not have signatures for it.
user@userbox:~/src/eos/build/programs/cleos$ ./cleos create account inita user EOS7LFctsWKomrkQGAWJCmgtFy87P4QMGy4689bdTHC2oHRtHhzLu EOS5KghxrybYZGHhSBgCAK7QMY3akBwphdUq9kMDZ7xQBVHun4a11
Error 3030002: signatures do not satisfy declared authorizations
Ensure that you have the related private keys inside your wallet and you wallet is unlocked.
Error Details:
transaction declares authority '{"actor":"inita","permission":"active"}', but does not have signatures for it.
user@userbox:~/src/eos/build/programs/cleos$ ./cleos create account inita user EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV EOS7LFctsWKomrkQGAWJCmgtFy87P4QMGy4689bdTHC2oHRtHhzLu
Error 3030002: signatures do not satisfy declared authorizations
Ensure that you have the related private keys inside your wallet and you wallet is unlocked.
Error Details:
transaction declares authority '{"actor":"inita","permission":"active"}', but does not have signatures for it.
user@userbox:~/src/eos/build/programs/cleos$ ./cleos create account inita user EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV EOS5KghxrybYZGHhSBgCAK7QMY3akBwphdUq9kMDZ7xQBVHun4a11
Error 3030002: signatures do not satisfy declared authorizations
Ensure that you have the related private keys inside your wallet and you wallet is unlocked.
Error Details:
transaction declares authority '{"actor":"inita","permission":"active"}', but does not have signatures for it.
user@userbox:~/src/eos/build/programs/cleos$ ./cleos create account inita user EOS5KghxrybYZGHhSBgCAK7QMY3akBwphdUq9kMDZ7xQBVHun4a11 EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV
Error 3030002: signatures do not satisfy declared authorizations
Ensure that you have the related private keys inside your wallet and you wallet is unlocked.
Error Details:
transaction declares authority '{"actor":"inita","permission":"active"}', but does not have signatures for it.
user@userbox:~/src/eos/build/programs/cleos$ ./cleos create account inita user EOS7LFctsWKomrkQGAWJCmgtFy87P4QMGy4689bdTHC2oHRtHhzLu EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV
Error 3030002: signatures do not satisfy declared authorizations
Ensure that you have the related private keys inside your wallet and you wallet is unlocked.
Error Details:
transaction declares authority '{"actor":"inita","permission":"active"}', but does not have signatures for it.

UPDATE
I started from scratch and didn't specify a producer name and used eosio as my owner account.  Now i get a different error.
user@userbox:~/src/eos/build/programs/cleos$ ./cleos create account eosio user EOS5LK1Hgv9Jujg6VGwvzfpWRwwn68zTanB7m2SBM2yzP35G4hKkK EOS7v2H6hg2CM52vPc6wGwuYWhL6AfuobkUHP6wsbibwdQ3JU7qNV
1871781ms thread-0   main.cpp:1158                 main                 ] Failed with error: Assert Exception (10)
itr != structs.end(): Unknown struct
Failed to serialize type

The account seems to have been created.
user@userbox:~/src/eos/build/programs/cleos$ ./cleos get account user
{
  "account_name": "user",
  "permissions": [{
      "perm_name": "active",
      "parent": "owner",
      "required_auth": {
        "threshold": 1,
        "keys": [{
            "key": "EOS7v2H6hg2CM52vPc6wGwuYWhL6AfuobkUHP6wsbibwdQ3JU7qNV",
            "weight": 1
          }
        ],
        "accounts": []
      }
    },{
      "perm_name": "owner",
      "parent": "",
      "required_auth": {
        "threshold": 1,
        "keys": [{
            "key": "EOS5LK1Hgv9Jujg6VGwvzfpWRwwn68zTanB7m2SBM2yzP35G4hKkK",
            "weight": 1
          }
        ],
        "accounts": []
      }
    }
  ]
}

Dawn 4 is producing no errors so I'm closing this issue.
Keep being awesome!


Make testRun.sh a CI test

Now that we have basic mocha infra, we should probably move testRun.sh, which runs in the appveryor.yml to be an actual mocha test.
The nontriviality here is that it might require GL on CI to do this boot, so it might not work out of the box on Travis CI.

Cc @ChrisEddy


First test documentation

Add the new project structure, and first version of the documentation

Great job Diego!


Error message on receipt page

Description
What happens if a user tries to enter an URL for an instance of a receipt page when they are not logged in or don't have correct rights to see the receipt?
Is this a potential problem? If so what type of scenarios are likely to happen?
Analysis
When trying to access the receipt of an instance that doesn't exists the receipt page will appear and the content seem to be loading..

Tasks

[ ] Verify that this issue meets DoP (remove unused text, add missing text/parameters/labels, verify tasks).

Specification tasks

[ ] Is this a case we should look into
[ ] Specify/design error message
[ ] Test design / decide test need

Development tasks

[ ] Documentation (if relevant)
[ ] Manual test (if needed)
[ ] Automated test (if needed)

@andrealouisestanderen testa du disse casene?


Shadow Ban detection

I figured someone would have put this in "issues" but I can't seem to find this.. so if this is a duplicate feel free to close :)
Since I have personally been shadow banned, Im realizing some of my other accounts could be also. It would be nice to have some kind of date stored in the accounts of the last time they found a rare, or something like this so that way we can have a good idea when an account has been shadow banned.

Or at the very least would anyone be willing to tell me how to create a log to a file with the worker username and the Pokemon ID that the worker finds? I don't care how unrefined it is I just need a way to find my shadow banned accounts and switch them out.


feat: add genesis hash to injected accounts

DApp will use this to determine which network can the account be used with. This is especially important in this case, as accounts are always restricted to one network.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

Hey. Thanks for taking the time to contribute.
There is an issue I see the genesisHash will be part of the account only in case if is provided by config and only that hash.
Is that intentional? If not what is intention?

Hey. Thanks for taking the time to contribute.
There is an issue I see the genesisHash will be part of the account only in case if is provided by config and only that hash. Is that intentional? If not what is intention?

Hey @BeroBurny, for example, if the account has the "Kusama genesis hash" attached to it, DApp will know that the account can only sign Kusama transaction.

Hey. Thanks for taking the time to contribute.
There is an issue I see the genesisHash will be part of the account only in case if is provided by config and only that hash. Is that intentional? If not what is intention?

Hey @BeroBurny, for example, if the account has the "Kusama genesis hash" attached to it, DApp will know that the account can only sign Kusama transaction. Which is true for this snap because enablePolkadotSnap accept a config of 1 network only.

That will work if the user provide config, but in case there is no config provided value will be undefined as is not sent from snap to client (adapter)

Thanks for the review, I have made genesisHash mandatory for custom network 🙏.

Thanks for the review, I have made genesisHash mandatory for custom network 🙏.

My bad seems I miscommunicated the issue.
Let us begin with the basics, snap is like a microservice. The browser is calling an extension and we get data back.

User => Browser <=> Snap

So the adapter lives in the browser and snaps inside MetaMask.
With the current setup browser never gets configured from snap, as there is no method to retrieve it. So adding data to config in a snap is not going to do anything on the adapter part and the browser in this case only gets the user address but no information about the genesis.
So current solution to that falls on top of my head.
a) Implement retrieving config method
b) Include genesis hash in response to getAddress
c) Open the issue and hope someone solves the problem

Alright, thanks for the clarification, would you say option a make the most sense here? @BeroBurny


API to build advertising data

Right now, to build data packets, we have to do something like:
    #[rustfmt::skip]
    let adv_data = &[
        0x02, 0x01, raw::BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE as u8,
        0x03, 0x03, 0x09, 0x18,
        0x0a, 0x09, b'H', b'e', b'l', b'l', b'o', b'R', b'T', b'I', b'C',
    ];
    #[rustfmt::skip]
    let scan_data = &[
        0x03, 0x03, 0x09, 0x18,
    ];

We need an API to build those array without having to fiddle with bytes.
I'd like to help, but I could not find the reference documentation for those data packet.
I guessed that adv_data is an array of length(1byte), type(1byte), data(length - 1 bytes). But I am not very familiar with BLE and found dozen of different documentation with no real reference for this.

I'm trying to gather as much reference as possible:

List of GATT services, which are two bytes (little endian, so reversed) used with type 0x03 https://www.bluetooth.com/specifications/gatt/services/

I'd like to tackle this issue, but I need to know a few things:

Is a builder pattern OK, or do you prefer a plain rust struct that will be transformed into data?
what AD types and GATT services  should we support with the "simple API"
GATT services are also used when creating gatt server, so I guess it would be better to have their definition at only one place

A good starting point would be what the Nordic SDK supports:
https://github.com/akiles/nrf5_sdk/blob/master/components/ble/common/ble_advdata.h#L146
https://github.com/akiles/nrf5_sdk/blob/master/components/ble/common/ble_advdata.c#L509
Also, Rubble already has support for this in Rust
https://jonas-schievink.github.io/rubble/rubble/link/ad_structure/enum.AdStructure.html
I'd prefer a solution like Rubble's where you fill a struct with whatever fields and then you encode it to bytes. There are not that many fields to justify a builder IMO. Also using a builder opens interesting questions, for example: what if you set the UUID list 2 times? Does it use the last one? Do they get concatenated? If it's a regular Rust struct you don't have these issues.

Yeah I guess a builder isn't justified. Especially if we don't use builders elsewhere (like for config). We have to be consistent.
I think this library is low level enough to use struct/enum directly.
I will use nordic SDK as starting point and use a rubble like implementation.

I started working on it, and I came up with that:
pub enum DeviceName<'a> {
    Short(&'a str),
    Long(&'a str),
}

// maybe implement something like rubble name()
pub struct CompanyId(u16);

pub struct ManufacturerData<'a> {
    company_identifier: CompanyId,
    data: &'a [u8],
}

pub struct RawData<'a> (u8, &'a [u8]);

pub struct ServiceData<'a> (u16, &'a [u8]);

pub struct Flags(u8);

pub enum Uuid {
    U16(u16),
    U32(u32),
    U128([u8;4]),
}

pub struct AdvertData<'a> {
    flags: Flags,
    name: Option<&'a DeviceName<'a>>,
    service: Option<&'a [ServiceData<'a>]>,
    manufacturer: Option<&'a ManufacturerData<'a>>,
    uuids_more_available: Option<&'a [Uuid]>,
    uuids_complete: Option<&'a [Uuid]>,
    uuids_solicited: Option<&'a [Uuid]>,
    raw: Option<&'a [RawData<'a>]>
}

pub struct ScanData<'a> {
    name: Option<&'a DeviceName<'a>>,
    service: Option<&'a [ServiceData<'a>]>,
    manufacturer: Option<&'a ManufacturerData<'a>>,
    uuids_more_available: Option<&'a [Uuid]>,
    uuids_complete: Option<&'a [Uuid]>,
    uuids_solicited: Option<&'a [Uuid]>,
    raw: Option<&'a [RawData<'a>]>
}

Rubble uses a list of enums, but the problem with the list of enum is that we can specify the same thing multiple times, so the API is  not fully safe. Also, scan response data cannot include flags, that's why I duplicated the structure. But we could also imagine passing a is_scan_data bool on the to_bytes method and specify that to get either advert or scan data from the struct.
I am also wondering if we should include something like rubble bitflags for flags.
The above structure is the closest I could come to represent the underlying data the best, they are a bit verbose, but with Default it should be ok. They are also unfinished, I need to include appearance and a few other things.
Also, rubble has a list of  appearances in the gatt, which can be included in the advert data, do you think we should include a list like that?
Finally, in the nordic SDK, to include appearance (or name), you only pass a bool and the SDK gets the appearance (or name) from gap data, but I think it's better to have a complete data struct and not rely on existing gap data.

I'd like to tackle this issue, @Dirbaio  what do you think?

@Dirbaio what are you thoughts on overhead of helpers to construct packets? I'm not sure that they would end up as zero-cost abstractions. If not, they could be compile-time macros. Or when you're able to create &'static [u8] in const fns that would be the best solution.

Doing it at runtime is probably fine, that's what the C nrf5-sdk does. Also it makes it possible to make stuff like device names dynamic which is nice.
Getting it to work wth today's const fn limitations will be quite hard though, I'd just focus on runtime building.
It can be "translate to/from struct" like the one above, or a "builder" where you add data and it writes it to a buffer as you go. I have the suspicion the second will be better for code size.


Dynamic View and multiple Windows per App

Related to #10 but hopefully this issue can serve as a more general discussion about handling Apps with multiple Windows.
The first issue I have encountered is that a View cannot contain exclusively Window components. See the snippet in #10 for which the App is not terminated. I think it's because the App is creating a window for its children, however when these are Windows themselves then the root window is "invisible" and can't be closed. Adding any other component to the View resolves this:
import edifice as ed

class MyApp(ed.Component):
    def render(self):
        return ed.View()(
            ed.Label("Hello"),
            ed.Window()(ed.Label("Hello")),
        )

if __name__ == "__main__":
    ed.App(MyApp()).start()

The second thing is that I am not quite sure how to go about dynamically managing windows. An example of spawning a window from a button click would be interesting (if it is possible). Then there is also the possibility of dynamic Views where some components could be invisible depending on a conditional...
Lastly, the snippet above creates two windows (one for MyApp, implicitly, and one for the second Label). They can be closed independently. In many cases, it would be desirable to assign one window as the root or parent window. When closed, it should close all of it's children and terminate the App.
As time permits, I'll dig into thee implementations some more and hopefully I can help in some way (even if it's just testing or documentation).

Re: hidden components. I see that this is possible in some way already by using inline condidtionals in the View, e.g.
https://github.com/fding/pyedifice/blob/b93ec3b85ba3c3d71b0431936546ef9fc4e7accd/edifice/components/forms.py#L145

I see that the FormDialog uses the undocumented List widget, will look into that some more:
https://github.com/fding/pyedifice/blob/b93ec3b85ba3c3d71b0431936546ef9fc4e7accd/edifice/components/forms.py#L282

Here's an example of how to create new windows on the click of a button, and how to close all windows once the main window is closed:
import edifice as ed

class MyApp(ed.Component):
    def __init__(self):
        super().__init__()
        self.spawned_windows = set()
        self.counter = 0
        self.main_window_open = True

    def create_window(self, e):
        with self.render_changes():
            self.spawned_windows = self.spawned_windows | {self.counter}
            self.counter += 1

    def close_window(self, i, e):
        with self.render_changes():
            self.spawned_windows = self.spawned_windows - {i}

    def close_main_window(self, e):
        with self.render_changes():
            self.spawned_windows = set()
            self.main_window_open = False

    def render(self):
        return ed.List()(
            self.main_window_open and ed.Window(on_close=self.close_main_window)(
                ed.Button("New window", on_click=self.create_window),
            ),
            *[
                ed.Window(on_close=lambda e, idx=i: self.close_window(idx, e))(
                    ed.Label(f"Window {i + 1}"),
                ).set_key(str(i))
                for i in self.spawned_windows
            ],
        )

if __name__ == "__main__":
    ed.App(MyApp()).start()

It uses the List component as you noted, which holds a list of subcomponents without mounting them into any UI element. Closing a window is done the same way you would hide an UI element, i.e. by not returning that window in the render function.
I think this solution fits well with the design of the rest of the library. However, the way the library handles windows isn't perfect: when the user closes a window that does not have an on_close event defined, the window will disappear, but the internal state will not register that the window is gone. This means that next time render is called, the window will be resurrected. I'm not sure about the best way of handling this inconsistency. The simplest way is to block the usual window closing mechanism, and only close a window when it's not rendered by anything. But I think this is bad default behavior and would result in overhead for almost all situations. The current version will get all the simple cases right, but could result in inconsistencies with multiple windows if the user isn't careful. Do you have any thoughts on how this might be better designed?

Thanks for the clarification. That example is quite helpful: maybe it can replace the current Window example in the docstrings?
Actually, do we even need List if mount_into_window=False in the App call does the same? I missed it before but it seems to work as well, for any (?) top level component in the render function.
I haven't poked around enough yet but could on_close be a positional arg? That would make it explicitly required and perhaps save some confusion. I suppose it would require some sort of stub for on_close when mount_into_window=True.
For my use cases it will probably work as-is. I agree that blocking the closing event would be a bit ugly. The only thing I can think of right away that might be convenient is to define a MainWindow component that is basically a shortcut for your above example, with e.g. create_child, close_child methods for managing the child windows... not sure if it's really necessary though.

when the user closes a window that does not have an on_close event defined, the window will disappear, but the internal state will not register that the window is gone

Is there some way to tell will_unmount to clean that up? I guess it would require hooking into the window closing event rather than blocking... might still be a too troublesome. I'll need to sleep on this.

Just a heads up that I'm too busy to really look at this, and my original use-case isn't going to happen in the form that I planned. Feel free to close this, or you can leave it open in case there are any takers. I'll definitely recommend that people check out this package if I find anyone looking for simple/reactive UI in python :)

Apps with multiple windows is supported in v1.5.0 with the WindowPopView Element.


Work in Progress Release

User Story
- As a developer, I want to work on a new release without having our customers interact with it.
Details, Background
In order to accelarate our CAPI progress we need to have all the CAPI components running on a management cluster. We are currently deploying them as a v20.0.0 Giant Swarm release. Unfortunately, this release is also visible in Happa at the moment which led to questions being asked by our customers.
Changes

Giant Swarm release can be marked as in-progress (alternatives work-in-progress, in-development);
Happa hides such a release for all users.

Questions

Should such a release be only hidden from our customers and visible to Giant Swarm employees?

@piontec for Honeybadger - we need to add support to release-operator to add in-progress status to releases

scratch my previous comment, @alex-dabija takes this to Phoenix :)

Releases already support (and are using) a WiP status (see here: https://github.com/giantswarm/apiextensions/blob/babaa3286282fa65fd05a77b680b41f14cd2bade/pkg/apis/release/v1alpha1/release_types.go#L20). The UI components needs to be modified to support hiding them for customers.

The main comment says

Happa hides such a release for all users.

@AverageMarcus says

The UI components needs to be modified to support hiding them for customers.

Which one exactly is intended?
When talking about UIs, we mean both kubeclt gs and web UI, correct?
Are we fine with such Releases still showing up via kubectl get releases.release.giantswarm.io (without gs plugin)?

Are we fine with such Releases still showing up via kubectl get releases.release.giantswarm.io (without gs plugin)?

I'd say that's fine as there isn't a huge amount we can do about that. kubectl gs get releases should maybe have an argument to toggle showing them maybe?

That sounds like this is already in place then and this issues isn't needed?

We do not want to show all the versions including work in progress version (e.g v1.2x.y ) which are available for Internal users only and not for customers.
Suggestion:

Have a notice to say WIP releases are "WIP" in Happa on cluster creation
Release status on List of existing clusters.

@alex-dabija feel free to close this issue, I am removing it from our board.
We will start working on Preview releases this week.

I'll take the liberty to close this


Intersection type is not resolved as expected when used with generics.

Bug Report
🔎 Search Terms

narrowing, grouping, generic and intersection
🕗 Version & Regression Information
I have tested all available versions on TypeScript Playground.

3.9.7 and after: Expected type works as expected. Unexpected types do not.
3.8.3 and before: Expected and Unexpected types both do not work as expected.

⏯ Playground Link
Playground link with relevant code
💻 Code
// TypeScript version: 4.3.5
type Action =
  | {
      type: 'Foo'
      payload: {
        foo: string
      }
    }
  | {
      type: 'Bar'
      payload: {
        bar: number
      }
    }

type ActionWithTypeName<T> = Action & { type: T }
type Expected = ActionWithTypeName<'Foo'>['payload'] // { foo: string }

type PayloadOfActionWithTypeName1<T> = ActionWithTypeName<T>['payload']
type Unexpected1 = PayloadOfActionWithTypeName1<'Foo'> // { foo: string } | { bar: number }

type PayloadOfActionWithTypeName2<T> = (Action & { type: T })['payload']
type Unexpected2 = PayloadOfActionWithTypeName2<'Foo'> // { foo: string } | { bar: number }

🙁 Actual behavior

Unexpected1 and Unexpected2 are not identical to Expected.
🙂 Expected behavior

Unexpected1 and Unexpected2 should be identical to Expected.

This is effectively a design limitation. We don't realize that { type: 'Bar', payload: { bar: number } } & { type: 'Foo' } is an empty type and therefore we don't eliminate it. I suggest writing this instead:
type ActionWithTypeName<T> = Extract<Action, { type: T }>;

@ahejlsberg Could you expand on what you mean by not realizing it's an empty type? It is eliminated when declared explicitly:
type Expected = { type: 'Bar', payload: { bar: number } } & { type: 'Foo' } // never

Also, I don't think Extract always is a viable workaround since it doesn't implement intersection. Example:
type NotAnIntersection = Extract<{ foo: 'bar' | 'baz' }, { foo: 'bar' }>; // never

It's not apparent from the form of the type that intersection reduction is necessary at all.
For example, if you wrote ({ x: number } & { y: string })["y"]), there appears to be no reason to do type computation on the { x: number } part of it at all, since the y property is clearly on the RHS.


Bots can't emote

I can't seem to be able to make my bot do /me commands. Is this an API limitation?

@CoralineAda I think it is a limitation: slash commands tend to get different handling, but I will dig into the details when I get a minute. We may need to make an alternative API call.

Thanks!


Use a more efficient formulation for fidelity

Summary
There is a more efficient way to calculate the quantum fidelity for two mixed states, using only one eigendecomposition instead of three SVDs.
Details and comments
For a more detailed analysis see arxiv:2309.10565.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.Adrian Müller seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.

It looks like the density matrices of pure states typically have huge condition numbers, which makes the eigenvalue decomposition quite unstable as compared to SVD. (Weirdly, np.sum(np.sqrt(svd(sqrt_rho @ sig @ sqrt_rho, compute_uv=False)))**2 with sqrt_rho computed using SVD is quite off, too.) Below is some numerical analysis, which shows that the previous version gives basically perfect results. I think it's better to remove this pull request again.
import numpy as np
from numpy.linalg import norm, svd, eigvals
from qiskit.quantum_info.states.utils import _funm_svd

from tqdm.auto import tqdm as tq

def fidelity_old(rho, sig):
    """ Fidelity using three svds """
    sqrt_rho = _funm_svd(rho, np.sqrt)
    sqrt_sig = _funm_svd(sig, np.sqrt)
    return norm(sqrt_rho @ sqrt_sig, ord="nuc")**2

def fidelity_svd2(rho, sig):
    """ Fidelity using _funm_svd and svd """
    sqrt_rho = _funm_svd(rho, np.sqrt)
    return np.sum(np.sqrt(svd(sqrt_rho @ sig @ sqrt_rho, compute_uv=False)))**2

def fidelity_new(rho, sig):
    """ Fidelity using eigvals """
    return np.sum(np.sqrt(eigvals(rho @ sig)).real)**2

def random_ket(n):
    """ Generate a random pure state """
    vec = np.random.random(2**n) + 1j*np.random.random(2**n)
    vec /= norm(vec, ord=2)
    return vec

# inspect the numerical errors for pure states
def get_errors(N, n, verbose=True):
    errors = []
    for i in tq(range(N), disable=verbose):
        p1 = random_ket(n)
        p2 = random_ket(n)

        # ground truth
        fid = np.abs(p1.conj().T @ p2)**2
        if verbose:
            print(f"fid      = {fid:.10f}")
        rho = np.outer(p1, p1.conj())
        sig = np.outer(p2, p2.conj())

        # numerical
        fid_old = fidelity_old(rho, sig)
        if verbose:
            print(f"fid_old  = {fid_old:.10f}  err = {fid_old-fid:.10f}")

        fid_svd2 = fidelity_svd2(rho, sig)
        if verbose:
            print(f"fid_svd2 = {fid_svd2:.10f}  err = {fid_svd2-fid:.10f}")

        fid_new = fidelity_new(rho, sig)
        if verbose:
            print(f"fid_new  = {fid_new:.10f}  err = {fid_new-fid:.10f}")
            print()

        errors.append(fid_new-fid)
    return np.array(errors)

for n in range(1, 12):
    print(f"n = {n}")
    get_errors(1, n, verbose=True)

# # get some statistics on it
# errors = get_errors(1000, n=9, verbose=False)
# print(f"mean error = {np.mean(errors):.10f}")
# import matplotlib.pyplot as plt
# plt.hist(errors, bins=int(np.sqrt(len(errors))))
# plt.axvline(np.mean(errors), color="red")
# plt.show()

# example output
# > python error_comparison.py
# n = 1
# fid      = 0.9192487267
# fid_old  = 0.9192487267  err = 0.0000000000
# fid_svd2 = 0.9192487401  err = 0.0000000134
# fid_new  = 0.9192487442  err = 0.0000000175

# n = 2
# fid      = 0.7086517604
# fid_old  = 0.7086517604  err = -0.0000000000
# fid_svd2 = 0.7086517857  err = 0.0000000253
# fid_new  = 0.7086517758  err = 0.0000000154

# n = 3
# fid      = 0.5741995449
# fid_old  = 0.5741995449  err = -0.0000000000
# fid_svd2 = 0.5741995926  err = 0.0000000477
# fid_new  = 0.5741995883  err = 0.0000000434

# n = 4
# fid      = 0.4530352316
# fid_old  = 0.4530352316  err = 0.0000000000
# fid_svd2 = 0.4530353026  err = 0.0000000710
# fid_new  = 0.4530352845  err = 0.0000000529

# n = 5
# fid      = 0.4864420385
# fid_old  = 0.4864420385  err = 0.0000000000
# fid_svd2 = 0.4864421842  err = 0.0000001457
# fid_new  = 0.4864421367  err = 0.0000000981

# n = 6
# fid      = 0.4987259645
# fid_old  = 0.4987259645  err = 0.0000000000
# fid_svd2 = 0.4987262770  err = 0.0000003125
# fid_new  = 0.4987261868  err = 0.0000002223

# n = 7
# fid      = 0.5752318799
# fid_old  = 0.5752318799  err = 0.0000000000
# fid_svd2 = 0.5752324235  err = 0.0000005436
# fid_new  = 0.5752322419  err = 0.0000003619

# n = 8
# fid      = 0.5811253729
# fid_old  = 0.5811253729  err = 0.0000000000
# fid_svd2 = 0.5811273893  err = 0.0000020164
# fid_new  = 0.5811261760  err = 0.0000008031

# n = 9
# fid      = 0.5301390601
# fid_old  = 0.5301390601  err = 0.0000000000
# fid_svd2 = 0.5301418354  err = 0.0000027752
# fid_new  = 0.5301403396  err = 0.0000012795

# n = 10
# fid      = 0.5587920791
# fid_old  = 0.5587920791  err = 0.0000000000
# fid_svd2 = 0.5587964015  err = 0.0000043224
# fid_new  = 0.5587943432  err = 0.0000022641

# n = 11
# fid      = 0.5569707247
# fid_old  = 0.5569707247  err = 0.0000000000
# fid_svd2 = 0.5569775748  err = 0.0000068501
# fid_new  = 0.5569744537  err = 0.0000037291


Set Operation Name for Consumer Kind

When integrating with Mass Transit's OTEL implementation most items come through perfectly aside from consumer kind traces.
This is just a small update to at least allow the operation name to avoid the below output in app insights:

//fyi:  @lmolkova

Any thoughts on this one folks ?

@RDalziel - Thank you for your PR. Schema mapping for consumer kind is not completed yet on our side. There is no ETA right now - Will update here when there are more details.

Thanks @vishweshbankwar  - is there any scope for iterations here which would at least allow for consumers kinds to not show as blank on Application Insights?


FailIf example does not work

Hi, I just tried to use a more complex workflow and used the FailIf example (https://github.com/amantinband/error-or?tab=readme-ov-file#failure)
.FailIf(val => val > 2, Error.Validation(description: $"{val} is too big")

But the val to build the description is unknown (Cannot resolve val). An overload for FailIf with a Func<TValue,Error> as second parameter would be highly appreciated ;)
The full example:
ErrorOr<string> foo = await "5".ToErrorOr()
  .Then(int.Parse)
  .FailIf(val => val > 2, Error.Validation(description: $"{val} is too big")) // Cannot resolve val
  .ThenDoAsync(Task.Delay)
  .ThenDo(val => Console.WriteLine($"Finished waiting {val} milliseconds."))
  .ThenAsync(val => Task.FromResult(val * 2))
  .Then(val => $"The result is {val}")
  .Else(errors => Error.Unexpected(description: "Yikes"))
  .MatchFirst(
      value => value,
      firstError => $"An error occurred: {firstError.Description}");

Nevertheless, congratulations to a fantastic library, I love using it!

created a PR for this issue @amantinband

Will this be merged?

Sorry was super busy with other things forgot about this completely.. merged. Will soon publish a new version

available as part of 2.1.0


Commands not appearing in the Web Editor?

I have the latest version of LuckPerms for Spongeforge.
I have been configuring/sorting out the commands each group can use for my Pixelmon server, up until trying again just now. None of the basic minecraft commands such as minecraft.command.ban even show up on the "Permission" section and none of my pixelmon.commands are showing up either.
The only commands it is allowing me to mess with are with Nucleus commands and also luckperms itself, nothing else is showing up. I want to add new plug-ins but I can't get permissions for the commands, even if I just type in the permission myself and enable it.

The permissions listed in the drop down of the web editor are just a suggestion. So you can use any permissions.
The permissions that show up there are the permissions that have been checked since the server is running. To populate the list, you can run /help.
So you also need to save the changes. In the top right corner is a save icon. Click that and then run the command it shows you on the server.

The permissions listed in the drop down of the web editor are just a suggestion. So you can use any permissions.
The permissions that show up there are the permissions that have been checked since the server is running. To populate the list, you can run /help.
So you also need to save the changes. In the top right corner is a save icon. Click that and then run the command it shows you on the server.

hey i have the same issue. but what did you mean by /help? (yes ik this post is 3 years old)


[Android] Choose client certificate from KeyChain

Hello,
We want to use flutter/dart for a large application in France.
The application must be able to retrieve the client certificate from the Android KeyChain.
Android side (Kotlin):
val certificateChain = KeyChain.getCertificateChain(mainActivity.applicationContext, certificateAlias)?.get(0);
val privateKey = KeyChain.getPrivateKey(mainActivity.applicationContext, certificateAlias);

Dart side: The security context only accepts an array of bytes.
We will begin migrating from Xamarin in January. Is it possible to do this? If not, we will have to go to another technology.
Thank you

/cc @brianquinlan

Hey @mohachouch,
Could you explain your use case here? If you were going to use a Kotlin API, what would you do with privateKey?
It is possible to get the byte representation of a java.security.Key with Key.getEncoded(). Assuming that it is an X509 key then you should be able to load it into a SecurityContext with setTrustedCertificateBytes
Let me know if that is not what you are trying to do.
Cheers,
Brian

Hey Brian,
Thanks for you help.
As part of our company, we have an Android tablet application that allows very secure operations.
For this, https exchanges are secured by a client certificate. The certificate is automatically sent to the tablets and I do not have direct access to the certificate.
Currently we use Xamarin, we have direct access to the native Http Client so we can easily pass the KeyStore certificate to the HTTP session but in flutter, I don't know how to do it.
val certificateChain = KeyChain.getCertificateChain(mainActivity.applicationContext, alias)?.get(0);
val privateKey = KeyChain.getPrivateKey(mainActivity.applicationContext, alias);

val store = KeyStore.getInstance("pkcs12")
store.load(null, null);
store.setKeyEntry(alias, privateKey, "".toCharArray(), arrayOf(certificateChain))

var cetificate = store.getCertificate(alias) as X509Certificate;

cetificate.encoded

I tried to pass the certificate to the security context, but I got a BAD_PKCS12_DATA error
I'm a bit lost and I don't know exactly how to retrieve the certificate from Android and how to pass it to the security context
Thanks

I tried to solve the problem all day, the client authentication works fine when I add the test certificate in the assets, but impossible from the KeyChain. Unable to retrieve certificate and private key.
I'm starting to tell myself that it's not possible and that I'll have to use the native http client

Hi @mohachouch,
What call fails: SecurityContext.useCertificateChain or SecurityContext.usePrivateKey?
useCertificateChain and usePrivateKey expect the data to be in PEM or PKCS12 format.
Certificate.encoded is ASN.1 DER format.
PEM is just base64 encoded DER with a header and footer.
If you can use the basic_utils package then a crypto function might help.
Like crlDerToPem (though that might put the wrong header and footer).
You can make your own converter based on the header/foots that you need i.e.
final privateKey = formatKeyString(base64.encode(bytes),
    X509Utils. BEGIN_PRIVATE_KEY, X509Utils.END_PRIVATE_KEY)
final certChain = formatKeyString(base64.encode(bytes),
    X509Utils.BEGIN_CERT, X509Utils.END_CERT)

Thank you for the explanation of the different certficate formats.
For certficate retrieval on Kotlin I use this function

val certificateChain = KeyChain.getCertificateChain(mainActivity.applicationContext, alias)!!.get(0);

With the conversion to the PEM format, the certificate, it's OK, Thanks you
But, I still have a problem for the private key
For private key retrieval on Kotlin I use this function :

val privateKey = KeyChain.getPrivateKey(mainActivity.applicationContext, alias);

val encoded  = privateKey.encoded

The problem is that the value of encoded is null. Do you have an idea ?
Thanks

@mohachouch - how do you use val certificateChain = KeyChain.getCertificateChain(mainActivity.applicationContext, alias)!!.get(0); in your current code?

I use platform channels to switch from Kotlin to flutter.
I don't think the Keychain can be accessed from flutter.
KeyChain.choosePrivateKeyAlias allows me to retrieve the alias certificate that the user has selected

KeyChain.choosePrivateKeyAlias

KeyChain.getCertificateChain allows me to retrieve the certificate

val certificateChain = KeyChain.getCertificateChain(mainActivity.applicationContext, alias)!!.get(0);

KeyChain.getPrivateKey allows me to retrieve the private key

val privateKey = KeyChain.getPrivateKey(mainActivity.applicationContext, alias);

But the problem is that it is of type AndroidKeyStoreRSAPrivateKey and the value of getEncoded() is null
So I feel like I couldn't extract the private key from the Android KeyChain to Flutter and I'll have to use the native http client

@brianquinlan Can you confirm that this is not possible with the current http client implementation? Thanks

It is not possible using dart:io HttpClient but it might be possible using another dart HTTP client.
Could you tell me how you are using this in your existing Xamarin application? I'd like to understand what APIs you are using.
For example, are you using a custom SSLSocketFactory?

Out of curiosity I poked a bit around in BoringSSL and Android to understand if this sort of thing is supported and how.
It seems that if we wanted to support this in our SecureSocket we would need to implement a BoringSSL ENGINE which can perform operations with opaque private keys. (example from AOSP source here). The operations have to be performed by talking to keystore service over IPC. Here is some example of how keystore client in C++ could look like.
This is all very poorly documented territory.

Yes @brianquinlan, wa are using a custom SSLSocketFactory with native http client OkHttp
I can share an example, if yout want

@mraleph We'd also have to expose PrivateKey (or similar) as a Dart API.

Yeah, we would need some API changes. Maybe we don't explicitly need PrivateKey but something like
class SecurityContext {
  void setClientCertificateFromKeyStore(String keyStoreAlias);
}

Though this might not be all too portable.

Yes @mraleph
We can add an AndroidSecurityContext
  class AndroidSecurityContext extends SecurityContext {
    Future<String> askCertificateAliasFromKeyStore()
    void setClientCertificateFromKeyStore(String keyStoreAlias);
  }

Hey @brianquinlan, here is an github gist of using the private key and certificate in Native/Koltin
https://gist.github.com/mohachouch/c079ca23568cc75c6a50c0f4f924f51d

Hey @mohachouch,
As far as I know, there is nothing in the Dart ecosystem that will allow you to do this without writing a native plugin.
If you decide to take the plugin approach, it would probably end up looking like package:cronet_http but you'd wrap OkHttp instead of Cronet.

Hey @brianquinlan
I started the implementation with okhttp. I got a lot of inspiration from cronethttp (Thanks)
https://github.com/mohachouch/native_http_client
It's not production ready but it's work 😉

Hey @mohachouch,
I see that your repo is now non-public. Did you decide on a different approach?

Hey @brianquinlan,
Oup's, I think now it's ok, the repo si public :)
We'll start by using this approach. But we really hope it will be supported by the Dart team. (Native client or dart client with client certificate from keychain)
Thanks

Closing issue here and will track this feature in https://github.com/dart-lang/http/issues/1237


How to dump current memory usage

I am having memory problems in my program, and I think it may be a mruby memory leak, possibly  linked to #2955. To understand where the problem lies (is it related to mruby, or to the other C++ code in my program?), I wanted to know if there is any way to dump the current mruby memory usage. I've grepped through the source code and did not find anything interesting.
Many thanks !

I usually use valgrind to find memory leaks.
If you tell me what kind of information you want, I can make a gem to dump memory usage.

(I could try writing the gem, too, if I have an idea of where to find the information, thanks !)

You may want to use mruby-objectspace gem. It provides the following methods:

ObjectSpace.count_objects that returns number of objects of each type
ObjectSpace.each_object that iterates over all live objects


tests: fix logic for parameterized tests

Fixes failing logic for arc-cluster-specific tests by moving conditionals within test blocks. Flips boolean to default to expect an arc cluster. Skipped tests will now show up as:
ok 8 azure-arc deployments have succeeded # skip arc cluster-specific test
ok 9 chart version on cluster matches checkout tag # skip arc cluster-specific test
ok 10 openservicemesh.io/ignore is true in azure-arc # skip arc cluster-specific test

/azp run pr-e2e-arc

/azp run pr-e2e-arc

You can also remove the ARC_CLUSTER=true on line 20 in e2e-aks-arc.yaml since you already set it to true by default in test.bats.

You can also remove the ARC_CLUSTER=true on line 20 in e2e-aks-arc.yaml since you already set it to true by default in test.bats.

/azp run pr-e2e-arc

/azp run pr-e2e-arc


First Draft of Notebook Landing pages

I want to push this to GH-Pages, @eteq can you make this new branch?

It looks like there isn't any straightoforward way to create a new branch from a PR like this, so I just manually pushed the commit from this PR up to  https://github.com/spacetelescope/notebook-infrastructure/tree/gh-pages  (and that's the builds that you see in the CI log here), so I I'll go ahead and close this now without merging (since I indirectly merged it manually instead).


Debug Map Api Url

fetch data without error

didn't end up using this Api because of CORS issue


Add (some) array & spatial-ish workflows to the benchmark suite

Looking for feedback on this issue from @ian-r-rose & @jrbourbeau (feel free to edit the issue directly)
Spatially large-scale operations appear to be a common use case for dask & coiled-runtime users.
We should add some benchmarks that test out some array operations that are common in spatial contexts.
Some initial (Phase 1) ideas are:

basic filtering and stats (e.g., x[x > 0] -> mean, median(?) along one and all axes
array spatial resampling (up and down, i.e., changing image resolution)
array time series resampling/grouping (time series of raster, get the average pixel value for the month)
DEM slope or flow direction calculation (a bit specific, but output is same size as input, requires map_overlap. info here)
"raster stats" ala https://github.com/perrygeo/python-rasterstats
Reproject (see https://corteva.github.io/rioxarray/stable/examples/reproject.html)

One thing to consider is if we want to use xarray in any of these benchmarks. To me that feels like "Phase 2". However, if we were willing to include xarray operations, there's a wealth of examples to pull from Pangeo's docs
http://gallery.pangeo.io/index.html

Looking at test_array -- there's more in there than I initially thought.
And we're already using xarray. So Step 1 of Phase 1 is to get a more complete grasp of what's already in the benchmarks suite


Precompilation IO issue

Seeing this message whenever I pre-compile micromamba_jll:
micromamba_jll Waiting for background task / IO / timer.
[pid 2148] waiting for IO to finish:
 Handle type        uv_handle_t->data
 timer              0x2b43820->0x7efe88aee5f0
This means that a package has started a background task or event source that has not finished running. For precompilation to complete successfully, the event source needs to be closed explicitly. See the developer documentation on fixing precompilation hangs for more help.

I'm not sure if this is the right repo to post this or not but thought I would just point this out if unaware.

Also hit this in Plots, e.g. https://github.com/JuliaPlots/Plots.jl/actions/runs/8587355509/job/23530898701?pr=4914#step:8:26.

Quick update — it looks like the actual code is here:
https://github.com/JuliaBinaryWrappers/micromamba_jll.jl/blob/main/src/wrappers/aarch64-apple-darwin.jl
not sure where to report this though.

cc’ing @cjdoris just in case you aren’t getting notified on this repo.
I wonder if there’s a new Yggdrasil build script or something that deals with this sort of thing?

Up until a few days ago, the micromamba_jll had not been rebuilt for about 9 months. So if this is a new issue then probably it is an upstream issue - in JLLWrappers maybe?
A few days ago (after you reported this issue) I triggered a new build of micromamba_jll just in case it helped. I suspect not.

For reference, this only occurs on julia ≥ 1.10, see https://docs.julialang.org/en/v1/devdocs/precompile_hang.

I've noticed this precompilation warning for micromamba_jll since the start of 1.10 but only posted the issue now because it is one of the few packages left still giving the warning. I think at the beginning of 1.10 there were a ton of packages with this warning (because people didn't realize such issues existed) but now there are only a couple left.

Maybe try the tips in https://docs.julialang.org/en/v1/devdocs/precompile_hang to try and figure out where the issue lies?

Here's what I get installing micromamba_jll into a new depot:
Precompiling project...
  5 dependencies successfully precompiled in 35 seconds
  1 dependency had output during precompilation:
┌ micromamba_jll
│   Downloading artifact: micromamba
│
│  [pid 1501] waiting for IO to finish:
│   Handle type        uv_handle_t->data
│   timer              0x1d34340->0x7f1084111ae0
│  This means that a package has started a background task or event source that has not finished running. For precompilation to complete successfully, the event source needs to be closed explicitly. See the developer documentation on fixing precompilation hangs for more help.
│
│  [pid 1501] waiting for IO to finish:
│   Handle type        uv_handle_t->data
│   timer              0x1d34340->0x7f1084111ae0
│  This means that a package has started a background task or event source that has not finished running. For precompilation to complete successfully, the event source needs to be closed explicitly. See the developer documentation on fixing precompilation hangs for more help.
└

What is suspicious to me is Downloading artifact: micromamba despite the fact that the artifacts are marked as lazy and so should not be getting downloaded here IIUC.

Just asked about this on Slack.

It’s a bug in Downloads.jl on 1.10 https://github.com/JuliaLang/Downloads.jl/pull/234#issuecomment-1889942752
It’s fixed on 1.11+
On 1.10 any download leaves a worker running after it for a period of time in case another download needs it

https://julialang.slack.com/archives/C674ELDNX/p1715542984972079?thread_ts=1715542984.972079&cid=C674ELDNX
So it's an upstream issue. Closing as there's nothing to do from this end.

Ah gotcha. Thanks!


Question: DependencyPropertyKey missing ?

Hi,
I am currently doing some prototypes migrating custom controls available in our end from WPF to WinUI.
During prototype I noticed that, in our end there are some WPF custom controls using DependencyPropertyKey ( available in System.Windows ) but equivalent implementation for WinUI is missing.
( Below is the sample code snippet about how we are using DependencyPropertyKey )
These implementations will be available soon in near WinUI Preview release ?
I am using right now
VS           => Version 16.7.0 Preview 5.0
.Net SDK => dotnet-sdk-5.0.100-preview.4.20268.1-win-x64 / dotnet-sdk-5.0.100-preview.4.20268.1-win-x86
Thanks in advance.
Code Snippet
private static readonly DependencyPropertyKey IsXyzPropertyKey =
DependencyProperty.RegisterReadOnly("IsXyz", typeof(bool), typeof(CustomControlExample), new PropertyMetadata(false));
public static readonly DependencyProperty IsXyzProperty = IsMultipleCalendarPropertyKey.DependencyProperty;
public bool IsMultipleCalendar
{
get {
return (bool)GetValue(IsXyzProperty);
}
protected set {
                 SetValue(IsXyzPropertyKey, value);
	  }

}

Same comment as here: https://github.com/microsoft/microsoft-ui-xaml/issues/3041#issuecomment-668695595

@robloo @StephenLPeters
Thanks for the clarification and assignment.

Have also left comments on #3074, #3073, #3041, please spruce this up with some scenarios/priorities and such by going through our feature proposal process. Sorry for the extra red tape, but it helps us frame these as changes in plan, not questions.


adding some definitions for selected techniques

@tgbugs please comment and correct:
An 'anatomical segmentation technique' fully annotates an anatomical image with regions of interest that might be useful for different types of image analysis.
An 'anatomical delineation technique' is a process in which a region of interest is segmented or parceled and then separated from the irrelevant portion of the image.
An 'anatomical parcellation technique' annotates substructures of an anatomical image with region(s) of interest that might be useful for different types of image analysis.

@tgbugs could you have a look if these definitions fit the terms?

@tgbugs 'anatomical segmentation technique' and 'anatomical parcellation technique' instances are now deleted and the terms are stated as synonyms in 'anatomical delineation technique'. The definition of 'anatomical delineation technique' needs another review.

@tgbugs we should have a look at this one again this week so that we can resolve the conflicts and close this PR


Fix onRequestContentPolicy, add onRequestAdvertisingPolicy and limitA…

…dTracking

:tada: This PR is included in version 0.1.0-next.1 :tada:
The release is available on:

npm package (@next dist-tag)
GitHub release

Your semantic-release bot :package::rocket:

:tada: This PR is included in version 1.0.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


ef commands getting "ScriptHalted" error

When I run Add-Migration InitialCreate I get "ScriptHalted" error in the the PMC.
Tried to find a solution but nothing seems to work.
Any suggestions are welcome!

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

ID: 6719f08e-3bd7-dc1a-71df-f2ef9fbca9d8
Version Independent ID: 7096fdb3-612e-9e00-bd0b-8ea4886a09ce
Content: Add a model to a Razor Pages app in ASP.NET Core
Content Source: aspnetcore/tutorials/razor-pages/model.md
Product: aspnet-core
Technology: aspnetcore-tutorials
GitHub Login: @Rick-Anderson
Microsoft Alias: riande

Same issue occurred on my Win 7 x86 machine running VS 2019 16.3.4 and .NET Core 3 SDK. Following post had the answer;
https://developercommunity.visualstudio.com/content/problem/753703/package-manager-console-scripthalted.html
Bottom line is need to update Powershell to version 5.1 to work with Core 3 Entity Framework.
The problem is the version of powershell.

powershell on win7 is 2.0,and PM is base on powershell. So, after I upgrade my powershell version to 5.1 it work out.

@fmir864  thanks for the update. Not many are on Win7. This issue is very discoverable.

Upgrading to Powershell 5.1 fixed the problem for me as well. Thank you!!
One side note that may help others is that I had Powershell 2.0 and when I tried to install 5.1 the install silently "stalled" around 50%.
I discovered that I needed to update to Powershell 4 and then upgrade to 5.1.


[Suggestion] Smooth Cursor/Typing Animation (Like Microsoft Office)

I want to make a suggestion to add an option to have a smooth typing animation like the one in Office 2013 and 2016.
There is already such add-in for Visual Studio, but not for VSCode here.

Any word on this?

+1

+1

I would LOVE either a plugin or a core feature that implement that. Smooth typing is life.

+1

So is this feature planned to be implemented then? I would love to see this.

I would also really like to see something like this implemented in the future! 👍

+1

+1

+1

+1

+1

+1

+1

Any Updates on this feature?

In Atom editor, ony thing you need to achieve this effect is new css style transition: all 80ms; to atom-text-editor .cursor element ... Big challenge for VScode ?

@ge0rgecz ok so that means you apply that transition to all things in atom editor wow

.cursor {
    transition: all 80ms;
}

With this simple css the cursor can be animated to move smoothly.

That can even be an productive way to learn how to develop a VSCode extension. Thanks @IncognitoJam! 👍

@IncognitoJam Forgive my ignorance, I'm not used to Chromium developer tools. Where do I add new styles in the developer panel?

@spikespaz You should go to the Elements tab and look at the Styles tab in the bottom/second pane. Click the little + icon which says New style rule when you hover over it. You can now add CSS here. I don't think this is permanent though and you will have to re-add the style each time you open VS Code.

Thank you for the CSS hack, it works for me, but it's only temporary. If you look at these issues here and here, I don't think you can inject the CSS permanently unless you make your own theme.
One of the guys from Microsoft (@bpasero) said this:

Thanks for this PR but we decided to not allow these kinds of modifications to our CSS directly. Rather, we think that our theming story should be evolved to allow more user configurations. See #26128, #26129 and #26130 for example.

The two main issues with this approach here is:

basically this makes all of our CSS class names API (in the same way all of our themable colors have become API). we do not want to commit ourselves to keeping the CSS class names stable. rather we should find those styles that we want to make themable and then explicitly announce them as API (same as we did and do for colors)

*the other issue is that bug reports we receive will be harder to understand if users run with custom CSS changes that we are not aware of. we think that we should be in control of which user styles can be changed and provide explicit support for instead of opening the door to any CSS changes that are possible with this approach

In one of the issues there was a suggestion to use vscode-custom-css, which can make it somewhat permanent. However, it involves modifying VS Code core files, requires admin rights, and a reload is needed after every VS Code update. Use at your own risk.
If an Extension is not the way to go, maybe it's worth a try to implement it directly in the source code.
In the mean time, we have the Chromium Developer Tools method above (temporary) and the vscode-custom-css method ("semi-permanent").

The viewCursors.css file looks promising. Maybe we could add the CSS property here and then have a setting to toggle the feature?

On windows, I found a way to permanently do it.
Edit the file:
<install_path>\resources\app\out\vs\workbench\electron-browser\bootstrap
Add the style to the head element of the file:
<style>
	.cursor {
		transition: all 80ms;  // The duration that you want
	}
</style>

This change will persist through restarts. It may say that the installation is corrupt, I just clicked "Don't show this again."
You will likely have to apply this again after each update. It would be nice if this feature was integrated into the editor itself.

I made a Pull Request in #51197! Thank you @IncognitoJam for the suggestion. I pretty much followed how the other cursor-related settings were implemented.

In the meantime, I made a very WIP extension for this. It will be buggy.
https://marketplace.visualstudio.com/items?itemName=spikespaz.vscode-smoothtype

Need this feature asap in next update as built-in feature.

Definitely! #55337 (Just thought I'd put my issue here)


Extremely poor validation results on self-trained checkpoints

Dear Tony.
Thank you for your excellent work on ALOHA, I have tried to reproduce your work in the Mujoco simulation environment, and based on your open source data, The success rate should be around 90% for transfer cube, and around 50% for insertion.
I have trained and validated on your open source dataset, and I get results of around 54% for transfer cube, and around 14% for insertion.The results are very dismal, and I have not changed any of the parameter settings, and I would like to know what are some of the reasons for such a problem, or if I need to optimise in any way. The exact data can be viewed in the table below
Here are my training parameter settings
python3 imitate_episodes.py \
--task_name sim_transfer_cube_scripted \
--ckpt_dir ~/data/aloha/act/sim_transfer_cube_scripted/ckpt/ \
--policy_class ACT --kl_weight 10 --chunk_size 100 --hidden_dim 512 --batch_size 8 --dim_feedforward 3200 \
--num_epochs 2000  --lr 1e-5 \
--seed 0

Here are my eval parameter settings
python3 imitate_episodes.py \
--task_name sim_transfer_cube_scripted \
--ckpt_dir ~/data/aloha/act/sim_transfer_cube_scripted/ckpt/ \
--policy_class ACT --kl_weight 10 --chunk_size 100 --hidden_dim 512 --batch_size 8 --dim_feedforward 3200 \
--num_epochs 2000  --lr 1e-5 \
--seed 0 \
--eval

The dataset obtained from the training is shown in the following link (Lark document, you need to register yourself, please note if you apply for permission to view)
https://iklxo6z9yv.feishu.cn/sheets/LRwosV4jnh7xokt8F8UcMT7snzh?from=from_copylink

I suspect the mujoco version is messing things up. I updated the requirements yesterday: https://github.com/tonyzhaozh/act/commit/742c753c0d4a5d87076c8f69e5628c79a8cc5488
Could you try reinstalling these packages and evaluate the same checkpoints again? You would not need to retrain the policy.

I suspect the mujoco version is messing things up. I updated the requirements yesterday: 742c753
Could you try reinstalling these packages and evaluate the same checkpoints again? You would not need to retrain the policy.

I have changed the version of mujuco and dm-control according to your instructions, their version information is as follows
(aloha) ➜  act-main conda list | grep dm-control
dm-control                1.0.14                   pypi_0    pypi
(aloha) ➜  act-main conda list | grep mujoco
mujoco                    2.3.7                    pypi_0    pypi
(aloha) ➜  act-main

The parameters used for model inference are as follows
python3 imitate_episodes.py \
--task_name sim_transfer_cube_scripted \
--ckpt_dir ~/data/aloha/act/sim_transfer_cube_scripted/ckpt/ \
--policy_class ACT --kl_weight 10 --chunk_size 100 --hidden_dim 512 --batch_size 8 --dim_feedforward 3200 \
--num_epochs 2000  --lr 1e-5 \
--seed 0 \
--eval

The result of this reasoning is as follows
Success rate: 0.54
Average return: 318.9

Reward >= 0: 50/50 = 100.0%
Reward >= 1: 40/50 = 80.0%
Reward >= 2: 35/50 = 70.0%
Reward >= 3: 27/50 = 54.0%
Reward >= 4: 27/50 = 54.0%

policy_best.ckpt: success_rate=0.54 avg_return=318.9

Does it need to be retrained or are there any other possibilities that led to a bad result？
In addition, by observing all the failed videos, I found that all the failures were caused by the right robotic arm failing to catch the square when grasping it leading to the failure of the final exchange of the square, is it necessary to introduce a model of object detection during grasping to ensure that the robotic arm can accurately grasp the object? I've put some of the failed gripping videos in the link below.
https://github.com/tonyzhaozh/act/assets/66520966/0f368cd2-33ce-4bb0-9e55-eb1ad53dab8f
https://github.com/tonyzhaozh/act/assets/66520966/0653fd93-7b93-4fda-9835-8728af6f3610

https://github.com/tonyzhaozh/act/assets/66520966/6348828e-9eec-4d39-8131-ea311083343c
https://github.com/tonyzhaozh/act/assets/66520966/1dc9a84f-f7ef-4db1-b36f-a74dac834c7f

Dear Tony,
I followed your tips and updated mujoco and dm-control, but the results did not improve, see github issue for details
Best wishes,
Jessy
在 2024-01-30 03:13:38，"Tony Z. Zhao" @.***> 写道：
I suspect the mujoco version is messing things up. I updated the requirements yesterday: 742c753
Could you try reinstalling these packages and evaluate the same checkpoints again? You would not need to retrain the policy.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: @.***>

Dear Tony. Thank you for your excellent work on ALOHA, I have tried to reproduce your work in the Mujoco simulation environment, and based on your open source data, The success rate should be around 90% for transfer cube, and around 50% for insertion. I have trained and validated on your open source dataset, and I get results of around 54% for transfer cube, and around 14% for insertion.The results are very dismal, and I have not changed any of the parameter settings, and I would like to know what are some of the reasons for such a problem, or if I need to optimise in any way. The exact data can be viewed in the table below
Here are my training parameter settings
python3 imitate_episodes.py \
--task_name sim_transfer_cube_scripted \
--ckpt_dir ~/data/aloha/act/sim_transfer_cube_scripted/ckpt/ \
--policy_class ACT --kl_weight 10 --chunk_size 100 --hidden_dim 512 --batch_size 8 --dim_feedforward 3200 \
--num_epochs 2000  --lr 1e-5 \
--seed 0

Here are my eval parameter settings
python3 imitate_episodes.py \
--task_name sim_transfer_cube_scripted \
--ckpt_dir ~/data/aloha/act/sim_transfer_cube_scripted/ckpt/ \
--policy_class ACT --kl_weight 10 --chunk_size 100 --hidden_dim 512 --batch_size 8 --dim_feedforward 3200 \
--num_epochs 2000  --lr 1e-5 \
--seed 0 \
--eval

The dataset obtained from the training is shown in the following link (Lark document, you need to register yourself, please note if you apply for permission to view) https://iklxo6z9yv.feishu.cn/sheets/LRwosV4jnh7xokt8F8UcMT7snzh?from=from_copylink

I have the same prolem, have you solved it? Thanks.

@Jessy-Huang @z-yf17 Have you solved the problem?

yes
---- Replied Message ----
| From | Andrew @.> |
| Date | 03/08/2024 05:33 |
| To | @.> |
| Cc |<EMAIL_ADDRESS>|
| Subject | Re: [tonyzhaozh/act] Extremely poor validation results on self-trained checkpoints (Issue #18) |
@@.*** Have you solved the problem?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: @.***>

I am experiencing a similar problem where the success rates are too low. How did you solve the problem? Any advice would be appreciated. Thank you!

you can try to give a bigger num_epoch first
---- Replied Message ----
| From | Andrew @.> |
| Date | 03/08/2024 15:04 |
| To | @.> |
| Cc |<EMAIL_ADDRESS>|
| Subject | Re: [tonyzhaozh/act] Extremely poor validation results on self-trained checkpoints (Issue #18) |
I am experiencing a similar problem where the success rates are too low. How did you solve the problem? Any advice would be appreciated. Thank you!
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: @.***>

我也遇到类似的问题，成功率太低。你是如何解决这个问题的？任何意见，将不胜感激。谢谢！

You can try the following parameters, in my case the success rate is 100%.
python imitate_episodes.py --task_name sim_transfer_cube_scripted --ckpt_dir ckpt_dir_batchsize_16_epoch_4000_TG --policy_class ACT --kl_weight 10 --chunk_size 100 --hidden_dim 512 --batch_size 16 --dim_feedforward 3200 --num_epochs 4000  --lr 2e-5 --seed 0 --eval


Regenerate Batch Management SDK

Regenerate Batch Management SDK based on the 2019-08-01
version of the Swagger specification.

Swagger specification is here: https://github.com/Azure/azure-rest-api-specs/pull/6723
I pushed an update where I used generate.ps1 rather than generate.cmd -- is there a reason there are two ways to generate SDKs...?

Swagger specification is here: Azure/azure-rest-api-specs#6723
I pushed an update where I used generate.ps1 rather than generate.cmd -- is there a reason there are two ways to generate SDKs...?

You should use generate.ps1, delete generate.cmd if have.


Support parsing defpackage

The grammar currently considers this to be an error:
(defpackage foo-bar
  (:use cl))

It's not clear to me which grammar rules are preventing this.

When I have time, I'll try to rewrite the CL parser from scratch. The clojure dependency shouldn't be necessary anymore and a lot of stuff could be simplified.


It seems do not support 5.1.0.beta1

As the title mentioned, when visit the static pages, it reports error "No route matches [GET]"

I just tried with 5.1.0.beta1 and it seems to work just fine.
Maybe this could help you: https://github.com/thoughtbot/high_voltage#routing-overview

Works for me too.

With Rails 5.1 release, we're actively testing against it and things look like they are working well. If you have any issues please feel free to re-open.


Making the delete Temperory files AsyncTask

Fixes Issue : #178

Thanks, I will make the changes

@opticod
Hey! Would it be fine to show a progressDialog with the message "Deleting Temporary Files"in the preExecute() and an AlertDialog Box showing the completion of process in the postExecute() of the AsyncTask class.

Yes, u can

Great.

Accidentally I deleted the branch so I really am sorry for the second commit.
Thanks

Thanks for the merge.


Do we need git-shim?

More of a question PR, do we need it?

So the rationale here is that the motivation explained in git-shim's README:

This is useful in a corporate environment where an HTTP Proxy is used. You could use the command git config --global url."https://".insteadOf git:// but that doesn't work for SCP-style style URLs: git@github.com:org/repo.git due to the colon :.

I don't think that's true, since we're actually using this git feature with SCP-style URIs? 🤔
https://github.com/dependabot/dependabot-core/blob/6252098c225778707f257ce77a6bcdd3be03b8c4/common/lib/dependabot/shared_helpers.rb#L261-L268C8
I guess the one case where insteadOf doesn't work is when using inlined user:pass in URLs, like<EMAIL_ADDRESS>maybe that's the reason?
Insights appreciated!

See https://github.com/dependabot/dependabot-core/pull/5310 for more info on why we went with the shim.
We should add that glommio dependency to the Cargo smoke tests so any future attempts to fix it will not regress!

Mmmm, I see, thanks for the pointer.
So we keep the git shim to fix the edge case of "not knowing the host in advance + SCP-style uri being used", correct? However, that realworld example there does not fit that case, right? Both URIs mentioned there<EMAIL_ADDRESS>and git://git.kernel.dk/liburing) and not SCP-style URIs?

I would agree normally, but SCP-style URIs feel like maybe too big of an edge case to warrant keeping our own shim? Specially if we have not really seen any issue in real life that cannot be fixed tweaking other stuff we already do.
In the case of PNPM, URL rewriting confused me. PNPM keeps track and detects the best protocol based on the shape of the URIs and accessibility of the repo. If it detects ssh as the best protocol, and we still rewrite URIs to https, then the requests may succeed, but PNPM will still save a ssh URI to the lockfile. If I had changed the shim or the our insteadOf configurations to rewrite URIs in the case of https://github.com/dependabot/dependabot-core/issues/7258, we would've introduced a bug probably worse than https://github.com/dependabot/dependabot-core/issues/7258, because we would've generated incorrect PRs.
Overall, I think all approaches have upsides and downsides, so I'm good with sticking to the shim. We should probably update the README of https://github.com/dependabot/git-shim to clarify the use case a bit though?

I'll close this since it was just a way to learn, thanks for the info and insights @jakecoffman :)


1.3.3 init?

Having troubles with version 1.3.3, the ui doesnt react.
XamEffects.Droid.Effects.Init(); doesnt exist in this version so im going with    XamEffects.Effects.Init();
is there anything else i have to do?
Im using 1.4 in a different project and it works like a charm
Thanks!

Hi, 1.3.3 is old version for XF 2.3.4.
This version not need android init.


Type not narrowed correctly when using in operator

TypeScript Version:  3.5.2

Search Terms: control flow narrow if in operator
Code
type Ancestry =
    | { type: string }
    | { type: string; category: string }
    | { type: string; category: string; subcategory: string };

const fn = (ancestry: Ancestry) => {
    if (!('category' in ancestry) && !('subcategory' in ancestry)) {
        ancestry; // ✅ { type: string }
    } else {
        /*
        ❌
        Actual: { type: string; category: string }
        Expected:
        {
            type: string;
            category: string;
        } | {
            type: string;
            category: string;
            subcategory: string;
        }
        */
        ancestry;
    }
};

Side note: curiously, if we check for undefined instead of in, this does work as expected:
type Ancestry =
    | { type: string; category: undefined; subcategory: undefined }
    | { type: string; category: string; subcategory: undefined }
    | { type: string; category: string; subcategory: string };

const fn = (ancestry: Ancestry) => {
    if (ancestry.category === undefined && ancestry.subcategory === undefined) {
        ancestry; // ✅ { type: string; category: undefined; subcategory: undefined }
    } else {
        /*
        ✅
        {
            type: string;
            category: string;
            subcategory: undefined;
        } | {
            type: string;
            category: string;
            subcategory: string;
        }
        */
        ancestry;
    }
};

The type { type: string; category: string; subcategory: string } is a subtype of { type: string; category: string } therefore subtype reduction turns your expected type into the actual type.
The type { type: string; category: string; subcategory: string } is a not a subtype of  { type: string; category: string; subcategory: undefined } therefore you get a union of the types.

declare const a: { type: string; category: string };
declare const b: { type: string; category: string; subcategory: string };

const example = Math.random() ? a : b; // { type: string; category: string }

declare const a2: { type: string; category: string, subcategory: undefined; };
declare const b2: { type: string; category: string; subcategory: string };

const example2 = Math.random() ? a2 : b2; // typeof a2 | typeof b2;

That makes sense, but I don't see how to use that knowledge to fix my problem—because TS drops the subcategory subtype, any further checks result in never:
type Ancestry =
    | { type: string }
    | { type: string; category: string }
    | { type: string; category: string; subcategory: string };

const fn = (ancestry: Ancestry) => {
    if (!('category' in ancestry) && !('subcategory' in ancestry)) {
        ancestry; // ✅ { type: string }
    } else if ('subcategory' in ancestry) {
        /*
        ❌
        Actual: never
        Expected: { type: string; category: string; subcategory: string; }
        */
        ancestry;
    }
};

Similarly:
type AncestryType = {
    type: string;
};

type AncestryCategory = AncestryType & {
    category: string;
};

type AncestrySubcategory = AncestryCategory & {
    subcategory: string;
};

type Ancestry = AncestryType | AncestryCategory | AncestrySubcategory;

const checkAncestryIsType = (ancestry: Ancestry): ancestry is AncestryType =>
    !('category' in ancestry);

const fn = (ancestry: Ancestry) => {
    if (checkAncestryIsType(ancestry)) {
        ancestry; // ✅ { type: string }
    } else {
        /*
        ❌
        Actual: never
        Expected: { type: string; category: string; subcategory: string; }
        */
        ancestry;
    }
};

I'm not sure if it works for your actual use-case, but is the second in clause necessary? It seems to be that if !('category' in ancestry) is true, then it must be the case that  !('subcategory' in ancestry) is always true.
type Ancestry =
    | { type: string }
    | { type: string; category: string }
    | { type: string; category: string; subcategory: string };

const fn = (ancestry: Ancestry) => {
    if (!('category' in ancestry)) {
        ancestry; // ✅ { type: string }
    } else if ('subcategory' in ancestry) {
        ancestry; // ✅ { type: string; category: string; subcategory: string; }
    }
    else {
        ancestry; // ✅ { type: string; category: string; }
    }
};

Interesting. That does help my use case.
I'm still curious though about the second example I posted in https://github.com/microsoft/TypeScript/issues/32680#issuecomment-517704200. Do you have any thoughts on that? I guess the workaround/solution would be to add a discriminant property, so that the union members are not considered as subtypes of each other?

A negated type predicate filters out all union constituents that are assignable to the predicate type. Every member of the union Ancestry is assignable to the super type AncestryType which is why the resulting type in the else branch is never.

Thanks!

For anyone who finds this issue, here is a simpler reproduction of the behaviour described in https://github.com/microsoft/TypeScript/issues/32680#issuecomment-517726428:
type AncestryType = { type: string };
type AncestryCategory = AncestryType & { category: string };
type Ancestry = AncestryType | AncestryCategory;

declare const ancestry: Ancestry;

declare const checkIsAncestryType: (
    ancestry: Ancestry,
) => ancestry is AncestryType;

if (checkIsAncestryType(ancestry)) {
    ancestry; // Ancestry
} else {
    ancestry; // never
}


Implement Chat History Persistence

Current Behavior:
The current implementation of the Google Generative AI chat functionality does not retain chat history between requests. This results in the model treating each interaction as a new conversation, losing context and hindering the user experience.
Desired Behavior:
The chat interface should be able to:

Save: Persist the conversation history to a suitable storage mechanism (e.g., database, file, or in-memory store).
Utilize: Integrate the retrieved history into the model.startChat method's history parameter to provide context to the model.

Potential Benefits:

Improved User Experience:  Enabling more natural and flowing conversations with the AI model.
Enhanced Functionality:  Allowing for features like referencing previous messages or building on existing discussion points.

UPDATE: Currently stores chatHistory in cookie (#7)


Make sure correct env is invoked

Fun fact activemq has an env shell script if you happen to prepend $PATH with your personnal paths like :
export PATH=/opt/activemq/bin:$PATH

Any script won't work without failing, because ActiveMQ's env returns 0. In fasd this line won't do anything :
env mv -f "$tempfile" "$_FASD_DATA"

The symptom is that fasd won't jump because --add or --delete commands won't add your paths in the data file (usually .fasd). So fasd doesn't know these directories.
Another option would be to remove env, thoughts ?

activemq should rename their env shell script. Or they should tell you not to export their directory to $PATH. env is a standard POSIX command. http://pubs.opengroup.org/onlinepubs/9699919799/

Yeah I know, I've made a PR on their project renaming this script.
Thx for the link it will allow this PR to hove a bit more weight. But I wonder if the proper envcould be enforced.
Any way this issue has been written to log the issue. Maybe that could be useful to someone :)

This is much appreciated. I just realized that the link I provided earlier did not link to the actual page for env. This is now fixed.


Test cds

Codecov Report

Merging #66 into master will increase coverage by 2.41%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master      #66      +/-   ##
==========================================
+ Coverage    87.9%   90.32%   +2.41%
==========================================
  Files           4        4
  Lines         124      124
  Branches       23       23
==========================================
+ Hits          109      112       +3
+ Misses         11        9       -2
+ Partials        4        3       -1


Build error

_My config.yaml
# PLUGINS
gems: [jekyll-picture-tag]

# JEKYLL PICTURE TAG SETTINGS
picture:
  source: "img/posts"

Usage
{% picture IS-A.png %}

Error
Liquid Exception: undefined method `[]' for nil:NilClass in _posts/2015-05-25-object-oriented-design.md
/Library/Ruby/Gems/2.0.0/gems/jekyll-picture-tag-0.2.3/lib/jekyll-picture-tag.rb:43:in `render': undefined method `[]' for nil:NilClass (NoMethodError)
	from /Library/Ruby/Gems/2.0.0/gems/liquid-2.6.2/lib/liquid/block.rb:109:in `block in render_all'
	from /Library/Ruby/Gems/2.0.0/gems/liquid-2.6.2/lib/liquid/block.rb:96:in `each'
	from /Library/Ruby/Gems/2.0.0/gems/liquid-2.6.2/lib/liquid/block.rb:96:in `render_all'
	from /Library/Ruby/Gems/2.0.0/gems/liquid-2.6.2/lib/liquid/block.rb:82:in `render'
	from /Library/Ruby/Gems/2.0.0/gems/liquid-2.6.2/lib/liquid/template.rb:128:in `render'
	from /Library/Ruby/Gems/2.0.0/gems/liquid-2.6.2/lib/liquid/template.rb:138:in `render!'
	from /Library/Ruby/Gems/2.0.0/gems/jekyll-2.5.3/lib/jekyll/convertible.rb:106:in `render_liquid'
	from /Library/Ruby/Gems/2.0.0/gems/jekyll-2.5.3/lib/jekyll/convertible.rb:233:in `do_layout'
	from /Library/Ruby/Gems/2.0.0/gems/jekyll-2.5.3/lib/jekyll/post.rb:261:in `render'
	from /Library/Ruby/Gems/2.0.0/gems/jekyll-2.5.3/lib/jekyll/site.rb:298:in `block in render'
	from /Library/Ruby/Gems/2.0.0/gems/jekyll-2.5.3/lib/jekyll/site.rb:297:in `each'
	from /Library/Ruby/Gems/2.0.0/gems/jekyll-2.5.3/lib/jekyll/site.rb:297:in `render'
	from /Library/Ruby/Gems/2.0.0/gems/jekyll-2.5.3/lib/jekyll/site.rb:51:in `process'
	from /Library/Ruby/Gems/2.0.0/gems/jekyll-2.5.3/lib/jekyll/command.rb:28:in `process_site'
	from /Library/Ruby/Gems/2.0.0/gems/jekyll-2.5.3/lib/jekyll/commands/build.rb:56:in `build'
	from /Library/Ruby/Gems/2.0.0/gems/jekyll-2.5.3/lib/jekyll/commands/build.rb:34:in `process'
	from /Library/Ruby/Gems/2.0.0/gems/jekyll-2.5.3/lib/jekyll/commands/build.rb:18:in `block (2 levels) in init_with_program'
	from /Library/Ruby/Gems/2.0.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `call'
	from /Library/Ruby/Gems/2.0.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `block in execute'
	from /Library/Ruby/Gems/2.0.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `each'
	from /Library/Ruby/Gems/2.0.0/gems/mercenary-0.3.5/lib/mercenary/command.rb:220:in `execute'
	from /Library/Ruby/Gems/2.0.0/gems/mercenary-0.3.5/lib/mercenary/program.rb:42:in `go'
	from /Library/Ruby/Gems/2.0.0/gems/mercenary-0.3.5/lib/mercenary.rb:19:in `program'
	from /Library/Ruby/Gems/2.0.0/gems/jekyll-2.5.3/bin/jekyll:20:in `<top (required)>'
	from /usr/bin/jekyll:23:in `load'
	from /usr/bin/jekyll:23:in `<main>'

Can anyone please correct me where I am wrong?
P.S: A proper example would be of great help as I am not a Ruby developer.

You appear to be missing the preset settings. You should have something like this in your _config.yml
picture:
  source: "img/posts"
  presets:
    default:
      ppi: [1, 1.5, 2]
      source_large:
        media: "(min-width: 480px)"
        width: "252"
      source_default:
        width: "480"


fix(deps): update icr.io/ext/sysdig/agent docker tag to v13.2.1

This PR contains the following updates:

Package
Update
Change

icr.io/ext/sysdig/agent
patch
13.2.0 -> 13.2.1

Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.

[ ] If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

/run pipeline

/run pipeline

/run pipeline

:tada: This PR is included in version 1.25.4 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Suggestion: Separate typescript source compiler from any ide integration

I would think it would be better to separate typescript's compiler and bug and release cycle from any ide related issues.  To me if the command line compiler works as expected then any ide integration should be the responsibility of that ide.  Of course the typescript community can maintain plugins for ide's in separate repo's if they want in order to help increase typescripts use.
The last release was tied to VS and also several bugs that where VS related were either holding up the 1.5 release or were moved to 1.6 prior to 1.5 official being released.  Not just picking on VS this would include Atom, Webstorm ect...
I am not that familiar with the things involved in having a particular ide support a language, but maybe some type of open api or maybe there is already a standard method to publish language features for ide consumption and typescript just needs to conform to that standard.
I just think this type of separation of compiler and ide would make for a smoother and faster development environment for the typescript language.

Are you talking about moving the source code around, or changing how we schedule releases? The compiler source and the VS integration source are already completely separate.

A few thoughts here, as of last week [TypeScript now has a nightly release on npm] (http://blogs.msdn.com/b/typescript/archive/2015/07/27/introducing-typescript-nightlies.aspx). we have kept master in a shipable state for the last few years. so nightly builds should not be broken builds, but rather may include design changes.without due breaking announcements. we are also working on getting a faster release cadence for all tools as well as the compiler, and ultimately a nightly tooling drop as well.
Tooling has been, and continues to be one of the TypeScript value propositions. TypeScript services are not only used for VS, but in VS Code, sublime text, Atom, eclipse, etc.. getting a release out for all these tools takes some time, and that participates in the time we spend "stabilizing" a release.
I do not think it is correct to ship a compiler that does not match tooling. it is annoying to me as a user to have to get errors in my editor, that i can "ignore" because i know my build tools is ok with it. it makes it hard to users to trust their tools feedback.

@RyanCavanaugh I was mainly referring to release schedule where you have a stable build of typescript as far as the core and language services, but you still have a bug in 1 or 2 particular editor's that may hold up the official release.
@mhegazy I agree that editor support is very important or people will not use the language.  It just seemed that sometimes the core compiler and tsc are feature complete and work fine in some editors but are buggy in others and we have to wait for all major editors to be fixed before official release.  This just seems very tightly coupled.  It just hit me as something where I thought workflow could be better by decoupling typescript from editors.  Now if I am reading this correctly then the Language Service is like an api for editors to consume to show errors, debug info,breakpoints ect...  I don't understand why if editors say Atom and Webstorm compile typescript fine and breakpoints are hit, then this should mean that the core and language service are good to go, but then say Sublime or VS Code has a problem why is this a bug in typescript, it could be but then would that not mean it is a bug for all editors as long as those editors conform to your specs.  I do understand your quote that it takes time to get editor support, and it is necessary in order for the language to be adopted for typescript to provide plugins for some ide's by default and that those plugins need to work with each new release,  but then you are endorsing or officially supporting X ide's over others.  I just prefer having the core feature set independent of any vendor's ide's.  You can certainly maintain official repos for plugins and keep them up to date with the official releases but not all plugins have to be working when the each version of typescript is released, it could be that x ide's plugin has some bugs but it works fine in other ide's now and we will have it fixe for x ide shortly, this also pushes the responsibility on the ide vendors to provide support for the language if they want their ide to be better.  Like any javascript framework say react, angular, they do not wait for certain ide's to add support for their framework before each release, of course basic javascript support works in the ide's but many add specific react angular features to their ide's to enhance debugging and error checking support specific to that framework.
So enough of the complaining, :)  Seriously not a complaint just a suggestion.
I really like typescript so far, Thanks for the 1.5 release and looking forward to finished es6 feature set with some es7.
Thanks,
Dan

@delebash definitely hear this loud and clear, it's something I have actually spent quite a bit of time thinking about lately.
I complain more than most so don't feel bad about the occasional light rant ;) Always happy to have feedback.

Two things to add.
First, I think we're in general agreement (internally) that the 1.5 release cycle was waaaaaay too long. It initially made sense to align this release with the VS schedule, but software schedules are prone to certain things that ended up making this release interval much longer than intended. This won't be repeated.
Second, getting our language working in at least one editor is a critical part of vetting the decisions we're making. It would be imprudent to release a commandline compiler that had syntax, semantics, or performance characteristics that ended up having bad downstream effects on editors. We don't necessarily need to make VS be the first editor to fully support each iteration of the language, but we do need some editor in common use to be usable before we can have confidence that we're releasing a good next step. We're making progress toward some architectural changes that will allow us to iterate on the VS side faster so that we can tighten up that feedback loop.

Glad to hear about shorter release cycles, I am all for short sprints vs long hauls.  This was just food for thought, so in the end as long as typescript releases are not held back for long periods of time by problems with x,y, or z ide integration problems then its all good.