Update TagDispatcher.java

If adapter is disabled, prompt user to enable NFC (show NFC settings).

From what I can see this doesn't prompt the user to enable NFC, it just sends them to the setting. There should at least be a Toast telling the user that they need to activate NFC.
Sidenote: I think this is a good enough solution for now but other than that I'd like to see an endpoint/callback instead that allows the implementation to handle this themselves. Maybe it is not always wanted to simply send the user to the settings but rather deliver using some other method or simply handle this in some other way.

@Franzaine @petter-fidesmo
I like the idea of a callback - perhaps extend OnDiscoveredTagListener with a method onError() ?
One could add a static method in TagDispatcher for bringing up the NFC settings activity; this could be called from the error callback.
In any case I didn't want to put in a toast since that should contain some localised strings, which haven't been added to the project.

Sounds good to me from a UX perspective :) But I have no idea about the actual implementation. @slomo or @petter-fidesmo do what do you think?

The rest seems quite nice. Could you please rebase until the current master, it should also fix the travis build.
Sorry for the nitpicking about indenting and so on, but we try to enforce googles java coding style.

I also like the callback idea. But lets try to make small steps here and merge this first. Than we  can have a look how well it integrates into our apps.

@slomo is the short summary of commit messages the single message in the conversation root, or the nested ones under that? Terminology unclear ...

I intended to talk about the title

@slomo OK, will keep it in mind!

I like the idea of the callback, I think the following solution would support most use cases and provide a good default behaviour:
Let's add an interface OnNfcDisabledListener:
public interface OnNfcDisabledListener {
    public void nfcDisabled();
}

Then let's pass this as an additional parameter to the constructor (and the factory method). If provided, we let enableExclusiveNfc return false if NFC is disabled and call the listener, if it is not provided (i.e. null), as a default behaviour we pop up the settings dialogue. Of course, we also provide a simplified factory method without the listener parameter that just defaults it to null. We can also add a toast as soon as I have set up the localized strings for the project.
I would be in favour of merging this if the solution provided this flexibility.
@adriaan-telcred What do you think?

@petter-fidesmo Sounds good!

@adriaan-telcred One last thing. Could you also rebase the branch and squash some committs. Since the change set is fairly limited 1 or 2 commits should be enough. This is a great guide on rebasing: https://github.com/edx/edx-platform/wiki/How-to-Rebase-a-Pull-Request

@petter-fidesmo Squashed and rebased!

@adriaan-telcred I tried to compile it locally and there is a syntax error. I realized that we are missing a description on how to build the project locally. https://github.com/fidesmo/nordpol/blob/feature-add-description-of-how-to-build/README.md in this pull request #20
Maybe you can try those instructions and see if you can compile it locally and then fix the syntax error?

Compilation errors have been fixed, and I rebased my patch to fidesmo:master 66a17f150d8087565dde7408ee2e507e41eff663.

@adriaan-telcred Great, I'd say we are really close now, but just two last things. Would it be possible to squash the last commit into the previous one? Also the comment @slomo left regarding the comment being oddly indented also needs to be addressed. Comments should be indented at the same level as the method, in this case 4 space characters.

@petter-fidesmo @slomo Indentation fixed, and squashed again.

@adriaan-telcred :+1: This is looking great! Thank you for your efforts and sorry for the trouble with the build. I will update the documentation with the information needed.

:+1:


11 March 2023

Task Lists

[ ] [README.md] Add a README.md for Problem Of The Day
[ ] [C++] Add C++ Solution for Problem Of The Day
[ ] [Java] Add Java Solution for Problem Of The Day
[ ] [Python3] Add Python3 Solution for Problem Of The Day
[ ] [C] Add C Solution for Problem Of The Day (optional)
[ ] [C#] Add C# Solution for Problem Of The Day (optional)
[ ] [JavaScript] Add JavaScript Solution for Problem Of The Day (optional)

FAQ
How do I get assigned to these issues?
You must leave a comment with the issues you want assigned.
Is there any limit to the number of issues that can be assigned?
Yes, one person can only be assigned two issues per day from the four (README, C++, Java, and Python 3).
Can I be assigned to multiple issues on different days by commenting once?
Yes, you can be assigned to multiple issues on different days by commenting once. However, you must be assigned to the contributor role in order to do so. If you already have access to the contributor role, simply list the issue in a comment that you want to be assigned to.
Example:
01 January 2023 - Java & Python
04 January 2023 - README.md & Java
12 January 2023 - C++
19 January 2023 - README.md

How do I get access to the Contributor role?
You must contribute 2-3 times before being granted access to the contributor role.
Can I be assigned to issues that are optional?
If [C], [C#], or [JavaScript] are available for the problem of the day, you can be assigned to it on the day of the problem.

Assign this issue...


Laradock stuck on  [workspace] exporting to image

Description:
Laradock stuck on  [workspace] exporting to image while running the command  docker-compose up -d nginx mysql workspace.  Build process doesn't complete.

The command ran for 2125s  (35min), it didn't finish the process then i terminated the process.
Expected Behavior:

Context information:
Output of git rev-parse HEAD
6deb3c07c0fdbe2541f28da85e9ba6aa69da4972

Output of docker version
Client: Docker Engine - Community
 Version:           24.0.6
 API version:       1.43
 Go version:        go1.20.7
 Git commit:        ed223bc
 Built:             Mon Sep  4 12:32:12 2023
 OS/Arch:           linux/amd64
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          24.0.6
  API version:      1.43 (minimum version 1.12)
  Go version:       go1.20.7
  Git commit:       1a79695
  Built:            Mon Sep  4 12:32:12 2023
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.22
  GitCommit:        8165feabfdfe38c65b599c4993d227328c231fca
 runc:
  Version:          1.1.8
  GitCommit:        v1.1.8-0-g82f18fe
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

Output of docker-compose version
Docker Compose version v2.20.3

System info: Mac, Windows or Linux. Include which disto/version
 Ubuntu 20.04.6 LTS

Steps to reproduce the issue:

git clone https://github.com/laradock/laradock.git
cd laradock
docker-compose up -d nginx mysql workspace

Stacktrace & Additional info:

N/A

It works to me
Seems like the problem is in your docker/environment, in that case, the problem is impossible to replicate


pbr example is missing one of it labels

Bevy version
main
bisected to #14848
Relevant system information
SystemInfo { os: "MacOS 14.5 ", kernel: "23.5.0", cpu: "Apple M1 Max", core_count: "10", memory: "64.0 GiB" }
AdapterInfo { name: "Apple M1 Max", vendor: 0, device: 0, device_type: IntegratedGpu, driver: "", driver_info: "", backend: Metal }
also tested win11+4080
What you did
cargo run --example pbr
What went wrong
The vertical "Metallic" label on the right side is missing.

Oh yeah, I checked through all the UI examples with this but forgot that none of them feature text rotation. I'll add some slanted text to one of the UI text examples so it doesn't get missed next time.


Metrics UI display

As a systems administrator, I need a UI for displaying the metrics so I can monitor the system and the way users are interacting with the system.

Closing, as we are using Grafana for this


Brazilian Portuguese [pt-br]

A complete Brazilian Portuguese translated made by me and LucasRo7

Thank you very much! I'm happy for more languages!


GPO Update not completing

When running this script on a fresh install of 22H2, GPO updates are not processing with the following errors:
Performing Group Policy Update
Updating policy...
Computer Policy update has completed successfully.
The following warnings were encountered during computer policy processing:
Windows failed to apply the Group Policy Scheduled Tasks settings. Group Policy Scheduled Tasks settings might have its own log file. Please click on the "More information" link.
User Policy update has completed successfully.
The following warnings were encountered during user policy processing:
Windows failed to apply the Group Policy Registry settings. Group Policy Registry settings might have its own log file. Please click on the "More information" link.
For more detailed information, review the event log or run GPRESULT /H GPReport.html from the command line to access information about Group Policy results.
WARNING: A reboot is required for all changed to take effect

Attached is a copy of the GP Report, with identifying information redacted.
Of note, Bitlocker setup fails following running the script, although I think that's because the group policy fails.
GPReport.pdf

Tracked this down a bit better, it points to the schedule updates xml file. If Windows updates tweaks are commented out or unchecked there are no issues. Likewise, this same bug exists in the optimize/debliat script which uses the same XML.

Tracked this down a bit better, it points to the schedule updates xml file. If Windows updates and the Internet Explorer tweaks are commented out or unchecked there are no issues updating group policy. Haven't checked to see if there are any bit locker issues when the updates tweak has been unchecked. Likewise, this same bug exists in the optimize/debliat script which uses the same XML.

This is a great find! We will look into and attempt to fix this shortly.


[Website] update go-dependencies.md java-dependencies.md links

Resolves #24084

change structure of links, make them a tag
wrap links on https://beam.apache.org/documentation/sdks/go-dependencies/index.html and https://beam.apache.org/documentation/sdks/java-dependencies/, https://beam.apache.org/documentation/programming-guide/#1324-using-cross-language-transforms-in-a-typescript-pipeline in p tag with word-break rule, so they don't stretch the page
add target="_blank" rel="noopener noreferrer" attributes to a tag so links would open in separate tab in case of a click

before:

after:

Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

[ ] Choose reviewer(s) and mention them in a comment (R: @username).
[ ] Mention the appropriate issue in your description (for example: addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment fixes #<ISSUE NUMBER> instead.
[ ] Update CHANGES.md with noteworthy changes.
[ ] If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.
To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md
GitHub Actions Tests Status (on master branch)

See CI.md for more information about GitHub Actions CI.

Verified, works as expected. Reviewed and tested by QA

@aromanenko-dev, could you, please help with review of current PR?

Thanks, LGTM
Just wondering - why only these urls? What's about the other long ones?

Thank you!

@bullet03

Just wondering - why only these urls? What's about the other long ones?

@bullet03

Just wondering - why only these urls? What's about the other long ones?

Thank you!
Found this by the moment. Still looking throught the whole site to find more, will batch them in one PR.


Navigate on time instead of audio

Is it possible in the audio slide show for example, that you can navigate only on time instead of time connected to the audio file?

Starting to count from when you change to that page?
Would you still want the audio there too or would it be better as an option on the Slideshow navigator page so you wouldn't have to have an audio player at all?

Would this be linked to the Timer? When it counts down to zero the page moves on? What if you have Timer and Navigate on Timer and also Narration and Navigate on Narration... which takes priority? I suppose Navigate on Narration takes priority otherwise Navigate on Timer could cut slide part way through audio...
Just leaving thoughts so we have a clear picture of what this should do...

Also just to add this something we briefly discussed during the conference developer day... When I originally worked on the auto play and navigate on narration functionality in the old Flash version I also had an option where you could set this to only happen on the first visit to the page. e.g. the audio auto plays and auto navigates on first visit but not when you then go back through the pages you've already viewed and listened to. I can't remember when or why but that got left off at some point but you've only got to demo or navigate back and forth with an LO that has auto play auto navigate to realise how useful that option was. Now that was an author controlled option e.g. you set that to be the behaviour when authoring.
We also briefly discussed on the dev day whether at some point we should add and have a settings icon for end users in place of the current theme switcher which has more options including the theme switcher but also could have user control over auto play auto navigate etc. I don't think that was the reason we were discussing having a settings icon and panel at the time and can't remember what the reason was but this could perhaps be an additional configuration option within that panel. Something to discuss during the meeting on the 10th perhaps.

I had a look at the code and it would be relatively easy to add in a Navigate on Timer option (like Navigate on Narration) in xenith but then I've noticed that we don't have a Page Timer option on every page. Is that something that would be desirable? I seem to remember something like that being asked for on the forums a while back (i.e. only view a page for a certain time) but then taking Ron's points above into consideration then we need to know what takes priority and what doesn't.
I've added the ability for all page models to be alerted when the timer runs out (if they wish or require) so should we go ahead and add Page Timer to every page and go from there?

@ronm123 I think I didn't know about the navigate on narration only working on 1st view so that's why it wasn't added to xenith. I take it this was default behaviour rather than an optional property (if it was optional prop then I don't know why it's deprecated!)
Page timer is a strange feature as it doesn't appear to do anything (I understand why it was added but it's not useful for vast majority). Adding option to navigate on it might make it used more (would make sense to be on all pages if this was done) but do we want to encourage pages to move on without student control? I can imagine really horrible ux things being done with it.

Also, if we do make these changes I'd prefer navigate on narration to be drop down menu (on/off/on for 1st view) than add another opt property as we have so many already. Although your settings idea might make this better Ron.

@JohnSmith-LT sounds good - I don't have any ideas for extra options to add


pkg clean up

Summary
This was started to remove the need for URL polyfill but based on browser support changes are unneeded. We have 96%+ coverage across all major browsers. IE and Opera Mini are the only two without support. This is okay.
I've cleaned up a few unused scripts and updated tsconfigs.

How did you test your changes?
Manually

Review Error for bangtoven @ 2023-07-26 20:14:34 UTC
User failed mfa authentication, see go/mfa-help


Waypoint: Set the ID of an Element

Give your form element the id cat-photo-form.
Give your form element the id of cat-photo-form.
How to do it???

If you are stuck on a Waypoint, please use the "Help" button to ask for help on the Gitter Chat Rooms.
For waypoints you can access the help room directly at:
https://gitter.im/FreeCodeCamp/Help

I think there's a bug because when I try to submit the answer , it doesn't respond.


incompatible changes reported against the same code

When I run cargo semver against a checkout of core-foundtion-sys that matches the current crate I get a bunch of errors like:
error: breaking changes in `CFURLSetResourcePropertyForKey`
   --> /Users/jrmuizel/src/core-foundation-rs/core-foundation-sys/src/url.rs:146:5
    |
146 |     pub fn CFURLSetResourcePropertyForKey(url: CFURLRef, key: CFStringRef, value: CFTypeRef, error: *mut CFErrorRef) -> Boolean;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = warning: type error: expected enum `libc::c_void`, found a different enum `libc::c_void` (breaking)

Hm, this suggests that a few specific internals behave incorrectly. Actually, other bug reports point towards a similar underlying problem. I'll have a look.

It seems to me that no crates exhibit this problem anymore with modern versions of rust-semverver. While I am not entirely sure, I'll close this for now.


Update google-cloud-nio to 0.123.25

Updates com.google.cloud:google-cloud-nio from 0.123.14 to 0.123.25.
GitHub Release Notes - Version Diff
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

Ignore future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "com.google.cloud", artifactId = "google-cloud-nio" } ]

labels: library-update, early-semver-minor, semver-spec-patch, commit-count:1

Superseded by #878.


s3 Pre signed url implemented

Implemented pre signed url for upload and download to s3 bucket.

Thank @Varungarg97

Thank @Varungarg97


max length of Cosmos DB account name : 31 characters or 44 characters?

[Enter feedback here]
In this page https://docs.microsoft.com/en-us/azure/cosmos-db/manage-with-templates, max is 44 characters.
Yet in this page https://docs.microsoft.com/en-us/azure/cosmos-db/how-to-manage-database-account, max is 31 characters
But when I try to create in Azure Portal, it looks like it should be 44 characters.
Please cross check all account name documentation after confirmation this tech details. Thanks in advance.

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

ID: 1555e87b-459c-1f2b-1591-46730e141189
Version Independent ID: d48e5b51-745c-8ee2-e3e1-ccca4c5426b4
Content: Learn how to manage database accounts in Azure Cosmos DB
Content Source: articles/cosmos-db/how-to-manage-database-account.md
Service: cosmos-db
Sub-service: cosmosdb-sql
GitHub Login: @markjbrown
Microsoft Alias: mjbrown

@MS-jeremy Thank you for the feedback. We are actively investigating and will get back to you soon.

Fix for these is in PR now.
@SnehaGunda, can you sign off. These includes are in your name.
Thanks for reporting.

@SnehaGunda you can disregard. Was able to auto-merge.
This will push in PM.

Thanks Mark.
@MS-jeremy we will now close this issue.
#please-close


Bump for 3.4.68

Checklist

[x] Used a personal fork of the feedstock to propose changes
[ ] Bumped the build number (if the version is unchanged)
[x] Reset the build number to 0 (if the version changed)
[x] Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
[x] Ensured the license file is being packaged.

@conda-forge-admin, please rerender

Closing since the bot did the job in parallel


v3. Lateral menu. Apply fonts and CSS details

[ ] Logo & Label are different in size
ww2
ww3

Checked with @atmoner


PSA examples fail compilation with p4c-bm2-psa: packet_path

When compiling the example PSA programs from https://github.com/p4lang/p4-spec/tree/master/p4-16/psa/examples with the new p4c-bm2-psa implementation, I am getting the following error:
In file: /home/vagrant/p4c/backends/bmv2/psa_switch/psaSwitch.cpp:350
Compiler Bug: ../psa.p4(96): <Type_Enum>(244): Unhandled type for <Type_Enum>(244) packet_path
enum PSA_PacketPath_t {
^^^^
../psa.p4(110)
  PSA_PacketPath_t packet_path;
                   ^^^^^^^^^^^

I am not sure sure if it's an issue with the underlying compiler or the psa.p4 spec.

moving to p4c repo


hash-table-binary-trees-algorithm

Please star this repository to show your support, in the meantime I am reviewing your code.


Applying the example code gom.api.imaging.compute_point_from_pixels() results in an error

Applying the example code of gom.api.imaging.compute_point_from_pixels() to lookup the 3D coordinates of a 2D point alas results in an error. Would appreciate to be able to utilize the described functionality as stated in the documentation. Or should the data be pre-processed somehow to make it work? Please advise me.
#see https://zeissiqs.github.io/zeiss-inspect-addon-api/2023/python_api/python_api.html#gom-api-imaging-compute-point-from-pixels
import gom
DIRNAME = 'c:/data/'
MEASUREMENT_SERIES = 'Scan 1'
MEASUREMENT = 'M1'
gom.script.sys.close_project() #Start by closing all current projects
gom.script.sys.load_project(file= DIRNAME + 'ATOSQ12_1.ginspect')
gom.script.view.toggle_image_mapping(enable=True, use_animation=False) #Show it to me in the UI
measurement = gom.app.project.measurement_series[MEASUREMENT_SERIES].measurements[MEASUREMENT]
left = gom.api.project.get_image_acquisition(measurement, 'left camera', [0])[0]
p = gom.api.imaging.compute_point_from_pixels([[(gom.Vec2d (10, 10), left)]], False)
print(p)
Error in line 18
GomApiError: Computation of 2D points is not allowed in 3D projects.
Stacktrace:
Line 18 in 'gom-api-imaging-compute-point-from-pixels.py' ()

Please try it with two (i.e. left and right) camera images as described in https://zeissiqs.github.io/zeiss-inspect-addon-api/2023/python_examples/point_pixel_transformations.html.
There are cases where a single image is sufficient, I am currently investigating the background.

Thank you for the reply. Yes, I can confirm it does work with two images. But, then the relation between left and right image-pixels must be known. We need the single image solution. A big thank you in advance. Your help is very much appreciated.

The topic is not sorted out completely yet. What I learned now, is that a single image works only with 2D projects in ZEISS INSPECT Correlate. In this case, the measuring object must have a flat surface and the camera axis must be orthogonal to this surface.

Unfortunately, a preceding step is required in this case. You use the function gom.api.imaging.compute_epipolar_line as a helper. You supply a set of tuples (pixel, image) and an additional image and get an epipolar line for the second image for each tuple. The wanted pixel-match is located on this epipolar line. (see https://en.wikipedia.org/wiki/Epipolar_geometry)
As the final step, you have to search for the wanted pixel on the epipolar line. This is typically done by gray value comparison of the surrounding pixels. As a prerequisite, the pixels must be located at distinct position, i.e. not on a uniformly colored surface. In the best case, the surface has been prepared with a speckle pattern.

Thank you. Please hold on. I'm still chewing on this one :-). Yes, the Epipolar-line is an option, but then the pixel matching must be redone.
Perhaps it can be done easier. For, in the Zeiss Inspect GUI I can switch on/off the visual overlay of the 2D-image, 3D-mesh and Reference-Points of a saved project => the sensor calibration matrix is stored with the data and is reread with the data from disk. I could apply that calibration matrix to solve the issue. But somehow I can't use the export via File->Export->Sensor Calibration. To be used under specific conditions only?

May I ask you to refer to the ZEISS Quality Forum? This way, more people would be able to see and hopefully answer your question.

Closing due lack of activity.


Command for boss pet killcount

This command would be something like
"!bandospet"
and will show the killcount you received the bandos pet on.
Essentially taking advantage of the collection log

Does the collection log actually show the kc you recieved specific loot or pets?
Might be able to track stuff you get after such Feature was implemented, but everything before that would be missing.

Does the collection log actually show the kc you recieved specific loot or pets?
Might be able to track stuff you get after such Feature was implemented, but everything before that would be missing.

Sadly no, I do not believe so.

duplicate #8397


 Can you share your keybinding?

How did you try the customizing? Can you share your keybinding?

I have always been this setting, it will be invalid after upgrading to 1.28.

I see it working in 1.28, but not in 1.29 Insiders.
Are you sure, its not working for you in 1.28?

I have the same trouble as you have.

I am sure that I can use it before I upgraded 1.28.

Can you set emmet.triggerExpansionOnTab to true in your settings and try again?

Can you set emmet.triggerExpansionOnTab to true in your settings and try again?

Thanks, finally resolved, but why would a default is false？

tab is the most popular keybinding used for expanding emmet abbreviations. But tab is also meant for inserting an actual tab i.e \t. Therefore when the cursor is not next to an actual emmet abbreviation, we had to add the \t. Thats the history for introducing the setting emmet.triggerExpansionOnTab. When that is set to true, we do the fallback to actual tab when required.
So the keybinding for emmet has this setting in its when clause

When you change the keybinding to something else, you will have to either update the when clause to remove the config.emmet.triggerExpansionOnTab part or you should set emmet.triggerExpansionOnTab to true in settings


Missing fields in interface ValueLabelProps in Slider

[x] I have followed (at least) the PR section of the contributing guide.

Sorry, couldn't add label and component after raising pull request.
Label: component: Slider
Closes #21932

@govardhan-srinivas Much appreciated, thanks!


Corrected spelling of license file.

Licence and license. This confusion is so similar to practice and practise that once you've learned the difference for one, you instantly know it for the other! Licence is a noun, license is a verb. Before learning to drive, you apply for a provisional driving licence, but the DVLA must license you to drive.


[Feature Request] Non-Union Generic Type Params

Search Terms

non-union
generic
type param
one of

Suggestion
A way to annotate that a generic type param will not accept union types.
I don't have the syntax or keyword in mind, but I'll just go ahead and use nonUnion as a kind of type param modifier,
type NonUnionX<nonUnion T> = (
  /*Implementation*/
);

Use Cases
What do you want to use this for?
I work with pretty complex types (in my opinion); and a lot of them.
When working on a complex type, I tend to break the problem down into smaller subproblems.
The base case is usually assuming that all type params are non-union.
After that, I build on top of the base case and implement types that support union type params.

Here is an example type that is a base case,
PrimaryKey_NonUnion<TableT>

And here is an example of a type building upon the base case,
PrimaryKey_Output<TableT>
It distributes TableT and uses PrimaryKey_NonUnion. The result is a union if TableT is a union.

And here is an example of another type building upon the base case,
PrimaryKey_Input<TableT>
It distributes TableT and uses PrimaryKey_NonUnion.
Then, it uses UnionToIntersection<> to combine the results into one type.

That experimental repository of mine is filled with instances of generic types that support union types and those that do not.
There are times where you really do not want to pass a union type to a generic type param because it'll result in bugs that may not be noticed till later.
What shortcomings exist with current approaches?
One approach is to just write a comment that says,
/**
 * + Assumes `T` is not a union
 * + Assumes `U` may be a union
 * + Assumes `V` is not a union
 */

This gets very error-prone when you start having hundreds of types.

Another approach is to give your types names that are descriptive,
type SomeOperation_NonUnionT_UnionU_NonUnionV<
  T,
  U,
  V
> = (
  //Implementation
);

This is still error-prone; you may still use it incorrectly.
Even if the name of the type says NonUnionT, you may still pass a union type to T.
Examples
type NonUnionX<nonUnion T> = (
  /*Implementation*/
);
//OK
type nonUnionX1 = NonUnionX<string>;
//Error, Type `NonUnionX` expects non-union for type parameter `0`
//  `string|number` is a union type
type nonUnionX2 = NonUnionX<string|number>;
//                          ~~~~~~~~~~~~~

type UnionX<T> = (
  T extends any ?
  //OK! `T` has been distributed
  NonUnionX<T> :
  never
);
//OK
type unionX1 = UnionX<string>;
//OK
type unionX2 = UnionX<string|number>;

type Blah<T> = (
  //Error, Type `NonUnionX` expects non-union for type parameter `0`
  //  `T` may be a union type
  NonUnionX<T>
  //        ~
);

A non-approach is to expose only types that handle union type params and to leave non-union implementations unexported.
This is not a useful approach because it means building new types in a different file using these non-union implementations becomes impossible. Since they're unexported.
Checklist
My suggestion meets these guidelines:

[X] This wouldn't be a breaking change in existing TypeScript/JavaScript code
[X] This wouldn't change the runtime behavior of existing JavaScript code
[X] This could be implemented without emitting different JS based on the types of the expressions
[X] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
[X] This feature would agree with the rest of TypeScript's Design Goals.

Similar issues
https://github.com/microsoft/TypeScript/issues/24085
https://github.com/microsoft/TypeScript/issues/27808

Can it not be done using a helper type?
type Check<T,U> = T extends unknown ? ExtractN<U,T> : never;
type ExtractN<T,U> = [T] extends [U] ? U : never;
type NonU<T> = Check<T,T>;

type SomeAlias<T extends NonU<T>> = T;

type A = SomeAlias<never>;
type B = SomeAlias<string>;
type C = SomeAlias<string|number>;
type D = SomeAlias<1 | 2 | 3>;

Uhhh... Wtf?
I'm surprised that doesn't give a circular constraint error or something.
I just did some quick tests and it looks like it works,
type Check<T,U> = T extends unknown ? ExtractN<U,T> : never;
type ExtractN<T,U> = [T] extends [U] ? U : never;
type NonU<T> = Check<T,T>;

type NonUnionX<T extends NonU<T> & (string|number)> = (
  /*Implementation*/
  T extends string ?
  "str" :
  T extends number ?
  "num" :
  never
);
//OK
type nonUnionX1 = NonUnionX<string>;
//Error, Type `NonUnionX` expects non-union for type parameter `0`
//  `string|number` is a union type
type nonUnionX2 = NonUnionX<string|number>;
//                          ~~~~~~~~~~~~~

type UnionX<T extends string|number> = (
  T extends string|number ?
  NonUnionX<T> :
  never
);
//OK
type unionX1 = UnionX<string>;
//OK
type unionX2 = UnionX<string|number>;

type Blah<T extends string|number> = (
  //Error, Type `NonUnionX` expects non-union for type parameter `0`
  //  `T` may be a union type
  NonUnionX<T>
  //        ~
);

type testInvalidParam = NonUnionX<boolean>
//                                ~~~~~~~

Playground
Too bad I can't customize the error message, though. Being told a type isn't assignable to never can be confusing =x
I'll play with this some more when I have the time and see if it messes with type inference for anything. If it doesn't mess with type inference, then you've basically solved my problem.

Hmm..
I finally got the time to play with this,
type Check<T,U> = T extends unknown ? ExtractN<U,T> : never;
type ExtractN<T,U> = [T] extends [U] ? U : never;
type NonU<T> = Check<T,T>;

function foo<T extends NonU<T> & { x : string }> (t : T) {
  //Expected: OK!
  //Actual  : Property 'x' does not exist on type 'T'.
  t.x
}
function foo2<T extends { x : string }> (t : T) {
  //Expected: OK!
  //Actual  : OK!
  t.x
}

Playground
It seems like it complicates implementations quite a bit.
I guess I'll have to use this... Sparingly.

Seems like it doesn't work for object types, either,
type Check<T,U> = T extends unknown ? ExtractN<U,T> : never;
type ExtractN<T,U> = [T] extends [U] ? U : never;
type NonU<T> = Check<T,T>;

type Obj = {
  [k:string]:string
};
type NonUnionX<T extends NonU<T> & Obj> = (
  /*Implementation*/
  keyof Obj
);
type Blah<T extends Obj> = (
  //Expected: Error
  //Actual  : OK
  //We have not distributed `T` here, it should be treated as potentially
  //being a union type
  NonUnionX<T>
);

Playground

I've been playing with this but I can't get it to work =/
Circular constraints hurt my brain.
export type UnionToIntersection<U> = (
    (
        U extends any ? (k: U) => void : never
    ) extends (
        (k: infer I) => void
    ) ? I : never
);
type NonU<T> = [T] extends [UnionToIntersection<T>] ?
  //Defer check to avoid circular constraint error, I think.
  //Can't seem to just use "regular" T
  //T :
  (T extends any ? T : never) :
  never;

type Constraint = {x:string};

type NonUnionX<T extends NonU<T> & Constraint> = (
  /*Implementation*/
  T extends string ?
  "str" :
  T extends number ?
  "num" :
  never
);
//OK
type nonUnionX1 = NonUnionX<{x:string}>;
//Error, Type `NonUnionX` expects non-union for type parameter `0`
//  `string|number` is a union type
type nonUnionX2 = NonUnionX<{x:"hi"}|{x:"bye"}>;
//                          ~~~~~~~~~~~~~

type UnionX<T extends Constraint> = (
  T extends string|number ?
  //OK
  NonUnionX<T> : //<-- Expected OK, Actual Error
  never
);
//OK
type unionX1 = UnionX<{x:string}>;
//OK
type unionX2 = UnionX<{x:"hi"}|{x:"bye"}>;

type Blah<T extends Constraint> = (
  //Error, Type `NonUnionX` expects non-union for type parameter `0`
  //  `T` may be a union type
  NonUnionX<T>
  //        ~
);

type testInvalidParam = NonUnionX<boolean>
//                                ~~~~~~~

type Passthrough<T extends NonU<T> & Constraint> = (
  //OK
  NonUnionX<T>
);

Playground
@jack-williams Teach me, master

The type I provided is almost certainly going to be brittle. In the example:
type UnionX<T extends Constraint> = (
  T extends Constraint ?
  //OK
  NonUnionX<T> : //<-- Expected OK, Actual Error
  never
);

I guess the assumption is that T can't be a union because it's in the body of distributive conditional type, but I don't think there is anyway to convey that information.
IMO, I don't think asking a type whether it is a union is a meaningful question. It would be like asking a number whether it is an addition or multiplication. Semantically, 1 + 3, 2 * 2, and 4, are all the same number that are independent of the notation used to specify them.
Is the type { x: number } | { x: number, y: number } a union? Syntactically yes, but semantically the type is represented by { x: number } . Distributive conditional types do dependent on syntax, which is very useful but not stable (two types that mean the same thing can behave differently). I can see the appeal of taming some of the more complex cases, but I'm not sure adding more constraints that ultimately depend on non-semantic properties is the best approach.

I've already given an example of why it's semantically useful.
In particular, many of my use cases happen to be that I need to guarantee type safety for a SQL query builder. And I need to either properly handle union cases or forbid them (if I cannot safely handle union types).
NonUnion types would help increase the safety of the library I'm writing.

Asking what the candidate key or super key of a union table type is actually more complex, if used as an input to a function.
Because a table may have more than one candidate key.

If it is not a union type, the CKs are the CKs of the table.
If it is a union type and an output of a function, then it is the union of CKs of each table.
If it is a union type and an input to a function, then the CKs are the... Cross product of each CK from each table.

When trying to build this expression,
//column null-safe eq to value
column <=> value

What are valid types for value?
If column is a not a union type, then  value has to be at least a subtype of the column's type.
If column is a union type, then value has to be a subtype of the intersection of each columns' type.

In the above cases, it's pretty easy to guarantee type safety, even if union types are passed to a function.
The exact way to guarantee safety is different for each problem (especially when you have correlated type params).
But here's a situation where I can't quite guarantee safety by allowing union types because of how I want the function to be used.
eqCandidateKeyOfTable(
  myTable,
  tableWithCandidateKeys,
  columns => [columns.columnA, columns.columnB]
)

If possible, I want to forbid a union type for myTable. It makes a  safety guarantee impossible at the moment.

In all these cases, the constraint types are not union types. However, the concrete types may be unions.
That sidesteps the issue of the constraint { x: number } | { x: number, y: number } being largely meaningless

This is how I'm emulating the non-union constraint at function call sites.
https://github.com/AnyhowStep/tsql/blob/master/src/select-clause/select-delegate.ts#L31
https://github.com/AnyhowStep/tsql/blob/master/src/type-util/is-union.ts#L6

Just thought I'd elaborate further.
This proposal is different from oneof in this case,
declare function foo<T extends oneof string|number> (t : T) : void;
declare function bar<T extends nonunion string|number> (t : T) : void;

//OK
//"x"|"y" extends string
//string is one of string|number
foo("x" as "x"|"y");

//Error
//"x"|"y" is a union type
bar("x" as "x"|"y");

function foo(str: number): void
function foo(str: string): void
function foo(str: unknown) {

}

foo("") // fine
foo(5) // fine
foo("" as (number | string)) // error

I'm going to copy-paste my response from Gitter,
I've said this many times before but overloads are terrible
foo(arg:{x:string}):void;
foo(arg:{y:string}):void;

foo({x:"",y:""}); //OK, but expected error

The overload thing only really works for simple cases.
foo(arg:oneof {x:string}|{y:string}):void

You can emulate this at function/method call sites at the moment with those fancy StrictUnion helper types but they don't work when you're working with type aliases only.

Like, >70% of my code is just TS type-level stuff and 30% or less is actual executable code. Emulating stuff at call-sites is only useful for downstream users but not for implementors


fixcast filter and join conjunct's return type to boolean

Proposed changes
Issue Number: close #xxx

Further comments
If this is a relatively large or complex change, kick off the discussion at<EMAIL_ADDRESS>by explaining why you chose the solution you did and what alternatives you considered, etc...

run buildall

run buildall


Fixed tests

fixed test to allow checking of PR's with new modules.
removed checking (and downloading) all versions in range, which was in my opinion really bad idea. instead only edge versions of each range are chosen.
bumped dependencies versions to latest => dropped node 4.

removed checking (and downloading) all versions in range, which was in my opinion really bad idea. instead only edge versions of each range are chosen.

Yep, that quite clever I didn't think about that 👍

@JulianWielga Thank you!


Please add tests or delete rules for Hockey app and Facebook app credentials

@jameswinkler, @eddynaka
We have no meaningful tests for these checks. Please review these rules for value. And build them out if they should be retained or delete them if they are weak.

I will add more tests to facebookAppCredentials, since that has a validator and we are getting matches.

I will remove HockeyApp.


NO-ISSUE: Bump ironic projects versions

/lgtm
But you need a jira reference or NO-ISSUE @elfosardo

/lgtm
But you need a jira reference or NO-ISSUE @elfosardo

yep, I was undecided if actually bulding an actual BUG for this, but NO-ISSUE is fine

/retest

/retest

/retest
looks like the provisioning completed, trying one more time

/retest

/retest

/retest
fix has merged

/retest

/retest

/retest

/retest

/lgtm

/retest
failure not related to this patch

/retest
issue with repo mirror service

/retest


setAudioStreamType not accessible

Hi,
Your library does not allow me to choose if I want to play by using the music speaker or the phone call speaker. The setAudioStreamType() for media player is not accessible.
Is there any specific reason to hide this capability ?

Hey, no specific reason, except nobody has needed it yet :) That's pretty easy to implement so it'll be part of the next release.


GET /favicon.ico 404

Another error in the log. This doesnt cause a crash I'm just curious what is happening.
Executing (default): UPDATE "Sessions" SET "expires"='2018-02-13 16:37:04.417 +00:00',"updatedAt"='2018-02-12 16:37:04.418 +00:00' WHERE "sid" = '9ApixaVmY-ImG7CY_PDSHYKlZyZjJr_W'
GET /favicon.ico 404 20.834 ms - 1192

One needs to put favicon.ico to the app

Should be fixed now


[Bug Report]: ESP32车辆定位项目中无法获取GPS模块数据，一直显示[12658.727]DRIVER_UART obj_read: py_board_get_node_by_handle failed;

联系方式
<EMAIL_ADDRESS>您发现了什么问题
A bug happened!

请更新固件到最新试试
请用串口助手查一下ESP32的串口有没有数据


Ability to specify title of an object

I'm not sure how you'd approach annotating the zod schema with the necessary data, but it would be great to be able to set the title field on the JSON Schema object.
e.g.       "title": "TitleHere",  in the context of zod-to-json-schema README 'Expected output' example:
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$ref": "#/definitions/mySchema",
  "definitions": {
    "mySchema": {
      "description": "My neat object schema",
      "type": "object",
      "title": "TitleHere",
      "properties": {
        "myString": {
          "type": "string",
          "minLength": 5
        },
        "myUnion": {
          "type": ["number", "boolean"]
        },
      },
      "additionalProperties": false,
      "required": ["myString", "myUnion"]
    }
  }
}

Currently I use the Zod .describe() method to set the description, then do a find and replace on the JSON Schema output for the "description" field, which is very hacky and preclude me from using the description field.
Official JSON Schema docs about annotations such as title can be found here: https://json-schema.org/understanding-json-schema/reference/annotations

I'm not sure how you'd approach annotating the zod schema with the necessary data

That's the issue, there is no canonical way of doing this. Maybe in v4, I guess we'll see
Try the nameStrategy or override options.


React + Immutable.JS: Best practice for sending Immutable.Map as props to children components?

Hi,
I'm doing the following inside a render() function on my Component:
posts.map((post) =>
  <PostComponent post={post} key={post.get('id')} />
)

Where posts is an Immutable.Map, and each item in it post is also a Map.
This seems to work but I'm getting the following warning:
Warning: Using Maps as children is not yet fully supported. It is an experimental feature that might be removed. Convert it to a sequence / iterable of keyed ReactElements instead.
What alternative approach is suggested? I don't want to lose Immutable.Map's functionality like .hasIn and .getIn.
Thanks!

Immutable.Map#map returns an Immutable.Map so you are giving react a Map of children.  You should be able to do:
posts.values().map(post =>
  <PostComponent post={post} key={post.get('id')} />
)

I don't know if you'd need to append an toArray or not.

@eyston Thanks for the help! :+1:
Yeah, it's valueSeq and then toArray is not even needed for the iteration:
posts.valueSeq().map(post =>
  <PostComponent post={post} key={post.get('id')} />
)

I guess I'm still a bit confused at to what an Immutable.Seqis. Is there a good primer/tutorial on all the different Immutable data types (other than the regular documentation)?

I don't know of one.  I came from clojure so I just guess a lot when it comes to Immutable.js :).
I'm actually not sure why so many functions have a x and xSeq version.  I generally use x and then get told map is not a function and see if an xSeq version exists.
Guessing from clojure ... Immutable.Seq is an immutable lazy list.  It is the base most of the other data structures implement.  So when you call something like valueSeq the contract is it is going to return a Seq but that might take the form of an eager List of all values, or it might be a lazy Seq where it only does the work to pull a single value out at a time.  The thing is, you don't care.  As long as it implements the Seq interface you can map away.

@eyston Thanks for the explanation :+1:
Hopefully we'll get a more thorough documentation and some more examples from Immutable.

+1 for the solutions described here!

+1

+1 solutions
posts.valueSeq().map(post =>
<PostComponent post={post} key={post.get('id')} />
)

+1 thanks

If you don't want to lose the key-value relationship you can also use entrySeq(), which is like a combination of keySeq and valueSeq:
posts.entrySeq().map(o =>
     <Post value={o[1]} key={o[0]} />
)

They also have mapEntries() which is entrySeq and map combined map . entrySeq.
posts.mapEntries(o =>
     <Post value={o[1]} key={o[0]} />
)

entrySeq().map and valueSeq().map did not throw a warning and produced a IndexedIterable.
When using mapEntries() I get the warning the OP originally had in the first comment. This produces a OrderedMap, which is the data structure I am mapping with. If you attempted to use mapEntries() hopefully this provided a hint as to why you may be receiving that warning.

All the solutions throws flattenChildren error when you modify its state out of the component, and then try to mount it back.

You could instead of passing Immutable Collections such as Maps and Lists to your React components, pass normal js objects and arrays, respectively. Thay way, it's easier to read and understand, and you remove dependency/boilerplate of Immutable from your React components.
Remember that Immutable Map each keys and values method return an iterator, which can be converted to an array using the spread operator inside brackets.
This way, using a normalized state for a Todos demo app e.g:
const stateShape = Record({
    todos: Map({
        1: {
            name: 'Eat a lot'
        },
        2: {
            name: 'Take span'
        },
    })
})

I'd suggest a mapStateToProps function like this:
[...] // some other code
const getProjectsArray = state => {
    const todos = state.get('todos')
    const todosArray = [...todos.values()]

   return todosArray
}

const mapStateToProps = (state) => {
    projects: getProjectsArray(state)
}
[...] // Some other code

Notes:

This makes easier to use tools like Normalizr and Reselect.
Remember to convert back to Immutable Collections your data before injecting it in your state. Which could be done in reducers but a better approach would be keep reducers out of complex logic and move all logic to something like a middleware.

Wouldn't that, however, kill any performance optimization done on react components based on ImmutableJS?

@Ciul that's going to cause unnecessary rerenders every time unless you implement shouldComponentUpdate with a deep comparison, which can be costly depending on your object.

posts.map((post) => <PostComponent post={post} key={post.get('id')} />).toArray();

@wSLecHayfIeNdock That behavior of toArray() that your example relies on, where it just takes the values of an immutable Map and drops the keys, has been removed in Immutable v4: https://github.com/facebook/immutable-js/pull/1340
The immutable v4 version of your snippet:
posts.map((post) => <PostComponent post={post} key={post.get('id')} />).valueSeq().toArray();

@andrewcapodieci That's why I suggest using Reselect. This will make a kind of cache and will return same array if not changed.

@Ciul are your transforming your immutable objects toJS() in selectors or using .get() syntax in jsx?

I have a strange request here. I'm also using Typescript, and converting to using entrySeq for React lists seemed like the right idea. Especially as https://reactjs.org/docs/lists-and-keys.html recommends getting the key as well.
However what is the type that should be set for the component that receives a Seq? It shouldn't be an Immutable Seq. It should be some sort of "Functor" type that supports map. Because the component can also take just an array as well.
Furthermore, this is basically React rendering of a Map. Does converting to an entrySeq mean that every time, the Map changes, we have to reproduce a list so that React can render it. It seems rather inefficient for React, and it seems that it would be better if there was some key-value structure that was also always iterable without needing to be converted into a different in-memory representation.
I want to use some generic functor type instead of immutable Seq so to avoid the dependency of react components on immutablejs.

Try reduce()
posts.reduce((jsxArray, post) => {
  jsxArray.push(
    <PostComponent post={post} key={post.get('id')} />,
  );
  return jsxArray;
}, []);


Added GBIF suggestion wrapper, similar in style to the previously ent…

…ered parse wrapper. Also added corresponding unit tests
Description
This will be my first of (hopefully many) additions to pytaxize. For my initial test commit, I have added a very basic wrapper over the GBIF suggestion API (see https://www.gbif.org/developer/species => /species/suggest), that is similar in style to the already existing "parse.py". I have also added the corresponding unit tests. Code was run through "black", as requested in the contributions guide.
The GBIF wrapper itself takes a partially completed, or malformed name, and outputs an "autocompletion" of up to 20 possible taxa for the input name.
Should this be merged, I will follow up with an addition of GBIF to the docs.
Related Issue
Example
from pytaxize import gbif
response = gbif.suggest(
name='puma con',
as_dataframe=False
)
=> [{'scientificName':'puma concolor'},{...}]

Codecov Report

Merging #51 into master will decrease coverage by 0.20%.
The diff coverage is 33.33%.

@@            Coverage Diff             @@
##           master      #51      +/-   ##
==========================================
- Coverage   38.86%   38.66%   -0.21%
==========================================
  Files          20       22       +2
  Lines         795      825      +30
==========================================
+ Hits          309      319      +10
- Misses        486      506      +20

Impacted Files
Coverage Δ

pytaxize/gbif/suggest.py
28.57% <28.57%> (ø)

pytaxize/gbif/__init__.py
100.00% <100.00%> (ø)

pytaxize/gbif/constants.py
100.00% <100.00%> (ø)

Continue to review full report at Codecov.

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

thanks @Daniel-Davies The PR looks great - and thanks for being detailed and following contributing notes. First take away I think is probably open an issue first to discuss (and then PR) while you get oriented here and I explain things that should be documented (my fault, sorry)
In general I am very keen to get any contributions here as I don't have much time to maintain python packages as they're outside of my main work focus.
However, I think for GBIF data for pytaxize, since pygbif https://github.com/sckott/pygbif is pretty solid now we should import that as needed and not replicate its functionality here.
in the pytaxize gbif module:

parse: already in pygbif https://pygbif.readthedocs.io/en/latest/modules/species.html#pygbif.species.name_parser - and anyway the pytaxize version is using an old base url, so good to get rid of that
gbif_name_backbone and gbif_name_lookup: aren't used anywhere yet - should drop these and import equivalents from pygbif when/as needed - https://pygbif.readthedocs.io/en/latest/modules/species.html
suggest - the method in this PR - in pygbif already https://pygbif.readthedocs.io/en/latest/modules/species.html#pygbif.species.name_suggest

The high level view I have of this package:

Data sources for which there are separate python packages - use those and don't duplicate effort here, e.g, GBIF
Data sources for which there are no pkg, include code here, e.g., NCBI, COL
High level methods/classes like Ids here will work with many different data sources as allowed by those data sources. e.g., in R pkg taxize downstream or children.  The Ids class here is equivalent to the get*() taxize functions, where instead of separate functions in the R pkg, I thought we'd have a class here (Ids) and then you can call methods on that class for each data source. So one thing would be great to have if you're keen is a gbif method within Ids

I realize that I did duplicate effort/code in R taxize where I have gbif code instead of using the R rgbif client, but I want to not do that here when possible.

note: actively working on children and classification classes - so make sure to update your branch before from the main branch as needed


Increase grpc and grpc-tools to 1.33.1

To make Python 3.9 support better and faster.

Done in #438


Adding metric for network interfaces

Added a new metric to check network interfaces.
It allows to check just one interface or to use regular expressions. Usage examples:
metrics-windows-network.rb
metrics-windows-network.rb --interface "Microsoft Virtual WiFi Miniport Adapter"
metrics-windows-network.rb --interface "isatap*"

Maybe it can be done better, but Ruby is not one of my usual languages :)

@magmax  Can you update the CHANGELOG please
@tas50 I will leave this to you to merge, I know you are working in this repo.

I did a mess.
I will create a branch and to it well, by modifying the changelog too.


[Hook]: OTel hook for .net

SDK
.NET
Maintainer
Community
Artifacts
We need to add https://www.nuget.org/packages/OpenFeature.Contrib.Hooks.Otel to the docs here: https://docs.openfeature.dev/docs/reference/technologies/server/dotnet
DoD:

dotnet OTel hooks shows up under hooks at https://docs.openfeature.dev/docs/reference/technologies/server/dotnet/

see similar PR
Repository
https://github.com/open-feature/dotnet-sdk-contrib/tree/main/src/OpenFeature.Contrib.Hooks.Otel
Anything else?
No response

https://github.com/open-feature/openfeature.dev/blob/66-hook-otel-hook-for-net/src/datasets/hooks/opentelemetry.ts#L34-L37


Long context will cause the vLLM stop

If I exceed the token limit of 4096, the vLLM abruptly stops. It would be helpful if you could incorporate some logging functionality into the stopping code. This way, users can easily modify the code to resume the vLLM from where it left off.

Hello, the question seems to remain unsolved. When I set max_num_batched_tokens very big (such as 10000) or the length of input tokens is quite long (near 10000), vLLM will fall into an endless loop and not use GPU. Is there any solution for long context situation? @LinPoly @zhuohan123

Hello, the question seems to remain unsolved. When I set max_num_batched_tokens very big (such as 10000) or the length of input tokens is quite long (near 10000), vLLM will fall into an endless loop and not use GPU. Is there any solution for long context situation? @LinPoly @zhuohan123

Hi! I think this is because you set the max_num_batched_tokens  and max_num_seq too big to act as metrics. If you have a request which needs more GPU memory than you have, it cannot be actually processed. But the above two values are too big to filter this request out so the request will still stay in waiting queue. The repository maintainers may give a better explaination on this.

Thanks for reply. But I have to set max_num_batched_tokens big to fit the long context input. In fact it is not that long because I have tested the huggingface version that it could deal with up to 8k context input in the same device. I think if it works in hf setting but does not work in vllm, it may expose some problems. I wonder there is some other solutions for long context.

Hello, the question seems to remain unsolved. When I set max_num_batched_tokens very big (such as 10000) or the length of input tokens is quite long (near 10000), vLLM will fall into an endless loop and not use GPU. Is there any solution for long context situation? @LinPoly @zhuohan123

Hi! I think this is because you set the max_num_batched_tokens  and max_num_seq too big to act as metrics. If you have a request which needs more GPU memory than you have, it cannot be actually processed. But the above two values are too big to filter this request out so the request will still stay in waiting queue. The repository maintainers may give a better explaination on this.

Thanks for reply. But I have to set max_num_batched_tokens big to fit the long context input. In fact it is not that long because I have tested the huggingface version that it could deal with up to 8k context input in the same device. I think if it works in hf setting but does not work in vllm, it may expose some problems. I wonder there are some other solutions for long context.

Hello, the question seems to remain unsolved. When I set max_num_batched_tokens very big (such as 10000) or the length of input tokens is quite long (near 10000), vLLM will fall into an endless loop and not use GPU. Is there any solution for long context situation? @LinPoly @zhuohan123

Hi, can you show me "vLLM will fall into an endless loop and not use GPU" happens at what code postion?
I also encountered vllm hangs problem and it seems vllm falls into an endless loop.

Hello, the question seems to remain unsolved. When I set max_num_batched_tokens very big (such as 10000) or the length of input tokens is quite long (near 10000), vLLM will fall into an endless loop and not use GPU. Is there any solution for long context situation? @LinPoly @zhuohan123

Hi, can you show me "vLLM will fall into an endless loop and not use GPU" happens at what code postion?
I also encountered vllm hangs problem and it seems vllm falls into an endless loop.

I guess it happens in _schedule() function in scheduler.py

Hello, the question seems to remain unsolved. When I set max_num_batched_tokens very big (such as 10000) or the length of input tokens is quite long (near 10000), vLLM will fall into an endless loop and not use GPU. Is there any solution for long context situation? @LinPoly @zhuohan123

the same, when i ran baichuan13b using vllm.entrypoints.api_server, it hang abruptly no more gpu using. no any message but server was dead.

I also encountered vllm-v0.1.3 hangs problem and it's like a deadlock problem. but I

@canghongjian @dalong2hongmei  Hello, have you solved it. I have also experienced vllm-v0.1.3 hanging issues twice, and it's like a deadlock problem. It's hard to locate code position.

@canghongjian @dalong2hongmei Hello, have you solved it? I have also experienced vllm-v0.1.3 hanging issues twice, and it's like a deadlock problem. It's hard to locate code position.

It's probably caused by vllm itself. I encountered this question again several days ago and found the maximum length that would not trigger this endless loop rises with the available GPU memory increases. Particularly, it is around 7000 in 15G T4 and 20000 in 22G A10.

Probably this: https://github.com/vllm-project/vllm/issues/546
For the record, I wasn't able to fix this particular issue.

Mine might be a different problem. I've reproduced it.  If there are many interrupt requests to abort,  the vllm service will not pass the pressure test because fall into an endless loop.  I don't know exactly why, but here is occurred error code postion: https://github.com/vllm-project/vllm/blob/main/vllm/engine/async_llm_engine.py#L160
@zhuohan123 Can you confirm it for me

Mine might be a different problem. I've reproduced it. If there are many interrupt requests to abort, the vllm service will not pass the pressure test because fall into an endless loop. I don't know exactly why, but here is occurred error code postion: https://github.com/vllm-project/vllm/blob/main/vllm/engine/async_llm_engine.py#L160 @zhuohan123 Can you confirm it

I have fixed the problem.


Support syntactic infinity

Macros eliminate calls to themselves through expansion. Here's an example of a term which eliminates itself through (best-effort) dataflow analysis and escape analysis. If it can't eliminate itself, it fails at CHECK time with an error.
inf is a literal without a corresponding evaluation. Instead, it must provably end up in comparisons (<, <=, ==, !=, >=, >). It evaluates the comparison as if it's larger than any other value except itself. (Ditto -Inf and "smaller than any other value".) (If we ever get a nan value for floats (which will be an actual value, not just a syntactic term), it might get an overriding exception, failing all comparisons except !=.)
Funnily enough, this will give us the much-desired "allomorphic inf" of Perl 6; this inf can "have all of the types" in effect by not being a value; only its role in a comparison can have a (boolean) value. Thus it will work for numbers, strings, booleans, enum types — anything comparable.
Example:
func max(values: Iterable) {
    my max = -inf;
    for values -> v {
        if max < v {
            max = v;
        }
    }
    if max == -inf {
        throw new X.Value { message: "Cannot take max of empty Iterable" };
    }
    return max;
}

This translates to something roughly like this:
func max(values: Iterable) {
    my max;
    my minusInfInMax = true;
    for values -> v {
        if minusInfInMax || max < v {
            max = v;
            minusInfInMax = false;
        }
    }
    if minusInfInMax {
        throw new X.Value { message: "Cannot take max of empty Iterable" };
    }
    return max;
}

Except that minusInfInMax is hygienically hidden and can't collide with any actual variable name in scope.
We have syntactic junctions (#210), so why not syntactic infinities?

I guess we can also allow inf and -inf to be stringified/printed, too. The main point is that they can never (not be proven not to) escape, in the "escape analysis" sense.

Maybe it's that I've only recently read about antimemes for the first time, but this issue felt similar.

Ranges.
I also feel it's reasonable to be able to do this:
for 1..inf -> n {
    say(n);
}

And this:
n = +prompt("n: ");

if n ~~ -inf..0 {
    say("negative");
}
elsif n ~~ 0..10 {
    say("low");
}
elsif n ~~ 11..inf {
    say("high");
}

Since ranges aren't aware of inf and -inf at all, it falls on the macros surrounding the latter to "hijack" the former somehow and "poison" ranges-with-infinities in them and treat them analogously to individual infinities.
I'm sure the implementors can hammer out the minute details. 😈

I think "syntactic infinity" might end up being a "cute today" idea that doesn't quite last all the way to general usefulness. As this talk points out, "users want values"... and "syntactic" here means "not first-class".
Maybe trying to do the same neatly through the type system, like with the extended real number line or the extended complex plane — adding infinities from the outside, as it were. The subset of cases that are purely syntactical could then maybe be the subject of really cool optimizations... if that ends up on the right side of a cost/benefit analysis, I dunno.
Closing, not because it ain't a cool idea, but because there are probably more urgent ideas.

Maybe trying to do the same neatly through the type system, like with the extended real number line or the extended complex plane — adding infinities from the outside, as it were.

I came back here now, a year later, to make essentially this point. I was writing some code that needed an infinity — and this being Java, I ended up doing int INFINITY = Integer.MAX_VALUE; — a poor-man's solution because it lays claim to Integer.MAX_VALUE as a kind of fake out-of-band value. Technically I should probably require that no actual in-band values take on this value as a precondition.
Anyway, I felt as I did this that a "true" way to do this would be to define a type locally, very similar to Optional/Maybe in that it adds an extra point — well, two extra points, since we probably want negative infinity while we're at it — and then just extends the comparison operation in the natural way. For some reason, this strikes me as "nicer" than a purely syntactic approach. Maybe one reason is that by talking about it as types and values, we can better reason about how they flow in the code; the corresponding reasoning about a purely syntactic extension feels brittle, because the syntax is so static, but we still need to worry about values escaping. By extending the type, values could still escape if we wanted; it's when they don't that we can fearlessly optimize things locally.


Image support

Request
As a software engineer, I work with various diagrams, drawings, and screenshots.  I'd like to have the ability to select (point to) an image, write a prompt, and get a description of the image.
Prompt
Explain the selected image.
Example

closing in favor of https://github.com/microsoft/vscode-copilot-release/issues/554. if interested, we know have this "Vision for Copilot Preview" extension as well which is a "bring your own key" model


Rename LastOffset -> CurrentOffset

The former name was a misnomer. This offset is the 'current offset' that
we are using to refer to the offset we are next going to be consuming.

cc @pingihu


Use the version of cosign from go.mod

Keeps everything nice and tidy.

We won't be able to merge this until we have updated to a point-release of cosign.

Based on #805, so that needs to be merged first

Needs a rebase, but the last commit lgtm!