Incomplete road generation

Version: 0.9.8
Hi,I using custom OpenDrive created by a OpenRoadEd
while click "Generation Roads",there is no error,but road network is not a closed loop
screenhot:

.xodr file:
openroaded_20191224.xodr.zip

This tool is just a simple visualizer to help to see if the OpenDrive is well-formed. If the OpenDrive is good, the simulation should run. I would suggest checking the OpenDrive to see if there are some information missing or not.

I am closing this. If the issue persists I will be happy to re-open it.


[MATLAB] Implement fromMATLAB method for arrow.array.ListArray.

Describe the enhancement requested
In support of #38353, we should implement a static fromMATLAB method for arrow.array.ListArray that takes in a MATLAB cell array and returns an instance of arrow.array.ListArray.
Component(s)
MATLAB

take


[Bug]: inconsistent behavior between headless: true and headless:"new" when calling isIntersectingViewport()

Minimal, reproducible example
import puppeteer from "puppeteer";
import UtilityClass from "./UtilityClass";
import assert from "node:assert";
import { test } from "node:test";

test("test description", async () => {
  const url = "https://devexpress.github.io/testcafe/example/";
  const browser = await puppeteer.launch({
    headless: "new",
    defaultViewport: null,
  });

  const [page] = await browser.pages();
  await page.goto(url);
  const el = await page.$(" p:nth-child(5) > label");
  const isVisible = await el?.isIntersectingViewport();

  // bug?
  console.log(isVisible); // will give false, but with "headless: true" will give true
  // assert.equal(isVisible, true);
  await browser.close();
});

Error string
No error string apart from the deprecation warning.
Bug behavior

[ ] Flaky
[ ] PDF

Background
I've been trying to maintain a collection of utility functions for my pptr scripts and I noticed that the "new" headless mode has a different behavior than the old one, there is an inconsistency in behavior between true/"new" values of the headless option when calling the .isIntersectingViewport() method. In the case above, the test runs with "new" and according to .isIntersectingViewport() the element is not visible, but when i run the test with "headless: true", .isIntersectingViewport() returns true.
Expectation
I expected const isVisible = await el?.isIntersectingViewport() to be true when using 'headless: "new"'.
Reality
In reality const isVisible = await el?.isIntersectingViewport() is false when using 'headless: "new"'.
Puppeteer configuration file (if used)
No response
Puppeteer version
21.4.1
Node version
v21.1.0
Package manager
npm
Package manager version
10.2.1
Operating system
Windows

I am unable to reproduce on Mac (will try on Windows):
import puppeteer from "puppeteer";
const url = "https://devexpress.github.io/testcafe/example/";
const browser = await puppeteer.launch({
  headless: "new",
  defaultViewport: null,
});
const [page] = await browser.pages();
await page.goto(url);
const el = await page.$(" p:nth-child(5) > label");
const isVisible = await el?.isIntersectingViewport();
console.log(isVisible);
await browser.close();

Note that using defaultViewport: null, means that the viewport could be of a different size and since the new headless has browser UI area it will be different depending on the platform/browser version.

Unable to reproduce on Windows too (I get the value true for the provided snippet).  Let me know if there additional steps/preconditions to reproduce this?

My apologies! When I read your comment I realised the mistake: I am indeed using windows but the script runs inside debian-wsl, and to make pptr run I did this:
1.sudo apt update && sudo apt upgrade -y
2.export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2; exit;}'):0.0
3.sudo /etc/init.d/dbus start &> /dev/null
4.sudo vim -f /etc/sudoers.d/dbus
..and add:
<your_username> ALL = (root) NOPASSWD: /etc/init.d/dbus
5.reload/close the terminal
6.sudo apt-get install ca-certificates fonts-liberation libappindicator3-1 libasound2 libatk-bridge2.0-0 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgbm1 libgcc1 libglib2.0-0 libgtk-3-0 libnspr4 libnss3 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 lsb-release wget xdg-utils
I tested in windows and as you said it doesn't reproduce.


Allow offline vulnerability database and transitive resolution to be enabled/disabled separately.

Currently, enabling offline mode (--experimental-offline) in scanning makes the scanner use a local vulnerability database and disables transitive dependency resolution for Maven pom.xml files.
But there are use cases for having one and not the other, i.e.

Disable transitive resolution, but still use the OSV.dev vulnerability API, as in #1121
Use a local vuln db, but still do transitive scanning in environments with access to the maven registry but not osv.dev.

With #1286 adding the --experimental-resolution-data-source flag, we could allow setting this to none or disable to disable transitive resolution, and make the --experimental-offline flag affect only the vulnerability database. (But that would mean 'offline mode' may still attempt to make network requests...)

I think we still should follow the assumption not to make network requests with --experimental-offline flag.
Maybe make this flag to take a string:

all or empty: default, no network requests at all
vulnerability: use offline database for vulnerability
dependency: does not perform transitive dependency scanning

I think we still should follow the assumption not to make network requests with --experimental-offline flag.
Maybe make this flag to take a string:

all or empty: default, no network requests at all
vulnerability: use offline database for vulnerability, but performs dependency resolution
dependency: does not perform transitive dependency scanning but making requests to OSV

+1! But I'd rename dependency to pkg-registry or something similar to be clearer.

all or empty: default, no network requests at all

Hm, the desired behaviour seems impossible with urfave/cli:
# using cli.StringFlag
# original behaviour is broken:
> osv-scanner scan --experimental-offline
flag needs an argument: -experimental-offline

> osv-scanner scan --experimental-offline --experimental-download-offline-databases
experimental-offline = "--experimental-download-offline-databases"
experimental-download-offline-databases = false

# now the string is always required:
> osv-scanner scan --experimental-offline all
experimental-offline = "all"
> osv-scanner scan --experimental-offline=vulnerability
experimental-offline = "vulnerability"
> osv-scanner scan --experimental-offline=
experimental-offline = ""

Personally, I'd prefer to keep the --experimental-offline syntax the same as a boolean flag.
How about adding new flags e.g. --experimental-offline-vulnerabilities and --experimental-no-resolve (or --experimental-resolution-data-source=none), and have --experimental-offline set both?

o keep the --experimental-offline syntax the same as a boolean flag.

How about adding new flags e.g. --experimental-offline-vulnerabilities and --experimental-no-resolve (or --experimental-resolution-data-source=none), and have --experimental-offline set both?

SGTM, this seems pretty reasonable.
Now that I think about it, I think we also discovered we couldn't have an empty string work as "all" by default for --call-analysis / --no-call-analysis in https://github.com/google/osv-scanner/issues/513. @hogo6002 is that right?

SGTM as well - I am leaning to have --experimental-no-resolve for turning off resolution.

Now that I think about it, I think we also discovered we couldn't have an empty string work as "all" by default for --call-analysis / --no-call-analysis in #513. @hogo6002 is that right?

Yeah, I think we can't directly pass an empty string value to a cli.StringFlag, but Gareth mentioned we can use cli.GenericFlag to implement it. https://github.com/google/osv-scanner/issues/513#issuecomment-1819631588

Now that I think about it, I think we also discovered we couldn't have an empty string work as "all" by default for --call-analysis / --no-call-analysis in #513. @hogo6002 is that right?

Yeah, I think we can't directly pass an empty string value to a cli.StringFlag, but Gareth mentioned we can use cli.GenericFlag to implement it. #513 (comment)

Interesting, but since we didn't go with this for --call-analysis, we should be consistent and just go with an approach that doesn't rely on this. i.e. @michaelkedar 's suggestion in https://github.com/google/osv-scanner/issues/1339#issuecomment-2430797119


Cleanup before repo move

@strangiato I don't expect you to do a full, review, but are you ok with the parts you care about?


Wind barbs not showing properly

Checklist:

[x] I updated to the latest version available
[x] I cleared the cache of my browser

Release with the issue: 4.9.0
Last working release (if known):
Browser and Operating System:
Opera, Chrome (Windows 10)
Home Assistant supervised on Debian
On another installation I have (in another home), using Home Assistant Operating System, barbs display correctly.

Description of problem:
The wind barbs do not display, showing instead dots at various positions:

Everything works fine when displaying wind speed and direction as text:

Any idea?

Javascript errors shown in the web inspector (if applicable):

Additional information:

The dot means calm/light winds. It is in different positions because it's rotated for direction. The barb svgs are a little off center, but I didn't have time to dig in to improving them (they're from an open source library).

@decompil3d Thank you for your quick answer.
I know that the dots mean calm winds, but the issue is that the card always displays them, regardless of the speed of the wind. If you look at the pictures I posted, the wind speeds range from 4 to 12 knots, and most of them should definitely be displayed as barbs.
Can you please have a look?

Oh interesting. Might be a bad conversion from knots. Can you please share the devtools state of the weather entity you're using? The full yaml including attributes.

You are right, I checked my other HA installation, where wind barbs display correctly, and the speed unit is kph, no kn. So must definitely be something related with knots.
Here is the devtools state (I included only the first forecasts, as there are lots of them. Of course I will share the whole yaml if you need it):
`temperature: 11
temperature_unit: °C
humidity: 85
pressure: 1017.2
pressure_unit: hPa
wind_bearing: 155
wind_speed: 7.78
wind_speed_unit: kn
visibility_unit: km
precipitation_unit: mm
forecast:

datetime: '2022-11-27T19:00:00+00:00'
condition: partlycloudy
wind_bearing: 165
temperature: 10.5
wind_speed: 7.78
precipitation: 0
datetime: '2022-11-27T20:00:00+00:00'
condition: partlycloudy
wind_bearing: 180
temperature: 10
wind_speed: 7.78
precipitation: 0
datetime: '2022-11-27T21:00:00+00:00'
condition: partlycloudy
wind_bearing: 195
temperature: 9.5
wind_speed: 7.78
precipitation: 0
datetime: '2022-11-27T22:00:00+00:00'
condition: cloudy
wind_bearing: 200
temperature: 9.2
wind_speed: 5.83
precipitation: 0
datetime: '2022-11-27T23:00:00+00:00'
condition: cloudy
wind_bearing: 205
temperature: 8.9
wind_speed: 5.83
precipitation: 0
datetime: '2022-11-28T00:00:00+00:00'
condition: cloudy
wind_bearing: 210
temperature: 8.6
wind_speed: 3.89
precipitation: 0
`

Backticks don't seem do work as I expected... Of course the bullet points are actually hyphens in the yaml.

I confirm that 4.9.1 corrected the issue. Thanks!


When clicking a link, you're asked to sign in again when you return

So this is odd, but when you reply to a thread, and then you click a link, it takes you to the link but the current tab also loads the login modal, you're not actually logged out, but it is annoying to have to click the X every time: https://i.imgur.com/4WWPVUQ.gif
Otherwise great extension!
Using Dev tools, it looks like 'setTimeout' is being called when the link is clicked, google turned up nothing for that besides a flarum bug with the scroll bar.

possible related: https://github.com/oaklinq/flarum-ext-reply2see/pull/1


Failed auto docs deployment during release

After this change #58 github has a workflow that updates the mkdocs website at each release.
Currently, when i tried to make a release the workflow fails:
https://github.com/ing-bank/probatus/runs/2003842919?check_suite_focus=true
This might be caused by the fact that github requires passing username and password before pushing to the gh-pages branch.

Fix in 9da4871fafa60cba2a7205f7274c06d90a431d3b , probably. Let's see next release.


use IRequestHandler for commands

Commands should use IRequestHandler instead of INotificationHandler
Bus should send the command instead of publishing an event

Fixed in new version.


Atom does not store settings in ".atom" when using it from PortableApps platform

Description
I am trying to run Atom as a portable so settings and everything stay on the same folder but I couldn't make it to work. For PortableApps I am using PortableApps Platform. I have followed the steps on this docs however I don't know if those are the latest or are outdated.
Steps to Reproduce

Download PortableApps Platform from the link above and install it wherever you want to (in my case I did it under F: but you can try with a USB flash drive)
Download the Atom ZIP file from https://github.com/atom/atom/releases I am using latest version 1.24.0-beta3
Go to your PortableApps folder (f:\PortableApps\PortableApps\) and unzip the downloaded file.
I have renamed the folder to AtomPortable but you can leave it as it's that doesn't matter.
Create the folder .atom under f:\PortableApps\PortableApps\AtomPortable
Using the PortableApps executable file - f:\PortableApps\Start.exe and open it
Run Atom from there and change any settings or install a new package and/or theme
Check the .atom folder, it will be empty (at least in my case)
All the settings went to %userprofile%/.atom

Expected behavior: everything related to Atom is stored under the .atom folder at the PortableApps path
Actual behavior: All the settings went to %userprofile%/.atom
Reproduces how often: I have tried only once cause I just downloaded Atom to use it recently
Versions:

1.24.0-beta3

This is the expected behavior unless you set the ATOM_HOME environment variable to point to where you want your .atom folder to be.

@lee-dohm you should update docs. Read again here what do you understand? (or I did understand at least).

Alternatively you can set the ATOM_HOME environment variable to point wherever you want (you can write a .sh or .cmd script to temporarily set it and launch it from that)

That is not mandatory and as per your answer here, it is mandatory so it is a little confusing when you read that but you said something different here. Anyway thanks for the info I will try and see if that works


[Tutorial] Can you link a tutorial on how to redesign an icon in SVG?

About this discussion

I was able to do this with GIMP based on this video, but it's not SVG and corner radius isn't considered tho. Converting it to SVG with an online converter is doing bad.
I guess I should use Inkscape for this? Could you please link/add to Contributing.md a tutorial video for me which explains what I should do? I am new to vector design but would like to learn about it.

autotrace bandsintown.png --output-file output.svg --output-format svg
Autotrace is doing weird things too...

I see you're having some issues with making icons. Here's a short clip of me using the pen tool to create a section of the icon you were making here. However I use Illustrator to create icons instead of Inkscape so its a bit different. If I'm not wrong, Inkscape has a "bezier tool" instead of "pen tool". I'd recommend watching a video on learning the bezier. Here's a video of a person making a music icon using the bezier and circle tool: https://www.youtube.com/watch?v=wH7OI5r8lfU
The pen/bezier tool is something you learn and improve on by using. I hope this helps and I'll take note of making a tutorial video for the future.

Thanks for your help @Chefski, I found this tutorial which was helpful to begin learning the bezier pen. I was able to do this with it, which looks quite useful already!

What do you say? :D
I would like to keep focus on FOSS tools like Inkscape for now, because I don't own Adobe Suit.

I am still missing the Stroke width of 12 px, as set in CONTRIBUTING.md. The image my comment above is with a stroke style width of 1 px. This is what 12 px in Inkscape looks like:

Should I go with 6 in Inkscape? Or what would be correct?
Really looking into making some icons :eyes:

Great to see you learned how to make vector icons! I'd suggest moving the lines more inwards if they seem to touch other lines after applying the stroke. Check out my sample here. I maintained the 12px stroke by putting the path more inwards if that makes sense. Feel free to use that SVG and make a PR :)
Good luck!

Where do you get the original icon in 192x192 from @Chefski ? If I look on play.google.com, they are 240x240 like this. Or do you just resize them yourself?

You resize yourself. I also get the icons from the Play Store website.

Okay, thats what i tried to do (scale pure icon to 160x160 with kpaint and then resize to 176x176 for left and bottom 16px ((192-160)/2), then rotating by 90° 2 times and resizing to 192x192 and rotating so that in the end my icon size is 192x192 with 16px borders.)
What tool did you use for the red lines in the pr?
Are these px values for the red lines correct?
16 28 164 176
16
28
164
176

When I make the icons and have to resize to fit the borders, I group all the shapes and make either the height or width (which ever is bigger) 148px if the stroke is made from the center.

The red lines are guide lines. I have them set to 160x160px and 144x144px as those are the 2 content area sizes specified in the guidelines. 160x160px is for most shapes, 144x144px is for squares.
https://inkscapetutorials.wordpress.com/2014/04/25/working-with-guides-in-inkscape/
These guidelines were also present in the Loom clip but they were cyan and I put them at at each line I had to draw

144x144px is for squares.

What does that mean? Could you link an example, please?

Instagram uses the 144x144px content area as its a square but a very rounded one


Selenoid latest does not start

I have issue with Selenoid latest (Jun 25, 2022 at 5:57 pm) does not start while Selenoid latest-release is working fine.
Does Selenoid latest required additional configuration, or anyone encounter this issue?
Docker Desktop 4.9.1 (81317)

@daseio we never said latest will work. This image is basically the latest commit to master branch. Yes, probably we broke something. But this was not released yet, so just use a release image.


Error on Update Web App Source Control Configuration

Error message received during deployment, specifically for Update Web App Source Control Configuration.
The error message is
The resource write operation failed to complete successfully, because it reached terminal provisioning state 'Failed'
Can someone help?

Resolved by updating plan to 2 and SQL plan to S2


Support for Validator components in MudForm

Feature request type
Enhance component
Component name
MudForm
Is your feature request related to a problem?
MudForm is great, but I miss a feature available in EditForm: the ability to attach validator components, as show in Microsoft Docs.
In my scenario, I use FluentValidation for both front-end and back-end validations. An example of a back-end validation would be to validate, before an insert, if a unique key field is not violated (or else, if the value is not already present in DB).
With EditForm and Validator Component, I am able to show a validation error in the form field in the very same manner I do for front-end validation erros (for instance, if the field is required and is empty).
However, with MudForm, I couldn't find a way to do it in a generic way, as it does not have an EditContext cascading parameter.
Describe the solution you'd like
Create and EditContext cascading parameter for MudForm similar to the one available in EditForm.
Have you seen this feature anywhere else?
No response
Describe alternatives you've considered
As a workaround, I am able to set the validation error message of some individual fields, but this is far from being the ideal solution.
Pull Request

[ ] I would like to do a Pull Request

Code of Conduct

[X] I agree to follow this project's Code of Conduct

@marcoatribeiro
it's not a problem at all. I can definitely help you with that. Here's some code that you can use as a reference:
public class AddEditRelatedWorkerCommandValidator : AbstractValidator<AddEditRelatedWorkerCommand>
{
    private readonly IApplicationDbContext _dbContext;
    private readonly IAppCache _cache;
    private readonly SemaphoreSlim _semaphore = new(1, 1);
    public AddEditRelatedWorkerCommandValidator(IApplicationDbContext dbContext, IAppCache cache)
    {

        RuleFor(v => v.Documentation)
            .MustAsync((x,doc ,cancellation) =>hasExistsById(x, cancellation)).When(x=>x.Name!=null).WithMessage("no exists");

        _dbContext = dbContext;
        _cache = cache;
    }

    private async Task<bool> hasExistsById(AddEditRelatedWorkerCommand item, CancellationToken cancellation = default)
    {
        await _semaphore.WaitAsync();
        try
        {
            return await _cache.GetOrAddAsync($"hasExistsById:{item.Documentation},{item.Name}",
                async()=> await _dbContext.Trainees.AnyAsync(v => v.ExpiryDate >= DateTime.Now.Date && v.Documentation == item.Documentation && v.Name== item.Name, cancellation),
                new TimeSpan(0,0,30)
                );
        }
        finally { _semaphore.Release(); }

    }
    private async Task<bool> hasExistsByName(string name, CancellationToken cancellation = default)
    {
        await _semaphore.WaitAsync();
        try
        {
            return  await _cache.GetOrAddAsync($"hasExistsByName:{name}",async()=>
             await _dbContext.Trainees.AnyAsync(v => v.ExpiryDate >= DateTime.Now.Date && v.Name == name, cancellation),new TimeSpan(0,0,30));
        }
        finally { _semaphore.Release(); }
    }
    public Func<object, string, Task<IEnumerable<string>>> ValidateValue => async (model, propertyName) =>
    {
        var result = await ValidateAsync(ValidationContext<AddEditRelatedWorkerCommand>.CreateWithOptions((AddEditRelatedWorkerCommand)model, x => x.IncludeProperties(propertyName)));
        if (result.IsValid)
            return Array.Empty<string>();
        return result.Errors.Select(e => e.ErrorMessage);
    };
}

Hi, @neozhu!
Thanks for your reply, but it doesn't really solve the issue I reported.
Please note the example I provided about the unique key is just that: an example. My suggestion is about having a way to get any validation errors from the backend (regardless of being related to the DB or not) and assigning them to the respective fields in a MudForm, just like I can do for EditForm, with the help of a class similar to the CustomValidation class, described in the docs.

Hi @marcoatribeiro,
I was wondering if you could help me understand why just not stick with the EditContext then? Is there a particular feature or functionality that EditContext lacks? MudForm was primarily designed to support nested forms and enable working without a model but those are corner cases.

Hi @ScarletKuro!
I'm using both, actually. EditForm also lacks some nice features which MudForm has (in particular, the ability to reset only validation state, without the need to reset the whole model).
Anyway, just to be clear: by no means I consider this feature a "must have" for MudForm, but if it were added, I'd most likely be able to make MudForm my standard choice for most (if not all) of my components. 😉


fix: google analytics to differentiate pages (dw-177) (#113)

Fixes #113
Fixes dw-177
Changes:

Manually record page views because bDAO website is an SPA. Based on https://www.makeuseof.com/nextjs-google-analytics/

Actually, the current Google Analytics setup DOES differentiate pages. The problem this PR intended to fix doesn't actually exist. See GitHub comment for reference: https://github.com/BanklessDAO/bankless-website/issues/113#issuecomment-1539247678
Thus, I am closing this PR.


Alter May Day 2020 UK

Important specifications

Which country is affected? United Kingdom
If you have found a mistake please also provide a valid source of your information?

Alteration of holiday location for 1 year only
Description
The UK is moving the Early May Bank Holiday from Monday 4th May 2020 to Friday 8th May 2020, meaning this will need to be updated. It is a one-off change.
Source: https://www.bbc.co.uk/news/uk-48565417

Thanks for the pull

The new nuget package is pushed

It is wrong implemented. See https://github.com/tinohager/Nager.Date/issues/153


Server down?

Hello! I tried using the level viewer today. It seems like none of the code I put in are working now. I tried both the exe and the website.

Yes, the API is down until further notice


preprocess.py: Setting no-neutralise from config?

While looking through Vineet's conditional PR, was wondering what the intended usage is for args.no_neutralise in preprocess.py. I can think of situations where this would be helpful, but it can't be set in config.yaml - is the idea that I would manually run the preprocess.py command, and then separately run the rest of the Snakemake pipeline, which would automatically detect that the preprocessing step has already been run?

follow-up from the meeting - we should expose all the command line flags currently supported in clm preprocess in the snakefile.


Licensing compatible with Meteor?

Since the Meteor community is well aware of the pitfalls inherent in Mongo, there was significant enthusiasm when we learned about Hyperdex.
However, from what I've seen in terms of licensing, it seems we might have a problem with going ahead and figuring out how to add support for HyperDex to Meteor.
Any ideas on how Meteor might still be able to use HyperDex?
CC @awatson1978

Hi Dan,
Our license is located here:  https://github.com/rescrv/HyperDex/blob/master/LICENSE.
This license covers the code that supports all the consistency, fault-tolerance, and atomic operations HyperDex is known for.  Redis, MongoDB, and others stop at this feature set.  We've gone further with HyperDex Warp, which adds ACID transactions across multiple keys on top.  Although this is indeed our key feature, we could not make these guarantees to applications without the underlying HyperDex storage system.
From what I can see of Meteor, it'd do just fine with the fully-supported open source code base if the Meteor community's enthusiasm is deflated by the transactional add-on.

Hi Dan; Hi Robert;
The architecture behind Meteor relies on two packages called mongo-livequery and minimongo which basically implement a client-side replica-set.  The good folks at the Meteor Development Group have effectively open-sourced the pattern for implementing client-side replica sets within web browsers; but even open-sourced, it's still a rather significant bit of database technology.
Porting HyperDex to Meteor in the way that people are wanting would basically involve writing a client-side replica set for HyperDex.  But it's a tough sell to put the time and effort into implementing a hyperdex-livequery and minihyperdex package without the ACID transactions.  The latency compensation depends on isomorphic APIs, and without the entire API available it just wouldn't make sense to try to do it at the community level.
This is something that either the HyperDex team would need to decide they want to implement themselves, or MDG would need to decide they want to approach HyperDex to purchase some type of global license (basically buy the tech from Cornell in some form).  Both of which are beyond my ability to address.  I'm not going to be sort through this.
Thanks for pinging me Dan.  Robert, nice to meet you.  For what it's worth, there's people in the Meteor community clamoring for your technology.  You might have a market there if you can implement a hyperdex-livequery and minihyperdex package.
Best.

I'm closing this issue because it sounds like the livequery and mini packages are a different design from Warp's transactions, and would likely require reworking both meteor and HyperDex.  Implementing both on HyperDex remains possible.


Bug: Node errors out and crashes on first install

What happened?
I am using the docker images,
I installed it following the instructions and also put ssl on the reverse proxy, resulting in the 3 dots appearing top left and the below error in the logs.
This also happens if I try to go direct to port 3000 using the machines IP.
Version
latest (ghcr.io/diced/zipline:latest)
What browser(s) are you seeing the problem on?
Chromium-based (Chrome, Edge, Brave, Opera, mobile chrome/chromium based, etc)
Zipline Logs
2023-03-31 03:41:22,990 PM info  [datasource] using Local(./uploads) datasource
2023-03-31 03:41:23,041 PM info  [database::migrations] establishing database connection
2023-03-31 03:41:23,042 PM info  [database::migrations] ensuring database exists, if not creating database - may error if no permissions
2023-03-31 03:41:23,478 PM info  [database::migrations] finished migrating database
2023-03-31 03:41:25,836 PM info  [server] listening on <IP_ADDRESS>:3000
2023-03-31 03:41:25,836 PM info  [server] started production<EMAIL_ADDRESS>server
2023-03-31 03:41:27,493 PM info  [server::response] GET /dashboard -> 200
/zipline/src/server/decorators/postFile.ts:21
      this.server.logger

           ^
TypeError: Cannot read properties of null (reading 'id')
    at _Reply.postUrl (/zipline/src/server/decorators/postFile.ts:21:12)
    at Object.urlsRouteOnResponse (/zipline/src/server/routes/uploads.ts:17:9)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Node.js v18.15.0
2023-03-31 03:41:30,682 PM info  [datasource] using Local(./uploads) datasource
2023-03-31 03:41:30,733 PM info  [database::migrations] establishing database connection
2023-03-31 03:41:30,734 PM info  [database::migrations] ensuring database exists, if not creating database - may error if no permissions
2023-03-31 03:41:30,895 PM info  [database::migrations] exiting migrations engine - database is up to date
2023-03-31 03:41:33,130 PM info  [server] listening on <IP_ADDRESS>:3000
2023-03-31 03:41:33,130 PM info  [server] started production<EMAIL_ADDRESS>server
2023-03-31 03:43:18,565 PM info  [server::response] GET /r/chrome_2023-03-31_15-20-41.png -> 404
2023-03-31 03:43:27,996 PM info  [server::response] GET /dashboard -> 200
/zipline/src/server/decorators/postFile.ts:21
      this.server.logger

           ^
TypeError: Cannot read properties of null (reading 'id')
    at _Reply.postUrl (/zipline/src/server/decorators/postFile.ts:21:12)
    at Object.urlsRouteOnResponse (/zipline/src/server/routes/uploads.ts:17:9)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Node.js v18.15.0
2023-03-31 03:43:31,270 PM info  [datasource] using Local(./uploads) datasource
2023-03-31 03:43:31,322 PM info  [database::migrations] establishing database connection
2023-03-31 03:43:31,323 PM info  [database::migrations] ensuring database exists, if not creating database - may error if no permissions
2023-03-31 03:43:31,487 PM info  [database::migrations] exiting migrations engine - database is up to date
2023-03-31 03:43:33,708 PM info  [server] listening on <IP_ADDRESS>:3000
2023-03-31 03:43:33,708 PM info  [server] started production<EMAIL_ADDRESS>server
2023-03-31 03:45:00,388 PM info  [server::response] GET /r/chrome_2023-03-31_15-20-41.png -> 404
2023-03-31 03:45:10,336 PM info  [server::response] GET / -> 302
2023-03-31 03:45:11,536 PM info  [server::response] GET /dashboard -> 200
/zipline/src/server/decorators/postFile.ts:21
      this.server.logger

           ^
TypeError: Cannot read properties of null (reading 'id')
    at _Reply.postUrl (/zipline/src/server/decorators/postFile.ts:21:12)
    at Object.urlsRouteOnResponse (/zipline/src/server/routes/uploads.ts:17:9)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Node.js v18.15.0
2023-03-31 03:45:14,886 PM info  [datasource] using Local(./uploads) datasource
2023-03-31 03:45:14,938 PM info  [database::migrations] establishing database connection
2023-03-31 03:45:14,940 PM info  [database::migrations] ensuring database exists, if not creating database - may error if no permissions
2023-03-31 03:45:15,105 PM info  [database::migrations] exiting migrations engine - database is up to date
2023-03-31 03:45:17,402 PM info  [server] listening on <IP_ADDRESS>:3000
2023-03-31 03:45:17,402 PM info  [server] started production<EMAIL_ADDRESS>server
2023-03-31 03:47:11,442 PM info  [server::response] GET /dashboard -> 200
/zipline/src/server/decorators/postFile.ts:21
      this.server.logger

           ^
TypeError: Cannot read properties of null (reading 'id')
    at _Reply.postUrl (/zipline/src/server/decorators/postFile.ts:21:12)
    at Object.urlsRouteOnResponse (/zipline/src/server/routes/uploads.ts:17:9)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Node.js v18.15.0
2023-03-31 03:47:14,721 PM info  [datasource] using Local(./uploads) datasource
2023-03-31 03:47:14,772 PM info  [database::migrations] establishing database connection
2023-03-31 03:47:14,774 PM info  [database::migrations] ensuring database exists, if not creating database - may error if no permissions
2023-03-31 03:47:14,941 PM info  [database::migrations] exiting migrations engine - database is up to date
2023-03-31 03:47:17,332 PM info  [server] listening on <IP_ADDRESS>:3000
2023-03-31 03:47:17,333 PM info  [server] started production<EMAIL_ADDRESS>server

Browser Logs
No response
Additional Info
version: '3'
services:
postgres:
image: postgres:15
restart: unless-stopped
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DATABASE=postgres
volumes:
- pg_data:/var/lib/postgresql/data
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U postgres']
interval: 10s
timeout: 5s
retries: 5
zipline:
image: ghcr.io/diced/zipline
ports:
- '3000:3000'
restart: unless-stopped
environment:
- CORE_RETURN_HTTPS=false
- CORE_SECRET=penisshit
- CORE_HOST=<IP_ADDRESS>
- CORE_PORT=3000
- CORE_DATABASE_URL=postgres://postgres:postgres@postgres/postgres
- CORE_LOGGER=true
- URLS_ROUTE=/
volumes:
- './uploads:/zipline/uploads'
- '$PWD/public:/zipline/public'
depends_on:
- 'postgres'
volumes:
pg_data:

Through testing, I have found it does not like - URLS_ROUTE=/  If you put another / in it generates urls with 3 / when the desired result is domain.co/jhjdfu

I'm not quite following. Are you saying that if URLS_ROUTE is set to //, it'll generate urls with ///?

Yes, a single "/" crashes the node when you try to access the dashboard and "//" creates urls with /// for example domain.co///djhfs

The /// result seems to be working as intended. The route that was set in config is expected to not end in a / so that it can be added later on upload or url shorten.


how do you delete SAM?

I used SAM to get some achievements but don't know how to uninstall it from my pc whenever I try to uninstall application it states that it is running/open but I cannot find it in task manager or anywhere else any help would be grateful
here the thing I see:

That's pretty strange. You closed both the Picker and the Game instance?
If you did, then something else must be interfering. A reboot will probably get rid of whatever has files open in that directory.

That's pretty strange. You closed both the Picker and the Game instance?
If you did, then something else must be interfering. A reboot will probably get rid of whatever has files open in that directory.
how do you reboot?

I simply meant restarting your computer.

Just open the task manager and close sam.exe


A new core typechecker for F* pure and ghost terms

This is a draft PR based on joint work with @aseemr. Some work still needs to be completed before it is ready to be merged.
FStar.TypeChecker.Core
The main component of this PR, it offers a core typechecker for F* terms. Although it has a few important optimizations (described below), it is also meant to be optimized for clarity, as a reference typechecker for core F*.
Its main API is

val check_term (g:env) (e:term) (t:term) (must_tot:bool) : either (option term) error.  This checks whether e is typeable in g at the type Tot t (if must_tot is true) or GTot t, otherwise. If successful, it returns either Inl None, meaning the term is typeable unconditionally; or Inl (Some p), where the term is typeable only if p is provable in g. If it fails, it returns Inr error.

Some main features of Core are:

It relies on memoization, where a hash table associates terms e with their typings G |- e : t <= p. To enable this, the representation of terms has changed to include a hash code, which is lazily computed and memoized at each node.

It implements a finer algorithm for relating terms, both by equality and subtyping, by selectively unfolding each side, one definition level at a time, unlike FStar.TypeChecker.Rel which more aggressively computes weak head normal forms to compare terms. That said, the Core does not have to deal with any of the higher-order unification features that Rel must, since the Core only works with fully elaborated terms.

Core still relies on FStar.TypeChecker.Env, FStar.TypeChecker.Normalize, and a few utilities related to patterns. As such, it is not an entirely standalone typechecker for F*. Note, it produces is a typechecking guard, rather than calling SMT itself. So, as such, it is independent of F*'s SMT encoding.

Relation to the unifier, tactic engine and #2635
A main motivation for introducing this core checker was in response to Bug #2635, which noticed that trusting the unifier to compute well-typed solutions, in the presence of refinement subtyping and equality reflection (i.e., using hypotheses silently from the context to convert types), is unsound. The patch we provided previously to #2635 tried to cover various holes in an ad hoc fashion. With this PR, we now are much more systematic about not trusting the unifier.
First, every unification solution computed by the regular typechecker in phase 2 (i.e., the phase that counts) is checked using Core. Any guard that is produced as a result must be proven. However, we have also made an effort to minimize the number of unification solutions that are computed in phase 2, trying to resolve nearly all uvars during the untrusted phase 1.
Second, in the tactic engine, in primitives that call the unifier (e.g., in apply_lemma, apply, trefl etc.), we check that every solution computed by the unifier using the Core and if any guards are produced as a result, this is added to the tactic state as additional goals (the behavior of this can be controlled by a policy, e.g., sending them to SMT, or showing them as explicit goals etc)
Relation to Steel
Although some Steel programs can be typechecked using this new Core behavior, some programs cannot, since the additional guards produced by the core are unexpected by the existing Steel tactics. We think it is possible for the Steel tactics to be revamped to handle these additional goals, but for now, we check all Steel programs using an option --compat_pre_core, to use a mode that provides compatibility with F* prior to this change. Even so, this is somewhat of an improvement to Steel prior to this change, since the unification solutions are at least checkable with the core, even if the tactics cannot yet cope with the resulting guards. Upgrading Steel to remove its reliance on this option is left for the future.

I wanted to try this branch on my projects, but got the following error when compiling F*:
File "src/extraction/ml/FStar_Extraction_ML_PrintML.ml", line 196, characters 55-74:
196 |      Ppat_construct (path_to_ident (path', name), Some (build_pattern pat))
                                                             ^^^^^^^^^^^^^^^^^^^
Error: This expression has type
         Ppxlib_ast.Parsetree.pattern = Parsetree.pattern
       but an expression was expected of type
         string Astlib.Ast_414.Asttypes.loc list *
         Ppxlib_ast.Parsetree.pattern

I'm using ocaml 4.14 and I just upgraded my opam packages (opam update && opam upgrade).
I tried to re-extract the ocaml snapshot using master's fstar.exe but it led to the same type error.

Hi @TWal, Tahina found this issue a few months back. OCaml AST changed since ppxlib version 0.26.0, but we have not yet upgraded our code. So, for now we pin the ppxlib version to 0.25.1. You could try with that.

Thanks, indeed this solved the problem (I wonder how it managed to compile on master however).
This branch breaks my usage of tactics, I minimized one example:
type simple_record = {
  f1: int;
  f2: int;
}

unfold
let f (x:simple_record): (f1:int & int) =
  let {f1; f2} = x in
  (|f1, f2|)

unfold
let g (x:(f1:int & int)): simple_record =
  let (|f1, f2|) = x in
  {f1; f2}

val dtuple2_ind: #a:Type -> #b:(a -> Type) -> p:((x:a & b x) -> Type0) -> squash (forall (x:a) (y:b x). p (|x, y|)) -> Lemma (forall xy. p xy)
let dtuple2_ind #a #b p _ = ()

let _: squash (forall (x:(f1:int & int)). f (g x) == x) =
  synth_by_tactic(fun () -> (
    apply_lemma (`dtuple2_ind);
    let _ = forall_intro () in
    let _ = forall_intro () in
    trefl();
    dump "end goal"
  ))

Thanks for the example @TWal! I have a fix that handles it properly now.
Let us know if you have any other regressions.

Thanks for the quick fix!
I found another issue:
assume val nat_dep: nat -> eqtype

type simple_record = {
  f1: nat_dep 1;
  f2: nat_dep 2;
}

unfold
type nested_pair = (f1:nat_dep 1 & nat_dep 2)

unfold
let f (x:simple_record): nested_pair =
  let {f1; f2} = x in
  (|f1, f2|)

unfold
let g (x:nested_pair): simple_record =
  let (|f1, f2|) = x in
  {f1; f2}

val dtuple2_ind: #a:Type -> #b:(a -> Type) -> p:((x:a & b x) -> Type0) -> squash (forall (x:a) (y:b x). p (|x, y|)) -> Lemma (forall xy. p xy)
let dtuple2_ind #a #b p _ = ()

let _: squash (forall (x:nested_pair). f (g x) == x) =
  synth_by_tactic(fun () -> (
    apply_lemma (`dtuple2_ind);
    let _ = forall_intro () in
    let _ = forall_intro () in
    trefl()
  ))

It gives the error:
(Error 228) user tactic failed: ‘apply_lemma: Could not typecheck unifier solved implicit ?433 to fun x ->
  (let { f1 = f1 ; f2 = f2 } =
      let Prims.Mkdtuple2 #_ #_ f1 f2 = x in
      CoreBug.Mksimple_record f1 f2
    in
    (| f1, f2 |)) ==
  x because not equal terms: Prims.trivial <> Prims.equals (i >= 0) true‘

If we replace the nat_dep 2 by a nat_dep 1 then it works fine.
It also works fine if nat_dep actually depend on an int.

assume val nat_dep: nat -> eqtype

type simple_record = {
  f1: nat_dep 1;
  f2: nat_dep 2;
  f3: nat_dep 3;
}

unfold
type nested_pair = (f1:nat_dep 1 & (f2:nat_dep 2 & nat_dep 3))

unfold
let f (x:simple_record): nested_pair =
  let {f1; f2; f3} = x in
  (|f1, (|f2, f3|)|)

unfold
let g (x:nested_pair): simple_record =
  let (|f1, (|f2, f3|)|) = x in
  {f1; f2; f3}

val dtuple2_ind: #a:Type -> #b:(a -> Type) -> p:((x:a & b x) -> Type0) -> squash (forall (x:a) (y:b x). p (|x, y|)) -> Lemma (forall xy. p xy)
let dtuple2_ind #a #b p _ = ()

let _: squash (forall (x:nested_pair). f (g x) == x) =
  synth_by_tactic(fun () -> (
    apply_lemma (`dtuple2_ind);
    let _ = forall_intro () in
    apply_lemma (`dtuple2_ind);
    let _ = forall_intro () in
    let _ = forall_intro () in
    trefl()
  ))

gives the error:
Failed to check initial tactic goal Prims.squash (forall (x: f1: CoreBug.nat_dep 1 & (f2: CoreBug.nat_dep 2 & CoreBug.nat_dep 3)).
      ((let { f1 = f1 ; f2 = f2 ; f3 = f3 } =
            (let Prims.Mkdtuple2 #_ #_ f1 (Prims.Mkdtuple2 #_ #_ f2 f3) = x in
              CoreBug.Mksimple_record f1 f2 f3)
            <:
            CoreBug.simple_record
          in
          (| f1, (| f2, f3 |) |))
        <:
        f1: CoreBug.nat_dep 1 & (f2: CoreBug.nat_dep 2 & CoreBug.nat_dep 3)) ==
      x) because not equal terms: Prims.trivial <> Prims.equals (i >= 0) trueproof-state: State dump @ depth 1 (at the time of failure):
Location: CoreBug.fst(31,4-31,30)
Goal 1/1:
 |- _ : Prims.squash (forall (x: f1: CoreBug.nat_dep 1 & (f2: CoreBug.nat_dep 2 & CoreBug.nat_dep 3)).
      ((let { f1 = f1 ; f2 = f2 ; f3 = f3 } =
            (let Prims.Mkdtuple2 #_ #_ f1 (Prims.Mkdtuple2 #_ #_ f2 f3) = x in
              CoreBug.Mksimple_record f1 f2 f3)
            <:
            CoreBug.simple_record
          in
          (| f1, (| f2, f3 |) |))
        <:
        f1: CoreBug.nat_dep 1 & (f2: CoreBug.nat_dep 2 & CoreBug.nat_dep 3)) ==
      x)

CoreBug.fst(30,2-30,17): (Warning 351) Failed to check initial tactic goal Prims.squash (forall (x: f1: CoreBug.nat_dep 1 & (f2: CoreBug.nat_dep 2 & CoreBug.nat_dep 3)).
      ((let { f1 = f1 ; f2 = f2 ; f3 = f3 } =
            (let Prims.Mkdtuple2 #_ #_ f1 (Prims.Mkdtuple2 #_ #_ f2 f3) = x in
              CoreBug.Mksimple_record f1 f2 f3)
            <:
            CoreBug.simple_record
          in
          (| f1, (| f2, f3 |) |))
        <:
        f1: CoreBug.nat_dep 1 & (f2: CoreBug.nat_dep 2 & CoreBug.nat_dep 3)) ==
      x) because not equal terms: Prims.trivial <> Prims.equals (i >= 0) true (see also CoreBug.fst(29,7-29,52))
CoreBug.fst(30,2-37,4): (Error 228) user tactic failed: `apply_lemma: Could not typecheck unifier solved implicit ?336 to fun x ->
  (let { f1 = f1 ; f2 = f2 ; f3 = f3 } =
      let Prims.Mkdtuple2 #_ #_ f1 (Prims.Mkdtuple2 #_ #_ f2 f3) = x in
      CoreBug.Mksimple_record f1 f2 f3
    in
    (| f1, (| f2, f3 |) |)) ==
  x because  Top ()
> top (fun x ->
  (let { f1 = f1 ; f2 = f2 ; f3 = f3 } =
      let Prims.Mkdtuple2 #_ #_ f1 (Prims.Mkdtuple2 #_ #_ f2 f3) = x in
      CoreBug.Mksimple_record f1 f2 f3
    in
    (| f1, (| f2, f3 |) |)) ==
  x)
>> abs body ((let { f1 = f1 ; f2 = f2 ; f3 = f3 } =
    let Prims.Mkdtuple2 #_ #_ f1 (Prims.Mkdtuple2 #_ #_ f2 f3) = x in
    CoreBug.Mksimple_record f1 f2 f3
  in
  (| f1, (| f2, f3 |) |)) ==
x)
>>> app head (Prims.eq2 (let { f1 = f1 ; f2 = f2 ; f3 = f3 } =
      let Prims.Mkdtuple2 #_ #_ f1 (Prims.Mkdtuple2 #_ #_ f2 f3) = x in
      CoreBug.Mksimple_record f1 f2 f3
    in
    (| f1, (| f2, f3 |) |)))
>>>> app arg (let { f1 = f1 ; f2 = f2 ; f3 = f3 } =
  let Prims.Mkdtuple2 #_ #_ f1 (Prims.Mkdtuple2 #_ #_ f2 f3) = x in
  CoreBug.Mksimple_record f1 f2 f3
in
(| f1, (| f2, f3 |) |))
>>>>> scrutinee (let Prims.Mkdtuple2 #_ #_ f1 (Prims.Mkdtuple2 #_ #_ f2 f3) = x in
CoreBug.Mksimple_record f1 f2 f3)
>>>>>> check_branches (CoreBug.simple_record)
>>>>>>> check_pat ()
>>>>>>>> pat dot term (CoreBug.nat_dep 2)
>>>>>>>>> app subtyping ()
>>>>>>>>>> check_subtype(no_guard) (Prims.int ( <:? 2) Prims.nat)
>>>>>>>>>>> check_relation (Prims.l_True =?= i >= 0)
>>>>>>>>>>>> check_relation (Prims.squash Prims.trivial =?= x: Prims.unit{Prims.equals (i >= 0) true})
>>>>>>>>>>>>> check_relation (x: Prims.unit{Prims.trivial} =?= x: Prims.unit{Prims.equals (i >= 0) true})
>>>>>>>>>>>>>> check_relation (Prims.trivial =?= Prims.equals (i >= 0) true)
not equal terms: Prims.trivial <> Prims.equals (i >= 0) true` (see also CoreBug.fst(31,4-31,30))
1 error was reported (see above)

let nat_dep sz = n:nat{n < sz}

//But it works if we trick F* like this??!
//let nat_dep0 sz = n:nat{n < sz}
//let nat_dep sz = x:(nat_dep0 sz){True}

type simple_record = {
  f1: nat_dep 1;
  f2: nat_dep 2;
  f3: nat_dep 3;
  f4: nat_dep 4;
}

unfold
type nested_pair = (f1:nat_dep 1 & (f2:nat_dep 2 & (f3:nat_dep 3 & nat_dep 4)))

unfold
let f (x:simple_record): nested_pair =
  let {f1; f2; f3; f4} = x in
  (|f1, (|f2, (|f3, f4|)|)|)

unfold
let g (x:nested_pair): simple_record =
  let (|f1, (|f2, (|f3, f4|)|)|) = x in
  {f1; f2; f3; f4}

val dtuple2_ind: #a:Type -> #b:(a -> Type) -> p:((x:a & b x) -> Type0) -> squash (forall (x:a) (y:b x). p (|x, y|)) -> Lemma (forall xy. p xy)
let dtuple2_ind #a #b p _ = ()

let _: squash (forall (x:nested_pair). f (g x) == x) =
  synth_by_tactic(fun () -> (
    apply_lemma (`dtuple2_ind);
    let _ = forall_intro () in
    apply_lemma (`dtuple2_ind);
    let _ = forall_intro () in
    apply_lemma (`dtuple2_ind);
    let _ = forall_intro () in
    let _ = forall_intro () in
    trefl();
    dump "SMT goals"
  ))

generates the SMT goal:
squash (forall (x: f1: nat_dep 1 & (f2: nat_dep 2 & (f3: nat_dep 3 & nat_dep 4)))
      (f1: nat)
      (f2: nat)
      (f3: nat)
      (f4: nat).
      (let Prims.Mkdtuple2 #_ #_ f1 (Prims.Mkdtuple2 #_ #_ f2 (Prims.Mkdtuple2 #_ #_ f3 f4)) = x in
        Mksimple_record f1 f2 f3 f4) ==
      Mksimple_record f1 f2 f3 f4 ==>
      f1 < 1 /\ (f2 < 2) /\ ((f3 < 3) /\ (f4 < 4)))

which look reasonable but fails for some reason.
Something a bit worrying is that by adding a new layer of refinement with a {True} we completely bypass the core typechecker, we don't get any SMT goal!
I noticed that when trying to simplify, if I used let nat_dep sz = nat then in the SMT goal the fX type would be int and we would require to prove that 0 <= fX, but using let nat_dep sz = n:nat{True} doesn't generate SMT goal.

Hi @TWal, I have pushed a fix for your last failure, all these examples are really useful, thanks!
To explain the last example a bit, the query was resulting from some imprecision in the way we were typechecking match expressions. Though the setting in the example is little different, but say there's a term:
match x with
| y -> e

where we know x:t{phi}. We were typechecking e in an environment with y:t, rather than y:t{phi}, thereby possibly generating more smt guards from e than necessary.
For example, the query that you observed has f1:nat, ... in the context (i.e. forall), and we are trying the prove f1 < 1, ..., whereas we already know that f1 is an argument to the dependent tuple constructor (with right type arguments).
As to why the trivial refinement worked, we basically dropped the last {True} refinement due to the above-mentioned imprecision but retained the more important nat_dep0, thereby no guards. It did not by-pass the core typechecker, just got lucky.

Thanks!
I progressed a bit in my project, now I have another kind of tactic generating unsolved SMT goals (which I didn't take the time to understand…)
type refined (a:Type) (pred:a -> bool) = x:a{pred x}

val dtuple2_ind: #a:Type -> #b:(a -> Type) -> p:((x:a & b x) -> Type0) -> squash (forall (x:a) (y:b x). p (|x, y|)) -> Lemma (forall xy. p xy)
let dtuple2_ind #a #b p _ = ()

val refined_ind: a:Type -> pred:(a -> bool) -> p:(refined a pred -> Type0) -> squash (forall (x:a). pred x ==> p x) -> squash (forall (x:refined a pred). p x)
let refined_ind a pred p _ = ()

val eq_to_eq: a:eqtype -> x:a -> y:a -> p:Type0 -> squash (x == y ==> p) -> squash (x = y ==> p)
let eq_to_eq a x y p _ = ()

val add_squash: p:Type0 -> q:Type0 -> squash (squash p ==> q) -> squash (p ==> q)
let add_squash p q _ =
  introduce p ==> q with _. ()

val or_split: b1:bool -> b2:bool -> p:Type0 -> squash (b1 ==> p) -> squash (b2 ==> p) -> squash (b1 || b2 ==> p)
let or_split b1 b2 p _ _ = ()

unfold
type toto = refined nat (fun n -> n = (0 <: nat) || n = (1 <: nat))

unfold
let tata (x:toto): Type0 =
  match x with
  | 0 -> unit
  | 1 -> unit

type test_sum  =
  | Ctor_1: unit -> test_sum
  | Ctor_2: unit -> test_sum

unfold
let f (x:dtuple2 toto tata): test_sum =
  match x with
  | (|0, z|) -> Ctor_1 z
  | (|1, z|) -> Ctor_2 z

unfold
let g (x:test_sum): dtuple2 toto tata =
  match x with
  | Ctor_1 z -> (|0, z|)
  | Ctor_2 z -> (|1, z|)

let _: squash (forall (x:dtuple2 toto tata). g (f x) == x) =
  synth_by_tactic (fun () ->
    apply_lemma (`dtuple2_ind);
    apply (`refined_ind);
    let _ = forall_intro () in
    norm [primops; iota];
    let solve_one_goal () =
      apply (`eq_to_eq);
      apply (`add_squash);
      let x_eq_term = binder_to_term (implies_intro ()) in
      l_to_r [x_eq_term];
      let _ = forall_intro () in
      trefl()
    in
    apply (`or_split);
    focus solve_one_goal;
    focus solve_one_goal;
    dump "SMT goals"
  )

This causes an internal assertion failure

type refined (a:Type) (pred:a -> bool) = x:a{pred x}

val dtuple2_ind: #a:Type -> #b:(a -> Type) -> p:((x:a & b x) -> Type0) -> squash (forall (x:a) (y:b x). p (|x, y|)) -> Lemma (forall xy. p xy)
let dtuple2_ind #a #b p _ = ()

val refined_ind: a:Type -> pred:(a -> bool) -> p:(refined a pred -> Type0) -> squash (forall (x:a). pred x ==> p x) -> squash (forall (x:refined a pred). p x)
let refined_ind a pred p _ = ()

val eq_to_eq: a:eqtype -> x:a -> y:a -> p:Type0 -> squash (x == y ==> p) -> squash (x = y ==> p)
let eq_to_eq a x y p _ = ()

val add_squash: p:Type0 -> q:Type0 -> squash (squash p ==> q) -> squash (p ==> q)
let add_squash p q _ =
  introduce p ==> q with _. ()

val or_split: b1:bool -> b2:bool -> p:Type0 -> squash (b1 ==> p) -> squash (b2 ==> p) -> squash (b1 || b2 ==> p)
let or_split b1 b2 p _ _ = ()

unfold
type toto = refined nat (fun x0 -> x0 = (1 <: nat) || x0 = (0 <: nat))

unfold
let tata (x1:toto): Type0 =
  match x1 with
  | 0 -> unit
  | 1 -> unit

type test_sum  =
  | Ctor_1: unit -> test_sum
  | Ctor_2: unit -> test_sum

unfold
let f (x:dtuple2 toto tata): test_sum =
  match x with
  | (|0, _0|) -> Ctor_1 _0
  | (|1, _0|) -> Ctor_2 _0

unfold
let g (x:test_sum): dtuple2 toto tata =
  match x with
  | Ctor_1 _0 -> (|0, _0|)
  | Ctor_2 _0 -> (|1, _0|)

val arrow_to_forall: #a:Type -> p:(a -> Type0) -> squash (forall (x:a). p x) -> (x:a -> squash (p x))
let arrow_to_forall #a p _ x =
  ()

val remove_refine: a:Type0 -> p:(a -> Type0) -> q:(a -> Type0) -> squash (forall (x:a). q x) -> squash (forall (x:a{p x}). q x)
let remove_refine a p q _ = ()

let _: x:dtuple2 toto tata -> squash (g (f x) == x) =
  synth_by_tactic (fun () ->
    apply (`arrow_to_forall);
    apply_lemma (`dtuple2_ind);
    apply (`refined_ind);
    let _ = forall_intro () in
    norm [primops; iota];
    let solve_one_goal () =
      apply (`eq_to_eq);
      apply (`add_squash);
      let x_eq_term = binder_to_term (implies_intro ()) in
      l_to_r [x_eq_term];
      let _ = forall_intro () in
      trefl()
    in
    apply (`or_split);
    focus solve_one_goal;
    focus solve_one_goal;
    dump "SMT goals"
  )

Hi @TWal, to your last example where F* says "Internal assertion failure", I am trying to fix it, looks like a bug in the core tc.
For the last but one example, with the smt failure, it is a legitimate failure, and has a flavor similar to the examples in #2635.
At the time of applying the or_split lemma, the goal looks something like this:
x:nat |- x = 0 || x = 1 ==> (... match x with | 0 -> ... | 1 -> ...)
where the pattern match on x only has these two cases. Note that the typing of the term on the right hand side of the implication depends on the left hand side. In particular, the pattern matching is exhaustive only under the assumption that x = 0 || x = 1.
When we apply the lemma, the p:Type0 argument of the lemma gets solved to ... match x with | 0 -> ... | 1 -> ... via unification. The core typechecker then typechecks this solution in the top-context, x:nat |- ..., and fails, as it should. In other words, the lemma application here is not well-typed, since the inferred p argument is not well-typed.
At least in this case, the following tactic is enough:
let _: x:dtuple2 toto tata -> squash (g (f x) == x) =
  synth_by_tactic (fun () ->
    apply (`arrow_to_forall); ())

A new error:
type refined (a:Type) (pred:a -> bool) = x:a{pred x}

class bytes_like (bytes:Type0) = {
  meh: unit;
}

unfold
type toto = refined nat (fun x0 -> x0 = (1 <: nat) || x0 = (0 <: nat))

unfold
let tata (x1:toto): Type0 =
  match x1 with
  | 0 -> unit
  | 1 -> unit

type test_sum (bytes:Type0) {|bytes_like bytes|} =
  | Ctor_1: unit -> test_sum bytes
  | Ctor_2: unit -> test_sum bytes

val arrow_to_forall: #a:Type -> p:(a -> Type0) -> squash (forall (x:a). p x) -> (x:a -> squash (p x))
let arrow_to_forall #a p _ x =
  ()

assume val foo:
  bytes:Type0 -> {|bytes_like bytes|} ->
  f:(dtuple2 toto tata -> test_sum bytes) -> g:(test_sum bytes -> dtuple2 toto tata) ->
  (x:dtuple2 toto tata -> squash (g (f x) == x)) ->
  unit

let bla (bytes:Type0) {|bytes_like bytes|} =
  foo bytes
    (fun x ->
      match x with
      | (|0, _0|) -> Ctor_1 _0
      | (|1, _0|) -> Ctor_2 _0
    )
    (fun x ->
      match x with
      | Ctor_1 _0 -> (|0, _0|)
      | Ctor_2 _0 -> (|1, _0|)
    )
    (synth_by_tactic (fun () ->
      apply (`arrow_to_forall);
      tadmit()
    ))

says
Failed to check initial tactic goal x: Prims.dtuple2 CoreBug.tata
  -> Prims.squash (((match
              (match x with
                | Prims.Mkdtuple2 #_ #_ 0 _0 -> CoreBug.Ctor_1 _0
                | Prims.Mkdtuple2 #_ #_ 1 _0 -> CoreBug.Ctor_2 _0)
              <:
              CoreBug.test_sum bytes
            with
            | CoreBug.Ctor_1 #_ #_ _0 -> (| 0, _0 |)
            | CoreBug.Ctor_2 #_ #_ _0 -> (| 1, _0 |))
          <:
          Prims.dtuple2 CoreBug.tata) ==
        x) because extra arg qualifier implicitproof-state

It's a bit weird that in the message, x has type dtuple2 tata when it should be dtuple2 toto tata?

FYI, I'm looking at that warning today ... I agree that dtuple2 tata is weird

That seems to be a pretty printer thing, in --ugly mode the type is correct (though the goal still fails to typecheck).

Ah, the error was actually below:
CoreBug.fst(46,4-49,6): (Error 228) user tactic failed: `apply: Could not typecheck unifier solved implicit ?419 to fun x ->
  (match
      match x with
      | Prims.Mkdtuple2 #_ #_ 0 _0 -> CoreBug.Ctor_1 _0
      | Prims.Mkdtuple2 #_ #_ 1 _0 -> CoreBug.Ctor_2 _0
    with
    | CoreBug.Ctor_1 #_ #_ _0 -> (| 0, _0 |)
    | CoreBug.Ctor_2 #_ #_ _0 -> (| 1, _0 |)) ==
  x because  Top ()
> top (fun x ->
  (match
      match x with
      | Prims.Mkdtuple2 #_ #_ 0 _0 -> CoreBug.Ctor_1 _0
      | Prims.Mkdtuple2 #_ #_ 1 _0 -> CoreBug.Ctor_2 _0
    with
    | CoreBug.Ctor_1 #_ #_ _0 -> (| 0, _0 |)
    | CoreBug.Ctor_2 #_ #_ _0 -> (| 1, _0 |)) ==
  x)
>> abs body ((match
    match x with
    | Prims.Mkdtuple2 #_ #_ 0 _0 -> CoreBug.Ctor_1 _0
    | Prims.Mkdtuple2 #_ #_ 1 _0 -> CoreBug.Ctor_2 _0
  with
  | CoreBug.Ctor_1 #_ #_ _0 -> (| 0, _0 |)
  | CoreBug.Ctor_2 #_ #_ _0 -> (| 1, _0 |)) ==
x)
>>> app head (Prims.eq2 (match
      match x with
      | Prims.Mkdtuple2 #_ #_ 0 _0 -> CoreBug.Ctor_1 _0
      | Prims.Mkdtuple2 #_ #_ 1 _0 -> CoreBug.Ctor_2 _0
    with
    | CoreBug.Ctor_1 #_ #_ _0 -> (| 0, _0 |)
    | CoreBug.Ctor_2 #_ #_ _0 -> (| 1, _0 |)))
>>>> app arg (match
  match x with
  | Prims.Mkdtuple2 #_ #_ 0 _0 -> CoreBug.Ctor_1 _0
  | Prims.Mkdtuple2 #_ #_ 1 _0 -> CoreBug.Ctor_2 _0
with
| CoreBug.Ctor_1 #_ #_ _0 -> (| 0, _0 |)
| CoreBug.Ctor_2 #_ #_ _0 -> (| 1, _0 |))
>>>>> scrutinee (match x with
| Prims.Mkdtuple2 #_ #_ 0 _0 -> CoreBug.Ctor_1 _0
| Prims.Mkdtuple2 #_ #_ 1 _0 -> CoreBug.Ctor_2 _0)
>>>>>> residual type (CoreBug.test_sum bytes)
>>>>>>> universe of (CoreBug.test_sum bytes)
>>>>>>>> app arg qual ()
extra arg qualifier implicit` (see also CoreBug.fst(47,6-47,30))
1 error was reported (see above)

I'm progressing on updating my lemmas for tactic 3/6, and figured that the lemma applied by implies_intro is not written correctly regarding the core typechecker:
let implies_intro_test (x:int) =
  assert (x == 0 ==> (match x with | 0 -> True)) by (
    let _ = (implies_intro ()) in
    dump "SMT goals";
    tadmit()
  )

Indeed, implies intro for such cases requires something like the dependent or_split above.

Indeed, implies intro for such cases requires something like the dependent or_split above.

Yes, if the theorems in FStar.Tactics.Logic could be transformed to be usable with the code typechecker, that would be great!
I managed to get a type that works for introducing implications, however the proof wasn't updatable in an obvious way.

Hi,
I've tried one of my projects that use tactics today, and I found a regression. Binders in a tactic environment used to be bv with fresh indexes, and now I observe binders with De Bruijn indexes or (at least, unfresh, ordered indexes).
Consider the following F* module:
module Foo

open FStar.Tactics

let index_of_bd b = string_of_int (inspect_bv (bv_of_binder b)).bv_index

assume val fact1: Type0
assume val fact2: Type0
assume val proof_fact1: squash fact1
assume val proof_fact2: squash fact2

let unfresh_bvs
  = assert (fact1 /\ fact2) by
    begin split ();
          let h1 = pose_as "h1" (`proof_fact1) in
          flip ();
          let h2 = pose_as "h2" (`proof_fact2) in
          dump ("h1:" ^ index_of_bd h1 ^ ", h2:" ^ index_of_bd h2);
          clear h1; dump "[h2] was dropped";
          tadmit ()
    end

In the branch master, h1 and h2 are binders whose bv indexes are fresh (aka big increasing integers). With branch _core_typechecker, h1 and h2 are both indexed by 1.
Thus, primitive tactics like clear cannot distinguish h1 from h2. In consequence, I'm able to remove h2 in a h1-free environment by calling clear h1.

Here are the `dump` traces in the two branches:
Master
h1:970018, h2:970079 @ /tmp/other/Regression.fst(21,10-21,68)  Thu Nov 10 19:37:50 2022
Goal 1/2
h2: squash fact2
--------------------------------------------------------------------------------
squash fact2
(*?u265*) _

Goal 2/2
h1: squash fact1
--------------------------------------------------------------------------------
squash fact1
(*?u252*) _

at the time of failure @ /tmp/other/Regression.fst(22,10-22,18)  Thu Nov 10 19:37:50 2022
Goal 1/2
h2: squash fact2
--------------------------------------------------------------------------------
squash fact2
(*?u265*) _

Goal 2/2
h1: squash fact1
--------------------------------------------------------------------------------
squash fact1
(*?u252*) _

Core typechecker
h1:1, h2:1 @ …iteTranspile/Regression.fst(20,6-20,64)  Thu Nov 10 18:59:12 2022
Goal 1/2
h2: squash fact2
--------------------------------------------------------------------------------
squash fact2
(*?u267*) _

Goal 2/2
h1: squash fact1
--------------------------------------------------------------------------------
squash fact1
(*?u252*) _

[h2] was dropped @ …iteTranspile/Regression.fst(22,6-22,29)  Thu Nov 10 18:59:12 2022
Goal 1/2
--------------------------------------------------------------------------------
squash fact2
(*?u268*) _

Goal 2/2
h1: squash fact1
--------------------------------------------------------------------------------
squash fact1
(*?u252*) _

I think this is an issue whenever one needs to do some binder bookkeeping.

Was this merged by mistake? This is a super-interesting development, but I think we are still shaking out bugs and discussions seem to be ongoing above, so was a bit surprised to see the merge.

No, this merge was intentional. Sorry if it was unexpected. There was no intention to take anyone by surprise. Sorry if it came off that way. I thought we had agreed at the last F* meeting that barring any blockers, we would merge on Friday. We should have updated that "this is a draft PR" remark before merging ... that's from 10 days ago, when indeed things were not ready to merge.
We've been maintaining this branch for ages (including fixes to HACL tactics etc.), so were quite keen to close this PR, especially as we had already reached our usual bar for merging PRs, i.e., we ensure that F* master doesn't regress code under our CI systems. This is a non-trivial quality guard. But, it is by no means definitive.
Well aware that this may result in breakages for systems not under Everest CI, we provided compat flags for people who want to follow F* master as a workaround to open issues. There was also an F* binary release just prior to this merge from earlier this week, so people have a binary to use before this big merge.
Of course, as more people try out F* master, we will be happy to get more feedback, please open issues, we'll fix etc.

From CHANGES.md:
As a better fix for Bug2635, F* now has a memoizing core typechecker for total (including ghost terms that are total) terms. The unification solutions, including those computed in the tactics engine, are typechecked using this core typechecker.

This is a breaking change, since the core typechecker may fail to typecheck those solutions, or produce SMT guards that, for example, may need to be handled by the tactics.

There are a couple of ways to maintain backward compatibility.

There is a new command line option (also settable via #set-options in a file) --compat_pre_core <n> , where n is either 0, 1, or 2. Value 0 is most permissive and value 2 is most strict, with the metric being how much of the core typechecker is applied.

This flag is a global setting that applies "relaxed" treatment to all the unification solutions. For controlling this more locally, there is a new tactic primitive with_compat_pre_core (see https://github.com/FStarLang/FStar/blob/master/ulib/FStar.Tactics.Builtins.fsti), that applies the compat pre core setting only to the input tactic invocation. See https://github.com/FStarLang/FStar/blob/master/ulib/experimental/Steel.Effect.Common.fsti for an example usage.


Convert DS combobox to primitive combobox

What does it do?

Converts the DS Combobox component to use the Primitive underneath
Adds no value to combobox primitive
Adds create value to combobox primitive

How to test it?

there's lots of automated testing but compare to the built DS

Related issue(s)/PR(s)

resolves CONTENT-543
resolves CONTENT-1058

similar to Select when I navigate through the options using the arrow keys, the focus does not start at the beginning, after arrow down on the last item

This isn't part of the spec for a combobox so I don't think we should be doing it imo (couldn't link, so here's a screenshot):

@joshuaellis I see, but I think we need to inform/ verify with Maeva at least because I think it has been a requirement at some point, which you now get rid of (for a good reason). Wdyt?

@joshuaellis I see, but I think we need to inform/ verify with Maeva at least because I think it has been a requirement at some point, which you now get rid of (for a good reason). Wdyt?

I'll talk to her when the PR is ready to review so there shouldn't be any bugs.

when I click into the input field after design-system-git-refactor-combobox-strapijs.vercel.app/?path=/story/design-system-components-combobox--base was loaded I can not type (nor use the arrow keys)

I can't reproduce this one :(

when searching the first search result does not have the focus anymore (nor the associated focus styles)
when I have selected an option (+ enter) and now press arrow-down I start from the top of the list instead of the selected item

when I click into the input field after design-system-git-refactor-combobox-strapijs.vercel.app/?path=/story/design-system-components-combobox--base was loaded I can not type (nor use the arrow keys)

I can't reproduce this one :(

You are right - it does work on Chrome, but not on FF:
https://user-images.githubusercontent.com/2244375/224934950-d2960b22-c7eb-4523-b8fd-7e7bed114b6d.mp4

This behaviour has slightly changed, in keeping with the spec the list is filtered to the option you're on at the moment so I bounce back to the point above.

I'm not sure about that. This example e.g. mirrors the behavior we had before: https://www.w3.org/WAI/ARIA/apg/patterns/combobox/examples/combobox-select-only/
https://user-images.githubusercontent.com/2244375/224935612-5de8769b-8e31-418b-9308-e1c96f958e5d.mp4

Reading the spec I'm not sure this is supposed to happen because the list is for autocomplete, the input is the "source of truth"

The difference I see in the spec is that typing always pre-selects the first matching option: https://www.w3.org/WAI/ARIA/apg/patterns/combobox/examples/combobox-autocomplete-both/
https://user-images.githubusercontent.com/2244375/224936410-037a6f69-78ff-4e39-be42-2772c7f52d92.mp4
I think I'd find that acceptable too. Wdyt?

I'm not sure about that. This example e.g. mirrors the behavior we had before: w3.org/WAI/ARIA/apg/patterns/combobox/examples/combobox-select-only

You're mixing up the specs a bit, the one i'm following is "combobox-autocomplete-list" whereas you've referenced "select-only" which would mean you can't type a value, following the latter would mean you can't type an input. Each example has slight nuances in their spec (which makes it a bit more confusing)

The difference I see in the spec is that typing always pre-selects the first matching option: w3.org/WAI/ARIA/apg/patterns/combobox/examples/combobox-autocomplete-both

We can add autocomplete to the input if @maevalienard is happy with that 👍🏼

We can add autocomplete to the input if @maevalienard is happy with that 👍🏼
I'm always happy with user-friendly improvements <3

Great, so we will strictly follow the ARIA/combobox-autocomplete-both spec.

You are right - it does work on Chrome, but not on FF:

I think this is an issue with iframes in firefox, it does work in this sandbox

@joshuaellis That might be, but I run into the same problem when using https://design-system-git-refactor-combobox-strapijs.vercel.app/iframe.html?args=&id=design-system-components-combobox--base&viewMode=story directly, which does not render an iframe. Does that work on your side?

@joshuaellis That might be, but I run into the same problem when using design-system-git-refactor-combobox-strapijs.vercel.app/iframe.html?args=&id=design-system-components-combobox--base&viewMode=story directly, which does not render an iframe. Does that work on your side?

Think i've solved this now 🤞🏼
Also implemented inline autocomplete 🤪

@maevalienard The combobox has autocomplete updates if you want to check them out, here's the stories

Previously when using a creatable combobox "Enter" would add the value to the list. With the new version I have to press KeyDown and Enter. I'm not sure if that is what we would want?

This goes against the spec and therefore I see it as bad, I don't think we should be doing it imo

[x] 1
[x] 2
[x] 3

Great catches 👍🏼

1
VERY tricky bug, think i've solved that now! 😄
2
Yes this is intended, the first item is autocompleted so the next item to be focussed is no. 2 and when there's no autocomplete you should be able to get to the first item, this is how the example on WAI works 👀
3
This is really tricky without breaking changes 🤔 i'd need to think if there's a hacky workaround i can do for now and remove later......
4
I think we can leave it.

Awesome! 🚀
Regarding 2) I had a quick look:

Yes this is intended, the first item is autocompleted so the next item to be focussed is no. 2 and when there's no autocomplete you should be able to get to the first item, this is how the example on WAI works 👀

I think the difference for me is that on the spec the autosuggested value is locked when I hit enter. In your case it does not, which gives me (at least visually) the feeling as if nothing has happened. For comparison:
In both videos the keyboard sequence is:
Enter "A" > Press Enter > Tab
Spec
https://user-images.githubusercontent.com/2244375/231769849-5240a6c4-dd2a-4bb9-b167-1677aaac025b.mp4
DS Combobox
https://user-images.githubusercontent.com/2244375/231769914-8dd432c8-c1d2-488d-89ba-03f727797438.mp4
Do you see what I mean?

Enter does not remove the highlight from the autosuggested value which gives me the feeling I am still typing
Tabbing on "Clear" does not close the list

You have spend much more time with this so if you think this is ok I am willing to approve but wanted to double-check :)

Right yes, I see what you mean now! 🙃 i'll take a look at that too, that shouldn't be too difficult.

🙈
https://user-images.githubusercontent.com/2244375/232020588-1b36f51a-2919-4b7a-8786-5a563cf0af10.mp4
This is actually the same on all of them:
Type "A" > Click 2nd item > First item is applied

Another problem:

Type Ham
Arrow Down, Arrow Up, Enter (Now Hamburger should be set)
Cmd + A (Select All), Delete
Type Ham

The 4th step will now type "Hamburgeram" because the word is automatically set and the cursor set to the end.
https://user-images.githubusercontent.com/2244375/232023508-e34d6fb7-9343-4163-9e3b-d4ba8ede38c8.mp4

Might be the same problem as before:

Type Tar
Arrow-right
Shift + Arrow left twice to select "ff"
Type "ll"

One "l" will replace "ff" and the other one be appended at the end of the word
https://user-images.githubusercontent.com/2244375/232024638-db1e66be-4777-4b08-814a-aac720bcee57.mp4

autocomplete hard.

Okay, I think we're there 🤞🏼


create facts into data/sources

This is a feature addition request to create facts definition yaml files.
The default values of the variable definitions will be collected from the yaml file of the adversary emulation plan and facts definition yml files will be created under the data/sources directory.
The list of variables will now appear in the sources menu of MITRE CALDERA.
By selecting any of the facts in the AUTONOMOUS menu of operations, the variables in the operation command will be replaced by their values.

Thank you, cleanup was fixed and facts were added here: https://github.com/mitre/emu/pull/3

Thank you, cleanup was fixed and facts were added here: https://github.com/mitre/emu/pull/3


We shouldn't check that layers aren't empty

Layers are sometimes empty at the start and end of animations. For example, the opacity layer for the popup menu is now 0x0 at the very start. We throw an assert when building the layer for that now.

I'm sure I broke this.

At a guess, it's just a combination of your menu changes creating a 0x0 OpacityLayer and my recent changes to the OpacityLayer to assert that the layer isn't empty (in addition to not being null, or whatever it was). We should just remove the "empty" part of the assert I added.

Ok, I've re-assigned this issue to you.  Feel free to bounce it back to me if you'd prefer me to look.


TypeError: string indices must be integers

Hi,
Getting TypeError, my guess is that this could be because there are no phones in the network. Is it possible to add code to check if no phones then continue or return 0. Sorry, I am not very good at coding.
Found command: health
Meraki Support Enabled
Spark Call Support Enabled
Error. Server returned '401 - Unauthorized
[2018-03-30 11:25:13,451] ERROR in app: Exception on / [POST]
Traceback (most recent call last):
File "/home/omz/.local/lib/python3.5/site-packages/flask/app.py", line 1982, in wsgi_app
response = self.full_dispatch_request()
File "/home/omz/.local/lib/python3.5/site-packages/flask/app.py", line 1614, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/omz/.local/lib/python3.5/site-packages/flask/app.py", line 1517, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/home/omz/.local/lib/python3.5/site-packages/flask/_compat.py", line 33, in reraise
raise value
File "/home/omz/.local/lib/python3.5/site-packages/flask/app.py", line 1612, in full_dispatch_request
rv = self.dispatch_request()
File "/home/omz/.local/lib/python3.5/site-packages/flask/app.py", line 1598, in dispatch_request
return self.view_functionsrule.endpoint
File "/home/omz/.local/lib/python3.5/site-packages/ciscosparkbot/Spark.py", line 184, in process_incoming_message
reply = self.commands[command]"callback"
File "/home/omz/spark_bot/spark-operations-bot-master/cico_combined.py", line 43, in get_health
retval += cico_spark_call.get_spark_call_health(incoming_msg, "html")
File "/home/omz/spark_bot/spark-operations-bot-master/cico_spark_call.py", line 278, in get_spark_call_health
retmsg += "" + str(spark_data["Total"]["offline"]) + " phone(s) offline out of a total of " + str(spark_data["Total"]["num"]) + " phone(s)."
TypeError: string indices must be integers
<IP_ADDRESS> - - [30/Mar/2018 11:25:13] "POST / HTTP/1.1" 500 -

I believe this is resolved - if not, please let me know!


Using Nylas Kotlin v3 SDK, create a code sample to read calendar events

Using Nylas Kotlin v3 SDK, create a code sample to read calendar events

Hi @relaxedtomato,
I want to work on this issue. Can you assign it to me?
Thanks

@NikhilTaneja98 - will assign, we just need to set you up with an account on our v3 dashboard for testing the code sample. Will be quick.
Send your email over to devrel at nylas.com with the subject: hacktoberfest23, and we'll quickly send account details 👍

I need to submit a support ticket on - https://support.nylas.com/hc/en-us/requests/new?

@NikhilTaneja98 - ah no, just send an email to devrel @ nylas.com and we will set up an account on our new dashboard for you to test out the code sample.
No need to create a support ticket :)

@NikhilTaneja98 - just sharing more information, our current nylas.com uses v2 of our API, we are creating code samples for hacktoberfest using the v3 of our API, so need to create an account for everyone. It’s pretty quick to get setup.

@relaxedtomato - I am using Java SDK v2 and do i need to provide only the read calendar class file or any other file as well like pom.xml(maven)?

@NikhilTaneja98 - perfect, Java SDK v2: https://github.com/nylas/nylas-java/tree/v2.0.0-beta
Is the correct version, did you send us an email for account creation?

Yes I did send email to devrel and i am using the same version of Java SDK.

@NikhilTaneja98 sounds good - I will check for your email soon and help you get setup!

@relaxedtomato PR submitted

Closed by PR #105


Documentation Remarks

Describe the bug
Minor updates in the docs.
Virtual Machine

All of the commands need to be updated from tf-grid to tf-grid-cli in the Deploy, Get, Cancel Sections
node & farm flags should be added in the Optional Flags section.

Kubernetes

All of the commands need to be updated from tf-grid to tf-grid-cli in the Deploy, Cancel Sections.
master-farm & workers-farm flags should be added in the Optional Flags section.
In the deploy command remove the ./ from the command.

Name Gateway

All of the commands need to be updated from tf-grid to tf-grid-cli in the Deploy, Get, Cancel Sections
node & farm flags should be added in the Optional Flags section.
In the deploy command remove the ./ from the command.
In the Get section the example command is missing the gateway type name.

FQDN Gateway

All of the commands need to be updated from tf-grid to tf-grid-cli in the Deploy, Get, Cancel Sections
node & farm flags should be added in the Optional Flags section.
In the deploy command remove the ./ from the command.
Incorrect gateway type in the deploy example command.

In the Get section the example command is missing the gateway type fqdn.

Verified.
All of the mentioned remarks were updated.


Implement collection.embed_multi and collection.embed_multi_with_metadata

I haven't implemented these methods yet: https://github.com/simonw/llm/blob/212cd617f35fbc4c918e7681d6cc89b97da776f9/llm/embeddings.py#L128-L148

Originally posted by @simonw in https://github.com/simonw/llm/issues/191#issuecomment-1703562735

Just removed this from the docs as it's not yet implemented:
You can embed multiple ID and string pairs at once using the `embed_multi()` method:

```python
collection.embed_multi({
    "hound": "my happy hound",
    "cat": "my dissatisfied cat"
})
```

I think this design is wrong:
    def embed_multi(self, id_text_map: Dict[str, str], store: bool = False) -> None:
        """
        Embed multiple texts and store them in the collection with given IDs.

        Args:
            id_text_map (dict): Dictionary mapping IDs to texts
            store (bool, optional): Whether to store the text in the content column
        """
        self.embed_multi_with_metadata({
            id: (text, None) for id, text in id_text_map.items()
        }, store=store)

    def embed_multi_with_metadata(
        self,
        id_text_metadata_map: Dict[str, Tuple[str, Optional[Dict[str, Union[str, int, float]]]]],
        store: bool = False,
    ) -> None:

It accepts a dictionary. But... the embedding_model.embed_multi() method as setup to take a generator or iterator of text strings, which is more efficient.
The embed_multi() method on collections should take a generator/iterator as well, or we lose that efficiency.

I think you feed it an iterator of (id, text) tuples - or for embed_multi_with_metadata() an iterator of (id, text, metadata) tuples.

Documentation: https://github.com/simonw/llm/blob/3b2d5bf7f9b3ae8628e7fee628b8bd044a4e437b/docs/embeddings/python-api.md#storing-embeddings-in-bulk


[PSA] Clarification of Egress Instance

@vgurevich @jafingerhut
My understanding, based on P4_14 documentation, was that we use egress instance to differentiate between different copies of a multicast packet. However, I noticed that we are allowing copies sent to different egress ports to have the same egress instance. It seems that the notion of egress instance is overloaded and I will appreciate some clarification. Thanks!

If a target device has enough bits in its egress instance value for a particular control plane's purpose, that control plane can, with that device, choose never to reuse egress instance values.
What we've written in the PSA simply says that the device should allow you to reuse egress instance values, as long as within a multicast group you do not reuse (egress port, egress instance) pairs.
More flexibility in the target device can't hurt you, can it?

Thanks @jafingerhut . Yes, I realize the restriction. I am more interested in understanding the semantics of egress instance in switch hardware. Is it tied to a resource in a PRE implementation or just a piece of metadata?

One reasonable implementation in hardware would be to have an SRAM near the packet buffer, indexed by multicast_group, which contains an address into another SRAM, where each entry in the second SRAM contains (egress_port, instance, next_ptr), where (egress_port, instance) get associated with the packet, and next_ptr points at another entry in the second SRAM if there are more copies to make for this multicast_group, or 0/NULL if there are no more copies to make.
That implementation would make it easy to have multiple (egress_port, instance) pairs be identical in the same multicast_group.  In such a hardware implementation, the restriction that no pairs can be the same would purely be a software restriction, not one required by the hardware.
I don't have any alternate hardware implementations to suggest that would make it impossible to have multiple pairs be identical in the same multicast_group.

I wasn't involved in the P4_14 language spec writing, but I suspect the background here is that there are P4 programs that will want some way to distinguish the different copies in the egress code, to process different copies differently from each other.
If the control plane chooses to make all egress instance values unique within a multicast group, then the P4 program egress code could use (multicast_group, egress_instance) as a key that uniquely identifies that copy.
If the control plane chooses to make all egress instance values unique across the whole chip, i.e. never reuse values between multicast groups, then a P4 program egress code could use (egress_instance) alone as a key to uniquely identify that copy.
If the control plane chooses to reuse egress instance values for different egress_port's in the same multicast_group, then the P4 program must use (multicast_group, egress_port, egress_instance) to uniquely identify a copy across all multicast groups.
It partly depends upon the reason the P4 program is doing the multicast replication, and what copies it needs to distinguish from each other, vs. which it does not.  This can depend on the 'application requirements' for which you are writing a P4 program, where here I don't mean applications running on the host, but in the programmable network devices.

Thanks @jafingerhut . It is perfectly reasonable to disallow identical (egress_port, instance) pairs for a multicast group in the PRE API.
Everything you say makes sense. Just out of curiosity, are there current networking use-cases where we may want to send mutlicast packets to the same port and distinguish them based on egress instance?

Depending upon the types of interfaces supported by an IP router, IP multicast routing can require sending multiple packets out of the same egress port for the same input packet, but each with different contents.
For example, if you support VLANs, and trunk port interfaces (i.e. those that allow packets with a configurable set of VLANs to share the same physical port, each tagged with an 802.1Q header containing the VLAN), then a single received IP multicast packet can require replication to multiple L3 interfaces.  (Trunk port #7, VLAN 5) and (Trunk port #7, VLAN 10) can be different interfaces according to L3 software.  (interface here being a logical concept, not necessarily tied one-to-one to a physical port or LAG).
IP multicast where some packets in the replication list are IP tunnel interfaces can lead to a similar situation.

Thanks @jafingerhut


How to do this in an Azure Pipeline

This article doesn't describe how to do this in an automated CI pipeline. If there is an article on how to do it in CI yaml pipeline, perhaps it should be referenced here in this article.
I am trying to find how to use a secured Azure Artifact feed in my yaml pipeline with the dotnet restore but I'm getting an uauthorized exception.

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

ID: c4c052a3-b135-aee6-84ea-c97910c0b5fc
Version Independent ID: 16614e12-d289-aaf5-93c1-08921ae3b3ed
Content: Publish and restore packages with dotnet CLI - Azure Artifacts
Content Source: docs/artifacts/nuget/dotnet-exe.md
Service: azure-devops-artifacts
GitHub Login: @ramiMSFT
Microsoft Alias: rabououn

@ForteUnited -- thank you for your feedback.  Please consider these resources:

Azure DevOps Services
Azure DevOps on Stack Overflow

@ramiMSFT -- please look into this issue.

@ForteUnited It's referenced in the Related articles section: Publish NuGet packages with Azure Pipelines (YAML/Classic)


Boolean validation

Can't find any validator for boolean. Is it supported in this library or need custom implementation?

You can use the callback rule to check for boolean values. I once used below, you can tweak it to your needs:
$validator = new Validator();
$validation = $validator->validate($_POST, [
  'accept_terms' => [
    'required',
    function ($value) {
      return in_array($value, [true, false, 'true', 'false', '0', '1', 'y', 'n']);
    },
  ]
]);

PS: Stolen from Laravel's boolean validation rule: https://laravel.com/docs/5.8/validation#rule-boolean

This should be included in the Core Rules.

@theZetrax I have just opened a pull request here, hopefully it would be merged ASAP.


As a tester I have an automated integration test suite for the CAMs ETL pipeline so that system quality does not regress

Acceptance Criteria:

We have a test suite that can :

Mock out or use known GRIB files to ensure the CAMs data is a known, static state
Run the ETL pipeline
Use a known separate database
Check the values written to the database are as expected.

For this story we will only create one test covering multiple (small number) locations and all pollutants.
For now this can just be automated and run locally. We will look to target the tests at a deployed environment in time, will be a different ticket.

Basic process

run_etl_process -> stub actual call (return our GRIBS) instead and then we can assert exact values.

In terms of regression we target specific documents and assert the values shown in the database. Failure of these tests would simple be an alert that the code has changed in terms of the etl process.
Plans to use some xarray functionality to grab a raw value from our GRIB. Then to manually go through all the calculations and store it as a variable. Then we assert that variable matches whatever we have within our database. As opposed to asserting a value such as 10.321472471264862.

Extra modifications to run_forecast_etl to allow overriding of base date and time from default value.


Node names are not correct

Hi,
For some reason, nodes in JCR which correspond to multifield entries are created with some generic names, eg. 14_1559297980446.
What I can see from the screenshot on the home page is that these node names should be equal to a value of some property, and the property name is set via itemNameProperty attribute.
Environment: Adobe Experience Manager (<IP_ADDRESS>)
Here's the sample code:
<locations
jcr:primaryType="nt:unstructured"
sling:resourceType="namics/genericmultifield"
cq:showOnCreate="{Boolean}true"
fieldLabel="Locations"
itemDialog="/apps/<proj>/<some_page_component>/sub_dialog"
itemNameProperty="locationName"
itemStorageNode="locations"
maxElements="99"
name="./locations"/>

Entry definition:
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0"
	xmlns:jcr="http://www.jcp.org/jcr/1.0"
	xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
	xmlns:granite="http://www.adobe.com/jcr/granite/1.0"
		  jcr:primaryType="nt:unstructured"
		  jcr:title="Location"
		  sling:resourceType="cq/gui/components/authoring/dialog">
	<content
		jcr:primaryType="nt:unstructured"
		sling:resourceType="granite/ui/components/foundation/container">
		<items jcr:primaryType="nt:unstructured">
			<column
				jcr:primaryType="nt:unstructured"
				sling:resourceType="granite/ui/components/coral/foundation/container">
				<items jcr:primaryType="nt:unstructured">
					<locationName
						jcr:primaryType="nt:unstructured"
						sling:resourceType="granite/ui/components/coral/foundation/form/textfield"
						fieldLabel="Location Name"
						name="./locationName"
						required="{Boolean}true"/>
					<street
						jcr:primaryType="nt:unstructured"
				sling:resourceType="granite/ui/components/coral/foundation/form/textfield"
						fieldLabel="Street"
						name="./street"/>
					<!-- etc. -->
				</items>
			</column>
		</items>
	</content>
</jcr:root>

Hello @danijelbasic,
the screen shots from the project description do suggest a different behavior to the actual implementation. The individual item node names are in this case generic and unique/crx save. They do not relate to any property value of the individual item node.
Are you encountering a specific problem due to this behavior?
regards,
Mike

Hi @MichaelHeil ,
Thank you for your reply. Ok, I didn't know that the screenshot is not in sync with the current implementation. Sometimes it's nice to see the node names corresponding to each entry to be the same as a property value when inspecting a content in crxde.
This is not the issue at all for my case. The most important thing is that the values are shown as labels next to each entry.
Best regards,
Danijel


Added New Folder Containing Tuned Model

I was working on improving validation accuracy of the model (issue #5 )
I added new folder to the repo named 'Sejal_Tuned_FER_Model' containing:

Tuned FER Model.ipynb
fer_model.json
fer_model_weights.h5

Please go through the 'Tuned FER Model.ipynb' notebook. Changes and updates with respect to the original model are mentioned in the notebook itself.
Kindly let me know if there is anything wrong or anything that needs to be changed.

@sejalsksagar Modifications done by you looks good. Try to increase the Validation Accuracy of the Model. Good Luck !

Okay sure I'll try


The Cloudflare Zone doesn't account for 'www' domains

Bug Report
It appears that the zone check in the isPurgeableUrl function of the UrlHelper.php doesn't account for 'www' in the domain when comparing with the Cloudflare zone domain name.
In the /src/helpers/UrlHelper.php helper I changed (line 75):
if (strtolower($urlDomain) !== strtolower($cfDomainName)) {
To this:
if ( str_ends_with( strtolower($cfDomainName), strtolower($urlDomain) ) ) {
This will look to compare the base domain, so it will match with any subdomain not just domains with www.
Plugin Version
3.0.1
Craft CMS Version
5.5.5
PHP Version
8.2

Thanks for reporting this! Fixed in https://github.com/putyourlightson/craft-cloudflare/commit/c62211e95782d4c2081276bf4205a96283d4fb4a and released in 3.0.2.


Fix frontend "npm start"

There was an issue with the dependencies, and make run-frontend wasn't working.
(That's fixed in the first commit.)
Additionally, there were a number of errors and warnings introduced with the Notifications component. This PR removes the ones emitted on load but leaves other ones which become apparent when interacting with the component. There are also some other console warnings that could be removed, but those are left for another time.
I expect the es/pt locale files will need some attention :)
How to use
cd frontend && npm install && npm start
Should run Headlamp with no big warning/error alert.
Testing done
cd frontend && npm install && npm start runs.

It works, with 10 warnings related to missing files.
@illume , is this something that impacts the rest of the build somehow?

I can't see any other effect. The warning seems to come from that component failing with typescript.
Probably, I'd like to address that separately to this PR (probably with a PR+another patch or replacing the dependency if upstream continues to be stalled).


Linear-phase filterbank for radial filter design

In this PR, a frequency-dependent Ambisonic encoding using linear-phase filter-bank is implemented, which is proposed by Franz Zotter in his paper,

Franz Zotter, "A linear-phase filter-bank approach to process rigid spherical microphone array recordings", in Proc. IcETRAN, Palic, Serbia, 2018. link

Almost all scripts in this PR are based on Franz Zotter's Matlab code, which he kindly provided.
The scripts in the examples directory can be used to create the graphics in the abovementioned paper (the exact parameters differ, though). For instance, in examples/linph-filterbank-modal-beamforming-em32.py, the directional responses (frequency- and time-domain) are simulated for Eigenmike em32.

Very nice to have this here, good work!
I've run all example scripts and had look into the added functions. Looks all reasonable to me. Did not debug this in detail, though.
I made some small suggestions in comments and PEP style coding.
From my side we can merge this.

The commit 81efa0b9018fe27a10f23dc6f27d660dc0927032 includes two post processing steps which I took from the original Matlab code.

2nd order Butterworth low-pass filter is used in order to limit the bandwidth to 20 kHz
a tapering window is applied to the impulse response

The FIR coefficients are now saved in wave files.


Clarify error messages for the second task

The message 1\n 0 for the second task may look nice to a user, though contains two whitespace symbols one after another.

Obsolete after #85 completion


Type fetch_events parameters; replace tornado_handler weak reference with tornado_handler_id

Thinking about #22296 revealed some simplifications. Cc @PIG208.

This looks correct, merged, thanks @andersk!
@alexmv @cognusion FYI -- we'll want to pay attention when this gets deployed to production, since it changes the sensitive Tornado code path.


Where can I find the SQL MI private IP address

Hi,
After I created SQL MI in virtual network, I cannot find SQL MI private IP address.
How can i connect SQL MI via private IP address?
Thanks.

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

ID: fc2dd547-3ff7-b32a-ba8a-c582a721a0ee
Version Independent ID: f083bdda-0c66-af32-0d27-f535e46c96dc
Content: Connectivity architecture for a managed instance in Azure SQL Database
Content Source: articles/sql-database/sql-database-managed-instance-connectivity-architecture.md
Service: sql-database
Sub-service: managed-instance
GitHub Login: @srdan-bozovic-msft
Microsoft Alias: srbozovi

@leizhang1984 We are checking this and will get back to you.

@leizhang1984 If there are no further questions at this time, we will go ahead and close this thread.


HTML to Mithril Converter breaks case-sensitive SVG elements.

When using the HTML to Mithril conversion tool provided, SVG elements are converted to all lowercase. SVG is case-sensitive, so this breaks those elements.
For example the following code does not work after passed through the converter.
HTML Input
<svg version="1.1" x="0" y="0" width="360" height="420">
  <path id="guideTextPath" d="M180,312 A132,132 0 0 0 272.34,272.34" fill="none"></path>
  <text font-size="14pt">
    <textPath href="#guideTextPath" startoffset="50%" alignment-baseline="central">GUIDE</textPath>
  </text>
</svg>

Actual Output (Converted to CoffeeScript)
m "svg[height='420'][version='1.1'][width='360'][x='0'][y='0']", [
  m "path[d='M180,312 A132,132 0 0 0 272.34,272.34'][fill='none'][id='guideTextPath']"
  m "text[font-size='14pt']", [
    m "textpath[alignment-baseline='central'][href='#guideTextPath'][startOffset='50%']", "GUIDE"
  ]
]

Expected Output (Converted to CoffeeScript)
m "svg[height='420'][version='1.1'][width='360'][x='0'][y='0']", [
  m "path[d='M180,312 A132,132 0 0 0 272.34,272.34'][fill='none'][id='guideTextPath']"
  m "text[font-size='14pt']", [
    m "textPath[alignment-baseline='central'][href='#guideTextPath'][startOffset='50%']", "GUIDE"
  ]
]

textPath should be capitalized, otherwise the text fails to display correctly.
I have tested this in Safari, Chrome, and Firefox on Mac OS X 10.10.3, and on iOS 8.3 Mobile Safari.
I'm also on Gitter if you want to discuss this further.

Closing, since the converter in core no longer exists. See the wiki for the recommended replacement.

Please open issue in https://github.com/ArthurClemens/mithril-template-converter

@ArthurClemens This was for the old one in Mithril core, not yours. :smile:

It still has that problem.

This is now fixed.


Update Erlang to version 18.1

Newest version of Erlang have now been increased from 18.0 to 18.1.
I propose a change that can handle both 18.0 and 18.1

Genuine question here, NixOS policy is to generally keep "versions that differ significantly in functionality", is there a particular reason (like newly introduced bugs or compatibility breaks) that motivate having both 18.0 and 18.1?

Hi guys, tremendous work you are doing with nearly 3000 modules and nearly 8000 versions. My need was to be able to compile several versions of Erlang and do simple switch between them. This do not really scale in your case. So, I will use kerl or envirius instead. So, I withdraw my pull request.
Maybe I will make a simple pull request to upgrade to 18.1 instead, we will see.
/Take care


Open Channel Screen Navigation

we have UI of Open Channel Screen (https://xd.adobe.com/view/1b7355c9-e125-47f4-895c-1a6d1d5dc438-4e20/screen/124eac55-44d3-46eb-932b-c71524065430/) but don't have the UI option to navigate to Open Channel Screen.

https://xd.adobe.com/view/1b7355c9-e125-47f4-895c-1a6d1d5dc438-4e20/screen/23cf53d4-2066-4a14-b9b2-8660f6f04cca/