Why the name parameter in mxnet.symbol.SoftmaxOutput can only be set to 'softmax'

if I set symbol=mx.symbol.SoftmaxOutput(data=fc2, name='output') , get the error:
mxnet.base.MXNetError: [16:20:43] src/symbol/symbol.cc:121: Symbol.InferShapeKeyword argument name softmax_label not found.
Candidate arguments:
        [0]data
        [1]convolution0_weight
        [2]convolution0_bias
        [3]convolution1_weight
        [4]convolution1_bias
        [5]fullyconnected0_weight
        [6]fullyconnected0_bias
        [7]fullyconnected1_weight
        [8]fullyconnected1_bias
        [9]output_label

this error can reproduced by setting name="output"  in https://github.com/dmlc/mxnet/blob/master/example/image-classification/symbol_inception-bn-28-small.py#L51

Mainly because the default output label of DataIter  is softmax_label, we can either change the data label name, or change the label name provided by data

@tqchen got it, thank you. Can you tell me the exact line that mxnet set the default output label? I have spend some time on it but did find out the exact line.

The only requirement is that the data/label name provided by your data iter matches the ones required by your network. You can change argument name in your network by making a Sym.Variable and pass it to softmax symbol

@piiswrong thank you for your answer. According to your answer, I would like to ask:

I can get source code of mxnet.io.DataIter in mxnet/io.py, but can't find mxnet.io.ImageRecordIter, can you tell me where is mxnet.io.ImageRecordIter
Is the data iter in your answer means mxnet.io.ImageRecordIter in cifar10 example?
What is the relationship between mxnet.io.DataIter and mxnet.io.ImageRecordIter?

ImageRecorderIter is implemented in C++.  you can reference src/io/iter_image_recordio.cc

softmax = mx.symbol.SoftmaxOutput(data = fc2, name = 'softmax')


code for the miniimagenet

Hello,
   Could you also provide the code of Mini-imagenet? Thank you!

Hi,
For classification task, we didn't clean the code and decision to open is
in progress.
Thank you for your interesting.
BRs, Jaesik.
2019년 9월 21일 (토) 오전 6:45, zheshiyige<EMAIL_ADDRESS>작성:

Hello,
Could you also provide the code of Mini-imagenet? Thank you!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/jaesik817/bmaml/issues/1?email_source=notifications&email_token=AFLDXI45ALP5XHWL66XH2MLQKU77XA5CNFSM4IY3RZXKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HMY4MRQ,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFLDXIYK4UBD26EDVYKA5A3QKU77XANCNFSM4IY3RZXA
.


Feature Request: simple/sum user licence usage per feature

As you can see below, flexlm_feature_used_users is differentiating users based on the server, display, and tool they are using for one specific feature:

I was wondering if there is the possibility to maybe create a flexlm_feature_used_users_simple view that can trim the extra stuff and sum each user's usage for a total amount. For example, user1 in the above example would be 4+2+2 and list as 8 tokens, Or can I already do that in Prometheus?
I am sorry if it's a beginner question.

Hi @D4R4,
I am actually wondering why the user string has so much information.
I would expect a simple username there. Can you share some information on that?
Besides of that, you have to ways of "grouping" or sum up the usage over a label, in this case user.

On the Prometheus server side, see recording_rules. You will have the information on the TSDB, and could also discard the original metrics.
On the Grafana side, putting a similar Prometheus query on your dashboard, not touching the prometheus TSDB.

Both have pros and cons as always, depending on what you prefer.

I added a function like this:
		lmstatFeatureUsedUsersSimple: prometheus.NewDesc( 			prometheus.BuildFQName(namespace, "feature", "used_users_simple"), 			"License feature used by user labeled by app, feature name and "+ 				"username of the license.", []string{"app", "name", "user"}, nil, 		),
`if licenses.MonitorUsers && (licUsersByFeature[name] != nil) {
var licUsers = licUsersByFeature[name]
		var licUsersTrimmed = map[string]float64{}

		for username, licused := range licUsers {
			var re = regexp.MustCompile(`^([^\s]*)\s.*$`)

			usernameSimple := re.ReplaceAllString(username, `$1`)
			if licUsersTrimmed[usernameSimple] != 0 {
				licUsersTrimmed[usernameSimple] += licused
			} else {
				licUsersTrimmed[usernameSimple] = licused
			}
		}

		for usernameSimple, licused := range licUsersTrimmed {
			ch <- prometheus.MustNewConstMetric(
				c.lmstatFeatureUsedUsersSimple, prometheus.GaugeValue,
				licused, licenses.Name, name, usernameSimple)
		}
	}`

To get the job done

Hi @D4R4, I am also interested in summing and reporting tokens per user. Where did you add this function and "if" statement?


Tab selection don't work.

Short cut(ctrl+`) of Editor Tab Navigate(Tab Selection) don't work

We need to invoke part.focus() when select() is called.


New create channel form UI

Implement the new channel form UI.
Screen designs can be found here:
https://app.zeplin.io/project/5bacdbad33af886d419f1b34/screen/5c519c6d1dfb92353b503ef9
https://app.zeplin.io/project/5bacdbad33af886d419f1b34/screen/5c519c6e0ddfba308d08c95e

Closed via #1568. Follow up stories created for additional bells and whistles for the forms.


Adding Polaris tool

Adding Polaris tool to civo marketplace.
Tool category is security.

[x] Have you followed the guidelines in our Contributing document in setting up the application?
[x] Have you checked that the application your submission is proposing to add does not yet exist on the Marketplace, or as a pull request to be processed?
[x] Have you tested your application on the Civo managed Kubernetes service? Please include a screenshot.
[x] Can you confirm that the software you are submitting licensed for use in a publicly-available Kubernetes marketplace?

Screenshot

/assign @andyjeffries

@milindchawre polaris/logo.png isn't a square aspect ratio image, can ou fix that?

@andyjeffries  @saiyam1814  Unfortunately I can only find official logo here whose aspect ratio, dimension and size is not appropriate. I tried to resize the dimension keeping the aspect ratio. But changing to square shape will mess up the aspect ratio and the image will look either stretched out or narrowed. What you suggest?

What we normally do is pad it with transparent pixels to be square. I found a nice SVG of their logo on their site and made one for you. Please update the PR with this and I'll get it merged.

@andyjeffries  Done! Can you also point out how you got the SVG version, might come handy next time.

I literally went to https://www.fairwinds.com/open-source-software, scrolled down to Polaris and dragged the image to my desktop - found it was a nice scalable SVG :-)

ohh I see thanks.


Status Page Loading Speed Optimization

Description
Just noticed that the dist js files size is very large now. It need to download 1.3MB files before a new user can see your status page.
Two ideas:

Try to chunk the js files manually, exclude some unnecessary modules for status page.
If above idea 1 is not working, maybe try to move this part out of vite.js and implement it in the traditional way without SPA.

Checklist

[ ] My code follows the style guidelines of this project
[ ] I ran ESLint and other linters for modified files
[ ] I have performed a self-review of my own code and tested it
[ ] I have commented my code, particularly in hard-to-understand areas
(including JSDoc for methods)
[ ] My changes generate no new warnings
[ ] My code needed automated testing. I have added them (this is optional task)

Still digging into it, read a lot of vite.js and rollup documentations.
Now I know why every modern websites or web apps are just putting a loading icon before ready, because it is almost impossible to optimize what should be loaded in a specific page. Not saying it completely impossible, but it is really really hard to control.
While in traditional web page, it is so easy to control by <script src=""></script> and the page loading time is usually very fast.
Luckily, adding gzip to express does helping the transfer size.

Hi @louislam, it's great that you added gzip/brotli!
However, I'm not sure how to benefit from it when using a reverse proxy (I'm using Nginx). I tried to add the following in my configuration:
  location ~ ^/(assets)/ {
    gzip_static on;
    expires max;
    add_header Cache-Control public;
  }

But it doesn't seem like the compressed files are generated in the same folder? At least the browser couldn't find them. I'll try to have another look next week but it would be great if other people with more experience could have a look at it and update the reverse proxy guides. ☺
Thanks a lot for your awesome work! 🥰

I think you don't need to set anything in your reserve proxy, because Uptime Kuma will do the job and more efficient. As I pre-compressed all js files.
This is my site: https://status.kuma.pet
You can verify it by the content-encoding in the response.

If you see ~300-400KB, it is working.

I'm sorry, I must have made a mistake when checking yesterday. I used web.dev before and after updating Uptime Kuma and in both cases, it recommended to compress JS and CSS resources. Maybe it cached the test.
In any case, it works great now, and web.dev indicates a 30 point boost in performance! Awesome work!


Feature: temporary well locations for colony picking

Overview
Feature request: (API)
Given a list of the (x,y) coordinates of locations to visit on a SBS shaped agar plate, I would like to add wells to a plate to be able to point the pipette to those locations, but I do not want the locations saved permanently so that the same base container can be re-used/used in multiple slots with different labels. I have found this possible by adding wells to a plate after loading but I have found that the Container ordering and robot.poses are not updated with the added well.
Feature base requirements

Use a single plate definition for bacterial colonies
Add wells to a given instance of a plate using a list of (x,y) positions (relative to the SBS shape lower left hand corner)
Utilize the same liquid handling function as a normally defined well
Added well locations not saved when defined

Proposed approach
First I created a custom labware with 1 well ('A1") which is localized at (0,0)
labware.create('colonyBase',(1,1),(0,0),5,10,volume=10)
Then in the protocol you would load this container and add wells to it. But I have found that in addition to using Container.add to add a new well the well needs to be added to the Container.ordering and to the pose_tracker. See protocol -testColPick.txt
I think that basically this all could be wrapped into a method that takes the container and a list of (x,y) locations and add the wells this way. Possibly something like this-possibleColonyMethod.txt
(I have tested the protocol and seen that it works but not the proposed method)
Possible issues/conflicts

I didn't know if this should be a method under the Container class or just a method under util
Unsure if other well settings are not set during Container.add that some other methods use
Unsure if adding wells after the fact messes up other processes
Currently the app doesn't calibrate containers that aren't used with some liquid handling method, whereas colony picking would really just use move_to. I added an aspirate at well 'A1' just to make it calibrate.
Maybe the addition of the ordering and to the position tracker should be rolled into Containers.add so that those things are done by default but I don't know how that would work with how they are set up now.
Keeping these functions could be affected in the future if the labware definitions get saved more than just when one is added.

I realized i was on an old edge and I just updated my firmware and it appears that adding the tracking is not necessary, but the addition to the pose_tracker is still required


optimize TakeLast for read-only collections #128

@Milyli ❤s fixing #128

@atifaziz here is one example of usage for GetCheapCount, instead of create a local function.

@leandromoh Sure, but how many more are there?


Faster deconvolution

This adds an alternative deconvolution class, DeconvolutionPreprocessGuo, which is about 5x faster than DeconvolutionPreprocess. It implements the faster Lucy-Richardson deconvolution approach described in Guo et al..
This deconvolution method gives a  slightly different answer from the current deconvolution approach so the MERlin results on the same dataset are also different. It seems to identify slightly more barcodes on average.
Also, to take full advantage you need to explicitly set decon_iterations to 2 as the default value of 20 is too large.

Hello @HazenBabcock! Thanks for opening this PR.

In the file merlin/analysis/preprocess.py:

Line 154:1: W293 blank line contains whitespace

In the file merlin/util/deconvolve.py:

Line 12:1: E302 expected 2 blank lines, found 1
Line 15:73: W291 trailing whitespace
Line 16:44: W291 trailing whitespace
Line 27:37: E251 unexpected spaces around keyword / parameter equals
Line 27:39: E251 unexpected spaces around keyword / parameter equals
Line 28:37: E251 unexpected spaces around keyword / parameter equals
Line 28:39: E251 unexpected spaces around keyword / parameter equals
Line 30:1: W293 blank line contains whitespace
Line 46:13: E231 missing whitespace after ','
Line 62:1: W293 blank line contains whitespace
Line 65:1: W293 blank line contains whitespace
Line 68:1: W293 blank line contains whitespace
Line 71:1: W293 blank line contains whitespace
Line 145:73: W291 trailing whitespace
Line 161:1: W293 blank line contains whitespace
Line 170:1: W293 blank line contains whitespace

@HazenBabcock I'm testing it a bit today, I'll see what parameters recapitulate the filtering behavior I had previously

@HazenBabcock the way you currently transform the requested highPassSigma into a kernel and sigma for cv2 replicates the ndimage.gaussian_filter sigma output quite closely. I think this is fine to use for both of them.
One think I noticed was that I'd previously done the filtering on the image as an int16 array, but you use a float array. If there's a reason the deconvolution should happen on floats, could we convert it outside of the filtering and keep the filtering output as an int16 array?

I think that should be fine to convert the image outside of high_pass_filter.
Thoughts about renaming the filter module to say filters to avoid name conflicts?

I recently added a file to utils called barcodefilters, maybe this one could be imagefilters?

@seichhorn Are you sure? This gives a kernel that is about 2 sigma in size, and a maximum relative difference of about 4%.
numpy.max(numpy.abs(hp_old - hp_new))/numpy.max(hp_old)

I'd suggest 3 sigma, which is still faster using cv2.GaussianBlur and reduces the difference to 1%.
highpass_filter_size = int(2 * numpy.ceil(3 * highpass_sigma) + 1)

@HazenBabcock You're right, 3 looks closer still.

@seichhorn It may be best to have the high_pass_filter function work on floats. I expect the casting we had to int16 could already have problems for the uint16 raw images. It seems the cv2.GaussianBlur function works on any image type, but the logic to check when lowpass > img would break down on uint16 images. We could either change this to work when lowpass > img and let the user pass any data type or convert it all to float and let the user reconvert back to int if needed.


fix #50

1. Does this PR affect any open issues?(Y/N) and add issue references?

[ ] N
[x] Y

fix #50
2. What is the scope of this PR?
Affects the current version and version 0.4.6 of the Chinese and English documents.

docs/user_docs/getting-started/install.md
i18n/zh-CN/docusaurus-plugin-content-docs/current/user_docs/getting-started/install.md
i18n/zh-CN/docusaurus-plugin-content-docs/version-0.4.6/user_docs/getting-started/install.md
versioned_docs/version-0.4.6/user_docs/getting-started/install.md

3. Provide a description of the PR:
add install doc for Gitee mirror.

[ ] Affects user behaviors
[ ] Contains syntax changes
[ ] Contains variable changes
[ ] Contains experimental features
[ ] Performance regression: Consumes more CPU
[ ] Performance regression: Consumes more Memory
[ ] Other

4. Are there any breaking changes?(Y/N) and describe the breaking changes?:

[ ] N
[ ] Y

5. Are there test cases for these changes?(Y/N) select and add more details, references or doc links:

[ ] Unit test
[ ] Integration test
[ ] Benchmark (add benchmark stats below)
[ ] Manual test (add detailed scripts or steps below)
[ ] Other

6. Release note

Please refer to Release Notes Language Style Guide to write a quality release note.
None

Thank you for your contribution. Good Job!


Conda build error

Hello,
I would like to request your assistance in building the Spateo package using conda. Unfortunately, I encountered the following error message:
raise DependencyNeedsBuildingError(exc, subdir=subdir)
conda_build.exceptions.DependencyNeedsBuildingError: Unsatisfiable dependencies for platform osx-64: {'fbgbp'}

Would you be so kind as to help me add the package to the conda channel? Thank you very much for your kind assistance.

same issue


root project import: /Users/zhoubin/gorepo/pkg/dep/sources/https---github.com-Azure-azure--storage--blob--go is not within any GOPATH/src

Sponsors SeaweedFS via Patreon https://www.patreon.com/seaweedfs
Describe the bug
A clear and concise description of what the bug is.
System Setup
List the command line to start "weed master", "weed volume", "weed filer", "weed s3", "weed mount".
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.

This is a basic go build question.
go get -u github.com/chrislusf/seaweedfs/weed


Fix bench

Don't use rand
Don't do integer division
Don't round to seconds when computing duration in seconds

Thanks!


Title is broken in Japanese

Title of document should be "Azure SQL DB" but in Japanese it is "の接続文字列" (= "connection string of").
Please correct this.

ドキュメントの詳細
⚠ このセクションを編集しないでください。 docs.microsoft.com で必須です ➟ GitHub の問題のリンク。

ID: 09dd1d03-ae28-c5a2-7c64-2f51675f6b09
Version Independent ID: dac74d68-2105-a029-1f49-d444c0a252f4
Content: Data Factory を使用して SQL Database をコピー先またはコピー元としてデータをコピーする | Microsoft Docs
Content Source: articles/data-factory/connector-azure-sql-database.md
Service: data-factory
GitHub Login: @linda33wj
Microsoft Alias: jingwang

@dcbrown16 Thanks for the feedback! We are currently investigating and will update you shortly.

@Sara-Nicolini - This looks like a language quality item in the target language

@tysonn, can you please reassign this issue to @DavidPrio

Hello, @dcbrown16
Your feedback is much appreciated.
Since your comments are specific to the localization of the documentation, we have moved this issue to the corresponding localization repository and we will close this one.
Please review the status of this issue here https://github.com/MicrosoftDocs/azure-docs.ja-jp/issues/507
Kind regards,
Microsoft DOCS International Team

Hi,
I want to pass parameters in linked services to pick the values dynamically. Could  you please let me know how to make it happen?
Thanks,
Vijay Sharma

Hello, @vijsharm08
Your contribution is much appreciated. Our team can only answer feedback related to the documentation.
Please kindly log your product feedback by using the button "Give Product Feedback" at the bottom of the DOCS page.
If you have any feedback related to the documentation, please feel free to log it through this channel.
We truly appreciate your contribution to our articles.
Kind regards,
Microsoft DOCS International Team
#please-close
@BryanTrach-MSFT @SunnyDeng


adding dns support for dnspod provider

DNS support for DNSPod provider
Description
I coded the dns driver for DNSPod on libcloud/dns/drivers/dnspod.py module. In order for this driver to work the libcloud/common/dnspod.py module is needed. The unitttests for this driver are coded in the libcloud/test/dns/test_dnspod.py module.
Status

done, ready for review

Checklist (tick everything that applies)

[ ] Code linting (required, can be done after the PR checks)
[ ] Documentation
[ ] Tests
[ ] ICLA (required for bigger changes)

Great, thanks.
Is the PR already for a review, or are you still working on it?

@Kami the pr is ready for review :)

Thanks :+1:
I've added some in-line comments.

@jetbird Did you push your latest changes?
Since I don't see any new commits (license header is still missing, etc.).

@Kami  done :)

@jetbird Thanks.
I've made some changes and fixes (6594a46c53ef6d9953b742826c4fc5d86bc0ed58, defff8acd1028f78b58df32e8dcd179f728aaf0c) and merged patch into trunk.
As you can see in the second commit (defff8acd1028f78b58df32e8dcd179f728aaf0c), _make_request method didn't actually do anything with the method argument (a bug which existing tests don't catch). That was masked by (ab)using **kwargs - that's a good example of why **kwargs should be avoided in scenarios like that and only used when there is a valid need for it.

@jetbird Can you please test latest changes against the live provider API?

Thanks for explaining the fixes :) Of course, I will test it now.

Tested. It works fine for me :)

@jetbird Great :+1:
It would also be good if you can add some basic docs for the driver and contact the provider (tall them about Libcloud, driver, etc. and ask them if it's possible to mention it somewhere on the page / docs, etc.).


Additive Example: Unexpected Teleport After Spawn

Describe the bug
When clients spawn in the Additive example they're teleported to the 4th NetStartPos
Repro project
AdditiveTest.zip
To Reproduce
Steps to reproduce the behavior:

Build and run the attached project
Start LAN Host in Editor
Run Built app as client
Bug: Observe in Editor the client spawns at the correct 2nd NetStartPos and is immediately teleported to the 4th NetStartPos (additional clients will be too)

Expected behavior
Joining clients should not be teleported.
Desktop (please complete the following information):

OS: Windows 10
Build target: Desktop
Unity version: 2018.3.13
Mirror branch: master

Additional context
This issue first appears after this commit.

Fixed in 3.6.6


sim: physics - investigate max_dt

max_dt with the np backend doesn't seem to work as expected, see #160.

I tried the problem mentioned in #166 and everything works as intended. In particular, when setting max_dt to 0.1 and using the np backend, the simulation is so slow that it takes about 2min before anything with respect to the takeoff is visible. After about 3min wall-clock time, the ROS time is at 1s (and the takeoff is half finished).


Update test-related makefile targets

Add a global 'test' target that runs unit and integration tests in a container.
Change the default unit test target to run the unit tests in a container, so they can be run as root
Always rebuild binaries when doing containerized integration tests, to prevent issues with mismatched libraries.

Chance I might have broken the papr tests. Going to try to convince them to run.

bot, retest this please

LGTM
@rh-atomic-bot r+

@rh-atomic-bot retry


Front end error is missing when messing with two tables after applying query

STR

Create a map with table1 dataset.
Style table1 layer based upon field1.
Change query from select * from table1 to select * from table2. Where table2 does not have field1.
Apply. The visualization breaks (styles, legends...). The console points out the error:

{
error: [
"column "field1" does not exist"
],
hint: "Perhaps you meant to reference the column "table2.field2"."
}

But the UI does not tell you what is happening.
Expected results
UI should show error and hint.

It looks like the query is stuck in another layer analysis node.

Ok, we will improve the error reporting but, take into account that, if you choose a column like cartodb_id for styling, and then you select another dataset which it contains the same column, nothing will fail, the only thing is that the style will be not the correct one, but that's another story.
If the column doesn't appear in the schema of the table selected, we will show the error in the layers list.

One of the problems found -> https://github.com/CartoDB/cartodb.js/pull/1478

Moved your last comment to a new ticket @ramiroaznar, ok? 💋


Sync on file change

For some kinds of development like front-end, it is good to have possibility to sync files on each change. As far as I know rsync provides such functionality.
I think it will be great to have  specific configurations for file watcher.

Yup, many build systems support such continuation modes, we can try to play with it. I have two concerns at the moment though:

Slow network may result in backpressure
rsync may not allow us create such a constant two-way sync channel (that would require some investigation and tests)

Any update on this? This would significantly add usefulness to mainframer as many tools especially on the frondend provide continuous build.

Thank you for that! If that does continuous forth and back of provided directories than that solves our use case. The toolchains that support continuous build have to deal with wrong partials all the time hence i think file sync should be just fine and we can live with the extra step of starting the build service.

Wait wait, we don't have continuous execution mode in Mainframer yet.
Let's call it --continuous-execution for now. It'll basically be running mainframer remote-command periodically/on-file change which is very different from remote-command being continuous itself
We're thinking about --continuous-execution and if we decide to go with it it'll conflict with continuous commands.
There is also an unfortunate conflict in naming with continuous file sync during execution that we're adding in 3.x (basically syncs files in parallel to the command to save time).

Well, if the synchronization of files would happen continuously then when it's build time most of the files would have been synced already, thus making the whole process even faster.

@febs but uploading is not a problem in most cases because developers usually make small changes in the source code and it syncs almost immediately. I think the main benefit here is that we can "pre-build" these changes remotely.

Correct.
We are also thinking about using inotify/fswatch to optimize sync for large projects, that will reduce time it takes rsync to understand what's changed.


After upgrade to 1.0, InvokeAsync returns FunctionResult with no way to get SKContext?

Shouldn't this be public? How do you get the SKContext or a ToString with this new way as of 1.0 beta now?

This is needed because of my token encoder:
How it was: SKContext result = await chatFunction.InvokeAsync(context);
tikToken.EncodeCount(result.ToString())
New way: FunctionResult fresult = await chatFunction.InvokeAsync(context);
tikToken.EncodeCount(fresult.?????)

Context should be public because then it would be possible to do:
New way: SKContext result = (await chatFunction.InvokeAsync(context)).Context;
tikToken.EncodeCount(result.ToString())
and things would still work....

Alternatively, create a (await chatFunction.InvokeAsync(context)).GetTokenCount or something like that?
chatFunction is a ISKFunction

also, what's up with this?
var semanticFunc = kernel.CreateSemanticFunction(message + memorySearch);
//var result = await semanticFunc.InvokeAsync();
var fresult = await semanticFunc.InvokeAsync(kernel);
Why can't you just keep it await semanticFunc.InvokeAsync(); ??? it should just use its own kernel that it is called from?

Hi @wrharper-AASP !
In case your chatFunction returns string, then you can access your result as:
FunctionResult fresult = await chatFunction.InvokeAsync(context);
tikToken.EncodeCount(fresult.GetValue<string>());

SKContext as a result type was replaced with FunctionResult in case you invoke function directly or KernelResult in case you invoke function through Kernel instance.
A couple of reasons for that:

We started to see some patterns of SKContext usage which is different from initial SKContext purpose. That's why we try to make it as internal mechanism rather than public input/output object.
SKContext supports only string as return data type. With FunctionResult, you can access not only strings, but any kind of data, including complex types as well as streaming (IAsyncEnumerable<T>).

By following link, you can find ADR with more details about this change:
https://github.com/microsoft/semantic-kernel/blob/main/docs/decisions/0009-function-and-kernel-result-types.md

Alternatively,
create a int (await chatFunction.InvokeAsync(context)).TokenCount?

@wrharper-AASP Regarding token information:
We have a couple of ways how to observe token usage.
Telemetry Host
It's possible to configure telemetry host for Kernel as well as separate module, like AzureChatCompletion.
Here is an example how to configure Application Insights telemetry:
https://github.com/microsoft/semantic-kernel/blob/main/dotnet/samples/ApplicationInsightsExample/Program.cs
This document contains list of available metrics (including metrics for tokens - SK.Connectors.OpenAI.PromptTokens, SK.Connectors.OpenAI.CompletionTokens, SK.Connectors.OpenAI.TotalTokens):
https://github.com/microsoft/semantic-kernel/blob/main/dotnet/docs/TELEMETRY.md
Model Results
This example shows how to get token usage when using Kernel and ChatCompletion directly:
https://github.com/microsoft/semantic-kernel/blob/main/dotnet/samples/KernelSyntaxExamples/Example43_GetModelResult.cs
Pre/Post Hooks
Pre/Post hooks are available only when running function through Kernel instance:
https://github.com/microsoft/semantic-kernel/blob/main/dotnet/samples/KernelSyntaxExamples/Example57_FunctionEventHandlers.cs

var fresult = await semanticFunc.InvokeAsync(kernel);
Why can't you just keep it await semanticFunc.InvokeAsync(); ??? it should just use its own kernel that it is called from?

@wrharper-AASP At the moment, SKContext is required input parameter for ISKFunction.
Available options:

Pass context as input parameter: function.InvokeAsync(context).
Pass kernel as input parameter: function.InvokeAsync(kernel). This is just extension method, which internally will do first option in following way: function.InvokeAsync(kernel.CreateNewContext(...)).

But in general, we recommend running your functions through Kernel instance. Kernel will act as function orchestrator and will pass information from one function to another, if you have multiple functions in pipeline. It will also provide an ability to use function Pre/Post Hooks, which will give you more control over function execution.
Example with Pre/Post Hooks: https://github.com/microsoft/semantic-kernel/blob/main/dotnet/samples/KernelSyntaxExamples/Example57_FunctionEventHandlers.cs

then what did function.invokeasync() originally do? I need to be able to do that still... what is the equivalent to the same result?

Alternatively,
create a int (await chatFunction.InvokeAsync(context)).TokenCount?

@wrharper-AASP Regarding token information:
We have a couple of ways how to observe token usage.
Telemetry Host
It's possible to configure telemetry host for Kernel as well as separate module, like AzureChatCompletion.
Here is an example how to configure Application Insights telemetry: https://github.com/microsoft/semantic-kernel/blob/main/dotnet/samples/ApplicationInsightsExample/Program.cs
This document contains list of available metrics (including metrics for tokens - SK.Connectors.OpenAI.PromptTokens, SK.Connectors.OpenAI.CompletionTokens, SK.Connectors.OpenAI.TotalTokens): https://github.com/microsoft/semantic-kernel/blob/main/dotnet/docs/TELEMETRY.md
Model Results
This example shows how to get token usage when using Kernel and ChatCompletion directly: https://github.com/microsoft/semantic-kernel/blob/main/dotnet/samples/KernelSyntaxExamples/Example43_GetModelResult.cs
Pre/Post Hooks
Pre/Post hooks are available only when running function through Kernel instance: https://github.com/microsoft/semantic-kernel/blob/main/dotnet/samples/KernelSyntaxExamples/Example57_FunctionEventHandlers.cs

This is way worse than my use case. I created a custom .net 6 tiktoken that is like pythons. I definitely will be using that instead of these options.

I will give an example of my use case for tokens and why these examples can't go to this level of detail:
                var semanticFunc = kernel.CreateSemanticFunction(message + memorySearch);
                var result = await semanticFunc.InvokeAsync();
                string sResult = result.ToString() + Environment.NewLine + Environment.NewLine;
                sResult += "Tokens message request: " + tikToken.EncodeCount(message) + Environment.NewLine;
                sResult += "Extra message tokens needed to query the memory search results: " + tikToken.EncodeCount(memorySearch) + Environment.NewLine;
                sResult += "Total message tokens: " + tikToken.EncodeCount(message + memorySearch) + Environment.NewLine;
                sResult += "Completition tokens: " + tikToken.EncodeCount(sResult) + Environment.NewLine;
                sResult += "Total tokens: " + tikToken.EncodeCount(sResult + message + memorySearch);
                return sResult;

this way token information is presented at the bottom but not really saved. It is just extra temporary info, and I can get the details for each piece of exactly what is going on.
I'm sorry but this upgrade seems like a massive downgrade for me to me so far.

then what did function.invokeasync() originally do? I need to be able to do that still...

Internally, function.InvokeAsync() without parameters created new SKContext object:

We removed the possibility to initialize SKContext object on user side, because, as I mentioned in previous comments, SKContext at some point will become internal mechanism only. We think that instead of working with SKContext object and string only, users need to be able to work with any kind of parameters and return types in their functions, including complex types and streaming. These changes are initial steps to improve data handling between different functions.

what is the equivalent to the same result?

As mentioned in previous comment, the available options are:

Pass context as input parameter: function.InvokeAsync(context).
Pass kernel as input parameter: function.InvokeAsync(kernel).

In order to create new context, you can use kernel.CreateNewContext(...);. But it's not a recommended approach. Ideally, the function should be executed through Kernel instance: kernel.RunAsync(function);

this way token information is presented at the bottom but not really saved. It is just extra temporary info, and I can get the details for each piece of exactly what is going on.

If you want more control over token counting, it's always possible to use your own tokenization logic. This scenario was not changed in 1.0.0-beta1.
We also have an example with 4 different available .NET tokenizers:
https://github.com/microsoft/semantic-kernel/blob/main/dotnet/samples/KernelSyntaxExamples/Example55_TextChunker.cs

I'm sorry but this upgrade seems like a massive downgrade to me so far.

I'm sorry to hear that your experience with new version did not exceed your expectations. We are here to support you in migration process.
All previous scenarios are still supported. Some of them can be achieved with slightly different syntax. With recent changes we are trying to make some space for future improvements to make SK even better. Sorry for any inconvenience.

kernel.RunAsync(function); is a new one I have not ran yet.
the problem i have with
fresult.GetValue()
vs
SKContext result = await chatFunction.InvokeAsync(context);
tikToken.EncodeCount(result.ToString())
is will it get everything in the current ISK or just the response from the AI? Will the results actually be the same?

will it get everything in the current ISK or just the response from the AI? Will the results actually be the same?

If your chatFunction is Semantic Function, then fresult.GetValue<string>() will return the same result as previous context.ToString(). On top of that, FunctionResult also contains Metadata property, which may contain some useful information about function execution (e.g. Response from AI, token count etc).
In next release we will deliver ToString override to FunctionResult, so in your case it will be possible to do:
FunctionResult result = await chatFunction.InvokeAsync(context);
tikToken.EncodeCount(result.ToString())

And if your chatFunction returns string internally, then ToString will return the same result. Please, let me know if this would simplify the usage for you. Thanks a lot!

That is very helpful, it will keep consistency and still allow the upgrade for those who wish to do the new features you guys are creating! I guess that is what I was trying to say. This makes things clearer.


Test DNS01 solver on private clusters

Follow-up for https://github.com/giantswarm/roadmap/issues/1981, to finish up https://github.com/giantswarm/talanx/issues/93.
We should test on thor whether the cert-manager DNS solver actually works, for example by creating a test certificate.

--dns01-recursive-nameservers-only alone works fine, since DNS requests then go through the internal endpoint of Route53 instead of public nameserver IPs (which aren't reachable in a private cluster).


Videos count is not Correct

🛠 Fixes Issue: #115
close #115
👨💻 Changes proposed:
It appears that there was a misunderstanding regarding the category name and the video count. Instead of using the category name, categoryID was there in the heading. I have changed that to category name.
📷 Screenshots

✔ Check List (Check all the applicable boxes)

[x] My code follows the code style of this project.
[x] The title of my pull request is a short description of the requested changes.
[x] I am a participant of GSSOC23

@KOMALDEWNANI I have removed console.log()


trufflehog: 3.56.1 -> 3.57.0

Diff: https://github.com/trufflesecurity/trufflehog/compare/refs/tags/v3.56.1...v3.57.0
Changelog: https://github.com/trufflesecurity/trufflehog/releases/tag/v3.57.0
Description of changes

Things done

Built on platform(s)

[ ] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
23.11 Release Notes (or backporting 23.05 Release notes)

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

[ ] Fits CONTRIBUTING.md.

Result of nixpkgs-review pr 256843 run on x86_64-linux 1

1 package built:

trufflehog


Switch to canvas-prebuilt ?

Hello,
This is more an idea than an issue.
I would like to suggest using canvas-prebuilt rather than canvas as a dependency.
This will make this library more 'portable' and speed up the installation.
What do you think ?

What is required for canvas-prebuilt support? I cloned repo and changed canvas to canvas-prebuilt in package.json, then altered require('canvas') in index.js to require('canvas-prebuilt') ... problem is however that then when I run a test script (which worked fine when using regular canvas), I get the following error:
Unhandled rejection TypeError: Cannot read property 'length' of null
    at Object.acquireContext (C:\Users\Administrator\chart-server\node_modules\chartjs-node\node_modules\chart.js\src\platforms\platform.dom.js:340:19)
    at Chart.construct (C:\Users\Administrator\chart-server\node_modules\chartjs-node\node_modules\chart.js\src\core\core.controller.js:79:27)
    at new Chart (C:\Users\Administrator\chart-server\node_modules\chartjs-node\node_modules\chart.js\src\core\core.js:42:8)
    at jsdom.envAsync.then.window (C:\Users\Administrator\chart-server\node_modules\chartjs-node\index.js:106:31)

Is it possible to add this support manually on my side at all?

for the record, the regular canvas package now also comes prebuilt, so there's no use in switching

@JTBrinkmann thanks for the update, i'm closing the issue then


io/registry: Add format support

Add format method in registry.py
Fixes: https://github.com/biocore/scikit-bio/issues/1048

@mr-karan I've followed up on the original issue, the approach here won't work, but I'll leave this PR open so that you can push additional changes

@mr-karan I'm closing this PR, feel free to re-open if you are still interested.


docs(Python): rewrite whl pack script

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


Exclude new CLU features from 2022-05-01 live testing

API change check
API changes are not detected in this pull request.


Remove url causing infinite loop

Issue #1

In this case we can ignore the /game/ URLs, however note that normally this should be resolved by checking pages actually have (new) content to prevent infinite pagination.


REQUEST: New Committer rights request for Jaanki

GitHub Username
@Jaanki
Code you are requesting Committer rights for
submariner-io/subctl
Requirements

[x] I have reviewed the contributor roles guidelines (https://submariner.io/community/contributor-roles/)
[x] I have enabled 2FA on my GitHub account (https://github.com/settings/security)
[x] I have subscribed to the submariner-dev e-mail list (https://groups.google.com/forum/#!forum/submariner-dev)
[x] I have been actively contributing to Submariner for at least 3 months
[x] I have two sponsors that meet the sponsor requirements listed in the community membership guidelines
[x] I have spoken to my sponsors ahead of this application, and they have agreed to sponsor my application

Sponsors

@skitt
@tpantelis

List of required reviews to Submariner project PRs

At least 20 PRs to the relevant codebase that you reviewed, and at least 5 for which you were the primary reviewer

https://github.com/submariner-io/subctl/pulls?q=is%3Apr+reviewed-by%3AJaanki+-author%3AJaanki+

+1 from me!

+1


2 more options required

It's lovely but it need 2 more options to be purrfect.

-p (port) add port
-exec (execute command / cmd)

Optional : less txt while running and/or VERBOSE text fix
Thank you !

Hi @metadone666,
I've added the ability to use a custom port using the parameter -p  in commit a238330


ECM API support

ECM API support
The ECM API is rather different from GEM. Instead of a single round-trip per call, each API call involves multiple round-trips. For example, in order to set the packet send interval:

PC sends FC (hex)
ECM-1240 responds with FC (hex)
PC sends three ASCII bytes “S” “E” “T” (must be upper case characters)
ECM-1240 responds with FC (hex)
PC sends three ASCII bytes “I” “V” “2” (must be upper case characters)
ECM-1240 responds with FC (hex)
PC sends a single byte chr$(interval value) sends the ascii character representing the interval.
ECM-1240 responds with FC (hex)

So that's 4 round-trips for one API call.
This PR updates ApiCall to allow separate formatters and parsers to be supplied for GEM and ECM, adds the necessary behaviors in BidirectionalProtocol, and supplies implementations for serial number and packet send frequency (the two GEM APIs we support that have ECM equivalents).

Stack created with Sapling. Best reviewed with ReviewStack.

#127
-> #126

Heard back from Ben, we're good to go with this.


[FEATURE] toolSpecificationFrom method support configuration of optional parameters

…al parameters

Issue

See #1293
Change

@P add optional attribute to support configuration of optional parameters
General checklist

[x] There are no breaking changes
[x] I have added unit and integration tests for my change
[x] I have manually run all the unit and integration tests in the module I have added/changed, and they are all green
[x] I have manually run all the unit and integration tests in the core and main modules, and they are all green

[x] I have added/updated the documentation
[ ] I have added an example in the examples repo (only for "big" features)
[ ] I have added/updated Spring Boot starter(s) (if applicable)

Checklist for adding new model integration

[ ] I have added my new module in the BOM

Checklist for adding new embedding store integration

[ ] I have added a {NameOfIntegration}EmbeddingStoreIT that extends from either EmbeddingStoreIT or EmbeddingStoreWithFilteringIT
[ ] I have added my new module in the BOM

Checklist for changing existing embedding store integration

[ ] I have manually verified that the {NameOfIntegration}EmbeddingStore works correctly with the data persisted using the latest released version of LangChain4j

@Kugaaa thank you!


[5.3] Model route with default value

I expect that 'hello world' should be returned, because a default value for name is set.
Refs. https://github.com/laravel/framework/issues/16727

I don't think it's a good idea to support default values like this.

As I understand it's already supported in Implicit Binding

As you see here https://github.com/laravel/framework/blob/e91f04b52603194dbc90dbbaee730e171bee1449/src/Illuminate/Routing/Router.php#L805

I can't even follow the trail of issues you mention.

So what is that supposed to mean? @taylorotwell


User should be able to logout

Add in menu a logout option. On Logout

clear localstorage
open Main page

Definitions of Done

[x] User is able to log out and log in under another account
[x] All the user's data is removed
[x] Log out item looks according to design

https://xd.adobe.com/spec/8f259bcd-550e-4f0c-40bb-bdce2ed36fe5-f914/screen/ef2121e1-d14a-4ff5-aa1b-0832354b4fe0/Dashboard-Scroll-2-Settings-1

Need an icon and location in the menu

@StanislavShevchenko
Hi, Here's an updated design of the settings menu:
https://xd.adobe.com/spec/8f259bcd-550e-4f0c-40bb-bdce2ed36fe5-f914/screen/ef2121e1-d14a-4ff5-aa1b-0832354b4fe0/Dashboard-Scroll-2-Settings-1

Checked on the Netlify preview branch
Work as expected.

Checked on Dev and QA environment
Look and work as expected.
User is navigated to Alpha splash screen after logout.


Any plans to use long term statistics for the sensor?

HA added long term statistics with 2021.8.0 and increased the support for integrations with 2021.9.0 - any plans in adding that here to this plugin to be able to check some historical data?
See: https://developers.home-assistant.io/docs/core/entity/sensor/#long-term-statistics

Looks like this should be quite easy to implement. Will take a look after I finish #9.

I implemented that for my custom_component. will check if it works and if so I will create a PR here...


USM: testutils: add IsProgramTraced to check if a process is being traced

What does this PR do?

This PR adds a IsProgramTraced function in USM's testutils to check if a process with a specific PID is being traced by one of our TLS decoding modules.
Motivation

Additional Notes

Possible Drawbacks / Trade-offs

Describe how to test/QA your changes

/merge


Sidebar now below toolbar

hi, i noticed in v2 that the sidebar when opened is now below the toolbar
is there still an option to have it beside the document+toolbar (when browser is maximized)
i like the original layout better.

Closing since this is answered.

Congrats on 5000 issues closed! ;)


Caption Set To "Posted a Video" When Posting In Headless Mode

There is no errors in the console and the "_set_interactivity" and "_set_description" function does get fired. When I run the script in normal mode, my caption gets typed and added to the video. But when I run it in headless mode, it fails to set my custom caption and sets it as "Posted a Video".
The console outputs exactly what is expected with no errors.
I have not rested if this gets resolved by using different browsers.
If any other information is needed, just ask.

@Jamadoo I have submitted a new PR to deal with the description, check out the fork on my profile under the hashtag branch and let me know if the issue persists....


Adds bindings parameter

Bindings parameter added to Stack in cattle is added to ./client files.

@cjellick Hi, can you please review this?

@mrajashree This should be on master already.


fix: Add import statements even if only pointer types exist

Fixed missing import statement when only pointer types such as*time.Time or *netip.Addr exist.

Hi @zaneli @kyleconroy
I made a similar change in my forked branch of sqlc. Changes are almose the same except for that in the
trim function, []* is also trimmed, to cover cases that when there exists a selected column of type of array of nullable types.
Is it possible?

// trimTypePrefix removes:
// *T => T
// []T => T
// []*T => T
func trimTypePrefix(t string) string {
	return strings.TrimPrefix(strings.TrimPrefix(t, "[]"), "*")
}


How to do GUI the right way.

Ive been reading a lot of suggestion on forums and such (like overlaying another canvas with a library like zebkit, or using native html) whatever the technique i have not been able to find good articles or resources for it. These are my requirements for now,

Buttons ( there are examples for this thank you).

TextFields  (blinking cursor, mobile keyboard support etc)
I havent been able to figure this one out, because overlaying a native form obviously will clash with the pixel nature of my game, so i need to figure something out for this in terms of being able to at least type in stuff and use a bitmap font.

Panels to combine those things(clearly if all of those didnt use dom components it would be much easier to do it in the engine).

Work on mobile(cocoon) and desktop(node-webkit), so im not really concerned about doing it inside of the browser, as i would probably want to use app stores to distribute the game.

Thanks in advance.

I'm going to close this issue off, as it's more a support related question, ideal more useful in the forum where it could be discussed openly, rather than an 'issue' per se with Phaser. I have added it to the Phaser 3 list of things to investigate though.


log-backup: Development Tasks for Log-based Increment Backup, directly on TiKV

Feature Request
Dup https://github.com/pingcap/tidb/issues/29501

/feature developing

/type feature

/type migrage


Base.prototype.update() always resolves with false

This may be on @clint-tseng's radar already, but right now, I think Base.prototype.update() always resolves the promise with false. db.update() seems to resolve the promise with the number of affected rows, not an object with a rowCount property. For example:
> const { connect } = require('./lib/model/database');
> const db = connect();
> db.
    update({ xmlFormId: 'newFormId' }).
    into('forms').
    where({ id: 1 }).
    then(result => console.log(result));
1 // Not { rowCount: 1 }

Since Base.prototype.update() looks for a rowCount property but will never find one, I think the promise will always resolve with false.

Yeah, not sure what happened here. This is fixed now.


Issues with reading in multiple passes

With reference to /n/hekstra_lab/projects/laue-dials-tests/hemoglobin_TR/playground/tutorial-hemoglobin.ipynb, the following,
laue.initial_solution imported.expt \
                        indexer.refinement.parameterisation.auto_reduction.action=fix \
                        spotfinder.threshold.dispersion.gain=2 \
                        spotfinder.filter.d_min=1.6 \
                        indexer.indexing.known_symmetry.space_group=5 \
                        indexer.indexing.known_symmetry.unit_cell=93.25,43.98,83.5,90.0,122.03,90.0

fails with error
Traceback (most recent call last):
  File "/n/hekstra_lab/people/dhekstra/conda_envs/laue-dials/bin/laue.initial_solution", line 8, in <module>
    sys.exit(run())
             ^^^^^
  File "/n/hekstra_lab/people/dhekstra/conda_envs/laue-dials/lib/python3.11/contextlib.py", line 81, in inner
    return func(*args, **kwds)
           ^^^^^^^^^^^^^^^^^^^
  File "/n/home12/dhekstra/ipython_notebooks/laue-dials/src/laue_dials/command_line/initial_solution.py", line 267, in run
    indexed_expts, indexed_refls = initial_index(
                                   ^^^^^^^^^^^^^^
  File "/n/home12/dhekstra/ipython_notebooks/laue-dials/src/laue_dials/algorithms/monochromatic.py", line 44, in initial_index
    expts_indexed, refls_indexed = index(expts, [refls], params)
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/n/hekstra_lab/people/dhekstra/conda_envs/laue-dials/lib/python3.11/site-packages/dials/command_line/index.py", line 162, in index
    indexed_experiments, indexed_reflections = _index_experiments(
                                               ^^^^^^^^^^^^^^^^^^^
  File "/n/hekstra_lab/people/dhekstra/conda_envs/laue-dials/lib/python3.11/site-packages/dials/command_line/index.py", line 114, in _index_experiments
    idxr.index()
  File "/n/hekstra_lab/people/dhekstra/conda_envs/laue-dials/lib/python3.11/site-packages/dials/algorithms/indexing/indexer.py", line 573, in index
    raise DialsIndexError("No suitable lattice could be found.")
dials.algorithms.indexing.DialsIndexError: Please report this error to<EMAIL_ADDRESS>No suitable lattice could be found.

The cause of this appears to be related to the angles of the four passes.
If we do not specify geometry.scan.oscillation during dials.import, dials.show imported.expt will advance the angle of each image by one degree in each pass (instead of the true step size of 6 degrees), and subsequent laue.initial_solution fails as described above.
When we do specify geometry.scan.oscillation as 0,6 during dials.import, dials.show imported.expt produces four scans with
Scan:
number of images:   31
image range:   {1,31}
oscillation:   {0,6}
exposure time: 0
and laue.initial_solution seems to succeed (very confusing given my comment below) but leads to trouble down the road.
Part of the difficulty is that the first ON/OFF pass uses angles (0:6:180) and the second pass uses (183:6:363).
Part of the problem may be that there are no angles/no angles are read from the MarCCD header, so we need to specify them externally. Naively it seems that there are three possible solutions:

somehow putting the angles in the headers of the MarCCD files (currently our MarCCD package doesn't support that but it could be extended)
some other way of getting the DIALS import done, e.g. by doing two separate imports and combining them.
use some DIALS function I do not know off to manipulate the MarCCD images.

I'd guess the second option would be the most attractive.

This issue may be separate from whether laue.sequence_to_stills can handle multiple timepoints with the same angular range. I will look into that next.

When we limit ourselves to an ON and an OFF pass at the same angles, and specify geometry.scan.oscillation=0,6 during dials.import, laue.initial_solution indexes about 16% of reflections for both datasets, with >3,000 reflections each, but then fails  with
Traceback (most recent call last):
  File "/n/hekstra_lab/people/dhekstra/conda_envs/laue-dials/bin/laue.initial_solution", line 8, in <module>
    sys.exit(run())
             ^^^^^
  File "/n/hekstra_lab/people/dhekstra/conda_envs/laue-dials/lib/python3.11/contextlib.py", line 81, in inner
    return func(*args, **kwds)
           ^^^^^^^^^^^^^^^^^^^
  File "/n/home12/dhekstra/ipython_notebooks/laue-dials/src/laue_dials/command_line/initial_solution.py", line 292, in run
    refined_expts, refined_refls = scan_varying_refine(
                                   ^^^^^^^^^^^^^^^^^^^^
  File "/n/home12/dhekstra/ipython_notebooks/laue-dials/src/laue_dials/algorithms/monochromatic.py", line 66, in scan_varying_refine
    expts_refined, refls_refined, _, _ = run_dials_refine(expts, refls, params)
                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/n/hekstra_lab/people/dhekstra/conda_envs/laue-dials/lib/python3.11/site-packages/dials/command_line/refine.py", line 433, in run_dials_refine
    params.input.reflections = None
    ^^^^^^^^^^^^
AttributeError: Please report this error to<EMAIL_ADDRESS>'scope_extract' object has no attribute 'input'

followed by a CalledProcessError

The following work-around by suggested by @kmdalton in the DIALS Slack channel seems to circumvent any problems with laue.initial_solution but still fails when it comes to laue.sequence_to_stills.
The workaround is:
dials.import \
    geometry.beam.wavelength=1.04 \
    geometry.scan.oscillation=0.,6. \
    geometry.goniometer.axis=-1,0,0 \
    geometry.beam.polarization_fraction=0.99 \
    geometry.detector.panel.pixel=0.079,0.079 \
    input.template="/n/hekstra_lab/projects/laue-dials-tests/hemoglobin_TR/data/new_imgs/HbI5a_off_###.mccd" \
    input.template="/n/hekstra_lab/projects/laue-dials-tests/hemoglobin_TR/data/new_imgs/HbI5a_100ps_###.mccd" \
    output.experiments=scan_a.expt

dials.import \
    geometry.beam.wavelength=1.04 \
    geometry.scan.oscillation=183.,6. \
    geometry.goniometer.axis=-1,0,0 \
    geometry.beam.polarization_fraction=0.99 \
    geometry.detector.panel.pixel=0.079,0.079 \
    input.template="/n/hekstra_lab/projects/laue-dials-tests/hemoglobin_TR/data/new_imgs/HbI5b_off_###.mccd" \
    input.template="/n/hekstra_lab/projects/laue-dials-tests/hemoglobin_TR/data/new_imgs/HbI5b_100ps_###.mccd" \
    output.experiments=scan_b.expt

dials.find_spots scan_a.expt output.reflections=strong_scan_a.refl
dials.find_spots scan_b.expt output.reflections=strong_scan_b.refl

dials.combine_experiments \
    scan_a.expt \
    scan_b.expt \
    strong_scan_a.refl \
    strong_scan_b.refl \
    reference_from_experiment.beam=0 \
    reference_from_experiment.detector=0 \
    reference_from_experiment.goniometer=0

but upon laue.sequence_to_stills monochromatic.*, the error is:
Traceback (most recent call last):
  File "/n/hekstra_lab/people/dhekstra/conda_envs/laue-dials/bin/laue.sequence_to_stills", line 8, in <module>
    sys.exit(run())
             ^^^^^
  File "/n/hekstra_lab/people/dhekstra/conda_envs/laue-dials/lib/python3.11/contextlib.py", line 81, in inner
    return func(*args, **kwds)
           ^^^^^^^^^^^^^^^^^^^
  File "/n/home12/dhekstra/ipython_notebooks/laue-dials/src/laue_dials/command_line/sequence_to_stills.py", line 229, in run
    total_reflections.extend(new_reflections[i])
                             ~~~~~~~~~~~~~~~^^^
IndexError: Please report this error to<EMAIL_ADDRESS>list index out of range

followed by a CalledProcessError.

on laue-dials version 0.3.dev48+gacda0c2:
I run the following script, living in /n/holyscratch01/hekstra_lab/hwang/laue/e35_PDZ/ld_gain_sweep/multipass.sh. I attempt to use dials.combine_experiments to combine multiple passes of e35 PDZ2. The script fails at laue.sequence_to_stills.
################README###########################
# An example script for processing one timepoint and all passes of e35 PDZ2. This can be called as:
# sh multipass.sh <timepoint, e.g. 'off'> <gain>
# the image files live at /n/holyscratch01/hekstra_lab/hwang/laue/e35_PDZ/images/e35${pass}_${TIME}_###.mccd"
# currently, the script breaks at `laue.sequence_to_stills`. Having this fixed would greatly help
# processing of multipass datasets.
#################################################

TIME=${1}
CELL='"65.2,39.45,38.9,90.000,117.45,90.000"'
GAIN=${2}
GAIN_STR=$(echo "$GAIN" | tr . ,)
N=4 # Max multiprocessing

# Make needed directories

mkdir gain_${GAIN_STR}
cd gain_${GAIN_STR}
mkdir dials_files_${TIME}
cd dials_files_${TIME}
eval "$(conda shell.bash hook)"
conda activate laue-dials
rm indexed.expt indexed.refl laue.initial_solution.log

#these start-angles and sweep angles are to be manually input by the user using information from their particular experimental design.
declare -A START_ANGLES=( ["c"]=0 ["d"]=92 ["e"]=181 ["f"]=361.5)
declare -A OSCS=( ["c"]=2 ["d"]=2 ["e"]=2 ["f"]=1)

for pass in c d e f
do

    FILE_INPUT_TEMPLATE="/n/holyscratch01/hekstra_lab/hwang/laue/e35_PDZ/images/e35${pass}_${TIME}_###.mccd"
    # Import data into DIALS files
    dials.import geometry.scan.oscillation=${START_ANGLES[$pass]},${OSCS[$pass]}\
        geometry.goniometer.invert_rotation_axis=True \
        geometry.goniometer.axes=0,1,0 \
        geometry.beam.wavelength=1.04 \
        geometry.detector.panel.pixel_size=0.08854,0.08854 \
        input.template=$FILE_INPUT_TEMPLATE \
        output.experiments=imported_${pass}.expt
    dials.find_spots imported_${pass}.expt output.reflections=strong_${pass}.refl
done

dials.combine_experiments imported_*.expt strong_*.refl \
reference_from_experiment.beam=0 reference_from_experiment.detector=0

# Get a monochromatic geometry model

laue.initial_solution combined.expt \
    indexer.refinement.parameterisation.auto_reduction.action=fix \
    spotfinder.spotfinder.threshold.dispersion.gain=$GAIN \
    indexer.indexing.known_symmetry.space_group=5 \
    indexer.indexing.known_symmetry.unit_cell=$CELL

# Split sequence into stills
laue.sequence_to_stills monochromatic.*

The error message:
The following parameters have been modified:

input {
  experiments = monochromatic.expt
  reflections = monochromatic.refl
}

Building experiment lists.
Traceback (most recent call last):
  File "/n/home01/hwang6/mambaforge/envs/laue-dials_old/bin/laue.sequence_to_stills", line 8, in <module>
    sys.exit(run())
             ^^^^^
  File "/n/home01/hwang6/mambaforge/envs/laue-dials_old/lib/python3.11/contextlib.py", line 81, in inner
    return func(*args, **kwds)
           ^^^^^^^^^^^^^^^^^^^
  File "/n/home01/hwang6/mambaforge/envs/laue-dials_old/lib/python3.11/site-packages/laue_dials/command_line/sequence_to_stills.py", line 219, in run
    (new_experiments, new_reflections) = sequence_to_stills(
                                         ^^^^^^^^^^^^^^^^^^^
  File "/n/home01/hwang6/mambaforge/envs/laue-dials_old/lib/python3.11/site-packages/laue_dials/command_line/sequence_to_stills.py", line 134, in sequence_to_stills
    crystal=crystals[i_scan_point],
            ~~~~~~~~^^^^^^^^^^^^^^
IndexError: Please report this error to<EMAIL_ADDRESS>list index out of range

The laue.sequence_to_stills errors should be fixed as of this commit. Can I get verification from @DHekstra and @hkwang that your datasets are analyzed properly using the most recent laue-dials version?

Could you provide a brief use example?

Attached my script for the hemoglobin example. This works in principle. The first ~12 frames of run a have poor geometry, but that is probably unrelated to what is described in this issue. Let's get feedback from @hkwang and then close this issue.
process.sh.txt

Yes, this works in principle: on either the hemoglobin or e35_PDZ example, the sequence_to_stills.py fix finishes splitting the sequence into stills, and completes downstream processing, instead of throwing the previous bug. However, I still haven't yet scaled and merged a combined dataset due to

errors with indexing when the crystal slips in the e35_PDZ case
errors with the image headers in the hemoglobin case
so I don't know that the sequence_to_stills.py fix generates time-resolved signal.

Tomorrow I should have confirmation that the sequence_to_stills.py fix works, nevertheless, on single-pass processing of the e35 PDZ dataset.

After using the sequence_to_stills.py fix on the e35_PDZ dataset, where each pass is processed individually, the time-resolved signal looks different than previously, but not noticeably worse.


Note reference with content from an external git repository README or any markdown file.

Please select if your request is either something new or an enhancement

[ ] Enhancement of an existing Feature.
[x] Request of a new feature.

Please select the area your request applies to. (Multiple selections are Possible. You can leave blank if you're not sure.)

[ ] Workspace - VSCode workspace, vaults, Intellisense/autocomplete, Dendron settings
[ ] Lookup - Dendron's Lookup Command
[ ] Views - Dendron Preview, Tree View, Side Panels in the UI
[ ] Schema - Dendron Schemas
[ ] Pod - Data import from / export to Dendron
[ ] Publish - External Site Publish
[x] Markdown - Markdown features, such as syntax support and features

Is your feature request related to a problem? Please describe
I work on a large project in which we maintain documentation for each components in their respective repository README.md
I want to have a single source of truth and keep component documentation in their repository README
so developers can directly see it when they work or use the component,
while still being able find the documentation from the vault.
Describe the solution you'd like
Note reference with content from an external git repository README or any markdown file.
Fetch the file from the git repository, ex.: https://github.com/myrepo//blob/main/README.md.
Open the link in a web browser when clicking on the reference.
Support all reference types.
Describe alternatives you've considered
Manually sync a project README into my vault.
Create script that automatically sync a node with a repository README.
Additional context
This would allow:

Easier adoption of the tool by not having to migrate/import all the documentation in the vault.
Reduce the maintenance effort for the documentation,
we usually include documentation in the README as we merge the feature, so everything is always in sync with the code.
Would prevent documentation duplication and allow a single source of truth.

Thanks @13013SwagR for the suggestion - it's an interesting one, and I could see it being a powerful expansion to references.
@kevinslin and @SeriousBug  as an FYI.

This sounds like something that would be covered by #1975 . If not, I would encourage leaving further details there to make sure we cover this use case.

@jonathanyeung it might work if the note references feature uses the note link feature under the hood.
But the idea is to have the external/remote file show in the current note as the note reference feature does.


Ground is fully missing in New Atlantis.

The ground is fully gone in new atlantis and in all buildings located in new atlantis, including the lodge. Any objects with physics and players and npcs are falling eternally.

Details
N/A. The issue persists without any creations enabled.
Game Version
<IP_ADDRESS>
Language
English (EN)
New Game
Yes
Reproduction Steps
Go to new Atlantis.

This would be caused by one of the other mods you are using, or by having too many mods. This is not an issue with the base game, or the SFCP.


Question: Does async/await remove the benefits of DataLoader?

In my implementation of GraphQL & DataLoader, I often use async/await to get the result of a database query. Then I pass the result into a model where I control the ACL (access control).
By doing this, does it remove the benefits of DataLoader? i.e. am I waiting for each DataLoader query to finish one-by-one by doing async/await on every query? I ask because if I don't do async/await and return a promise as an output (without my model ACL layer), the GraphQL APIs continue to work, I'd like to know if my usage of the ACL model is eliminating the benefits of DataLoader..

Just to follow up on this: async/await not only does not remove the benefits of DataLoader, it's actually a quite nice way to use DataLoader. async/await is a syntactic way to operate on Promises, and Promises are returned by the load() function.

@leebyron My colleague made a similar point to me. Presumably one major advantage of DataLoader is that it batches load calls when the occur on the same tick. If you say something like:
const foo = await dataLoader.load(...)
const bar = await dataLoader.load(...)
const baz = await dataLoader.load(...)

...then Node will execute each call in a separate tick and no batching will be possible (at least this is my understanding).
Am I misunderstanding something or do you just think that the convenience of await outweighs the benefits of batching?

@matthewgertner: Your understanding is correct. If you want the three loads to occur concurrently you will have to avoid the serial execution ordering that await imposes. In your example, you could use Promise.all:
const [foo, bar, baz] = await Promise.all([
  dataLoader.load(...),
  dataLoader.load(...),
  dataLoader.load(...),
]);

Note that this doesn't mean you can't use await at all, just that you have to be selective where and how you use it.

Right, thanks for the clarification.


Add Pkl language

Description
Adds support for the Pkl programming language.
Checklist:

[x] I am adding a new language.

[x] The extension of the new language is used in hundreds of repositories on GitHub.com.

Search results for each extension:

https://github.com/search?type=code&q=NOT+is%3Afork+path%3A*.pkl+%2F^\s*(module|import\s*"|amends|extends|local|const|fixed|abstract|open\s*[class|module]|class\s*[^%3D]|typealias|%40\w%2B)\b%2F+NOT+user%3Aapple

[x] I have included a real-world usage sample for all extensions added in this PR:

Sample source(s):

https://github.com/apple/pkl-pantry/blob/main/packages/org.json_schema/Parser.pkl
https://github.com/apple/pkl-pantry/blob/main/packages/io.prometheus/examples/rule.pkl
https://github.com/apple/pkl-pantry/blob/main/packages/org.openapis.v3/tests/SchemaGenerator.pkl

Sample license(s):

Apache-2.0

[x] I have included a syntax highlighting grammar: https://github.com/apple/pkl.tmbundle

[x] I have added a color

Hex value: #6b9543
Rationale: This is one of the colors of the Pkl logo

[x] I have updated the heuristics to distinguish my language from others using the same extension.

I've tried to remove our org from the language search but I'm not sure the syntax supports it.

@lildude I removed .pcf and PklProject from the list of file names and extensions. We don't have the expected usage data yet. Will add this later as a separate PR once we do have the data.
For some reason my last commit didn't appear in the PR even though it's there if you click the branch...

Hi @lildude. Are we still pending on popularity? There's considerably more pkl files in the search since I created this PR.

Just commenting for context RE: Popularity, we're currently using this in one or two of Shopify's internal repositories. I'd like to pitch using this for some of our external open source stuff, but there is a bit of chicken-and-egg there since we want the Github experience to be fantastic for our open source projects as well. Just adding another viewpoint if it helps at all.
@lildude Popularity aside, are you generally okay with the implementation here?

any updates? would love to see it move forward.

amazing!!


Fix documentation for tlsext_ticket_key docs

The tlsext_ticket_key functions are documented as returning 0 on success.
In fact they return 1 on success.

Note this applies to both the function that was newly added for 3.0 as well as the original function. This error appears in the docs for all stable branches.

We should probably only say one of "documentation" and "docs" in the commit message summary, though.

24 hours has passed since 'approval: done' was set, but as this PR has been updated in that time the label 'approval: ready to merge' is not being automatically set.  Please review the updates and set the label manually.

Pushed. Thanks. If fixed the "documentation" vs "docs" issue in the commit message.


feat(backend): Use fixed-point WeightKg for weights. Closes #363

This patch ports the OpenPowerlifting weight representation to Go.

The new WeightKg type represents numbers like `123.45` by storing them
in a fixed-point integer representation, like `12345`. The advantage of
this representation is that integer comparisons and arithmetic are
significantly faster than the corresponding floating-point operations,
because integers do not require loads into XMM registers.

This is the first non-trivial Go code I've written, so please be skeptical if something looks unidiomatic. It would be nice to have a benchmark for this in the test suite -- if there's a preferred entrypoint for loading the DB and performing searches, please let me know.
I benchmarked this by manually disabling the server's cache and investigating /leaderboard. Performance seems largely unchanged, maybe slightly faster, but the majority of overhead appears to be elsewhere. Response times are extremely variable in both development and this branch, between 7ms and 60ms, although I haven't investigated enough to blame GC yet.

I'm going to leave this open while I crack on with the lower-hanging fruit this week as jet-lag will be seeping into my grey matter very shortly.
Check out the benchmarking suite in Go (testing.B), I've used it a bunch on other projects and it's super handy at measuring these sort of improvements.
I'll create an issue for myself to tidy some stuff up to allow for easier benchmarking without having to do it manually.


Add task for generating Babel config

Some tools requires ESLint/Babel configurations to be exists in the project. For example, IDE will not show you ESLint warnings if your config is not exists. It's why we should add availability to generate this config by task.
run generate-babel-config

Also remove config sync for Babel configuration.

Closed in #668


Reading or writing a binary file with Bytes

File.read opens the file in text mode, which means newlines might be transformed. This is undesirable when working with binary files, so I propose File.binread, analogous to the same function in Ruby's IO:
class File
  # Returns the content of *filename* as a `Bytes`.
  #
  # ```
  # File.binwrite("bar", UInt8.slice(1, 3, 6, 10))
  # File.binread("bar") # => Slice[1, 3, 6, 10]
  # ```
  def self.binread(filename : Path | String) : Bytes
    open(filename, "rb") do |file|
      size = file.size.to_i
      size = 256 if size == 0
      io = IO::Memory.new(size)
      IO.copy(file, io)
      io.to_slice
    end
  end
end

Similarly we could add File.binwrite:
class File
  # Writes the given *content* to *filename*.
  #
  # By default, an existing file will be overwritten.
  #
  # *filename* will be created if it does not already exist.
  def self.binwrite(filename : Path | String, content : Bytes, *, perm = DEFAULT_CREATE_PERMISSIONS)
    write(filename, content, perm: perm, mode: "wb")
  end
end

File.write can also write a Bytes, but from a programmer's perspective that mode argument seems easy to miss, and binwrite takes care of this, so I think this is acceptable despite being almost a method alias. Note that there are still valid cases where the argument to File.write is a Bytes but the mode remains "w" (e.g. the content comes from a lib fun and is never transformed into a String).

Just asking because I'm clueless about this:

which means newlines might be transformed

Do you have an example where this happens? And... is this only specific to Windows?

Turns out the opposite happens, files are always opened in binary mode on Windows:
https://github.com/crystal-lang/crystal/blob/28240b8ae9b2cbc20ec6e6ea4d7e50ca2ff7de82/src/crystal/system/win32/file.cr#L12
And the generic file mode parser doesn't handle text / binary modes either:
https://github.com/crystal-lang/crystal/blob/28240b8ae9b2cbc20ec6e6ea4d7e50ca2ff7de82/src/crystal/system/file.cr#L32-L33
This is unexpected. Normally what happens is as follows:
module Crystal::System::File
  def self.open(filename : String, mode : String, perm : Int32 | ::File::Permissions) : LibC::Int
    perm = ::File::Permissions.new(perm) if perm.is_a? Int32
    oflag = open_flag(mode) | LibC::O_NOINHERIT
    oflag |= LibC::O_TEXT unless mode.includes?("b")
    oflag |= LibC::O_BINARY if mode.includes?("b")
    # ...
  end
end

# raw bytes written in text mode, because I forgot the *mode* argument
File.write("foo", Bytes.new(5) { |i| 8_u8 + i })

File.open("foo", mode: "rb") do |file|
  file.gets_to_end.to_slice # => Bytes[8, 9, 13, 10, 11, 12]
end

# correct way of writing raw binary data, but incorrect way of reading it back
File.write("bar", Bytes.new(5) { |i| 19_u8 - i * 3 }, mode: "wb")

File.read("bar").to_slice # => Bytes[19, 16, 10, 7]

Just to fill some details about the issue, because I think it's not very clear from the descriptions so far:
Files can be opened in different modes (read, write, read+write etc.) which is specified via the mode parameter of File.new etc. This parameter is inherited from the C function fopen.
The mode can have a binary option which designates the file to be opened as a binary file - in contrast to a text file. That binary option is effectively ignored on Linux and AFAIK most other POSIX operating systems. It is only supported for standard conformity and has no effect.
On Windows however, there are practical differences between opening files in text mode vs. binary mode. In text mode there are some special rules in place, such as replacing CRLF with LF and vice versa. This can be observed in the example above where the byte 10 is replaced by the bytes 13, 10 and vice versa when reading/writing in text mode (13 is the codepoint for carriage return and 10 is the code point for line feed).
Note this does not happen on Windows currently because the stdlib implementation always uses binary mode, even if the binary option is not explicitly selected.
And I think that's actually pretty good.
I am strongly opposed to adding non-standard methods File.readbin/File.writebin for operating in binary mode. Whatever we do, I'm convinced that binary mode should be the easily reachable default. It's the most expectable and intelligible mode of operation.
Maybe I'm missing some obvious use cases, but I'm very doubtful about even adding support for text mode on Windows (or other platforms where it would make a difference). If it's not the default and can be enabled somehow, that would be fine by me. I'm not a Windows dev, so I'm really wondering why you would even want to use that. If you need to convert line endings for some reason, you can just do that explicitly in Crystal code. I don't think any of the other Windows semantics of text mode really matter.
Instead of looking at Ruby (which seems to have made bad decisions regarding Windows support), I'd suggest looking at modern languages with good portability. To my knowledge, Go and Rust have no concept for opening files in binary vs. text mode, for example.
So I really think there's nothing to be done here. Except maybe improve the general API to replace the C inheritance of mode parameter being of string type (#7857).

@HertzDevil then perhaps that needs its own API to read or write bytes and not strings, no? We are discussing binary data to be written and read from a file, so perhaps needs a different pair of methods.
Apologies if my response is not too verbose or propose a solution, but I would like to better understand it before anything.
Thank you.

File.read("foo.bin").to_slice

If an "invalid" (whatever that means) string falls in an intermediates forest, was it really invalid?

File.write with a Bytes argument uses IO#write, not IO#write_string, so it ignores the encoding settings. I think this is intended behaviour but one may consider it a bug.
I am fine with IO#getb_to_end. Maybe at least one overload of #getb too.

I would certainly say that's a bug. It should either interpret they Bytes as string and apply the encoding, or the encoding parameter should not be allowed with Bytes. It doesn't make sense to allow the parameter but silently ignore it.

I have in fact reached a situation where File.binread won't be sufficient (reading binary content through Compress::Gzip::Reader, i.e. like this example).
There is actually another key difference here: IO#getb_to_end is allowed to return a writable Slice by using a writable IO::Memory, whereas String#to_slice always produces a read-only Bytes, at least not without unsafe operations. This means #getb_to_end can be more efficient if the Bytes is to be modified in-place, since the current equivalent would be io.gets_to_end.to_slice.dup.


Add mermaid diagrams for what happens when we run the model.

What existing problem does the pull request solve and why should we include it?
This pull request adds a mermaid diagram in the front page of the documentation which attempts to show what happens when you run a model using tm2py with the basic usage attached.
Note: I had some struggles with how to display all the stuff being "queued" using loops and itertools....suggestions appreciated :-)
cc: @lmz
Applicable Issues
Closes #29

For the sake of not letting this get to elderly, I'm going to merge this for now and we can re-open the issue if we would like to add additional features/color/details.


BadgeApp: Auto-acquire text from criteria

It may be a good idea for BadgeApp to automatically acquire its criteria text from criteria.md.  That certainly would be DRY.  We can tweak the criteria.md file so it's easier to process, e.g., if additional information needs to be added.

I've talked with Sam.  Let's start by creating the forms "by hand", so that we can see if we're going in the right direction.  No point automating the wrong thing.


Allowing multiple "never" types to co-exist compromises type safety

Bug Report
🔎 Search Terms
never, property, extends, intersection
🕗 Version & Regression Information
This is the behavior in every version I tried, and I reviewed the FAQ for entries about "never"
⏯ Playground Link
Playground link with relevant code
💻 Code

type IsNever<T> = T extends never ? "YES" : "NO";
type NeverIsNever = IsNever<never>; // should be "YES" but is never, why?!
type ButNeverReallyIsNever = never extends never ? "YES" : "NO"; // this yields "YES" as expected
type ObjectWithNeverPropertyCannotExist = IsNever<{ value: never }> // should probably be "YES", but it is "NO"
type ArrayWithNeverItemsCannotExist = IsNever<never[]> // should probably be "YES", but it is "NO"

🙁 Actual behavior
None of the above types is recognized as never, even though they are all types that can have no legal values. The following comment from @RyanCavanaugh seems to confirm it:
https://github.com/microsoft/TypeScript/issues/43954#issuecomment-832776463
This leads to a conclusion  that TS allows multiple "never" types to co-exist. In type theory, this shouldn't happen because the initial object (if it exists) must be necessarily unique. Unfortunately, not recognizing that those types are identical leads to type safety being compromised in certain situations, e.g.
https://github.com/microsoft/TypeScript/issues/50559
🙂 Expected behavior
I think all these types should be recognized as equal to never. As such, no values of these types should be allowed to exist, as it the case of:
function modify<T extends { value: number }>(a: T): T {
    // type of "b" is T & { value: string } which is in fact "never"
    const b = {
        ...a,
        value: 'abc',
    };
    return b;
}

See: https://github.com/microsoft/TypeScript/issues/50559
In particular a value of type never should not be considered a legal return value of any function unless the return type is explicitly declared as never.

type NeverIsNever = IsNever; // should be "YES" but is never, why?!

This is the expected behaviour of Distributive Conditional Types.
To prevent distributiveness you can wrap your types in brackets:
type IsNever<T> = [T] extends [never] ? "YES" : "NO";

@MartinJohns Thank you for the hint regarding the brackets around T and for the example with an empty array. Somehow I missed that one, but let me fix it:
type NeverTupleShouldBeNever = IsNever<[never]> // should probably be "YES", but it is "NO"

I am also wondering what do you think about { value: never } being equivalent to never. Looks like you haven't addressed that one in your comment and at the same time it seems to be at the root of the problem that causes https://github.com/microsoft/TypeScript/issues/50185.

@MartinJohns Well, I didn't know that type assertions would allow that. It doesn't sounds very type-safe. Digging a little bit deeper, it seems like the following is also possible:
function isNever(x: unknown): x is never {
    return true;
}
const a = 123;
let x: string;
if (isNever(a)) {
    x = a;
}

which really doesn't sounds valid to me.

These properties are sometimes used to model a "xor" union type. For example: { a: string; b: never } | { a: never; b: string }

Would you mind sharing a practical example which requires this kind of union type to be used? Shouldn't a union of two nevers also be never?

@fatcerberus

I wrote a more nerdy theoretical explanation in a different issue recently, see https://github.com/microsoft/TypeScript/issues/49862#issuecomment-1180954393

Thank you for sharing the link. So yes, I am aware of all of that. And it only proves my point I guess. There shouldn't exist any values of type never or if we allow them to exist we pretty much loose type safety everywhere. A code that produces a value of type never is not valid in the sense of type checking.

Digging a little bit deeper, it seems like the following is also possible:

The implementation of type guards is not checked against the return type annotation. This is whole different issue (too lazy to look it up), and completely unrelated to never. If you write a function that tells the compiler "this checks that the argument is a bool", and then your function does not check this, well... it's not the compilers fault that things get screwed up.

Would you mind sharing a practical example which requires this kind of union type to be used?

I would personally not do it like this, the better option is to use a discriminated union. But if you have a union of different cases, and you want to ensure that only one of it matches, you need to use these never properties. Otherwise trying to narrow the union type with the in-operator results in unsound behaviour, because object types are not sealed. If you simply omit the property b in my previous case, it might be that such a property exists. But having a property b typed never explicitly says that it must not be provided. Using undefined is also an option here.

Shouldn't a union of two nevers also be never?

A union of two never gets simplified to never. But this is not the case in my example.

There shouldn't exist any values of type never or if we allow them to exist we pretty much loose type safety everywhere. A code that produces a value of type never is not valid in the sense of type checking.

An object having a property typed never is not the same as never. The one case shouldn't  happen, in the other case you do have an object, which explicitly mentions a property should not be set at all.

Having studied type theory for many years, I would simply like to point out that this is incorrect:

In type theory, [multiple "never" types co-existing] shouldn't happen because the initial object (if it exists) must be necessarily unique.

The initial object is only required to be unique up to isomorphism, not up to equality. In type systems like Coq or Agda, which have a very strong (and sound) type theoretical basis, it is very easy to produce different empty types, for instance defining two different data types with no constructors (or the type of equalities between 0 and 1, or the type of functions from a non-empty type to an empty type, and so on). Elements of such types are not assignable to other empty types, it's only possible to construct functions between those types.

@MartinJohns

An object having a property typed never is not the same as never. The one case shouldn't happen, in the other case you do have an object, which explicitly mentions a property should not be set at all.

Well, the point is this doesn't seem the be the case:
const a: { value: never } = {};

actually gives an error:

Property 'value' is missing in type '{}' but required in type '{ value: never; }'.

which seems to be contradicting your statement. Please have a look at this tsplayground.
In fact "not having property" would be better represented by { value?: undefined }, but not quite. Actually, I don't think the concept of "not having property" can be accurately represented in any type system but I am not 100% sure. At least { value: never } does not seem to be the proper solution here.

The implementation of type guards is not checked against the return type annotation.

Of course it's not. I wasn't suggesting that this should be the case. What I meant was that type guards with return type x is never should probably be prohibited as they doesn't make any sense. Similarly, if you tried to use a conditional statement if (x === true) { ... } when x is of type number, TS would kindly notify you that the code will be unreachable.

I don't see any incorrect behavior here. See also https://twitter.com/SeaRyanC/status/1326575516250329088

{ value?: never } is generally the way to write a type that you don't want to have a particular property.  It's possible to work around because optional properties are unsound, but in practice it's usually enough to prevent the property from being created.

What I meant was that type guards with return type x is never should probably be prohibited as they doesn't make any sense.

There's an infinite amount of nonsensical code you can write and only a finite amount of time to check for all of those constructs before people get bored and stop using static type checkers. Unless people are frequently going around writing x is never either through mechanical error or common misconception, this isn't something we should spend a constrained resource on.

Lemme summarize the above discussion:

Even though a type like { value: never } is isomorphic with never it does not necessarily mean that it needs to be treated as the same type by the type system. In fact, it's a completely different type and it's completely fine. Because of that IsNever<{ value: never }> = "NO" and this is actually the expected behavior.
Values of type { value: never } cannot exist the same way values of type never cannot exist. The fact that the example code was able to produce such a value was due to another problem, basically TS making an oversimplification by assuming that the type of { ...a, value: 'abc' } is T & { value: string } = never but this is not really the case. In fact, the type should be evaluated as Omit<T, "value"> & { value: string } but this is already covered by https://github.com/microsoft/TypeScript/issues/10727.
Finally, it does not make sense to expect TS to be able to verify if a given type is equivalent to never. In case of { value: never } this is actually simple but in general this is probably an "undecidable" problem as pointed out here https://twitter.com/SeaRyanC/status/1326575516250329088.


parser: fix create table without name

Closes #29

@xqueries/developer
Also, I think we should discuss #51 first


Enable brotli for blocking

Add brotli(), no_brotli() methods.

Thanks for catching this! Mind fixing the unneeded mut, and we'll merge this in?


[SAP Mobile Cards] Updating the Validation Rules

The new validations make it harder for people to cheat/game the system.
Added Text Match Questions.

@MichaelCzcz @thecodester I see that rules.vr files are ignored in Git. I have made some changes to those files,  will those changes be reflected. If yes, I'd be interested to learn how.
Thank you for your support.


Add .removeData()

Feature Proposal
Add a removeData() function to remove all data from the canvas
Possible Implementation
No response

This is easily achievable by yourself by setting the data to an empty object like so:
const c = new Chart(ctx, options);

c.data = {};
c.update();

https://jsfiddle.net/ohfg48v3/


Tigervnc tests and no proprietary fonts

Motivation for this change
Proprietary fonts aren't necessary for tigervnc to function, and introduce an
unfree dependency, so let's remove them. And add a test to make sure :)
cc @iblech whose work (#85124) this is based on (I didn't touch vncserver, sorry :/ )
cc @ma27 who expressed interest
Things done

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

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

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

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

[x] Fits CONTRIBUTING.md.

Result of nixpkgs-review pr 130778 at cfb935c5 run on aarch64-linux 1

2 packages built successfully:

crowbar
tigervnc


[Bug] failed to compile NtHiM v0.1.3

Hello
I am facing this error. used this command cargo install NtHiM

Hello @remonsec,
This issue occurs, because cargo install NtHiM ignores the Cargo.lock file in NtHiM, and tries to figure out and use newer version of the dependencies defined in the Cargo.toml file.
In this case, Cargo.toml and Cargo.lock files have defined the version v3.0.0-beta.2 for clap, however cargo tries to make use of clap v3.0.10, and this newer version appears to be using the help method instead of the about method, that leads to the issue.
You can fix this issue by using the --locked flag during installation, i.e. cargo install --locked NtHiM, which will force cargo to use the version defined in Cargo.toml and Cargo.lock files.
I will start implementing the help method from the upcoming release of NtHiM, as required by the newer releases of clap.
Failure during Installation (cargo install NtHiM)
clap v3.0.10 being used!

Failure Message!

Successful Installation (cargo install --locked NtHiM)
clap v3.0.0-beta.2 being used!

Successfully Installed!

Thank you for opening up this issue!
Thanks,
@TheBinitGhimire

Hello @remonsec,
The new release of NtHiM, i.e. v0.1.4, is published now, which includes the support for the methods available in the latest version of clap, i.e. clap v3.0.10.
The guidelines I provided earlier would help you in successfully installing NtHiM v0.1.3. With this new release, the default command would work fine as well as you did. So, if you are willing to try out this new release, you shall skip the guidelines.
I hope you would try installing NtHiM v0.1.4 using the same command that you used earlier, and let me know if you are still facing any issues during the installation.
Thanks,
@TheBinitGhimire

Hello @remonsec,
The new release of NtHiM, i.e. v0.1.4, is published now, which includes the support for the methods available in the latest version of clap, i.e. clap v3.0.10.
The guidelines I provided earlier would help you in successfully installing NtHiM v0.1.3. With this new release, the default command would work fine as well as you did. So, if you are willing to try out this new release, you shall skip the guidelines.
I hope you would try installing the latest version of NtHiM, i.e. NtHiM v0.1.4, using the same command that you used earlier, and let me know if you are still facing any issues during the installation.
Thanks,
@TheBinitGhimire

I had same problem
update rust to fix

Hello @gprime31,
Thank you for providing the information that Rust/Cargo would have helped in fixing this problem too! I will mention this issue ID as well in the commit message along with #12 and #21 for the documentation update.
Thanks,
@TheBinitGhimire


Option for limiting simultaneous checkouts

We have a lot of git dependencies (currently 79) checked out by bower and this can easily lay down our git server because of huge load on cpu (especially without local cache).
Can we define an option for bower to limit simultaneous checkouts? Like so:
$ bower install --parallel=3

Thanks

👍

Bower is deprecated now, and in maintenance mode. Because of this we won't implement new features like this one. We recommend switching to Yarn or npm, and migrating with bower-away