AI food buying

This patch is amazing, I didn't think it was possible to change AI behaviour......
I have a suggestion to try and improve some of the AI's economies a little even in their original castles......as you know most AIs buy in other food varieties every so often even if they have food. It would be good to have more food variety for AIs, for example Emir buying in 10 apples and 10 cheese instead of his standard 20 apples and Sultan can buy 5 cheese, 5 apples, 5 meat and 5 bread instead of just buying apples. Even Rat could buy in 5 bread, 5 meat and 5 cheese instead of just apples. This would allow them to increase their tax rate. :)

Yes I suppose rat's character would be too stupid to think about the benefits of food variety and for Sultan, less woodcutters (about 7 instead of his current 15) and farms instead and a few iron mines! Of course the original castles should be changed slightly (a few more houses) to account for this, for those who still like using the original castles!

I disagree, I think the Sultan is fine. He should not be buffed... And if, just the tiniest little bit, he is in a good spot right now. He is meant to be very easy to beat.

OK then, just one more quarry with 2 ox tethers (5 people) in place of 5 of his woodcutters then might be a good balanced solution for Sultan, a slightly better economy but still easy to beat as intended!

You are probably right, and economies of AIs can be easily improved by building new castles for them with more production, they are probably fine at the minute. However I still think it should be modified to improve at least some of the AIs economies (maybe not Rat's though as you say 😄 ) by buying in more food types.
Wazir and Emir buying in 10 cheese and 10 apples instead of 20 apples would be better for them for 2 reasons: increased food variety and therefore taxes, plus if they run out of food it costs less to replenish their supplies as they can choose to replenish just the 10 apples or just the 10 cheese!  Caliph also I think could with buying in 10 cheese and 10 apples instead of just apples. Phillip buys in 20 cheese, 20 apples and 20 bread, he would be better buying in 15 apples, 15 cheese, 15 bread and 15 meat instead, so he can boost his taxes!

Also, I wouldn‘t mind the Rat buying cheese at least - I mean, come on, Rat and Cheese, that‘s a no-brainer!

Buying food despite generally having excess food, just to maintain food variety - in this case, selling e.g. 5 bread and buying 5 apples results in a net loss of gold through the trading, which may or may not be made up for by slightly higher taxes due to the +1 extra popularity for a couple seconds.

Yeah I have changed my mind now about Wazir, and actually now think he should be changed again to just buy bread if his granary is empty or nearly empty rather than buying in 20 apples every so often for food variety. Two reasons: Wazir relies a lot on selling bread for his economy to flourish, and buying in apples every so often will cost him more than he would recoup from the +1 popularity boost and 2. Wazir is an evil lord who wouldn't care about giving his people much food variety anyway. 😃

And for the Sultan, 4 food types would really fit him well I’d say, because 1. it’s efficient for him who buys food anyway (and his economy is weak enough to need every little push it can get), and 2. it also fits his character quite well, I’d say: He likes feasting and relaxing in his flower-filled palace more than battling, and he does whatever he can in order to make his people happy, not caring profane issues such as about money and costs for luxurious things like elaborate meals, home comfort or ornamental decorations when he is busy meditating or studying poetry.

Yeah that's what I was thinking. Just thinking there, maybe just 3 food types rather than 4 food types for Sultan though as +5 fear factor and +3 food variety would allow him to use -8 for taxes. 4 food types would create +9 for taxes and that extra +1 isn't very useful for him.

I disagree. The AI uses taxing a lot to get  down to ~50 popularity and gaining some extra money doing that, and then let it recover a bit again.
Which means a +1 goes a loooong way.

You are right. So Sultan would benefit from buying all four food types. Still not sure though about whether or not Wazir should just buy bread if he is lacking and not buy apples and also whether Emir should switch to buying 10 apples and 10 cheese instead of 20 apples.

Regarding the "popularity lowering tax tricks" of the AI, I generally hate those, though.
Not because I think it would be unfair or OP in anyway, but rather the opposite... the AI even does that down to -24 taxes if they can, which is downright awfully inefficient in terms of gold/popularity, and the AI also goes down to 50 popularity when having TONS of gold, limiting the own recruiting speed (lower popularity = slower peasant spawning).
Furthermore, the AI could just as well move between 90 and 95 popularity (or 80 and 100 at most), to avoid peasant shortage and situations where it has about 50 popularity, and now the granary goes empty/destroyed or an inn runs out of ale or whatever else, and suddenly it goes below 50 and needs to cut taxes a lot in order to get back up...
Anyway, yeah, Wazir without apples might be better. Although who knows... his negative fear factor combined with no ale or religion means his only ways to get his popularity right are either bigger rations, multiple food types, or negative taxes... so at -5 fear factor, he could use extra rations (+4) combined with no taxes (+1) and bread & apples (+1) to raise popularity (total of +1), and switch to low taxes (-2) to lower it (total of -2) and make extra tax money (which even is super efficient in terms of gold/popularity compared to the higher tax rates).
Although, knowing the AI, I'd bet he rather goes all out with double rations and higher taxes anyway...

Although, knowing the AI, I'd bet he rather goes all out with double rations and higher taxes anyway...

They still manage to earn tons of money though. I am always shocked how much enemies like Saladin, Wolf, Emir or Wazir earn. So it can not be that bad now, can it?

Anyway, yeah, Wazir without apples might be better. Although who knows... his negative fear factor combined with no ale or religion means his only ways to get his popularity right are either bigger rations, multiple food types, or negative taxes... so at -5 fear factor

He rarely if ever uses -5 fear factor from what I observe, -3 is what he commonly uses.

They still manage to earn tons of money though. I am always shocked how much enemies like Saladin, Wolf, Emir or Wazir earn. So it can not be that bad now, can it?

Although Wazir and Emir (and Nizar too) do have faster recruitment speeds than Saladin, Wolf or Frederick and so do tend to deplete their gold quicker when they start with 40,000 gold.

They still manage to earn tons of money though. I am always shocked how much enemies like Saladin, Wolf, Emir or Wazir earn. So it can not be that bad now, can it?

Well yeah, but so can a human player... difference being, a good human player would simply end the match before having 250k gold reserves, usually.
And ofc, human players also sometimes have their stockpiles filled up because they focus more on making senseful troop movements and siege attacks, which the AI is just not really capable of in most situations, and hence have no real need for economic efficiency in the later game.

He rarely if ever uses -5 fear factor from what I observe, -3 is what he commonly uses.

-3 fear factor instead of -5 then makes it possible to stay on -2 taxes for a total of 0 popularity with the setup as mentioned previously... not bad either, imho.

Even Pig too if he is in a good economic position, can make a lot of money, I notice, he started one match I was playing against a few AI lords on 40,000 gold and ended up with over 150,000 gold iirc even though he was attacking me frequently with lots of macemen!

Pig's economy is really situational, though... sometimes it works out fairly well, and sometimes it is just "meh". A good Saladin, Frederick or Abbot can make many times more gold.


implement max duration for incoming calls

can make it long but get rid of zombie connections or campers

Do we have data to indicate that this has happened and/or is a problem?
Any pointers on where to start looking if someone wanted to contribute?


Can't preview or render, mmap not compatible with 3-byte container size.

Steps to reproduce the behavior:

Open corrscope and add any amount of channels and master audio
Press Preview or Render to Video

Expected behavior
The video gets previewed or rendered.
Actual behavior
An error with traceback included.
Screenshots

Version

OS: Windows 10 21H2
Corrscope version: 0.8.1 (Same error with 0.7.1)
Python version: 3.11.2
How you installed corrscope: Windows Binaries (x64)
How you obtained FFmpeg: Download from gyan.dev, version 6.0

The log:
Traceback (most recent call last):
  File "corrscope\gui\__init__.py", line 750, in run
  File "corrscope\corrscope.py", line 242, in play
  File "corrscope\corrscope.py", line 207, in _load_channels
  File "corrscope\corrscope.py", line 208, in <listcomp>
  File "corrscope\channel.py", line 79, in __init__
  File "corrscope\wave.py", line 150, in __init__
  File "corrscope\utils\scipy\wavfile.py", line 690, in read
  File "corrscope\utils\scipy\wavfile.py", line 485, in _read_data_chunk
ValueError: mmap=True not compatible with 3-byte container size.

24-bit integer WAV is unsupported, convert to 16 or 32 bit integer WAV or 32-bit float.

Wait SquaredWave arent you the one making chiptune music?


Flynn Client & Host CLIs should expose cluster status

Both flynn and flynn-host should expose a status command that reports the details of the cluster's status.

@titanous @lmars
Here, I would add another command to flynn and flynn-host which calls controller.Client.Status(), correct? + The integration tests. :)

@philiplb sounds right yes.

@lmars
Thanks.
I have a small problem here:
In the Vagrant box, I'm running a local Flynn via script/bootstrap-flynn.
And then I add it via flynn cluster add. The dashboard is running fine, its status page shows all apps and their health. However, in my status command, the call to the status endpoint results in nil Detail:
func runStatus(args *docopt.Args, client controller.Client) error {
	clusterStatus, err := client.Status()
	if clusterStatus != nil {
		printStatus(clusterStatus)

		if clusterStatus.Detail != nil {
			// This is never reached...
			detail := make(map[string]json.RawMessage)
			if err := json.Unmarshal(*clusterStatus.Detail, &detail); err != nil {
				return err
			}
			for app, rawAppStatus := range detail {
				fmt.Println(app, ": ")
				var appStatus status.Status
				if err := json.Unmarshal(rawAppStatus, &appStatus); err != nil {
					return err
				}
				printStatus(appStatus)
			}
		}

	}
	return err
}

Do you know how I can get the apps details?

@lmars @titanous
Ou, also on our live cluster, I don't get the details.

@philiplb I didn't look close enough when I made my last comment, client.Status() just returns the status of the controller (which has no details), rather than the status of the cluster (which comes from the status app).
You need to make a request to the status app which can be found internally at http://status-web.discoverd, externally we should run a job which gets the status using curl.

Perhaps we should expose the cluster status endpoint from the controller API?

@titanous that is a good idea yes.

@titanous Could you give some directions about how to expose the cluster status endpoint from the controller API?

@philiplb

Add a new handler to the controller GET /cluster/status (existing handlers are here)
The handler should GET http://status-web.discoverd and return the result
Add client.ClusterStatus() which hits that endpoint

Flynn is unmaintained and our infrastructure will shut down on June 1, 2021. See the README for details.


[ENH] Future numba distances enhancements

Pairwise_distance taking a 2d array reshape it wrong: it should be (1, d, m)
The values for epsilon (and other parameters) that require a float if given an int should attempt to cast the int to float (assuming greater than 0 but less than 1)

change the symmetric feature to define symmetric distances, thus halving the search space

randomise cluster assignment for equal distances

add TWE (we can organise this into separate issues after the first pass)

add multivariate MSM. make MSM conform to style

implement Swale

Pairwise euclidean should return the squared pairwise not euclidean as you sqrt at the end not at each step


Allow hovercraft docker script to run in OSX & Linux

The slides/present script was failing in OSX because realpath is not a native OSX command.
One option for OSX users is to brew install coreutils, but this requires an extra step for those users.
A cleaner (I hope) option is included here.

Ah ha! I have coreutils installed, which is probably why this was working for me. Sorry about that.

The goal behind script=`realpath $0`  was to allow you to run the present script from anywhere, but I'm fine with having to be in the slides/ directory in order to run it.


Add more visibility on a non ExitError in execs

This recovers including stdout and stderr in exec errors for non ExitErrors, hopefully giving more visibility when tests fail like this:
#11 230.3 === NAME  TestContainerExecError/truncates_output_past_a_maximum_size
#11 230.3     container_test.go:3032:
#11 230.3         	Error Trace:	/app/core/integration/container_test.go:3032
#11 230.3         	Error:      	Should be in error chain:
#11 230.3         	            	expected: %!q(**dagger.ExecError=0xc001439718)
#11 230.3         	            	in chain: "input:1: container.from.withDirectory.withExec.sync failed to solve: process \"sh -c base64 -d encout >&1; base64 -d encerr >&2; exit 1\" did not complete successfully: exit code: 1\n\nPlease visit https://dagger.io/help#go for troubleshooting guidance."
#11 230.3         	            		"input:1: container.from.withDirectory.withExec.sync failed to solve: process \"sh -c base64 -d encout >&1; base64 -d encerr >&2; exit 1\" did not complete successfully: exit code: 1\n"
#11 230.3         	Test:       	TestContainerExecError/truncates_output_past_a_maximum_size
#11 230.3 --- FAIL: TestContainerExecError (33.28s)
#11 230.3     --- PASS: TestContainerExecError/includes_output_of_failed_exec_in_error (0.91s)
#11 230.3     --- PASS: TestContainerExecError/includes_output_of_failed_exec_in_error_when_redirects_are_enabled (0.97s)
#11 230.3     --- FAIL: TestContainerExecError/truncates_output_past_a_maximum_size (30.83s)

I was just reminded of this buildkit issue I opened up last month as part of fixing this dagger issue.
Specifically, if you search for The pipe is not being read by buildkitd due to the grpc writeQuota issue in the buildkit issue, I'm wondering if that's what's happening here. Basically, there seems to be a potential grpc bug that causes API calls sending lots of data rapidly to result in stalls. I'm wondering if the recent increase in the amount of stdout/stderr we read could be resulting in this happening again sometimes.
If you can repro this locally, you could check this by:

Removing the timeout we set in wrapSolveError here
Follow the engine logs in one terminal, e.g. docker logs -f dagger-engine.dev
In another terminal, send SIGQUIT to the engine, e.g. docker kill -s SIGQUIT dagger-engine.dev

That should give a stack trace of all the goroutines in the engine, which you can then check to see if any are blocked on that writeQuota call from grpc.

@sipsma fyi, I spent a bit of time trying to replicate getting writeQuota, but to no avail so far.

@sipsma, good news… it’s not writeQuota. 🙂
I pushed a change to always return the ExecError after proc.Wait().
Debugging a failed exec has a 30s timeout. If running the debug container to get the output takes longer than that, it returns an error with context deadline exceeded. Previously this wasn’t being converted into ExecError, thus failing the test.
Since at this point we know the exec failed (we’re just trying to get the stdout/stderr/exit code), it’s still an exec error, but if the process is cut-off before returning a proper *pb.ExitError I guess the output could be incomplete and we don’t get the actual exit code.
Doesn’t seem like something we’d want to show the user because it’s not directly related to the failing command, rather to fetching the failed output, but it helps in debugging. I’m also not sure the best way to present (or to just not). I put in [] to make the distinction clearer:
input:1: container.from.withDirectory.withExec.sync [context deadline exceeded]: failed to solve: process "sh -c base64 -d encout >&1; base64 -d encerr >&2; exit 1" did not complete successfully: exit code: 1

Hopefully it won’t show the user, including the -1 exit code, if we make it harder to happen.
I ran a bunch of tests and I believe the source of the flakiness started happening since https://github.com/dagger/dagger/commit/f5f76fcbda4b772a54aecc43812bd03e51c0d62c (at least a lot more):

I see this error a lot:
traces export: context deadline exceeded: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial tcp: address /dev/otel-grpc.sock: missing port in address"

I don't think this is expected right @vito? It looks like a leftover from JournalURI -> JournalFile, looking at the failed TCP connection on a Unix socket.
I’m guessing when this happens, it causes a delay when debugging a failed exec, especially in the test with the error truncation going from 2K to 100K. I didn’t expect this could take more than 30s, it’s just reading a few files. But it does flag that users could hit this issue, getting the unexpected -1 exit code in ExecError (if they’re checking for it), so we still need a solution to reduce getting the context canceled.
So it’s the combination of these 3 changes:

https://github.com/dagger/dagger/pull/5151
https://github.com/dagger/dagger/pull/5164
https://github.com/dagger/dagger/pull/5184

The problem in the last one was not accounting for the non-exit error in context deadline exceeded.
The change in this PR should make the test pass more consistently. The exit code will be -1 on timeout, but I’m not checking it in these tests. Is it weird to return -1 when it isn’t found? Is it better to return 1 when we don’t know? Don’t think it’s worth it to regex from the error message again in this condition.
And what about the [%w]: %w wrapping? Is it better to ignore err there?

Correction: there can still be some flakiness in the test because as I said in the above comment if the context gets canceled the output may not be all there, so it may fail on expected output assertion.

@helderco That all makes sense, but what I was wondering about previously was why the timeout was getting hit at all, with the writeQuota issue being one possible suspect. Were you able to repro this locally and get the stack trace when everything gets stuck?
Gonna go look at the code changes too now, and have no issue with shipping the changes you described to better handle this this error case.

Yeah I know. I did that multiple times but never saw writeQuota. When I took the timeouts it seemed to hang on the registry testing.

I gave a quick shot to see if I could repro it locally by running ./hack/dev bash -c 'for i in {1..10}; do docker exec -it dagger-engine.dev buildctl prune --all && go test -v -count=1 -run=TestContainerExecError ./core/integration; done', and was able to get it to freeze after a few tries of that loop.
I sent SIGQUIT to dagger-engine.dev and got this stack trace, which seems to include the writeQuota call 😢https://gist.github.com/sipsma/0a605302a66fbcc6d70a95c3aaba3f66#file-gistfile1-txt-L1070

@helderco changes here LGTM!
That's interesting your stack trace looks totally different, how were you invoking the test?

This is from just now on main: https://gist.githubusercontent.com/helderco/bdd16399d2d92928ac8004891526a3fc/raw/aa4a47acdecb36c3b391b8186f0d6b6a34de9eb6/gistfile1.txt
I'm invoking with ./hack/dev ./hack/make engine:test, but I added the -run directly in mage to make it quicker. On friday I went to dinner and came back still hanging after 48 mins. That's the example I shared in the previous comment.

I'm invoking with ./hack/dev ./hack/make engine:test, but I added the -run directly in mage to make it quicker.

Ah okay, if you use ./hack/dev ./hack/make together like that then the actual engine being tested is a service container, so you'd need to send SIGQUIT to the process inside dagger-engine.dev rather than to dagger-engine.dev itself. E.g. docker exec -it kill -QUIT <pid of dagger-engine process>.

@sipsma Ugh, I also tested with ./hack/dev go test ... multiple times, but at the time must not have gotten the stack trace.
So just ran with this command: ./hack/dev go test -p 16 -v --count=1 -timeout=1h ./core/integration -run TestContainerExecError
There's our friend: https://gist.github.com/helderco/9232cd4a4afc7c8626e0c1f45e877e2d#file-writequota-txt-L1370

Is there a limit we need to stay off of? I tried reducing from 100K to 50K, been running multiple times and haven't hit the fan yet.

@helderco I just poked around the grpc repo a bit more, there was a new issue since Tonis last posted there about this, the conclusion at the end of the thread is extremely helpful: https://github.com/grpc/grpc-go/issues/5393#issuecomment-1148851417
I just looked and saw that it seems highly plausible for Send to be called on the same stream in parallel from different goroutines in the buildkit implementation, which according to that thread is what would trigger this. You can see srv.Send being called from separate goroutines here (the problematic call we get stuck on is from a call made after srv is passed to a different struct here).
It's just a guess, but I would suspect that when we are hitting this the container is exiting so close after it just spit out a bunch of data that the exit message and last part of the data stream are getting called at the same time.
Fortunately, if the above understanding is indeed correct, I think fixing this upstream in Buildkit shouldn't be too hard, probably just a matter of wrapping all those Send calls with a mutex. I guess we'd also want to make sure that if it's possible for the exit to happen while stdout/stderr data is still being flushed, then the client waits to receive it. I'll check w/ the PMs to see who could work on that.

For reducing the truncation size, I think that makes sense it would reduce the chances of this happening since it probably only happens when sending the data stream gets backed up (it looks like the max message for this stream is 32kb). I think that's a totally reasonable workaround for now. Maybe just set it to 32kb for now actually? So it always all fits in one message.

Thank you so much for the assist @sipsma 🙂


Error while using multiple custom fonts with different sizes (+ workaround)

Hi there,
When I call the text() method on a Text element, changing it's value, every other custom fonts eventually take the same size... (i.e a 18 font become a 14 one or vice versa).
I was able to reproduce a bug when using two or more custom fonts. Take this code (usable in CloudPebble if you load 2 customs fonts "small-font-14" and "medium-font-18"):
"use strict";

var UI = require("ui");
var Vector2 = require("vector2");

var w = new UI.Window();

var i = 0;

var fielda = new UI.Text({
  position: new Vector2(5, 0),
  size: new Vector2(100, 168),
  font: "gothic-14",
  text: "select triggered "+i + "x",
  color: "white"
});

var fieldb = new UI.Text({
  position: new Vector2(5, 20),
  size: new Vector2(100, 168),
  font: "gothic-18",
  text: "select triggered "+i + "x",
  color: "white"
});

var fieldc = new UI.Text({
  position: new Vector2(5, 50),
  size: new Vector2(100, 168),
  font: "small-font-14",
  text: "select triggered "+i + "x",
  color: "white"
});

var fieldd = new UI.Text({
  position: new Vector2(5, 70),
  size: new Vector2(100, 168),
  font: "medium-font-18",
  text: "select triggered "+i + "x",
  color: "white"
});

w.add(fielda);
w.add(fieldb);
w.add(fieldc);
w.add(fieldd);

w.on("click", "select", function () {
  fielda.text("select triggered "+i + "x");
  fieldb.text("select triggered "+i + "x");
  fieldc.text("select triggered "+i + "x"); // after 2 or 3 click on select, this element font switch to 18
  fieldd.text("select triggered "+i + "x");
  i++;
});

w.show();

Is this the expected behavior ? A workaround is to call font() before text() as in :
//(...)

w.on("click", "select", function () {
  fielda.text("select triggered "+i + "x");
  fieldb.text("select triggered "+i + "x");
  fieldc.font("small-font-14"); // Here it is, forcing the "14" again.
  fieldc.text("select triggered "+i + "x");
  fieldd.text("select triggered "+i + "x");
  i++;
});

w.show();

Thanks

Apparently the workaround isn't working all the time..

Well, this was an embarrassing one! Try out master and let me know if it fixes it for you.

Works like a charm! Thx.


1.3.7 Backports

This change is

test-me-please

test-me-please

k8s tests passed
Two runtime tests failed:
runtime.RuntimeMonitorTest With Sample Containers multiple monitors
runtime.RuntimeChaos Endpoint recovery on restart

both are unrelated to these changes


I can compile the code in VS2015, Windows, but the run result seems wrong.

I compile and run the code both in Linux and Windows. In Linux it looks good.
In Widnows, I tried tow methods to compile it:

modify CMakelists.txt , CMake 3.9 + Visual Studio 2015 to compile it.
Just use Visual Studio 2015, manually add the 3rd libraries.
These two methods both can help me compile code successfully.
But when I run the code, the results seems wrong.
Here is the output of calibrate_radiometric_response in Windows and Ubuntu.

When I just use radical library, it cannot show the image, the output cv::Mat it black.

Could you give me some suggestion to solve the problem above?
Thanks for your advice.

Hi, thanks for the interest. It looks like on Windows the calibration process does not converge. Trying to compile and test on Windows has long been in my TODO list, I hope I can give it a try and find the problem soon.
Regarding the second part of your question, can you explain what exactly you are doing and what you expect to see?

Thanks for your reply!
In the second part of my question, I use the radical as a library like you described in README.txt . Right image is the original  color image from Xtion RGBD sensor, and left image is output image with vignette removed.
The source is:
cv::Mat frame;                 //  color image from the camera cv::Mat irradiance, radiance;  // temporary storage cv::Mat frame_corrected;       // output image with vignette removed rr.inverseMap(frame, irradiance); vr.remove(irradiance, radiance); rr.directMap(radiance, frame_corrected);
The calibration files used for this code is the calibration results that from the Ubuntu. And this code looks good in Ubuntu.  frame_corrected in Windows is black.

Oh, I see. Seems like something is really broken in Windows. I will have a look very soon and let you know.

Hey, I've pushed some updates that allow to compile the library and the apps in VS2015 out of the box.
Further, I've found and fixed the reason for the black image (problem with serialization of vignetting response calibration file on Windows platform, these bloody line endings :))
Finally, I've added a new app for quick testing that just removes vignetting effects from images of camera stream. It's called remove_vignetting, give it a try.
The problem with non-converging calibration is still present, I can reproduce it but haven't have time to look into that.

Thanks a lot!
I've try the new code and the black image problem has been solved!
I can only calibrate the sensor in Ubuntu and run the result in Windows. But it's not hard to do.

Glad to hear. I'll check what's going on with the "engel" calibration on Windows at some later point. In the meanwhile, one more option (besides calibration on Linux) is to use "debevec" calibration. To enable it, you need to compile with Ceres.

There was a problem with energy computation after rescaling on each iteration. Should be fixed now.


Warmup servers prior to executing benchmarks

Hi there 👋 I'm looking to add another Scala GraphQL library to the benchmarks. When I first looked at the current results I was a bit surprised that Sangria (Scala) was performing this badly. After looking at the benchmarking script, it seems that the servers are not warmed up prior to being benchmarked.
The JVM has a notoriously bad cold-start performance (see related post here), so any GraphQL libraries from JVM languages (Java, Kotlin, Scala, etc.) being benchmarked will show as having very poor performance if the server is not warmed up prior to measuring request latencies.
A very simple way to warmup the servers is to execute this line twice, discarding the results from the first invocation. Ideally, the first invocation should be with a smaller number of connections to prevent overwhelming the server as it warms up. I believe that this might also help resolve #217.
I'm happy to create a PR if you agree with this approach

The other thing about these benchmarks are that it doesn't really test GraphQL capabilities. Instead it tries to benchmark the webserver.
We prefer benchmarking on https://github.com/tailcallhq/graphql-benchmarks which are a lot more thorough.

I agree about warming up, PR welcome.

it doesn't really test GraphQL capabilities. Instead it tries to benchmark the webserver.

static-rust is a literal webserver benchmark, and the difference between that one and async-graphql/juniper is over 2x. So it's far from "only" benchmarking webservers. But it could certainly be improved (#190), note that this was a side project that I hacked together in a weekend :wink:


Suggestion: 1.12 -- Advanced Crystal Saturator

I'd like to re-open a request of creating a Crystal Charger but for Ae2 stuff, because it makes everything easier.
Basically, a chest you can put crystals into, and they get charged at a certain tick speed, increasing upto 3x with the acceleration cards. Takes only 4 ticks to make one charged crystal and will also uses 1280 AE power (320AE/t). All sides should be interactable with a Interface, attempting to deposit or pull items from them as they are created, or needed.

A lot of other mod can charge quartz...
( Draconic Evolution / EnderIO / Thermal ...)


ROI from Stardist2D

The Stardist2D works much faster, almost 20x faster than the Stardist plugin on my machine, even though both sides are using the GPU. It seems the main difference is at the Stardist NMS step. However, I could not figure out how to get the ROIs. Also, it is possible to generate a colorful label image like the Stardist plugin?
Thank you in advance,

HI @JLiLab ,
I'm happy to read it's faster even if I didn't really expect that ! 😅
To get ROIs from the label image we usually rely on our other tool : LaRoME  with scripts examples .
To get a colorful label you can simply change the LUT : Image > Lut ... , using "glasbey_inverted" or "glasbey_on_dark" !
Cheers,
R

Thank you!
For ROI, I found the "Label image to ROIs" function. It should work too, right?
Best,
J


guide: Spring Boot to Micronaut Framework - Application class

This PR adds the ability to generate Spring Boot applications. It is currently limited to Gradle, but we can expand it to Maven as well.
This PR also adds a simple guide which has two sample applications

micronautframework. A Micronaut Application

-springboot. A Spring Boot application

does it work with Maven?

does it work with Maven?

Not yet. But we should be able to make it work as well.

The spring boot apps still contain a src/main/resources/application.yml file containing
micronaut:
  application:
    name: micronautguide

Should this be removed?

There are still slight details such as the one you are describing.
For example, Spring boot apps are generated in the example.micronaut package
However, we can improve those details in a separate PR.


encapsulation problem?

hello,
i am using net core 5.0. Don't know if this is my fault but can you please have a look at this issue?
I was not having this problem when i used mpz_t exponent as uint exponent.
https://github.com/OneMillionthUsername/simple-Diffie-Hellman-Encryption/issues/1#issue-1366364306

i fixed my problem, so i think i don't fully understand how mpz_t works.


Automated cherry pick of #5955: Persist TLS certificate and key of antrea-controller (#5955)
#6004: Fix race condition in pkg/apiserver/certificate unit tests

Cherry pick of #5955 #6004 on release-1.13.
#5955: Persist TLS certificate and key of antrea-controller (#5955)
#6004: Fix race condition in pkg/apiserver/certificate unit tests
For details on the cherry pick process, see the cherry pick requests page.

@tnqn I know you mentioned before that "upgrading" from a patched controller to an unpatched one could create an issue (when using the RollingUpdate strategy), but I don't recall what the issue would be exactly. While I see that there could be a race condition between the old and new controllers, it doesn't seem any worse than the situation before your patch (for example, upgrading from 1.12.0 to 1.13.0). Or do we increase the likelihood of the old controller overriding the CA bundle because of the periodic sync?
I am surprised that we are getting a request to backport. As you pointed out originally, the odds of the old controller overriding the new CA are quite low:

Even for the latest report, we only know there was an old controller overwriting the CA bundle with its own one generated two days ago, but this shouldn't happen as overwriting the ConfigMap is one-time job and an old instance will only do it again after 1/2 of the valid duration (half a year) or it never succeeded to update all resources' CA bundle in the last two days.

That being said, I am fine with backporting this patch, for the reason you mentioned. Let's just make sure we publish patch releases in the correct order: 1.15.x -> 1.14.x -> 1.13.x

Or do we increase the likelihood of the old controller overriding the CA bundle because of the periodic sync?

Yes, I think it increases the likelihood a bit. When it's upgraded from unpatched to unpatched, the issue should only happen when there is already something wrong causing the old controller to keep retrying overwriting the CA cert. When it's upgraded from patched to unpatched, even if everything works fine, there is a chance that old controller could overwrite it due to the periodical update.

Let's just make sure we publish patch releases in the correct order: 1.15.x -> 1.14.x -> 1.13.x

Sure, I was thinking the same.

/test-all


Video is playing itself twice

Script version
5.4
Describe the bug
I'm no expert in coding, but after latest update. When I play a video, all ads are skipped, but the video audio is played twice, I can stop the video on my screen and that stops one audio track, but then i can hear the video again in the background without the possiblity of stopping it.
Desktop (please complete the following information):

OS: W10
Browser Chrome

Additional context

Have the same issue. Reloading the page fixes it most of the time but it's really annoying.

Yes, i'm also having the same issue. I do notice that you can pause and play the background audio by first clicking somewhere around the video and the pressing space.

having the same issue. the ad voice plays in the background

Seconding this report. Can 100% confirm that the issue happens still. Having the script disabled fixes the issue for me as it also breaks other extensions I'm using for YouTube.

Seconding this report too. I don't want to complain because it's free but it seems every update recently has made things worse.

Yes, i'm also having the same issue. I do notice that you can pause and play the background audio by first clicking somewhere around the video and the pressing space.

Solves it for me, thanks !

I've pushed an update to hopefully address this (v5.5)
Also, this is a duplicate issue. (https://github.com/TheRealJoelmatic/RemoveAdblockThing/issues/449)


Need basic documentation on how Track and Identify map into this new API

Forgive me for my ignorance, but after perusing the documentation it's not clear how we would migrate the following code to this new api:
# old api:
import klaviyo
klaviyo_client = klaviyo.Klaviyo(
            public_token=TOKEN)

then
klaviyo_client.Public.track(
            event_name,
            email=email,
            properties=event_properties,
            customer_properties=customer_properties)

or
klaviyo_client.Public.identify(
            email=email,
            properties=customer_properties
        )

Any help? can this be added to the documentation? This all we use the python Klaviyo API for right now -- tracking events from our app that trigger flows and updating user profiles with content from our app.

Hey Savraj,
Thanks for reaching out.
In our recent upgrade of our APIs, we split both the track and identify endpoints into two client- and server-side equivalents, each.
I am assuming you're using these serverside (but correct me otherwise).
In this case, here is how you would migrate:

install the new package

pip install klaviyo-api

instantiate the client:

from klaviyo_api import KlaviyoAPI

klaviyo = KlaviyoAPI("YOUR_API_KEY_HERE")

track -> create_event:

SDK function signature
payload structure

body = {
  "data": {
    "type": "event",
    "attributes": {
      "properties": {},
      "metric": {
        "data": {
          "type": "metric",
          "attributes": {
            "name": "<string>",
          }
        }
      },
      "profile": {
        "data": {
          "type": "profile",
          "attributes": {
            "email": "<string>",
            "phone_number": "<string>",
            "external_id": "<string>",
            "anonymous_id": "<string>",
            "_kx": "<string>",
            "first_name": "<string>",
            "last_name": "<string>",
            "organization": "<string>",
            "title": "<string>",
            "image": "<string>",
            "location": {
              "address1": "<string>",
              "address2": "<string>",
              "city": "<string>",
              "country": "<string>",
              "latitude": "<string>",
              "longitude": "<string>",
              "region": "<string>",
              "zip": "<string>",
              "timezone": "<string>"
            },
            "properties": {}
          },
          "id": "<string>",
          "meta": {
            "patch_properties": {
              "append": {},
              "unappend": {},
              "unset": "<string>"
            }
          }
        }
      },
      "time": "<dateTime>",
      "value": "<number>",
      "unique_id": "<string>"
    }
  }
}
klaviyo.Events.create_event(body)

in your case, you could substitute in the values you have for event, email, event_properties and customer_properties into the above. Some reminders:

separate the customer_properties into "custom_properties", which would go in attributes.properties, from the standard predefined customer properties, that go in attributes and attributes.location
if your event_properties uses the deprecated $value, make sure to move that to attributes.value (more broadly, we have moved away from the $<attribute>) in favor of the new predefined properties, which are optional
include email within attributes, as presumably, that's the identifier you'll be using. the predefined properties above are optional, with the exception of at least on identifier (email, phone_number, etc), so minimally, your payload could look like this:

body = {
  "data": {
    "type": "event",
    "attributes": {
      "properties": event_properties,
      "metric": {
        "data": {
          "type": "metric",
          "attributes": {
            "name": event_name,
          }
        }
      },
      "profile": {
        "data": {
          "type": "profile",
          "attributes": {
            "email": email,
            "properties": customer_properties
          },
        }
      },
      "value": event_properties.get('$value'),
      "unique_id": "<string>"
    }
  }
}

identify -> create_profile:

SDK function signature
payload structure

This is similar to the create_event call above, just with a simpler payload. As above, feel free to remove any of the optional predefined attributes:
body = {
	"data": {
		"type": "profile",
		"attributes": {
			"email": "<string>",
			"phone_number": "<string>",
			"external_id": "<string>",
			"first_name": "<string>",
			"last_name": "<string>",
			"organization": "<string>",
			"title": "<string>",
			"image": "<string>",
			"location": {
				"address1": "<string>",
				"address2": "<string>",
				"city": "<string>",
				"country": "<string>",
				"latitude": "<string>",
				"longitude": "<string>",
				"region": "<string>",
				"zip": "<string>",
				"timezone": "<string>"
			},
			"properties": {}
		}
	}
}

klaviyo.Profiles.create_profile(body)

If you have any other migration related questions, we have some resources on this page.
Though to your point, we definitely need to add some SDK-specific migration resources; I'll add that to our team's near-term roadmap.
Definitely reach out if you run into any further issues.
(also, i see you've been a GitHub user since the year it was founded, very cool)
Cheers,
Jon


AdminImageWidget compatible with Django 2.1

From the django 2.1 release notes:

Support for Widget.render() methods without the renderer argument is removed.

With Django 2.1 the current widget will raise this exception:

TypeError: render() got an unexpected keyword argument 'renderer'

Coverage remained the same at ?% when pulling 6bb12b4fe0e33a676750cf4f6853aa3fbd569a68 on haakenlid:patch-2 into 385468429b075433a09cf147891d9f0e2194e55f on jazzband:master.

Could you add a test?

Are there any tests for the admin widgets at all? I'm not familiar enough with the project to know where to add such a test.

Me neither, but it shouldn't be difficult to look or grep around.

I added a test.


Improve deck utility

What we're after: Bring the usability and functionality of dashboard.cloud.gov up to at least a level where people are using it and getting utility daily
Benefits

Novice cloud.gov users have a much easier time coming up to speed
Enabler for  showing live billing info in the deck

See Invision mock-ups.

This also has a docs component - we should figure out whether (and how) the cloud.gov docs should be "bilingual" (teaching both the CF CLI and our Dashboard, rather than just the CF CLI), and how best to maintain those docs as the Dashboard shifts rapidly.

I'd like us to adjust "What we're after", since measuring daily use of the Dashboard probably isn't the right core metric for this feature. A person might only need to do org/space/app management tasks occasionally, so measuring how often people use the Dashboard isn't a good measurement of how well it serves their needs. (Using the Dashboard less could even be a good sign - better training/docs might mean people would need to do less troubleshooting, fewer configuration changes, and fewer quota checks. :) )
I'd suggest something more like: Bring the usability and functionality of dashboard.cloud.gov up to a level that satisfies the web UI needs of both brand-new users and experienced (and short-on-time) org administrators.

I agree with @brittag . I also see usability and amount of people using the dashboard as separate metrics. We might have a completely different set of work to do to get more people using the dashboard (making it more known, adding more functionality) and it doesn't all necessarily have to do with usability.

Big usability themes for me right now are 1) navigation; 2) logs; and 3) actionability — but I'd like to get more info on current dashboard usage and needs.
The two big current use cases we've seen so far: 1) monitoring (checking the setup, getting a sense of normal activity); 2) troubleshooting. We may see additional use cases as we broaden the audience, and if we develop any ATO integration.
Dashboard probably also has a kind of sales and education component as well — as an onboarding/introduction to the platform and what it can do. It ties into a number of the PI7 features:

Guidance for getting ATO with cloud.gov #63
Proactive notice of new features and incidents #71
Streamline new user provisioning #77
Improve value-proposition communication #85
Activate our base of inquiries #67

That is, as we introduce new users to the system, one of the first places we'll point them is to the dashboard. Well, first maybe a better product page on the marketing site, then to the dashboard, then maybe to the docs and the CLI. The dashboard will likely have to do a bunch of heavy lifting at each stage in the customer lifecycle. It has to begin to fulfill the promise of the marketing side and provide a pathway to further, more advanced actions.

Per program-level meeting yesterday, considering this done for our PI planning purposes.


How about a fileRemoved event?

For use cases where we want to display the list of files currently in the list to be uploaded, having a fileRemoved event could centralize all the list update function (trigger the list update on filesSubmitted and fileRemoved event).
I got that functionality by adding "this.fire('fileRemoved', file);" to removeFile function.
P.S. If I want to contribute, which one do I actually contribute on (master? develop?)? I clicked on the "View our development branch" and the last commit was a year ago.

it think it's ok to have a file removed event or you can simply filter them not showing it. i've to think a little bit to what could be the benefits.
if you want to contribut you are right the master branch is the one to be kept as reference and probably the develop one does not contain anything of value.

In my case, I have a single UI list that displays the list of uploaded files and their state, plus interface "buttons" that allows start/resume, pause, cancel the files upload. In addition, there are potential external events that could cause files to the removed.
Now, I could have it as part of the wrapper around flow.js, but I want to add to the library for several reasons.

API symmetry: There's an event for when files are added to upload queue, but no equivalent event for when a file is removed from upload queue (off-side, perhaps a "fileRemoving" to allow user to cancel a file removal? Although that's a case I can't think of any use for).
Cleaner user code: Users of flow.js may have several external states that depends on the upload-queue of flow.js. Instead of having a wrapper code that specifically target all cases where a file could be removed (for example, invoking cancel() on individual FlowFile, invoking cancel() on Flow, adding file in singleFile mode), an event allow user to catch all instance of when a file leaves the upload queue.
I like this library, and I want to contribute.

I've a pull request created for this. #165

Pull request resubmitted with rebase #167

Issue resolved by #167 pull.


Feature/nostr.json

Tested on desktop/mobile, works well. Bug that was found previously (inability to save json, “not enough relays”) is not replicable now.

retested on prod, ok.


Eqaul function with excellent bundle size that supports only specific data types

Is your feature request related to a problem? Please describe. A clear and
concise description of what the problem is. Ex. I'm always frustrated when [...]

equalArrayBuffer,
equalDate,
equalError,
equalPrimitive,
equalURL,

:tada: This issue has been resolved in version 1.5.0-beta.1 :tada:
The release is available on:

npm package (@beta dist-tag)
GitHub release

Your semantic-release bot :package::rocket:

:tada: This issue has been resolved in version 1.5.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Set initial state dynamically at runtime anywhere in the hierarchy

Bug or feature request?
Feature, I think. (Or maybe a misunderstanding of the design of hierarchical states.)
Description:
For testing, I need to be able to set the initial state to any state within a deeply nested hierarchy as a shortcut to avoid having to replay a series of events to test a particular state.
const a = {
  "strict": true,
  "initial": "A",
  "states": {
    "A": {
      "states": {
        "C": {},
        "D": {}
      }
    },
    "B": {}
  }
};

For example, if I were testing events on the C state, in my test I'd like to be able to do something like:
test('testing C', () => {
  // Set-up
  const fsm = Machine(Object.assign({}, a, {initial: '.A.C'}));  // or `A.C` or `C`
  const current  = fsm.initialState;
  // Assertions…
});

(Bug) Expected result:
State({ A: 'C' })

(Bug) Actual result:
TypeError: Cannot read property 'resolvedStateValue' of undefined
    at e.get [as resolvedStateValue] (main.fba6c9ef.js:1)
    at e.get [as initialStateValue] (main.fba6c9ef.js:1)
    at e.get [as initialState] (main.fba6c9ef.js:1)
    at new App (main.fba6c9ef.js:1)
    at constructClassInstance (main.fba6c9ef.js:1)
    at beginWork (main.fba6c9ef.js:1)
    at i (main.fba6c9ef.js:1)
    at a (main.fba6c9ef.js:1)
    at s (main.fba6c9ef.js:1)
    at w (main.fba6c9ef.js:1)

Even if this is the correct behavior, I’d suggest the code could be a little more defensive and provide a better error message.
(Feature) Potential implementation:
I’d expect the initial property of a machine configuration to accept a fully qualified path to any state in the hierarchy. (Would this break encapsulation?) Or maybe there should be another parameter in the Machine factory function that allows you to set the initial state dynamically, independent of the static state configuration.
How are others isolating for testing?

@jmakeig It looks like that error may be because "A" does not have an "initial" property defined?
On a slightly unrelated note, it would be great to allow guards for initial states! For example, a dropdown component may accept an defaultOpen prop to open it by default. It would be great to dynamically change the initial state from "Closed" to "Open" in the statechart!

Argh. I think the problem is that I'm still trying to wrap my arms around the API and the fact that xstate is stateless. I think what I need is:

import {Machine, State} from 'xstate';

const a = {
  "strict": true,
  "initial": "A",
  "states": {
    "A": {
      "states": {
        "C": {
          on: { d: "D"}
        },
        "D": {}
      }
    },
    "B": {}
  }
};

test('testing C', () => {
  // Set-up
  const fsm = Machine(a);
  const c = new State({A: 'C'});
  // Assertions…
  const d = fsm.transition(c, 'd');
  expect(d).toEqual({ A: 'D' });
  // …
});

The docs hint that you’ll likely only need to construct synthetic State objects for testing, which is exactly what I needed above.
Note to self: The initial state is just a default transition. There’s nothing special about it. The first parameter of Machine.prototype.transition specifies the “starting point”. This has nothing to do with the initial state.


Checkbox onClick and onChange fire too late

Steps

Inject a Semantic-UI-React (SUIR) Checkbox as a child of an element with an onclick handler. Granted, this likely isn't a problem if your entire page is built with SUIR, but I do not have that luxury in my use case.
Add an onClick handler to the SUIR Checkbox that calls event.stopPropagation().

Expected Result
The parent element's onclick handler should not be called.
Actual Result
The parent element's onclick handler is called before the Checkbox's onClick.
Version
0.64.0
Testcase
https://codepen.io/anon/pen/dNZBrr

In further testing, I'm seeing some weird behavior with just React and simple HTML elements. React-mounted elements have their event capture and bubble after elements that start in the HTML. Is this expected? I'll take my issue over to the React project as well. Here is a new test case.

Mystery solved: this is due to React's choice to only support attaching listeners to the <html> element. I will have to use componentDidMount and addEventListener myself.

Bear in mind React is a JS implementation of the DOM, aka, the virtual DOM. The event system in React is not the event system that is in the browser. These are two different mechanisms with two different APIs firing at two different times
https://facebook.github.io/react/docs/events.html
https://facebook.github.io/react/docs/handling-events.html
A React app can be loaded on part of the page as well. However, React must own all DOM interaction including events and manipulation.

Fully aware of the virtual DOM, but only just learned React lets events escape and bubble through the page instead of scoping them to the virtual DOM. I would phrase it as "React assumes it owns all DOM interaction".


Manually inline functions.

Inlining the attribute checking / updating functions into elementOpen results in 10+% performance increase on my personal benchmarks. This is fairly unfortunate as the code should be easily able to be inlined by a compiler. While I know that Closure Compiler does do some inlining, it relies on heuristics and cannot be forced to inline (as far as I know). Even if it did inline and we did rely on that, it wouldn't solve the problem for those not using Closure.
I'm not aware of any JavaScript compiler that lets you mark something to be inlined. This is unfortunate since C, a language written 43 years ago let you do it with macros and C++, written 32 years ago let you do it with a simple keyword. While I can appreciate that in general, you don't want people randomly choosing what should be inlined and what shouldn't, in this case I know that it should and I should be able to tell a compiler that without having to literally move the code in line.
Not really intending to merge this at this point but more to get some ideas. This is going back to how this code was initially structured towards the beginning, but was separated out to be more readable.

LGTM

Ping John about forcing inline. The closure compiler will only automatically inline if it is good for code size, so either if the function is really tiny or it is only called once.

So closure currently doesn't inline .apply() at all and apparently what I am asking is much more complex than I had initially thought.

An alternative may be to copy into argsBuilder, pass it around to hasChangedAttrs and updateNewAttrs, then truncate it.

Didn't even think about that approach, I can try it to see how it works. I'm not sure if doing an array copy on every elementOpen is a good idea, but it might be ok.

Nope, don't do that. http://jsperf.com/apply-vs-collecting

Ok, alternative number 2: Apply only once. I did something similar in a previous commit of #63.
function elementOpen() {
  // ...
  var changed = changedAttributes.apply(node, arguments);
  if (changed) {
    updateChangedAttributes(node, changed);
  }
  // ...
}

function updateChangedAttributes(el, attributes) {
  var newAttrs = updateNewAttrs(el, attributes);

  for (var attr in newAttrs) {
    updateAttribute(el, attr, newAttrs[attr]);
  }
};


Orphan StringNames when closing project manager or empty project

Tested versions

Reproducible in 4.3.beta (5f1184e93fe1021c86520460dc0a6619bff3c1fb) and 4.3.beta1 (174 orphans)
Partially reproducible in 4.3.dev4  and 4.3.dev5 (3 orphans)
Partially reproducible in 4.3.dev6 (9 orphans)

System information
Fedora Linux 40 (KDE Plasma) - Wayland - Vulkan (Forward+) - dedicated AMD Radeon RX 7600M XT (RADV NAVI33) () - AMD Ryzen 7 7840HS w/ Radeon 780M Graphics (16 Threads)
Issue description
When closing the project manager or the editor with --verbose mode, I get 174 orphan StringNames reported:
Orphan StringName: greaterThanEqual (static: 0, total: 1)
Orphan StringName: packSnorm4x8 (static: 0, total: 1)
Orphan StringName: textureGrad (static: 0, total: 1)
Orphan StringName: uaddCarry (static: 0, total: 1)
Orphan StringName: InputMap (static: 1, total: 3)
Orphan StringName: frexp (static: 0, total: 1)
Orphan StringName: uint (static: 0, total: 1)
Orphan StringName: bitfieldInsert (static: 0, total: 1)
Orphan StringName: GDExtensionManager (static: 1, total: 3)
Orphan StringName: packSnorm2x16 (static: 0, total: 1)
Orphan StringName: sqrt (static: 0, total: 1)
Orphan StringName: normalize (static: 0, total: 1)
Orphan StringName: notEqual (static: 0, total: 1)
Orphan StringName: usubBorrow (static: 0, total: 1)
Orphan StringName: ceil (static: 0, total: 1)
Orphan StringName: TextServerManager (static: 1, total: 4)
Orphan StringName: step (static: 0, total: 1)
Orphan StringName: dFdx (static: 0, total: 1)
Orphan StringName: dFdy (static: 0, total: 1)
Orphan StringName: asinh (static: 0, total: 1)
Orphan StringName: findLSB (static: 0, total: 1)
Orphan StringName: lessThan (static: 0, total: 1)
Orphan StringName: findMSB (static: 0, total: 1)
Orphan StringName: texelFetch (static: 0, total: 1)
Orphan StringName: log2 (static: 0, total: 1)
Orphan StringName: WorkerThreadPool (static: 1, total: 3)
Orphan StringName: ThemeDB (static: 1, total: 3)
Orphan StringName: imulExtended (static: 0, total: 1)
Orphan StringName: asin (static: 0, total: 1)
Orphan StringName: textureQueryLod (static: 0, total: 1)
Orphan StringName: Input (static: 1, total: 3)
Orphan StringName: atan (static: 0, total: 1)
Orphan StringName: smoothstep (static: 0, total: 1)
Orphan StringName: PhysicsServer3DManager (static: 1, total: 4)
Orphan StringName: cosh (static: 0, total: 1)
Orphan StringName: PhysicsServer2D (static: 1, total: 4)
Orphan StringName: PhysicsServer3D (static: 1, total: 4)
Orphan StringName: ResourceLoader (static: 1, total: 3)
Orphan StringName: texture (static: 0, total: 1)
Orphan StringName: floatBitsToInt (static: 0, total: 1)
Orphan StringName: XRServer (static: 1, total: 4)
Orphan StringName: AudioServer (static: 1, total: 4)
Orphan StringName: unpackUnorm4x8 (static: 0, total: 1)
Orphan StringName: ResourceUID (static: 1, total: 3)
Orphan StringName: faceforward (static: 0, total: 1)
Orphan StringName: tanh (static: 0, total: 1)
Orphan StringName: transpose (static: 0, total: 1)
Orphan StringName: abs (static: 0, total: 1)
Orphan StringName: all (static: 0, total: 1)
Orphan StringName: clamp (static: 0, total: 1)
Orphan StringName: any (static: 0, total: 1)
Orphan StringName: bitCount (static: 0, total: 1)
Orphan StringName: cos (static: 0, total: 1)
Orphan StringName: lessThanEqual (static: 0, total: 1)
Orphan StringName: reflect (static: 0, total: 1)
Orphan StringName: RenderingServer (static: 1, total: 4)
Orphan StringName: dot (static: 0, total: 1)
Orphan StringName: EditorFileDialog (static: 1, total: 8)
Orphan StringName: determinant (static: 0, total: 1)
Orphan StringName: exp (static: 0, total: 1)
Orphan StringName: fwidthCoarse (static: 0, total: 1)
Orphan StringName: NavigationServer2D (static: 0, total: 3)
Orphan StringName: NavigationServer3D (static: 1, total: 4)
Orphan StringName: CameraServer (static: 1, total: 4)
Orphan StringName: AudioStream (static: 0, total: 1)
Orphan StringName: textureSize (static: 0, total: 1)
Orphan StringName: fma (static: 0, total: 1)
Orphan StringName: IP (static: 0, total: 3)
Orphan StringName: OS (static: 1, total: 3)
Orphan StringName: ItemList (static: 1, total: 10)
Orphan StringName: intBitsToFloat (static: 0, total: 1)
Orphan StringName: acosh (static: 0, total: 1)
Orphan StringName: degrees (static: 0, total: 1)
Orphan StringName: EditorInterface (static: 1, total: 3)
Orphan StringName: ivec2 (static: 0, total: 1)
Orphan StringName: ivec3 (static: 0, total: 1)
Orphan StringName: ivec4 (static: 0, total: 1)
Orphan StringName: bitfieldExtract (static: 0, total: 1)
Orphan StringName: DisplayServer (static: 1, total: 4)
Orphan StringName: Marshalls (static: 1, total: 3)
Orphan StringName: vec2 (static: 0, total: 1)
Orphan StringName: vec3 (static: 0, total: 1)
Orphan StringName: vec4 (static: 0, total: 1)
Orphan StringName: exp2 (static: 0, total: 1)
Orphan StringName: dFdxCoarse (static: 0, total: 1)
Orphan StringName: int (static: 0, total: 1)
Orphan StringName: mat2 (static: 0, total: 1)
Orphan StringName: mat3 (static: 0, total: 1)
Orphan StringName: mat4 (static: 0, total: 1)
Orphan StringName: unpackHalf2x16 (static: 0, total: 1)
Orphan StringName: TabBar (static: 1, total: 10)
Orphan StringName: textureProjLod (static: 0, total: 1)
Orphan StringName: inversesqrt (static: 0, total: 1)
Orphan StringName: log (static: 0, total: 1)
Orphan StringName: Geometry2D (static: 1, total: 3)
Orphan StringName: Geometry3D (static: 1, total: 3)
Orphan StringName: textureGather (static: 0, total: 1)
Orphan StringName: max (static: 0, total: 1)
Orphan StringName: atanh (static: 0, total: 1)
Orphan StringName: min (static: 0, total: 1)
Orphan StringName: mix (static: 0, total: 1)
Orphan StringName: mod (static: 0, total: 1)
Orphan StringName: FileDialog (static: 1, total: 8)
Orphan StringName: not (static: 0, total: 1)
Orphan StringName: umulExtended (static: 0, total: 1)
Orphan StringName: AudioStreamRandomizer (static: 0, total: 5)
Orphan StringName: dFdxFine (static: 0, total: 1)
Orphan StringName: MenuButton (static: 1, total: 2)
Orphan StringName: trunc (static: 0, total: 1)
Orphan StringName: pow (static: 0, total: 1)
Orphan StringName: inverse (static: 0, total: 1)
Orphan StringName: equal (static: 0, total: 1)
Orphan StringName: unpackSnorm4x8 (static: 0, total: 1)
Orphan StringName: uvec2 (static: 0, total: 1)
Orphan StringName: uvec3 (static: 0, total: 1)
Orphan StringName: uvec4 (static: 0, total: 1)
Orphan StringName: refract (static: 0, total: 1)
Orphan StringName: NativeMenu (static: 1, total: 4)
Orphan StringName: sin (static: 0, total: 1)
Orphan StringName: packUnorm4x8 (static: 0, total: 1)
Orphan StringName: OptionButton (static: 1, total: 12)
Orphan StringName: tan (static: 0, total: 1)
Orphan StringName: ResourceSaver (static: 1, total: 3)
Orphan StringName: dFdyFine (static: 0, total: 1)
Orphan StringName: bool (static: 0, total: 1)
Orphan StringName: textureProjGrad (static: 0, total: 1)
Orphan StringName: unpackUnorm2x16 (static: 0, total: 1)
Orphan StringName: textureLod (static: 0, total: 1)
Orphan StringName: modf (static: 0, total: 1)
Orphan StringName: dFdyCoarse (static: 0, total: 1)
Orphan StringName: ProjectSettings (static: 1, total: 3)
Orphan StringName: floatBitsToUint (static: 0, total: 1)
Orphan StringName: Performance (static: 1, total: 3)
Orphan StringName: outerProduct (static: 0, total: 1)
Orphan StringName: Engine (static: 1, total: 3)
Orphan StringName: round (static: 0, total: 1)
Orphan StringName: distance (static: 0, total: 1)
Orphan StringName: PhysicsServer2DManager (static: 1, total: 4)
Orphan StringName: textureQueryLevels (static: 0, total: 1)
Orphan StringName: roundEven (static: 0, total: 1)
Orphan StringName: bvec2 (static: 0, total: 1)
Orphan StringName: bvec3 (static: 0, total: 1)
Orphan StringName: bvec4 (static: 0, total: 1)
Orphan StringName: fwidthFine (static: 0, total: 1)
Orphan StringName: unpackSnorm2x16 (static: 0, total: 1)
Orphan StringName: JavaClassWrapper (static: 1, total: 3)
Orphan StringName: uintBitsToFloat (static: 0, total: 1)
Orphan StringName: float (static: 0, total: 1)
Orphan StringName: radians (static: 0, total: 1)
Orphan StringName: JavaScriptBridge (static: 1, total: 3)
Orphan StringName: floor (static: 0, total: 1)
Orphan StringName: packHalf2x16 (static: 0, total: 1)
Orphan StringName: greaterThan (static: 0, total: 1)
Orphan StringName: cross (static: 0, total: 1)
Orphan StringName: fwidth (static: 0, total: 1)
Orphan StringName: bitfieldReverse (static: 0, total: 1)
Orphan StringName: Texture2D (static: 0, total: 5)
Orphan StringName: isinf (static: 0, total: 1)
Orphan StringName: ldexp (static: 0, total: 1)
Orphan StringName: NavigationMeshGenerator (static: 1, total: 3)
Orphan StringName: length (static: 0, total: 1)
Orphan StringName: sign (static: 0, total: 1)
Orphan StringName: sinh (static: 0, total: 1)
Orphan StringName: Time (static: 1, total: 3)
Orphan StringName: packUnorm2x16 (static: 0, total: 1)
Orphan StringName: matrixCompMult (static: 0, total: 1)
Orphan StringName: fract (static: 0, total: 1)
Orphan StringName: ClassDB (static: 1, total: 3)
Orphan StringName: textureProj (static: 0, total: 1)
Orphan StringName: acos (static: 0, total: 1)
Orphan StringName: EngineDebugger (static: 1, total: 3)
Orphan StringName: TranslationServer (static: 1, total: 3)
Orphan StringName: PopupMenu (static: 1, total: 16)
Orphan StringName: isnan (static: 0, total: 1)
StringName: 174 unclaimed string names at exit.

Most of this seems to have been introduced between dev 6 and beta 1.
In previous snapshots, there's a subset of those that were reported:
In 4.3.dev6:
Orphan StringName: EditorFileDialog (static: 1, total: 7)
Orphan StringName: AudioStream (static: 0, total: 1)
Orphan StringName: ItemList (static: 1, total: 9)
Orphan StringName: TabBar (static: 1, total: 9)
Orphan StringName: FileDialog (static: 1, total: 7)
Orphan StringName: AudioStreamRandomizer (static: 0, total: 4)
Orphan StringName: OptionButton (static: 1, total: 11)
Orphan StringName: Texture2D (static: 0, total: 5)
Orphan StringName: PopupMenu (static: 1, total: 15)
StringName: 9 unclaimed string names at exit.

And in 4.3.dev4 / 4.3.dev5:
Orphan StringName: ItemList (static: 1, total: 9)
Orphan StringName: Texture2D (static: 0, total: 2)
Orphan StringName: PopupMenu (static: 1, total: 15)
StringName: 3 unclaimed string names at exit.

Steps to reproduce

godot -v, close it and check terminal

Minimal reproduction project (MRP)
n/a

I bisected the dev4 regression to #88162, CC @KoBeWi.
The dev6 regression is from #88306, which adds more PropertyListHelper uses.
Now bisecting the beta1 part.

Sounds like another case of "leaks" reported as leaks, because they get freed too late. Each class that uses PropertyListHelper has a static instance which gets freed only once the program fully exits, which is likely after the leak detector. The only solution would be manually freeing static helpers, not sure where though.

Now bisecting the beta1 part.

Some of the beta1 "leaks" seem to be Engine singletons, I suspect this was caused by #92060, CC @raulsntos.
The last chunk of "leaks" seems to come from #92564, CC @Chaosus.

This one exist since dev1 build:

If someone wants to help to hunt this bug down to close this issue. It's related with editor nodes since it doesn't happen at exit of Project Manager.

@Chaosus @KoBeWi I solved this problem but I'm using a 4.3.dev version that is before the merge that solved the other orphan StringNames, for the other StringNames the issue was on PropertyInfo class_name, so I changed it to a String instead of StringName and it solved, I believe it was happening whenever a class used a static PropertyListHelper to register properties. For the remaining orphan StringName (Node) the problem comes from the following places:
// editor/editor_node.cpp  line 4570;
ClassDB::is_parent_class(p_class, SNAME("Node"))

// edior/scene_create_dialog.cpp line 55:
node_type_other->add_theme_icon_override(SNAME("icon"), get_editor_theme_icon(SNAME("Node")));

// editor/scene_tree_dock.cpp -> line 1506:
filter_menu->set_item_icon(filter_menu->get_item_index(FILTER_BY_TYPE), get_editor_theme_icon(SNAME("Node")));

// modules/multiplayer/editor/editor_network_profiler.cpp line 66:
theme_cache.node_icon = get_theme_icon(SNAME("Node"), EditorStringName(EditorIcons));

// editor/create_dialog.cpp line 505:
String text = help_bit->get_class_description(p_type);

for the places using SNAME, removing SNAME solves the issue (but not sure if it's a good solution), for the create_dialog.cpp line 505 situation I believe is happening because the StringName is placed on a static HashMap and the map is not cleaned, but I still haven't tried to solve yet...
I think the problem happens whenever StringName is initialized using static because it lives longer then the StringName::cleanup function call point (as it was suggested on @KoBeWi reply), but I still don't understand why it happens on the places using SNAME since there are several other places that also use SNAME and don't have a problem, the only explanation that makes sense to me now is that on this specific cases the StringName is also used somewhere else so it is referenced one extra time and because it is static as a byproduct of the SNAME macro the extra reference is not dereferenced correctly, does anyone know what is going on? Also, how does SNAME (static StringName) gets automatically dereferenced/deleted on other situations? Is it because of the SafeNumeric functionality? Would appreciate any insights or direction on resources to learn more about this... I'm going to spend more time trying to figure it out as well and maybe post here once more if I think I figured it out.

I understand what is happening now, the problem is that the engine never cleans static StringNames, the reason why only those instances trigger the warning message is because of the condition:
if (d->static_count.get() != d->refcount.get())

and the situation that triggers the warning is the only one where there is a difference between refcount and static_count, by cleaning up the static HashMap on the situation where the StringName is not static the warning goes away:
~EditorHelpBit() {
    doc_class_cache.clear();
};

but this still doesn't clean the static StringNames, so I'm not sure about a good solution yet but one I'm trying to implement is to have a static Vector that keeps a pointer to all static StringNames, then loop over the vector and call unref on all of them before the logic that cleans the Data on the _table and displays the message, then change the condition to just check for:
if (d->refcount.get()) {
...
}

instead


missing argument 'active' in update_cache

Hi, I got  the error
File "betfairlightweight/streaming/cache.py", line 585, in update_cache
TypeError: update() missing 1 required positional argument: 'active'
after upgrading bflw to v2.15.1.
I believe self.active should be an argument in line 585 and 587. I will try to create a pull request.

Yes you are correct, missed this as I don't use mb/ml


MSID: 97894 Version: 1 DOI: 10.1101/2<IP_ADDRESS>6455

MSID: 97894
Version: 1
Preprint DOI: https://doi.org/10.1101/2<IP_ADDRESS>6455
Step 1. Awaiting reviews
Editorial to post reviews via hypothesis
Useful links:

DocMap: https://data-hub-api.elifesciences.org/enhanced-preprints/docmaps/v2/by-publisher/elife/get-by-manuscript-id?manuscript_id=97894
New model tracking: https://docs.google.com/spreadsheets/d/1_fHaoOy7hjyocptKtVJRijeNpUY4hBS7Ck_aVmx6ZJk/
Reviews on sciety: https://sciety.org/articles/activity/10.1101/2<IP_ADDRESS>6455

For trouble shooting (e.g. no Docmaps available):

DocMap issue addressing: https://miro.com/app/board/uXjVNCwK6EI=/
Explore DataHub DocMaps API: https://lookerstudio.google.com/reporting/4c2f0368-babb-4beb-b5b3-497e7e7b0f08/page/ejphD
Unmatched submissions and preprints: https://lookerstudio.google.com/u/0/reporting/9f86204f-3bf7-477c-9b18-5c5ef141bf69/page/p_gxi57ha93c
Unmatched manuscripts spreadsheet: https://docs.google.com/spreadsheets/d/15QcK8w-ssB7109RQEDtFpJPZ0J5HTGxoHa_2TtpMBbg/edit#gid=1336081641

Step 2. Preview reviewed preprint
Production QC content ahead of publication
Instructions:

QC preview: https://prod--epp.elifesciences.org/previews/97894v1
Update ticket with any problems (add blocked label)
When QC OK, add QC OK label to ticket and add publication date and time to https://docs.google.com/spreadsheets/d/1amAlKvdLcaDp5W8Z8g77NmkwbMF5n_u89ArSqPMO8jg
Move card to next column
(At end of the day post link in #enhanced-preprint and ask for PDF to be generated)

Useful links:

Preprint DOI :  https://doi.org/10.1101/2<IP_ADDRESS>6455
Confirm reviews returned by EPP: https://prod--epp.elifesciences.org/api/reviewed-preprints/97894/v1/reviews
To update the MECA path in the docmap: https://docs.google.com/spreadsheets/d/1mctCQuNFBjSn97Lihy7_vBO6z7-N-oqyLv4clyi6zHg

Step 3: Awaiting search reindex
This step adds the reviewed preprint to the homepage: https://elifesciences.org
The search reindex is triggered once an hour. We need the reviewed preprint to be indexed as the search application serves the journal homepage.
Useful links:

Jenkins pipeline to reindex search can be triggered sooner or monitored here: https://alfred.elifesciences.org/job/process/job/process-reindex-reviewed-preprints/

Step 4: Published! PDF requested
Waiting for PDF to be generated
Useful links:

PDF tracking: https://docs.google.com/spreadsheets/d/106_XeDjmuBae7gexOTNzg60lapeqjl2aRn9DzupGyS8/

Step 5: Introduce PDF to data folder and git repo
Upload PDF to relevent folder in git repo https://github.com/elifesciences/enhanced-preprints-data/
Step 6: Done!

[ ] Kettle is on!

error: [journal-ref-article-title] This journal reference (id c14) has no article-title element.
error: [journal-ref-article-title] This journal reference (id c18) has no article-title element.
error: [journal-ref-article-title] This journal reference (id c25) has no article-title element.
error: [journal-ref-article-title] This journal reference (id c26) has no article-title element.
warn: [journal-ref-text-content] This journal reference (id c27) has untagged textual content - , Retrieved from . Is it tagged correctly?
error: [journal-ref-article-title] This journal reference (id c28) has no article-title element.
error: [journal-ref-article-title] This journal reference (id c33) has no article-title element.
error: [journal-ref-article-title] This journal reference (id c37) has no article-title element.
error: [journal-ref-article-title] This journal reference (id c38) has no article-title element.
error: [journal-ref-article-title] This journal reference (id c39) has no article-title element.
error: [ref-doi-conformance]  in reference (id=c48) does not contain a valid DOI: '10.1002/(SICI)1096-9861(19961223)376:4⟨614::AID-CNE9⟩3.0.CO;2-4'.
warn: [mixed-citation-other-publication-flag] mixed-citation in reference (id=c30) has a publication-type='other'. Is that correct?
warn: [mixed-citation-other-publication-flag] mixed-citation in reference (id=c41) has a publication-type='other'. Is that correct?
warn: [mixed-citation-other-publication-flag] mixed-citation in reference (id=c50) has a publication-type='other'. Is that correct?
error: [body-footnote] This preprint has footnotes appended to the content. EPP cannot render these, so they need adding to the text.
warn: [empty-parentheses-presence] p element contains empty parentheses ('[]', or '()'). Is there a missing citation within the parentheses? Or perhaps this is a piece of code that needs formatting?

@rkcook312, I think this one was edited yesterday (perhaps the Sciety page was still cached yesterday) and if you re-pull, it should be resolved.

Thanks @fred-atherden, re-pulled and fixed now, cheers!


fix: fix html public check

Description
I don't think we should verify the public File in html, but it gave me a hint in my startup.

Additional context
Failed to load url /config.js (resolved id: /config.js). This file is in /public and will be copied as-is during build without going through the plugin transforms, and therefore should not be imported from source code. It can only be referenced via HTML tags.

What is the purpose of this pull request?

[ ] Bug fix
[ ] New Feature
[ ] Documentation update
[x] Other

Before submitting the PR, please make sure you do the following

[x] Read the Contributing Guidelines.
[x] Read the Pull Request Guidelines and follow the PR Title Convention.
[x] Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
[x] Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
[x] Ideally, include relevant tests that fail without this PR but pass with it.

I encountered this bug（my version "vite": "^4.3.9"）
Which version fixed the bug

This doesn't look like a bug to me @nanhaishiyounan, and it was a PR that was sent and later closed without being merged and without a linked issue. If you found a bug, please create a minimal reproduction and send a new bug report with more context of why this is a problem to you.


Detect controller hotplugging

It would be nice to be able to listen for controller (joystick) connect and disconnect events so a user could add a controller and jump in during the middle of a game.
If that is not possible, maybe an API to scan for controller changes manually.

Hi, there. For now (1.5.3 libGdx version), it seems that the libGdx controller for desktop extension has not been rewritten yet. But it is easy to walk around this problem by using reflection. You just have to use relfection to reinstantiate the com.badlogic.gdx.controllers.desktop.DesktopControllerManager class in your app manager.
Here is a method you can use in your Game to reload controllers.
private Array<Controller> reloadControllers(){
	String controllersClassName = "com.badlogic.gdx.controllers.Controllers";
	try {
		//very hacky and dirty method to update controllers
		Class controllersClass = Class.forName(controllersClassName);
		Field managersField = controllersClass.getDeclaredField("managers");
		managersField.setAccessible(true);
		ObjectMap<Application, ControllerManager> managers = (ObjectMap<Application, ControllerManager>) managersField.get(null);
		managersField.setAccessible(false);
		String desktopControllerManagerClassName = "com.badlogic.gdx.controllers.desktop.DesktopControllerManager";
		managers.put(Gdx.app, (ControllerManager) Class.forName(desktopControllerManagerClassName).newInstance());

	} catch (ClassNotFoundException ex) {
		Logger.getLogger(Gamepad.class.getName()).log(Level.SEVERE, null, ex);
	} catch (NoSuchFieldException ex) {
		Logger.getLogger(Gamepad.class.getName()).log(Level.SEVERE, null, ex);
	} catch (SecurityException ex) {
		Logger.getLogger(Gamepad.class.getName()).log(Level.SEVERE, null, ex);
	} catch (IllegalArgumentException ex) {
		Logger.getLogger(Gamepad.class.getName()).log(Level.SEVERE, null, ex);
	} catch (IllegalAccessException ex) {
		Logger.getLogger(Gamepad.class.getName()).log(Level.SEVERE, null, ex);
	} catch (InstantiationException ex) {
		Logger.getLogger(Gamepad.class.getName()).log(Level.SEVERE, null, ex);
	}
	return Controllers.getControllers();
}

This is of course very dirty, but you're not supposed to invoke this method each time the render method is called (you better not!). Use a Timer for this :
@Override
public void create () {
        //... just add this at the end of your create method for instance
	if(Gdx.app.getType() == Application.ApplicationType.Desktop){
		Timer.schedule(new Timer.Task() {

			@Override
			public void run() {
				reloadControllers();
			}
		}, 0.5f, 0.5f);
	}
}

Would love this functionality. Want to avoid hacks that have been mentioned previously.

Same here. Listening for controller connects/disconnects without doing anything similar to the above would be great.

This has been fixed in the new LWJGL 3 backend.

Can you explain how to get this working?
The connect() and disconnect() methods are not firing on desktop and I have the most recent version of libgdx.

You have to put the '1.7.3-SNAPSHOT' as gdxVersion in your build.gradle file. Then reload the project. In your DesktopLauncher class, you have to replace the regular LwjglApplicationConfiguration and LwjglApplication classes by the new Lwjgl3ApplicationConfiguration and Lwjgl3Application classes. The name of the controller manager is also different : Lwjgl3ControllerManager.
It's worth noting that you can't add listeners directly to your controllers. You'll have to add your listeners directly to an instance of Lwjgl3ControllerManager (and you'll have to declare the instance).
Lwjgl3ControllerManager manager = new Lwjgl3ControllerManager();
manager.addListener(myListener);

Thanks, tired the dirty way, but lets see how this works

hmm still got an Error.
Chanced to '1.7.3.....' reloaded, took a small bit of time and had to reimport things but no problem,
but Eclipse still cant find class Lwjgl3ApplicationConfiguration

Okay, my mistake. I forgot to mention some other modifcations in the build.gradle file (I edited my previous post)

But the current GDX version is 1.9.0. How is it that I have to load 1.7.3-SNAPSHOT to get it working?

I followed the instructions from here: https://github.com/libgdx/libgdx/wiki/Controllers

Simply check the "Controllers" checkbox in the gdx-setup app. For LWJGL 3, replace the dependency to gdx-controllers-desktop with gdx-controllers-lwjgl3 and remove the compile "com.badlogicgames.gdx:gdx-controllers-platform:$gdxVersion:natives-desktop" dependency in your desktop project.
It seems to load LWJGL3 just for the controller (which is better than loading it for the whole project), but I get an exception "Error creating controller manager: com.badlogic.gdx.controllers.desktop.DesktopControllerManager"
I did also test doing the changes you mentioned before, and I get the same problem. I would rather not change the whole project to LWJGL3 because it doesn't have the ability to set the window's icon.

You will have to use the LWJGL 3 backend in connection with the LWJGL 3
controller backend.
On Jan 30, 2016 4:28 AM, "Alexander"<EMAIL_ADDRESS>wrote:

I followed the instructions from here:
https://github.com/libgdx/libgdx/wiki/Controllers
Simply check the "Controllers" checkbox in the gdx-setup app. For LWJGL 3,
replace the dependency to gdx-controllers-desktop with
gdx-controllers-lwjgl3 and remove the compile
"com.badlogicgames.gdx:gdx-controllers-platform:$gdxVersion:natives-desktop"
dependency in your desktop project.
It seems to load LWJGL3 just for the controller (which is better than
loading it for the whole project), but I get an exception "Error creating
controller manager:
com.badlogic.gdx.controllers.desktop.DesktopControllerManager"
I did also test doing the changes you mentioned before, and I get the same
problem. I would rather not change the whole project to LWJGL3 because it
doesn't have the ability to set the window's icon.
—
Reply to this email directly or view it on GitHub
https://github.com/libgdx/libgdx/issues/2182#issuecomment-177057469.

I've tested using LWJGL3 for both the backend and the controller, the program runs now, but the disconnect() method still does not get called when I unplug the controller.
These are the dependencies I'm using for desktop. I've tried both 1.9.0 and 1.7.3-SNAPSHOT for the $gdxVersion.
    dependencies {
        compile project(":core")
        compile "com.badlogicgames.gdx:gdx-backend-lwjgl3:$gdxVersion"
        compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop"
        compile "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-desktop"
        compile "com.badlogicgames.gdx:gdx-tools:$gdxVersion"
        compile "com.badlogicgames.gdx:gdx-controllers-lwjgl3:$gdxVersion"
    }

What OS?
On Jan 30, 2016 11:05 PM, "Alexander"<EMAIL_ADDRESS>wrote:

I've tested using LWJGL3 for both the backend and the controller, the
program runs now, but the disconnect() method still does not get called
when I unplug the controller.
These are the dependencies I'm using for desktop. I've tried both 1.9.0
and 1.7.3-SNAPSHOT for the $gdxVersion.
dependencies {
    compile project(":core")
    compile "com.badlogicgames.gdx:gdx-backend-lwjgl3:$gdxVersion"
    compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop"
    compile "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-desktop"
    compile "com.badlogicgames.gdx:gdx-tools:$gdxVersion"
    compile "com.badlogicgames.gdx:gdx-controllers-lwjgl3:$gdxVersion"
}

—
Reply to this email directly or view it on GitHub
https://github.com/libgdx/libgdx/issues/2182#issuecomment-177316821.

The device is using Windows 8.1

@the-coding-fox Is this still an issue?

As far as i know, lwjgl3 backend has not become the default implementation of lwjgl of libgdx yet (1.9.3 version). You still have to adapt your dependencies to make hotplugging work. I guess the issue will be quiet fixed when lwjgl3 will be default (and stable) and hotplugging working out of the box !

So how can I get the lwjgl3 backend working for my libGDX project? I'm on version 1.9.3. I've tried changing the gradle build to include the lwjgl3 under desktop dependencies, but the controller api still fails to recognize that I have the lwjgl3 backend.

@fatalcubez Have you done everything here to enable lwjgl3: https://github.com/libgdx/libgdx/issues/3673
You also need to replace gdx-controllers-desktop with
gdx-controllers-lwjgl3 and remove the
compile "com.badlogicgames.gdx:gdx-controllers-platform:$gdxVersion:natives-desktop"
dependency in your desktop project.

So I set everything up, but now I'm getting this exception:

Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\Users\Scott\AppData\Local\Temp\libgdxScott\68069333\lwjgl.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary1(ClassLoader.java:1965)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1890)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1851)
at java.lang.Runtime.load0(Runtime.java:795)
at java.lang.System.load(System.java:1062)
at org.lwjgl.system.Library$1.load(Library.java:25)
at org.lwjgl.system.Library$1.load(Library.java:22)
at org.lwjgl.system.Library.loadLibrary(Library.java:196)
at org.lwjgl.system.Library.loadSystem(Library.java:90)
at org.lwjgl.system.Library.(Library.java:48)
at org.lwjgl.system.MemoryUtil.(MemoryUtil.java:56)
at org.lwjgl.system.libffi.Closure.(Closure.java:57)
at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.initializeGlfw(Lwjgl3Application.java:66)
at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.(Lwjgl3Application.java:75)
at com.fullspectrum.game.desktop.DesktopLauncher.main(DesktopLauncher.java:26)

From what I've read about people who are having a similar issue but with different library dll files, the suggestion to change the JVM to be 32-bit. However, I was wondering if there is a fix for this so I can keep everything 64-bit. Thanks!

For anyone who is wondering, it turns out that if you have the new lwjgl3 as well as the old lwjgl versions then you'll get this error. The source of my problem was that I was using gdx-tools which relies on the older lwjgl versions. Once I got rid of that in the gradle build and refreshed my project, the old lwjgl jars went away and the program ran without problem.


Add deployment strategy customization

Doesn't directly fix #177, but allows users to fix #177 themselves.

Thank you @devnev !


Adding Async/Promise and Callback Wrappers

People cann still have an easier option of keeping the storage calls async and this would make migration from other libraries much easier:
e.g.
MMKV.setAsync("key", "value")
.then(function() {});

MMKV.getStringAsync("key")
.then(function(value) {});
// OR
let value = await MMKV.getStringAsync("key")

Hi! I have migrated two projects from AsyncStorage to MMKV now, and I was also thinking about this.
I'm not doing it for the following reasons:

It does not make sense to have that in the library. If you want to call it that way, you can create a wrapper for the library in your project.
It took me less than 4 hours for 2 quite big projects, so it isn't that difficult. I've had the help of TSC and ESLint telling me about every error (with the "no non-promise like await" rule), so that was a huge help.

Thanks!


Fix GetPost dateString parsing

I created a post and tried to navigate to it but was greeted with "Post not found".
I noticed this while debugging in the Immediate Window:
theDate
{12/17/2024 12:00:00 AM +02:00}
    Date: {12/17/2024 12:00:00 AM}
    DateTime: {12/17/2024 12:00:00 AM}
    Day: 17
    DayOfWeek: Tuesday
    DayOfYear: 352
    Hour: 0
    LocalDateTime: {12/17/2024 12:00:00 AM}
    Microsecond: 0
    Millisecond: 0
    Minute: 0
    Month: 12
    Nanosecond: 0
    Offset: {02:00:00}
    Second: 0
    Ticks:<PHONE_NUMBER>00000000
    TimeOfDay: {00:00:00}
    TotalOffsetMinutes: 120
    UtcDateTime: {12/16/2024 10:00:00 PM}
    UtcTicks:<PHONE_NUMBER>00000000
    Year: 2024
theDate.UtcDateTime.Date
{12/16/2024 12:00:00 AM}
    Date: {12/16/2024 12:00:00 AM}
    Day: 16
    DayOfWeek: Monday
    DayOfYear: 351
    Hour: 0
    Kind: Utc
    Microsecond: 0
    Millisecond: 0
    Minute: 0
    Month: 12
    Nanosecond: 0
    Second: 0
    Ticks:<PHONE_NUMBER>00000000
    TimeOfDay: {00:00:00}
    Year: 2024

The time zone seems to roll the UTC date to the previous day.
My fix seems to resolve it for me but if there is a better fix, feel free to reject the PR.

Thanks for catching this issue!


A file that contains only one number

Describe the bug
Norminette is wrong when file that contains only one number.
Erroneous code

I am trying to check file.c which contains only number without trailing newline:

echo -n "12345" > file.c
norminette file.c

And got norminette's response:
0
file.c: OK!

If I run norminette with -dd flag:

norminette -dd file.c

There is the result:
2
uncaught -> [<CONSTANT=12345>]
file.c: OK!

Additional infos

OS: Linux Mint 20.3
python --version: Python 3.8.10
norminette -v: norminette 3.3.51

Additional context
In the first case, I get the number 0 and the inscription that the file is OK. In the second case, the number 2 appears, followed by OK.
I think the file in this case should not correspond to the norminette, especially uninformative output such as 0 and 2.

Hello, The file must compile. A file that doesn’t compile isn’t expected to pass the Norm.


The behavior of returning a value of a type containing an explicit padding field from C into Rust might be undefined

libc uses integers and aggregates of integers for explicit padding byte fields. When these fields are returned from C, they might be uninitialized. We currently do not have any wording in the spec saying that an uninitialized integer is not instant undefined behavior, and there are proposals that define them to both be ok, and to actually be instant undefined behavior.
These padding fields should use MaybeUninit<INT> instead.
The right way to actually fix this issue is to actually remove these padding fields. They only exist because repr(align(N)), repr(packed(N)), unions, etc. did not exist when these types were added. For toolchains that actually support MaybeUninit, we can actually do better and don't use any kind of padding fields at all. For toolchains that do not support repr(align(N)), repr(packed(N)), unions, etc. MaybeUninit does not exist and cannot be actually implemented in Rust, so there is nothing we can do.
For C types using FAM, there is no way to avoid undefined behavior in Rust today, so we have to use explicit padding fields.
Removing these fields or changing their type are major breaking changes when these fields are public. Most of these fields are private, but some of them aren't.
Rust currently does not exploit this potential undefined behavior for anything, and for most targets, it cannot actually exploit it since the C library is dynamically linked or linked without cross-lang-lto. If we start using cross-lang-lto, e.g., when statically-linking musl, this could become an issue in the future.

cc @emilio - I think rust-bindgen probably has the same issues when it comes to automatically-generated explicit padding fields. The constraints of fixing that there are probably the same as the constraints of fixing that here: where MaybeUninit is available, one can probably do better and not emit padding fields in the first place, and where MaybeUninit is not available, there is no way to avoid the UB anyways. For FAMs, I don't think rust-bindgen can do anything either.

Yes, that's right. I've opened https://github.com/rust-lang/rust-bindgen/issues/1606 to track this.

I don’t believe that this is likely to cause problems in practice: C code in system libraries is not visible to the Rust compiler, so rustc has no way to know that these fields are uninitialized.  bindgen has a bigger problem because it may be used with LTO.

C code in system libraries is not visible to the Rust compiler, so rustc has no way to know that these fields are uninitialized.

Actually, that's not true with linker-plugin-lto.


Make MDList and ABC With Three Concrete Varients

Okay, I know I just deprecated MDChecklist, but maybe we actually keep it and make three child options:

CheckList
OrderedList
UnorderedList

This would definitely make the str code cleaner. Maybe we just move toward this style across the entire repo. I think we can do that slowly.

Okay, let's forget this.  Especially considering the recursive indentation seems nontrivial to implement.


Condition builder: Async docs insider review of the Usage tab guidance

Acceptance Criteria

Do Async docs insider review of the guidance with @aagonzales and @jeanservaas and @laurenmrice for the Usage tab

Link:
Usage Guidance - Editable Figma file

Consider the Data structure and does that need it's own tab or does it live in Usage.

Here is the usage template in Figma!


Render and Main process does not restart when the files are changed

Describe the issue / bug.
I do not understand why, but when you change the files in the /src directory, the build is not updated. I'll completely restart the application
Tell me about your development environment.

Node version: v8.1.4
NPM version: 5.3.0
vue-cli version: 2.8.2
Operating System: antergos (Arch Linux)

In my case works (I have common code outside of renderer/main directories). I suggest you to use https://github.com/electron-userland/electron-webpack (#310)  (example project — https://github.com/electron-userland/electrify).
electron-webpack supports HMR for both renderer and main process, without reloading (to avoid restarts for main process, you need to implement https://webpack.js.org/api/hot-module-replacement/).

https://medium.com/@develar/electron-very-fast-developer-workflow-with-webpack-hmr-e2a2e23590ad

You can try it
$ git clone git@github.com:cawa-93/command-editor.git
$ cd command-editor
$ git checkout update
$ npm i
$ npm run dev

The compiler does not respond to file changes. And I do not understand why.
My Dependency List:
├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>└──<EMAIL_ADDRESS>

@cawa-93 Don't get me wrong, but could you please try to migrate to electron-webpack (in any case will be merged soon, #300)?

@cawa-93 I see only index.ejs file in the src, all other files in the main/renderer. Or do you mean that nothing is updated if you change any file in the src and child dirs?

Yes. I had to enter the vails in the directories main and render

For example. I started the command npm run dev. The application opened. I changed the text of the button (suppose it's in the file /src/render/component/btn.vue). I expected the Renderer Process to be automatically recompiled. But this does not happen.

electron-webpack supports HMR — please migrate to it and try :)
Migration is easy —

Install,
Change package scripts.
Remove .electron-vue directory.
If you use electron-builder, make sure that you use version 19.16.1 +

You can see sample project — http://github.com/electron-userland/electrify

I get this error:
Error: Cannot find entry file src/renderer/index.ts

Is it by default designed for a project on a typescript?

I will check it now. Сейчас поправлю, если удобнее, можно в слаке напрямую (http://slackin.electron.build) писать.

@cawa-93 Fixed in 0.5.2, thanks for report.

@cawa-93
I'm not sure what issue you are running into, as I am not able to reproduce this either. Are you able to test this on another system?

@SimulatedGREG try update branche

@cawa-93 Forgot to mention — electron-webpack requires webpack 3.0.

Right. How did @develar  advise me, I installed the electron-webpack
@0.5.2 and<EMAIL_ADDRESS>However, the result remained the same: the collector does not respond to file changes. See this

@cawa-93
I think this might be an OS level issue with Arch Linux. There is a slim chance you are reaching the inotify user watch limit. Basically saying that when your text editor and webpack are watching all your source, assets, and npm files you are reaching a limit the OS let's you catch on file changes. Take a look at these links about how to increase that limit and see if that helps.
This link is part of a separate ruby package called listen, but the documentation here is still related to OS-level filesystem watching.
https://github.com/guard/listen/wiki/Increasing-the-amount-of-inotify-watchers
Related issue with chokidar that webpack uses internally.
https://github.com/paulmillr/chokidar/issues/294

It seems that it is so. After restarting the laptop everything started to work as expected (although I do not know how long). @develar, @SimulatedGREG, Thanks for the help.

@cawa-93 have you seen my patch (slack)?

reaching a limit the OS let's you catch on file changes

To fix this it, electron-webpack 0.6.0 watches only source directory (src/**/*, but source directory for other process also excluded). https://github.com/electron-userland/electron-webpack/blob/master/packages/electron-webpack/src/plugins/WatchMatchPlugin.ts

For me to work Main and Render reload I Just put
// main.js and index.js
if (module.hot) { module.hot.accept() }

// dev-runner.js

const server = new WebpackDevServer(
      compiler,
      {
        contentBase: path.join(__dirname, '../'),
        quiet: true,
        hot: true,
        liveReload: true,
        watchOptions: {
          poll: true
        },