text:
Latin Hypercube sampling only supports uniform distributions

Hi @m-d-grunnill I noticed the following comment in §5.2 of the demonstration notebook:
"Note currently metacast only support latin hypercube sampling with uniform distributions."
I feel that this is a relatively important limitation, and it should probably be mentioned elsewhere (e.g., README.md).
End users can circumvent this limitation by sampling from the unit interval, and using inverse-CDF functions to then sample from their desired distributions (e.g., using the ppf() method of scipy.stats distributions). So while this is a limitation of the MetaCast package, it still allows users to sample from arbitrary distributions. You could highlight this in §5.2 of the notebook (and maybe in README.md).
Would it be relatively simple to allow users to provide ppf() methods for each parameter? (I'm asking out of interest, not in th expectation that you'll do this as part of the JOSS review).
Aside: I maintain a Latin hypercube sampling package (imaginatively named lhs) that supports sampling from arbitrary distributions, and defining "dependent distributions" whose shape parameters can be functions of the samples drawn for other parameters. Distributions can be defined in a number of ways.

This note was in the documentation for the lhs_prcc function as well. But to make this limitation to users clearer I have put a further note in the README.md file.
I don't think users can currently circumvent this issue using the lhs_prcc function. Therefore, I am opening this up as an enhancement issue.

authors: m-d-grunnill robmoss

repo: m-d-grunnill/MetaCast


text:
Expands ocamldoc

Fixes #106

When last Travis run passes this can be merged.

source: gharchive/pull-request

repo: m-harrison/osilo

license: isc

license_type: permissive

license_source: bigquery


text:
ndt5: error metrics are misleading

sum(ndt_test_errors_total) should be a meaningful value.
Today errors are double counted: once in s2c or c2s ManageTest functions and again in PanicOnError. (there may be other instances). This double accounting makes it difficult to direclty measure success & error rates.
panicMsgToErrType does not SplitN enough fields and always returns "panic" label.
https://github.com/m-lab/ndt-server/blob/56164b68e989ccdef60d6edb85b462d795d4174c/ndt5/ndt5.go#L80
Locally, the wss js client does not produce an error in the server. However, the metrics for deployed pods report 1 error for every e2e check, 1 per/min for the queue check (i believe), and 1 per/min for the e2e check.

https://github.com/m-lab/dev-tracker/issues/401

ErrorCount represents two types of errors -- explicit return paths from s2c & c2s tests as well as panic recovery. It may be preferable for these to be two separate metrics. e.g. PanicCount & ErrorCount.
ActiveTests & ErrorCount use different label names for the same value. i.e. "type" and "test" for server ConnectionType. These should use the same label name.

Part of https://github.com/m-lab/dev-tracker/issues/315

For counting "ndt_test_total" -- what do we want to consider a successful test? Options:

server records a result -- we have this data -- but it can be misleading b/c we also miss client errors
client completes full protocol -- this seems like it would underestimate the test count b/c some clients may end a connection early but be happy with the measurement otherwise (unknown how often this happens)
client completes partial protocol -- but where is acceptable to start counting success -- even if the protocol is not completed?

In #169 I've actually removed the generic metrics ndt_test_total and ndt_test_errors_total in favor of ndt5 (protocol-specific) versions.
It's not apparent to me today that we can have a common "test count" metric between ndt5 and ndt7 that is meaningful.

This was deployed to production in https://github.com/m-lab/k8s-support/releases/tag/v1.4.0

source: gharchive/issue

repo: m-lab/ndt-server

license_source: github-api


text:
fix: type 'Null' is not a subtype of type 'String' in getCurrentUser

Instructions

PR target branch should be against development
PR title name should follow this format: https://github.com/mParticle/mparticle-workflows/blob/main/.github/workflows/pr-title-check.yml
PR branch prefix should follow this format: https://github.com/mParticle/mparticle-workflows/blob/main/.github/workflows/pr-branch-check-name.yml

Summary

Currently the mParticle SDK has a null pointer bug when trying to retrieve the mpid on some Android devices.

Testing Plan

I didn't test it locally, basically I just added a null check, an additional layer of protection to the existing check that only looks if the mpid is an empty string.

Reference Issue (For mParticle employees only.  Ignore if you are an outside contributor)

https://github.com/mParticle/mparticle-flutter-sdk/issues/45

This has been published to pub.dev as version 1.0.5 - https://pub.dev/packages/mparticle_flutter_sdk
Thanks again for your help and apologies this took a bit longer than expected to approve. I had been out for a couple weeks.

@rmi22186 I appreciate it 🙏

repo: mParticle/mparticle-flutter-sdk


text:
Example of reading and writing baseline

Hi, is there an example of a code with read and write baseline somewhere?

I remembered that I added that code upon request, and that somebody tested it and said it worked. I looked up who said that, it's you 😉 "I did the test. Saving the baseline works."
I don't have code, but indeed it would be good to have it in some example. Volunteers?

Yes, I remember that. Maybe someone did it and share their code.

I found some time and made an example based on https://github.com/sparkfun/SparkFun_CCS811_Arduino_Library/blob/master/examples/Example4_SetBaseline/Example4_SetBaseline.ino
To make it work, I changed the get_baseline in ccs811.h to:
uint16_t CCS811::get_baseline(void) {   uint8_t buf[2];   wake_up();   bool ok = i2cread(CCS811_BASELINE,2,buf);   wake_down();   unsigned int baseline = (buf[0]<<8) + buf[1];   return baseline; }
My example code for ESP32 (I did not test it on ESP8266!) for loading, saving and deleting a baseline: https://pastebin.com/KGigYPr6

Hello,
It looks maarten-pennings wanted to make you work a bit ahaha.
I guess you previously tested baseline on another library.
Here's how to do it with maarten's code, simply ;
uint16_t ccs811Baseline;
ccs811.get_baseline(&ccs811Baseline);

Can you post a valid code for ESP8266? And more precisely what needs to be changed in the library to work because the above example gives error.

I'm not sure what you want to see.
The easy part is to actually get and set the baseline.
The hard part is when.
And another hard part is how and where to save the baseline when the Arduino itself will power off.
This is how a main program could be structured
void setup() {
  ... no special code for baseline (the CCS811 will run with "zero baseline" the first 20 min) ...
}

void loop() {
  // Get the baseline from persistent memory and write to CCS811 when the CCS811 is on for 20 min
  if( CCS811 is powered 20 min ) {
    handle_baseline_for_power_on();
  }

  // If there is a reason to switch off the CCS811 and the Arduino
  if( ... reason to switch off ... ) {
    if( CCS811 is powered for at least 20 min) { handle_baseline_for_power_off(); }
    // somehow switch ourselves (Arduino) and CCS811 off
    ...
  }

  ... code that uses the CCS811 ...
}

Then you would need two helpers handle_baseline_for_power_on/off.
They need persistent storage...
// These variable should somehow be made persistent (i.e. saved to some flash)
// In this example I will just pretent they are persistent
uint16_t persistent_baseline;
bool persistent_baseline_available = false;

// Only call after CCS811 is on for 20min
void handle_baseline_for_power_off() {
  uint16_t baseline;
  bool ok;

  ok= get_baseline(&baseline);
  if( ok ) {
    // I2C transaction successful, so save the baseline persistently (and record it is valid)
    persistent_baseline = baseline;
    persistent_baseline_available = true;
  }
}

// Only call after CCS811 is on for 20min
void handle_baseline_for_power_on() {
  // If no baseline is saved persistently, continue with the "zero baseline" from setup()
  if( persistent_baseline_available ) {
    bool ok;
    ok= set_baseline(persistent_baseline);
    if( !ok ) { ... I2C transaction failed ... hmm ... what to do ... }
  }
}

This code is not even tested on syntax ...

I had the impression baseline register can't be written, thats why Google brought me here.
If you save the baseline, be sure to save that values when sensor is outside in fresh air for a few minutes. I've waited at least 20 minutes. Since it is winter now and temperatures are quite cold, please make sure to write environmental calibration settings. This changes the TVOC and thus eCO2 a lot.
Then take the sensor in and restore the baseline calibration.
If you restore a baseline calibration value which would lead to no detection of TVOC internal calibration method adjusts baseline calibration register and so it seems your write to the baseline calibration was unsuccessful.
I hope the automatic baseline calibration won't change or adjust this value that after 24 hours the lowest measured TVOC measurement is set as baseline for 0 TVOC / 400 ppm eCO2. Reading the section about automatic calibration could mean this. If so you have to monitor baseline register and write back your value from clean outside air.
If you don't write the baseline calibration register CCS811 adjusts its internal correction after each startup to 0 TVOC / 400 ppm eCO2.
For long running sensors after the first 500 hours manual recommends saving baseline every 5-7 days. So to get a tradeoff between reliable values and comfort I would put it to fresh outside air once month.
Please note that just opening a window can take hours to have really fresh like outside air inside. I've seen this with CO2 sensors.  This strongly depends on the position of the sensor inside the room and how wide you open the window. But at cold temperatures outside you lose significant amount of energy until air has really outside quality.

I had the impression baseline register can't be written, thats why Google brought me here.
If you save the baseline, be sure to save that values when sensor is outside in fresh air for a few minutes. I've waited at least 20 minutes. Since it is winter now and temperatures are quite cold, please make sure to write environmental calibration settings. This changes the TVOC and thus eCO2 a lot.
Then take the sensor in and restore the baseline calibration.
If you restore a baseline calibration value which would lead to no detection of TVOC internal calibration method adjusts baseline calibration register and so it seems your write to the baseline calibration was unsuccessful.
I hope the automatic baseline calibration won't change or adjust this value that after 24 hours the lowest measured TVOC measurement is set as baseline for 0 TVOC / 400 ppm eCO2. Reading the section about automatic calibration could mean this. If so you have to monitor baseline register and write back your value from clean outside air.
If you don't write the baseline calibration register CCS811 adjusts its internal correction after each startup to 0 TVOC / 400 ppm eCO2.
For long running sensors after the first 500 hours manual recommends saving baseline every 5-7 days. So to get a tradeoff between reliable values and comfort I would put it to fresh outside air once month.
Please note that just opening a window can take hours to have really fresh like outside air inside. I've seen this with CO2 sensors.  This strongly depends on the position of the sensor inside the room and how wide you open the window. But at cold temperatures outside you lose significant amount of energy until air has really outside quality.

I'm experimenting with this library and sensor's baseline for quite a while now. I'm getting some problems setting the correct baseline.
It's winter now so to get clean air means putting it on my balcony where it's quite cold (~0C). I then wait for the baseline to stabilize after about 30-40min.
So first question arises - does the temperature/humidity affect baseline reading? I assume that yes.
Therefore I have DHT22 sensor connected to the same ESP32 and I tried adding corrections via setEnvironmentalData. This changes the baseline significantly, however, in my case for some reson it sets it to "higher" standard. So indoors it shows very high numbers (eCO2 @ 2500+) although air is not nearly that bad. Of course indoor readings also get compensated via setEnvironmentalData.
This leads me to the main question - how to properly get the baseline? Do I need to wait for warmer weather and then take it outside to get proper baseline? Should I somehow get clean air indoors at room tempertures? Are there any general guidelines to get proper baseline?

The MoX sensor has a resistance depending on the gases in the air. The cleaner the air the lower the resistance. Unfortunately, this relation is not stable in time (resistance changes due to what happened in the past). So what the firmware of a MoX sensor does is record the lowest resistance it has seen - the cleanest air. Let's call this R0. When you perform a measurement, the sensor measures the current resistance, let's call it Rc, and it roughly outputs Rc/R0; this is called eqTVOC. The problem is, that the sensor resistance for clean air changes in time, so the sensor needs to adapt R0. The firmware has algorithms to adapt R0 on a daily basis (24 hour cycle).
The R0 is called the "baseline". As noted above, R0 is maintained by the sensor as long as it is powered. Once the sensor is switched off, R0 is lost. After a new power on, it takes some time before a good R0 is determined by the sensor.
What the chip supports is baseline backup and restore. You can execute x=get_baseline () before you switch off, and set_baseline(x) after you switch on. Make sure that the x=get_baseline() is executed when the chip actually has a good baseline, so it must have run long enough. Also,  execute set_baseline(x) after power on and a delay to wait that the sensor is stable otherwise the written baseline might be overwritten by not-yet-correct Rc (unstable MoX) by the firmware. Read the datasheet  (and separate app note https://www.sciosense.com/wp-content/uploads/documents/Application-Note-Baseline-Save-and-Restore-on-CCS811.pdf) for details on when to do this exactly
Putting it outside does not seem wise: 1) the baseline is constantly adjusted, 2) R0 is now for outside and Rc for inside, so Rc/R0 has a mismatch, 3) ccs811 is in indoor air quality sensor.
Yes humidity and temperature are relevant, so measure them and feed them (use the appropriate function, and take care of the units).

authors: BorisDess CelMaiRau JsBergbau Sindar-sudo bfaliszek maarten-pennings

license: MIT


text:
PageUp / PageDown shortcut support

Is your feature request related to a problem? Please describe.
KDE Connect has a "slideshow tool", when you press left or right on this tool in the mobile app, in KDE it will emit PageUp for left / previous slide, and PageDown for right / next slide. As far as I can tell these are unconfigurable in KDE Connect (at least from GUI).
Describe the solution you'd like
I would like if this presentation tool supported PageUp and PageDown for changing slides.

#115

@trgwii This functionality should be available on latest main branch now 😄

authors: Janszczyrek maaslalani trgwii

repo: maaslalani/slides


text:
Make it possible to change vep-config.json path via command-line arg for SeqrMTToESTask

Add a command line arg that makes it possible to change the vep config paths @
https://github.com/macarthur-lab/hail-elasticsearch-pipelines/blob/master/hail_scripts/v02/utils/hail_utils.py#L119
https://github.com/macarthur-lab/hail-elasticsearch-pipelines/blob/master/hail_scripts/v02/utils/hail_utils.py#L122
This allows different VEP paths for local installs, allows
https://github.com/macarthur-lab/hail-elasticsearch-pipelines/issues/165
to be fixed, etc.

If theres an optimized VEP config that works for seqr, why wouldn't we create that config and always use it? For example, for https://github.com/macarthur-lab/hail-elasticsearch-pipelines/issues/165 why would we want to keep the option to continue using a config that is 5 times slower?


text:
🛑 Nextcloud is down

In a387988, Nextcloud (https://nextcloud.macbrayne.de/login?$SECRET) was down:

HTTP code: 503
Response time: 957 ms

Resolved: Nextcloud is back up in f5d35b2.

repo: macbrayne/status


text:
Timetravel miner for Machinecoin

Is there any timetravel miner you would recommend, any ccminer fork specifically for timetravel algo or any other miner for linux/ubuntu OS?

Sorry, for the late reply...didn't noticed the issue at GitHub nor got a mail.
However, asking for a miner is not very GitHub issue related, but here you go https://github.com/tpruvot/ccminer.
Nico;

repo: machinecoin-project/machinecoin-core


text:
Building doesn't work

Hello,
I try to install packages on my computer, but I couldn't build dependencies. Here is the result of colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release
You can find the events.log and logger_all.log for details.
Ubuntu 18.04
Anaconda Python 3.6
Starting >>> googletest-distribution
Starting >>> mpi_cmake_modules
Starting >>> pybind11
--- stderr: mpi_cmake_modules
CMake Error at cmake/sphinx.cmake:65 (message):
  breathing-cat not found! Please install using: pip3 install breathing-cat
Call Stack (most recent call first):
  cmake/documentation.cmake:43 (add_sphinx_documentation)
  CMakeLists.txt:85 (add_documentation)

---
Failed   <<< mpi_cmake_modules [0.66s, exited with code 1]
Aborted  <<< pybind11 [0.81s]
Aborted  <<< googletest-distribution [1.01s]

Summary: 0 packages finished [1.62s]
  1 package failed: mpi_cmake_modules
  2 packages aborted: googletest-distribution pybind11
  2 packages had stderr output: mpi_cmake_modules pybind11
  7 packages not processed

[events.log](https://github.com/machines-in-motion/reactive_planners/files/9952151/events.log)
[logger_all.log](https://github.com/machines-in-motion/reactive_planners/files/9952152/logger_all.log)

When I try to install breathing-cat: pip3 install breathing-cat
ERROR: Could not find a version that satisfies the requirement breathing-cat (from versions: none)
ERROR: No matching distribution found for breathing-cat

Hi,
This is a mpi_cmake_modules issue and unrelated to this package. Please open an issue there.
I am going to close this issue.

authors: Lhumd emrecemal


text:
Multiple Criteria Recommendation Support

I didn't understand through the documentation and by reading the code.
Does spotlight support Multiple Criteria Decision Making
For example in the factorization module, can the rating be a vector and therefore the object would be a matrix? Or is that something that i'd have to implement on my own?
Been looking to step away from ML.NET now that finally my project allows for me to develop a unique machine learning module.
Thanks in advance!

No, this is not implemented.

Thank you for your response!

authors: andre-motta maciejkula

repo: maciejkula/spotlight

license: mit


text:
Creating an embedding net with batchnorm 1D fails due to check of embedding net outputsize

When initializing and building the initial flow, these statements can raise exceptions, https://github.com/mackelab/sbi/blob/0fcf9842c9515fc089ea464fb11359d4c19c7331/sbi/neural_nets/flow.py#L59
When an embedding net with batchnorm1D is used, batchnorm expects a batch of inputs.  Is it not better to see the output size of the layer by doing:
embedding_net.model[-1].out_features ?

Hey,
Thanks for reporting this limitation. Your suggestion however won't work in general as not all PyTorch Modules have the attribute out_features i.e. activation functions.
There should be two ways to fix this:

Giving the embedding net a batch of at least two datapoints.
Switch to evaluation mode for this operation i.e. emebdding_net.eval().

If you pass the embedding net in evaluation mode to the flow builder, it should also work, no? Later during training it will automatically be switched to train.
Kind regards,
Manuel

Hi Manuel,
Your suggestions also work.  I just wanted to point out that this happens during the initialization phase, density_estimator_function = posterior_nn(model="maf", embedding_net=embedding_net, hidden_features=num_hidden, num_transforms=number_of_transforms) which then calls build_maf, which then does y_numel = embedding_net(batch_y[:1]).numel().

I can try to take this

repo: mackelab/sbi


text:
scala.ScalaReflectionException: object macroid.warts.CheckUi not found

Same as: https://github.com/macroid/macroid-akka-pingpong/issues/1
I created the project via activator template, and I'm simply trying to compile it as it is. android-sdk-plugin version is 1.3.6. Nothing in the linked threads seems to make any difference, I always get the same error.
Before compiling fails, there are some warnings that might help:
[warn] Scala version was updated by one of library dependencies:
[warn] 	* org.scala-lang:scala-library:(2.11.1, 2.11.4, 2.11.2, 2.11.0) -> 2.11.6
[warn] To force scalaVersion, add the following:
[warn] 	ivyScala := ivyScala.value map { _.copy(overrideScalaVersion = true) }
[warn] There may be incompatibilities among your library dependencies.
[warn] Here are some of the libraries that were evicted:
[warn] 	* com.android.support:support-v4:21.0.3 -> 22.1.1

Hey, the simplest solution for now is to remove these lines: https://github.com/macroid/macroid-akka-pingpong/blob/master/build.sbt#L17-L20. See also the discussion at https://groups.google.com/forum/#!topic/macroid/Xt8V16BoM3w.
I will try to look into it soon to see what the proper way to fix this is.

Hello!
Thank you! The error above doesn't show up anymore, but I have a new one:
java.lang.UnsupportedClassVersionError: macroid/LayoutTweakMacros$ : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:643)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
at java.net.URLClassLoader.access$000(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:212)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:323)
at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
at java.lang.Class.forName0(Native Method)
...
Maybe I should create a separate issue about this but most likely everyone who will start building this project will go through the same steps, so I leave this choice to you.

The error seems to be that something in your toolchain does not support Java 7. Do you have JDK 6 installed? Or maybe an outdated version of Android Build Tools (unlikely)?

I have openjdk7. I tryed to remove the openjdk6 just to be sure, tryed updating the android build tools, neither helped so far, same error.

I have reverted the last pull request (87d3b713) locally and set the source and target version of java to 1.6 in build.sbt and now it works.

As far as I remember, Macroid M3 was built with Java 1.6, so at least the behavior is consistent. However I’m not sure why your toolchain requires 1.6. Maybe @pfn has an idea?

The stack trace is elided, so can't tell what tool is failing. Usually dex fails with that error, so it would indicate build tools being out of date.

Ok, I have solved the second issue too: I have installed the official oracle JDK. Other scala -> android libraries refused to work on openJDK too, so the conclusion: don't use openJDK in scala -> android tool chains, only oracle JDK works (I'm using debian linux).

authors: aregic pfn stanch

repo: macroid/macroid-akka-pingpong


text:
How to make macvim as editor in vimperator?

When I tried to make macvim as vimperator's editor in ~/.vimperatorrc as:
set editor='/Applications/MacVim.app/Contents/MacOS/MacVim -g -f'
it works not well,can you help me?
My os is macOS sierra.
Thx.

it works not well

What exactly does this mean? Does it silently fail? Does it crash? Does it behave unexpectedly? How so?
I'm not familiar with vimperator, but it's possible you shouldn't be trying to launch MacVim by directly specifying the executable in the bundle. I'm not even sure the MacVim executable will parse those arguments. The mvim script launches the Vim executable (see lines 44 and 86. Perhaps that's what you want?

When I add a line set editor='/usr/share/mvim -g $opts ${1:+"$@"}' to ~/.vimperatorrc,it does not work(/usr/share/mvim is the mvim script),then I change the line to set editor='/usr/share/mvim -g -f',it works,
but performs not very good,the detail is:
1st:I pressed ctrl+i in some input box in firefox,then macvim activated
2nd:I input some words in the activated macvim(gui) and run :wq
3rd:The macvim(gui) exited
4th:I found my current activated windows is not firefox,but still in macvim app(though the current macvim windows is
closed,but the macvim app is still running)that's to say,macvim didn't make me return back to
firefox after I have run :wq in macvim
Can you help me?

There's a setting you can set in MacVim's preferences, I believe, which will cause it to terminate after all windows are closed. This sounds like it will resolve your issue.

Hi, @jpetrie I have realized the this may not be macvim's issue,but macos's issue,I have searched a lot about how to auto terminate a app after all windows are closed,but can not find a solution for my macOS sierra10.12.3,RedQuits seems good,but it seems not support macOS sierra.Here is the link:Solution

Right. As I said, it's up to the application to decide whether or not it closed when all windows are closed. MacVim has a setting in the preferences to control this behavior, you should set it and that will fix your issue.

Thanks,it works by setting MacVim's preferences.

repo: macvim-dev/macvim

license: Vim


text:
retain selected fragment on rotation

I am in need of retaining the selected fragment on rotation. Using "android:configChanges" is not an option for me. Thanks :)

You can get the currentFragment with the method getStoredFragment() . Save this Fragment befor the change and load it again after the change with changeFragment(Fragment fragment, String title).


text:
Deployment to now

Hey, thanks for this future tech.
I am getting this under deployment to zeit/now:
> /home/nowuser/src/bin/server.js:40
>     const clientStats = stats.toJson().children[0]
>                              ^
> TypeError: Cannot read property 'toJson' of undefined

Hi @surepe, thanks for checking out Reactivity!
It would help if you could give the steps you followed to get this error. Did you use anow.json for configuration, and specify environment variables?

I've revert my changes to project and this is the result of deploying an untouched reactivity. Seems like we can't do another webpack manipulations on "start".
> ▲ npm start
> > reactivity@0.1.0 start /home/nowuser/src
> > node bin/server.js
> Error: EACCES: permission denied, open 'buildServer/main.js'
>     at Object.fs.openSync (fs.js:652:18)
>     at Object.fs.writeFileSync (fs.js:1299:33)

Anyway, it's gotta be cool if you have some time and provide working deployment setup to zeit/now.
Thanks!

Hey @surepe we have resolved your issue, please pull the latest changes and when deploying with now you need to provide the .env file using -E FILE, --dotenv=FILE like so now --dotenv=.env.

Great work @dawidvdh. --dotenv looks for .env by default so now --dotenv should do the trick too if you've copied .sample.env to .env

authors: dawidvdh rocbear surepe

repo: madeagency/reactivity


text:
Bug: increased number of 504

Requests to /matches that failed with a 504 since 2017-05-19 (html response removed):
2017-05-19T00:33:11.392Z - error: API error uri=https://api.dc01.gamelockerapp.com/shards/na/matches, filter[playerIds]=90afbefe-3be4-11e5-9c3d-06b48b82cd49, filter[createdAt-start]=2017-01-01T00:00:00Z, filter[gameMode]=casual,ranked, sort=createdAt, status=504, error=<html>
2017-05-19T04:40:48.846Z - error: API error uri=https://api.dc01.gamelockerapp.com/shards/na/matches?page[offset]=150, filter[playerIds]=d072d018-703b-11e5-a1f9-068789513eb5, filter[createdAt-start]=2017-01-01T00:00:00Z, filter[gameMode]=casual,ranked, sort=createdAt, status=504, error=<html>
2017-05-19T05:06:38.947Z - error: API error uri=https://api.dc01.gamelockerapp.com/shards/na/matches?page[offset]=50, filter[playerIds]=6cd2c4a8-5dea-11e6-b763-068789513eb5, filter[createdAt-start]=2017-01-01T00:00:00Z, filter[gameMode]=casual,ranked, sort=createdAt, status=504, error=<html>
2017-05-19T05:31:56.642Z - error: API error uri=https://api.dc01.gamelockerapp.com/shards/sg/matches?page[offset]=150, filter[playerIds]=6a1f6fa2-d4ac-11e6-a720-068789513eb5, filter[createdAt-start]=2017-01-01T00:00:00Z, filter[gameMode]=casual,ranked, sort=createdAt, status=504, error=<html>
2017-05-19T05:32:30.423Z - error: API error uri=https://api.dc01.gamelockerapp.com/shards/sg/matches, filter[playerIds]=754f5c64-85fa-11e4-8cbd-06d90c28bf1a, filter[createdAt-start]=2017-05-03T18:35:57.000Z, filter[gameMode]=casual,ranked, sort=createdAt, status=504, error=<html>
2017-05-19T05:33:10.783Z - error: API error uri=https://api.dc01.gamelockerapp.com/shards/sg/matches?page[offset]=50, filter[playerIds]=7939ab7a-7535-11e4-b12c-06d90c28bf1a, filter[createdAt-start]=2017-01-01T00:00:00Z, filter[gameMode]=casual,ranked, sort=createdAt, status=504, error=<html>
2017-05-19T05:33:11.249Z - error: API error uri=https://api.dc01.gamelockerapp.com/shards/sg/matches?page[offset]=50, filter[playerIds]=7939ab7a-7535-11e4-b12c-06d90c28bf1a, filter[createdAt-start]=2017-01-01T00:00:00Z, filter[gameMode]=casual,ranked, sort=createdAt, status=504, error=<html>
2017-05-19T06:33:00.013Z - error: API error uri=https://api.dc01.gamelockerapp.com/shards/na/matches?page[offset]=50, filter[playerIds]=dfce4dfc-72b8-11e4-b201-06d90c28bf1a, filter[createdAt-start]=2017-01-01T00:00:00Z, filter[gameMode]=casual,ranked, sort=createdAt, status=504, error=<html>
2017-05-19T11:30:54.823Z - error: API error uri=https://api.dc01.gamelockerapp.com/shards/na/matches, filter[playerIds]=717b72f6-845d-11e4-9297-06eb725f8a76, filter[createdAt-start]=2017-01-01T00:00:00Z, filter[gameMode]=casual,ranked, sort=createdAt, status=504, error=<html>
2017-05-19T11:35:50.682Z - error: API error uri=https://api.dc01.gamelockerapp.com/shards/na/matches?page[offset]=50, filter[playerIds]=22a2d23a-a48d-11e6-9647-06fc87f1dd11, filter[createdAt-start]=2017-01-01T00:00:00Z, filter[gameMode]=casual,ranked, sort=createdAt, status=504, error=<html>
2017-05-19T19:40:39.178Z - error: API error uri=https://api.dc01.gamelockerapp.com/shards/na/matches, filter[playerIds]=848214ae-9209-11e4-b0a5-06d90c28bf1a, filter[createdAt-start]=2017-01-01T00:00:00Z, filter[gameMode]=casual,ranked, sort=createdAt, status=504, error=<html>
2017-05-19T20:01:46.003Z - error: API error uri=https://api.dc01.gamelockerapp.com/shards/na/matches, filter[playerIds]=e9a50fb6-7e69-11e4-b252-06eb725f8a76, filter[createdAt-start]=2017-01-01T00:00:00Z, filter[gameMode]=casual,ranked, sort=createdAt, status=504, error=<html>
2017-05-19T21:46:43.215Z - error: API error uri=https://api.dc01.gamelockerapp.com/shards/na/matches, filter[playerIds]=6c4b74e2-7daa-11e5-a19f-06f4ee369f53, filter[createdAt-start]=2017-01-01T00:00:00Z, filter[gameMode]=casual,ranked, sort=createdAt, status=504, error=<html>
2017-05-19T21:46:43.782Z - error: API error uri=https://api.dc01.gamelockerapp.com/shards/na/matches, filter[playerIds]=6c4b74e2-7daa-11e5-a19f-06f4ee369f53, filter[createdAt-start]=2017-01-01T00:00:00Z, filter[gameMode]=casual,ranked, sort=createdAt, status=504, error=<html>
2017-05-19T23:53:32.444Z - error: API error uri=https://api.dc01.gamelockerapp.com/shards/na/matches?page[offset]=50, filter[playerIds]=6fc6e0ee-db38-11e4-9dde-06d90c28bf1a, filter[createdAt-start]=2017-01-01T00:00:00Z, filter[gameMode]=casual,ranked, sort=createdAt, status=504, error=<html>
2017-05-20T02:14:45.614Z - error: API error uri=https://api.dc01.gamelockerapp.com/shards/na/matches?page[offset]=50, filter[playerIds]=59e7540c-fecc-11e6-aad8-0297ea8a7ddc, filter[createdAt-start]=2017-01-01T00:00:00Z, filter[gameMode]=casual,ranked, sort=createdAt, status=504, error=<html>
2017-05-20T03:11:25.956Z - error: API error uri=https://api.dc01.gamelockerapp.com/shards/na/matches, filter[playerIds]=9291e584-0e36-11e5-a932-06eb725f8a76, filter[createdAt-start]=2017-01-01T00:00:00Z, filter[gameMode]=casual,ranked, sort=createdAt, status=504, error=<html>
2017-05-20T08:08:13.183Z - error: API error uri=https://api.dc01.gamelockerapp.com/shards/sg/matches?page[offset]=50, filter[playerIds]=10dd4630-a4a6-11e5-bd17-06f4ee369f53, filter[createdAt-start]=2017-01-01T00:00:00Z, filter[gameMode]=casual,ranked, sort=createdAt, status=504, error=<html>
2017-05-20T10:48:45.316Z - error: API error uri=https://api.dc01.gamelockerapp.com/shards/sg/matches, filter[playerIds]=872e754a-d0a1-11e4-9157-06eb725f8a76, filter[createdAt-start]=2017-01-01T00:00:00Z, filter[gameMode]=casual,ranked, sort=createdAt, status=504, error=<html>
2017-05-20T11:36:33.882Z - error: API error uri=https://api.dc01.gamelockerapp.com/shards/sg/matches, filter[playerIds]=b083e0f4-bc16-11e5-bc70-068789513eb5, filter[createdAt-start]=2017-01-01T00:00:00Z, filter[gameMode]=casual,ranked, sort=createdAt, status=504, error=<html>
2017-05-20T11:36:37.722Z - error: API error uri=https://api.dc01.gamelockerapp.com/shards/sg/matches, filter[playerIds]=b083e0f4-bc16-11e5-bc70-068789513eb5, filter[createdAt-start]=2017-01-01T00:00:00Z, filter[gameMode]=casual,ranked, sort=createdAt, status=504, error=<html>
2017-05-20T15:17:13.171Z - error: API error uri=https://api.dc01.gamelockerapp.com/shards/sg/matches?page[offset]=50, filter[playerIds]=03fcc0f2-7f35-11e6-aa53-06b48b82cd49, filter[createdAt-start]=2017-01-01T00:00:00Z, filter[gameMode]=casual,ranked, sort=createdAt, status=504, error=<html>
2017-05-20T19:19:45.833Z - error: API error uri=https://api.dc01.gamelockerapp.com/shards/na/matches, filter[playerIds]=3f6b190c-711f-11e4-8ef8-062d0b175276, filter[createdAt-start]=2017-01-01T00:00:00Z, filter[gameMode]=casual,ranked, sort=createdAt, status=504, error=<html>
2017-05-20T20:40:56.045Z - error: API error uri=https://api.dc01.gamelockerapp.com/shards/sg/matches, filter[playerIds]=ff6264d2-f934-11e6-abd1-02081e0fc90e, filter[createdAt-start]=2017-01-01T00:00:00Z, filter[gameMode]=casual,ranked, sort=createdAt, status=504, error=<html>
2017-05-20T21:49:42.634Z - error: API error uri=https://api.dc01.gamelockerapp.com/shards/na/matches?page[offset]=100, filter[playerIds]=e46a95ac-e179-11e4-86c7-06eb725f8a76, filter[createdAt-start]=2017-01-01T00:00:00Z, filter[gameMode]=casual,ranked, sort=createdAt, status=504, error=<html>
2017-05-20T21:49:43.540Z - error: API error uri=https://api.dc01.gamelockerapp.com/shards/na/matches?page[offset]=100, filter[playerIds]=e46a95ac-e179-11e4-86c7-06eb725f8a76, filter[createdAt-start]=2017-01-01T00:00:00Z, filter[gameMode]=casual,ranked, sort=createdAt, status=504, error=<html>
2017-05-20T23:53:12.095Z - error: API error uri=https://api.dc01.gamelockerapp.com/shards/na/matches?page[offset]=100, filter[playerIds]=cb6ff888-6f16-11e4-8115-062d0b175276, filter[createdAt-start]=2017-01-01T00:00:00Z, filter[gameMode]=casual,ranked, sort=createdAt, status=504, error=<html>
2017-05-21T00:36:57.529Z - error: API error uri=https://api.dc01.gamelockerapp.com/shards/sg/matches, filter[playerIds]=f57ac040-8a9a-11e5-b361-068789513eb5, filter[createdAt-start]=2017-01-01T00:00:00Z, filter[gameMode]=casual,ranked, sort=createdAt, status=504, error=<html>
2017-05-21T00:37:48.886Z - error: API error uri=https://api.dc01.gamelockerapp.com/shards/sg/matches, filter[playerIds]=812c93a6-86f0-11e5-905c-0628b69bf6d1, filter[createdAt-start]=2017-01-01T00:00:00Z, filter[gameMode]=casual,ranked, sort=createdAt, status=504, error=<html>
2017-05-21T04:14:24.484Z - error: API error uri=https://api.dc01.gamelockerapp.com/shards/sa/matches?page[offset]=100, filter[playerIds]=54b24bba-fdbd-11e5-b7a6-06eb725f8a76, filter[createdAt-start]=2017-01-01T00:00:00Z, filter[gameMode]=casual,ranked, sort=createdAt, status=504, error=<html>
2017-05-21T04:14:54.306Z - error: API error uri=https://api.dc01.gamelockerapp.com/shards/sg/matches, filter[playerIds]=be9ebd80-5546-11e5-9a14-06d90c28bf1a, filter[createdAt-start]=2017-01-01T00:00:00Z, filter[gameMode]=casual,ranked, sort=createdAt, status=504, error=<html>
2017-05-21T04:14:54.715Z - error: API error uri=https://api.dc01.gamelockerapp.com/shards/sg/matches, filter[playerIds]=be9ebd80-5546-11e5-9a14-06d90c28bf1a, filter[createdAt-start]=2017-01-01T00:00:00Z, filter[gameMode]=casual,ranked, sort=createdAt, status=504, error=<html>
2017-05-21T05:08:56.638Z - error: API error uri=https://api.dc01.gamelockerapp.com/shards/sg/matches, filter[playerIds]=fcea75cc-d171-11e6-b9c8-068789513eb5, filter[createdAt-start]=2017-01-01T00:00:00Z, filter[gameMode]=casual,ranked, sort=createdAt, status=504, error=<html>
2017-05-21T11:28:02.268Z - error: API error uri=https://api.dc01.gamelockerapp.com/shards/sg/matches, filter[playerIds]=55c909fc-c3fe-11e4-a6a8-06d90c28bf1a, filter[createdAt-start]=2017-01-01T00:00:00Z, filter[gameMode]=casual,ranked, sort=createdAt, status=504, error=<html>
2017-05-21T16:34:45.491Z - error: API error uri=https://api.dc01.gamelockerapp.com/shards/sg/matches?page[offset]=50, filter[playerIds]=69536ac4-5b21-11e6-87d1-06d90c28bf1a, filter[createdAt-start]=2017-01-01T00:00:00Z, filter[gameMode]=casual,ranked, sort=createdAt, status=504, error=<html>
2017-05-21T18:14:07.517Z - error: API error uri=https://api.dc01.gamelockerapp.com/shards/sg/matches?page[offset]=50, filter[playerIds]=f67f2d08-e2de-11e6-a69a-06b48b82cd49, filter[createdAt-start]=2017-01-01T00:00:00Z, filter[gameMode]=casual,ranked, sort=createdAt, status=504, error=<html>
2017-05-21T23:56:01.474Z - error: API error uri=https://api.dc01.gamelockerapp.com/shards/na/matches?page[offset]=100, filter[playerIds]=d9a8cea4-77e3-11e4-9a06-06d90c28bf1a, filter[createdAt-start]=2017-01-01T00:00:00Z, filter[gameMode]=casual,ranked, sort=createdAt, status=504, error=<html>

It appears to happen randomly every few hours for one request or two.

23-05-2017 (Tue) 11:39:25       Empty Response  https://api.dc01.gamelockerapp.com/shards/na/matches?filter[playerNames]=Suusano&filter[createdAt-start]=2017-05-05T00:00:00Z&sort=-createdAt&page[limit]=1
23-05-2017 (Tue) 11:40:51       Empty Response  https://api.dc01.gamelockerapp.com/shards/na/matches?filter[playerIds]=681d7770-5399-11e5-aa99-068789513eb5&filter[createdAt-start]=2017-05-05T00:00:00Z&page[offset]=50&page[limit]=50
23-05-2017 (Tue) 11:47:54       Empty Response  https://api.dc01.gamelockerapp.com/shards/eu/matches?filter[playerNames]=JuLesPhaN&filter[createdAt-start]=2017-05-05T00:00:00Z&sort=-createdAt&page[limit]=1
23-05-2017 (Tue) 12:43:35       Empty Response  https://api.dc01.gamelockerapp.com/shards/sg/matches?filter[playerNames]=Mrultimateleon&filter[createdAt-start]=2017-05-05T00:00:00Z&sort=-createdAt&page[limit]=1
23-05-2017 (Tue) 13:05:54       Empty Response  https://api.dc01.gamelockerapp.com/shards/sg/matches?filter[playerNames]=zukuzukua&filter[createdAt-start]=2017-05-05T00:00:00Z&sort=-createdAt&page[limit]=1
23-05-2017 (Tue) 13:09:42       Empty Response  https://api.dc01.gamelockerapp.com/shards/sg/matches?filter[playerNames]=ParasChaudhary&filter[createdAt-start]=2017-05-05T00:00:00Z&sort=-createdAt&page[limit]=1
23-05-2017 (Tue) 13:12:00       Empty Response  https://api.dc01.gamelockerapp.com/shards/sg/matches?filter[playerNames]=Apriyanto&filter[createdAt-start]=2017-05-05T00:00:00Z&sort=-createdAt&page[limit]=1
23-05-2017 (Tue) 13:12:45       Empty Response  https://api.dc01.gamelockerapp.com/shards/sg/matches?filter[playerIds]=0461c534-c008-11e5-8ba9-06eb725f8a76&filter[createdAt-start]=2017-05-05T00:00:00Z&page[offset]=100&page[limit]=50
23-05-2017 (Tue) 13:45:58       Empty Response  https://api.dc01.gamelockerapp.com/shards/sg/matches?filter[playerNames]=NullKarma&filter[createdAt-start]=2017-05-05T00:00:00Z&sort=-createdAt&page[limit]=1
23-05-2017 (Tue) 13:58:46       Empty Response  https://api.dc01.gamelockerapp.com/shards/sg/matches?filter[playerIds]=b931df00-c9cb-11e4-9b20-06d90c28bf1a&filter[createdAt-start]=2017-05-05T00:00:00Z&page[offset]=0&page[limit]=50
23-05-2017 (Tue) 14:10:43       Empty Response  https://api.dc01.gamelockerapp.com/shards/sg/matches?filter[playerIds]=c1972e08-a34e-11e6-b862-06eb725f8a76&filter[createdAt-start]=2017-05-05T00:00:00Z&page[offset]=350&page[limit]=50
23-05-2017 (Tue) 14:29:06       Empty Response  https://api.dc01.gamelockerapp.com/shards/sa/matches?filter[playerNames]=JGFRANKENSTEIN&filter[createdAt-start]=2017-05-05T00:00:00Z&sort=-createdAt&page[limit]=1
23-05-2017 (Tue) 14:50:28       Empty Response  https://api.dc01.gamelockerapp.com/shards/sg/matches?filter[playerNames]=jojoneew&filter[createdAt-start]=2017-05-05T00:00:00Z&sort=-createdAt&page[limit]=1
23-05-2017 (Tue) 14:54:35       Empty Response  https://api.dc01.gamelockerapp.com/shards/sg/matches?filter[playerIds]=75dd7af8-abd3-11e5-a3f9-06eb725f8a76&filter[createdAt-start]=2017-05-05T00:00:00Z&page[offset]=50&page[limit]=50
23-05-2017 (Tue) 14:58:51       Empty Response  https://api.dc01.gamelockerapp.com/shards/sg/matches?filter[playerIds]=c889563e-5749-11e5-b995-06eb725f8a76&filter[createdAt-start]=2017-05-05T00:00:00Z&page[offset]=0&page[limit]=50
23-05-2017 (Tue) 16:05:00       Empty Response  https://api.dc01.gamelockerapp.com/shards/sg/matches?filter[playerIds]=e01f746e-302d-11e6-9d05-062cb73cdbb1&filter[createdAt-start]=2017-05-05T00:00:00Z&page[offset]=50&page[limit]=50
23-05-2017 (Tue) 16:07:02       Empty Response  https://api.dc01.gamelockerapp.com/shards/na/matches?filter[playerNames]=CloudFTW&filter[createdAt-start]=2017-05-05T00:00:00Z&sort=-createdAt&page[limit]=1

Everything is smooth now.

see #177 for problem, discussion and proposed solution

authors: anaggh schneefux

repo: madglory/gamelocker-vainglory


text:
[Bug] Docker container did not start (root.key is missing)

Describe the bug
The docker container dont start. Details below. Here the files to reproduce:
unbound.zip
To Reproduce
Steps to reproduce the behavior:

Create a folder volume1/docker/unbound and copy all files from https://github.com/madnuttah/unbound-docker/tree/main/doc/examples/usr/local/unbound into it
Create the file root.zone from https://www.internic.net/domain/root.zone in /volume1/docker/unbound/iana.d/root.zone
Create an auth-zone.conf in docker/unbound/zones.d with Root-Server  from here https://www.iana.org/domains/root/servers ---> Is there also a template on your folders how the file should look like or is it downloaded automatically?
Use the docker compose in Portainer to start the container on a Synology NAS:
docker compose.txt
Change DNS-Settings in AdGuard home to

Unbound
127.0.0.1:5355
Expected behavior
Container starts
Screenshots
But I got this error:
could not write builtin anchor, to file /usr/local/unbound/iana.d/root.key: Permission denied
[1714068106] libunbound[7:0] error: unable to open /usr/local/unbound/iana.d/root.key for reading: No such file or directory
[1714068106] libunbound[7:0] error: error reading auto-trust-anchor-file: /usr/local/unbound/iana.d/root.key
[1714068106] libunbound[7:0] error: validator: error in trustanchors config
[1714068106] libunbound[7:0] error: validator: could not apply configuration settings.
[1714068106] libunbound[7:0] error: module init for module validator failed
Apr 25 20:01:46 unbound[1:0] notice: init module 0: validator
Apr 25 20:01:46 unbound[1:0] notice: init module 1: iterator
Apr 25 20:01:47 unbound[1:0] info: start of service (unbound 1.19.3).
Without the volumes in the docker-compose the docker container can start.
Please complete the following information:

Device: Synology NAS
OS: DSM 7.2

Additional context
asked the question also here: https://www.synology-forum.de/threads/best-practice-adguard-home-unbound-als-dns-server.127983/page-15

Hi and thanks for reaching out to me.
Why do you want to mount the iana.d folder? It's not recommended to map this volume:

The "internic" files are downloaded at buildtime, the only reason to connect this volume would be manually updating these files. If you manually copied the files into the folder for a reason, just correct ownership and permissions. Anyway, you shouldn't need this mapping at all.

One more thing: you only need to connect the folders if you want to use splitted configs or need the log. The image also runs fine without. In this case, only your customized unbound.conf needs to be mapped, if necessary at all. The image is already adapted to recursive mode, some say "hyperlocal" and has various optimizations for performance and security already.

thank you very much for the info.
I removed now the volumes-part in the docker compose. Now it works, but I get this warning. Is there an additional step necessary to solve this warning?
Apr 26 15:11:06 unbound[1:0] notice: init module 0: validator
Apr 26 15:11:06 unbound[1:0] notice: init module 1: iterator
Apr 26 15:11:06 unbound[1:0] warning: auth zone .: ZONEMD verification failed: verify DNSKEY RRset with trust anchor failed
Apr 26 15:11:06 unbound[1:0] info: start of service (unbound 1.19.3).
Apr 26 15:11:12 unbound[1:0] info: generate keytag query _ta-4f66. NULL IN

Did you completely down and up the compose stack docker-compose down && docker-compose up -d? If it still shows this warning, I'd need your unbound config(s) then please. Thank you.

I used portainer to create a stack and used the docker compose file from above but without the volumes. So I also did not specify a dedicated conf-file (and using the default)

OK, then please mount the iana.d folder again (sorry) and put the fresh downloaded root files (iana.org root.key and root.zone) in there.
You'll surely need to correct ownership and the permissions afterwards using chown -R YourUNBOUND_UID:YourUNBOUND_GID /VOLUME1/.../YourUnboundFolder and chmod -r 770 /VOLUME1/.../YourUnboundFolder (sudo may apply).
You maybe also need to set additional permissions via Synology File Manager or Windows ACLs on your Unbound share.
Thank you.

now it works without an error/warning in the log.
What I did:

Use all the files in my first post
Create an additional emtpy root.key file and put this in the iana.d folder
Synology -> give rights for writing and reading for the unbound-folder and all files below
use the docker compose from first post

Thank you for your help and this great docker image! From my side we can close this ticket.

It was a pleasure to me. Thanks for choosing my image, glad it works for you! If there's anything else, feel free to reopen the issue or to file a new one.
Cheers.

authors: madnuttah update-freak

repo: madnuttah/unbound-docker


text:
numpy extrapolation beyond bounds

Interpolating functions should extrapolate beyond bounds. Still some cases where lookup fills with nan

nan values created during the ratio vs ratio divide are now replaced with 0 to ensure no nan values in the xi and yi interpolation points for interpn.
interpolation kwargs set up in look_up function and common kwargs passed to mode 1/2 and mode 3 functions.
interpolation kind for final 1d interpolation in mode 3 is still set by user defined METHOD. Value is added to dictionary before final interpolation.

repo: madrasalach/pygmid


text:
Cancellation safety

Worker::tag_recv accepts &mut [MaybeUninit<u8>] as a data buffer.
https://github.com/madsys-dev/async-ucx/blob/d38238742b714c0a1ed4ae571d0a8175883eb226/src/ucp/endpoint/tag.rs#L5-L8
However, a future can be cancelled(dropped) at any time. While the IO operation is still in progress, the data buffer may be used after free. It's an unsoundness issue.

Yes, this issue needs to be fixed in the future.
One possible way is to call ucp_request_cancel in the drop function.

The data buffer is invalid once the drop function is called.
Any IO operation should stop using the buffer immediatiley.
Does ucp_request_cancel  have such an effect?

I think it does. But I can't find proof in the UCX docs.

This line requires a mutable exclusive access. But the completion callback may be called in another thread at any time.
Is there any guarantee for the &mut Request?
https://github.com/madsys-dev/async-ucx/blob/d38238742b714c0a1ed4ae571d0a8175883eb226/src/ucp/endpoint/mod.rs#L131

Oh in fact an immutable reference is enough, because the AtomicWaker guarantees thread safety.
And it is also safe to get mutable reference here (but don't pass it out). Because both Worker and Endpoint are !Send, IO functions and their callbacks are running on the same thread.

Yes, this issue needs to be fixed in the future.
One possible way is to call ucp_request_cancel in the drop function.

ucx_request_cancel can't guarantee cancellation safety.

ucx_request_cancel doesn't cancel send requests. https://github.com/openucx/ucx/issues/1162
If tag recv request is posted to transport layer, ucp_request_cancel need wait request completion. Buffer may still be used during cancellation.

authors: Nugine wangrunji0408 yiyuanliu

repo: madsys-dev/async-ucx


text:
Add validate input hook for antiaim or similar code.

Tried to make it as clean as i could, also overrideview hook does work, i fixed it by uncommenting and removing E8

Nevermind, overrideview should be the original sig, will change it.


text:
Error

Game name: (please, specify the game name)
Engine version: (specify engine version, if known)
Platform: (specify platform, if known)
Error message: Read 24 but expected 4758
Stack trace:    в uTinyRipper.BundleFileScheme.ReadMetadata(Stream stream, Int32 metadataSize)
в uTinyRipper.BundleFileScheme.ReadFileStreamMetadata(Stream stream, Int64 basePosition)
в uTinyRipper.BundleFileScheme.ReadScheme(Stream stream)
в uTinyRipper.GameCollection.ReadScheme(SmartStream stream, String filePath, String fileName)
в uTinyRipper.GameCollection.LoadScheme(String filePath, String fileName)
в uTinyRipper.GameStructure.ProcessPlatformStructure(GameStructureProcessor processor, PlatformGameStructure structure)
в uTinyRipper.GameStructure.Load(List1 pathes, LayoutInfo layinfo)    в uTinyRipper.GameStructure.Load(IEnumerable1 pathes, LayoutInfo layinfo)
в uTinyRipperGUI.MainWindow.LoadFiles(Object data)

Hello
AssetRipper is actively being developed with the intent to recover games as best as possible. I encourage you to help out if you're able and willing. Code contributions can be submitted via pull requests.
Development Progress
These are some of the notable things I've implemented since taking over development.

2020 - 2022 support
APK, XAPK, and IPA reading with SharpZipLib
Dummy shaders (so everything isn't pink when you open the project)
IL2Cpp support via an integration of Cpp2IL
Better game platform support
Full script decompilation with the ILSpy decompiler
Cross-platform support
Multiple configuration options
Numerous performance improvements
Support for all asset types
Lightmap Recovery
High-quality 3D model export with SharpGltf (including static meshes)
Prefab Outlining

This is not (at all) a comprehensive list. There are so many other things that could not be included here. They have all been made possible with the support of my generous sponsors.
Future Plans
This is a list of notable improvements planned for the future.

2023+ Support
Asset Deduplication
Mesh preview
Scene preview
Child State Machines
Dynamic Zip File Loading
Static Mesh Separation
Hybrid Script Export

As time has gone on, reality has forced me to focus my attention away from AssetRipper. These improvements (and any not listed here) can only happen with your financial support.
Development is slow when sponsorship is low.
Sponsorship
If you like the work I've done and want to see it continue, please consider sponsoring me. It really helps with development, more than you know.

GitHub Sponsors
Patreon
Paypal

repo: mafaca/UtinyRipper


text:
[WIP] Updating travis

Adding support for node.js 10, windows and osx builds.

Yes, the tests are not stable on windows.

repo: mafintosh/discovery-swarm


text:
🛑 Almacenia is down

In 0c2ac93, Almacenia (https://www.almacenia.com/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Almacenia is back up in 5967308.

repo: magarlo/upptime-status


text:
Retryable and non retryable events

Currently, all failures are retried if they are not successful. There are situations where it is unnecessary to retry when we know it will fail.
For example, In a HTTP context, if the external system returns a 4xx status code denoting client error we should skip retrying.

Closed by #20

repo: mage-os/mageos-async-events


text:
BROKEN

m2c add phpmyadmin
Unknown argument phpmyadmin. Run m2c add --help for usage information

Hey @rbouma,
You need to use m2c add service phpmyadmin.
m2c add --help

Information:
  Adds optional service or extra domain to the project.

Usage:
  m2c add service <service>
  m2c add domain <domain>
  m2c add --help

Services:
  elasticsearch     Elasticsearch service.
  phpmyadmin        phpMyAdmin service.
  rabbitmq          RabbitMQ service.
  varnish           Varnish service.

Flags:
  --help            Displays this information.

authors: rbouma shkoliar


text:
Blockchain data unable to load and possible virus

When I first download the wallet it got flagged for possibly having a virus (Trogan:win32/tiggre!plock) and I had to disable my firewalls to download it, I then got the wallet loaded a few times and the blockcoin started to download. After a few hours my computer unexpectantly shut down and now when I try to load the wallet I says that there is an error loading the block chain.

same here.
Something is really wrong with all the executables for this criptocurrency. all of them is infected with Trojans and Malwares

Download the block chain from hear http://coinmagi.org/bin/block-chain/m-block-chain.tar.gz if it gets stuck.

authors: Commander-Crash boti chickenminer

repo: magi-project/magi


text:
Fixed the typo

Fixed the typo

I approve this commit.  It is important.

repo: magic-research/magic-animate


text:
Add snapcraft support

This pull request adds support to build magic-wormhole as a snap.
magic-wormhole is already available in the snap store via the yaml in the snapcrafter repo.
This PR is to upstream the snapcraft.yaml which creates the snap which is in the store. If the PR is accepted, we can transfer ownership of the magic-wormhole snap to you, the upstream developer. Once done you could use the free build.snapcraft.io service to automatically build new releases of magic-wormhole and push directly to the store.
If accepted, I'm happy to walk you through the next steps.

Hey, sorry I didn't dive into this earlier. It looks like there's currently a snapcraft.yaml in the root directory (not in snap/).. is that good neough? Are there any changes we should make to it in addition to (or instead of) this PR?

@popey your reply is needed, sir.

authors: abitrolly popey warner

repo: magic-wormhole/magic-wormhole


text:
Avalanche Extension breaks loginWithMagicLink functionality on React Native

✅ Prerequisites

[x ] Did you perform a cursory search of open issues? Is this question already asked elsewhere?
[ x] Are you reporting to the correct repository (magic-sdk)?

❓ Question
Sorry, I've been stuck on this issue for a few days now.
I'm setting up a magic instance which is a SDKBase with a ReactNative extension.
I'm following the instructions for the Avalanche extension, specifically targeting the Fuji Testnet:
m = new Magic(magicKey,
    {
      extensions: {
        xchain: new AvalancheExtension({
          rpcUrl: 'https://api.avax-test.network/ext/bc/C/rpc', // fuji testnet
          chainId: '43113', // fuji testnet
          networkId: 4, // Avalanche networkId
        }),
      },
    }
   );

Without the extension, my app works as expected, I'm able to generate a DiD token.
However, it seems like the extension is breaking the login functionality.
I'm able to log "m":
q {
  "apiKey": <API_KEY_HERE>,
  "auth": Oe {
    "sdk": [Circular],
  },
  "endpoint": "https://box.magic.link",
  "parameters": <JWT_TOKEN_HERE>,
  "rpcProvider": Ge {
    "addListener": [Function anonymous],
    "emit": [Function anonymous],
    "eventNames": [Function anonymous],
    "isMagic": true,
    "listenerCount": [Function anonymous],
    "listeners": [Function anonymous],
    "off": [Function anonymous],
    "on": [Function anonymous],
    "once": [Function anonymous],
    "removeAllListeners": [Function anonymous],
    "removeListener": [Function anonymous],
    "sdk": [Circular],
  },
  "testMode": true,
  "user": Je {
    "sdk": [Circular],
  },
  "xchain": c {
    "__is_initialized__": true,
    "__sdk_access_field_descriptors__": Map {
      "request" => Object {
        "descriptor": Object {
          "configurable": true,
          "enumerable": false,
          "value": [Function request],
          "writable": true,
        },
        "isPrototypeField": true,
      },
      "overlay" => Object {
        "descriptor": Object {
          "configurable": true,
          "enumerable": false,
          "get": [Function get],
          "set": undefined,
        },
        "isPrototypeField": true,
      },
      "sdk" => Object {
        "descriptor": Object {
          "configurable": true,
          "enumerable": true,
          "value": undefined,
          "writable": true,
        },
        "isPrototypeField": false,
      },
    },
    "avalancheConfig": Object {
      "chainId": "43113",
      "networkId": 4,
      "rpcUrl": "https://api.avax-test.network/ext/bc/C/rpc",
    },
    "config": Object {
      "chainType": "AVAX",
      "options": Object {
        "chainId": "43113",
        "networkId": 4,
      },
      "rpcUrl": "https://api.avax-test.network/ext/bc/C/rpc",
    },
    "name": "avax",
    "sdk": [Circular],
    "signTransaction": [Function anonymous],
    "utils": Object {
      "createJsonRpcRequestPayload": [Function h],
      "createPromiEvent": [Function Q],
      "decodeJSON": [Function Te],
      "encodeJSON": [Function H],
      "isPromiEvent": [Function Se],
      "standardizeJsonRpcRequestPayload": [Function _],
      "storage": Object {
        "clear": [Function anonymous],
        "getItem": [Function anonymous],
        "iterate": [Function anonymous],
        "key": [Function anonymous],
        "keys": [Function anonymous],
        "length": [Function anonymous],
        "removeItem": [Function anonymous],
        "setItem": [Function anonymous],
      },
    },
  },
}

However, calls to m.auth.loginWithMagicLink never return anything, or produce any error.
🌎 Environment

Software
Version(s)

@magic-sdk/react-native
"^8.2.1"

@magic-ext/avalanche"
"^3.1.1",

@seanli @FYJen @Ethella @smithki  - any details here?

Avalance extension is not officially supported in RN. But I can take a look to see what bug you may have encountered

@daweth It doesn't seem to break my local project. What error do you see after you embed the extension?

Are you able to generate a DID after calling loginWIthMagicLink using the Magic Instance w/Avalanche extension?

There is no error. There is simply no result from calling the function within a TryCatch block. There are also no records of handling it on the magic admin dash

Yes, I'm able to generate DID with Avalanche extension plugged in. Do you mind sharing a reproducible demo with me?

Cool, feel free to re-open the ticket if you found anything. 😄

authors: Ethella daweth

repo: magiclabs/magic-js


text:
[Docs] Update contributing guide

Add more info on the 5 files to change when contributing

this gonna help a lot of newcomers

this gonna help a lot of newcomers

It sure will 💯

authors: BankkRoll dillionverma unnamed-lab

repo: magicuidesign/magicui


text:
Readchar returning spaces when run asynchronously

I'm creating a game and I would like to make a pause function when the user presses "p", so I use threading to asynchronously run readchar. The issue is, when I do this, the text becomes deformed with extra spaces after each line.
Before readchar:

After readchar:

hi @Yourself1011 my PR fixes this issue, see https://github.com/magmax/python-readchar/pull/54

Also this is a duplicate of https://github.com/magmax/python-readchar/issues/53

Already merged. Should be fixed at v3.0.1. Can you confirm it?

Writing this comment to note the fix was reverted in v3.0.4 https://github.com/magmax/python-readchar/pull/54
Installing v3.0.3 worked fine for my purposes though: https://pypi.org/project/readchar/3.0.3/

should be fixed in v4.0.0

repo: magmax/python-readchar


text:
ts-toolbelt should be in dependencies, not devDependencies

Hiya 👋
I was having trouble getting the typechecking working - everything was just any. After some debugging, it turned out ts-toolbelt wasn't installed. After manually installing it, I'm seeing the typechecking working again :)
I see that it's in devDependencies of both projects here. Can we move it to dependencies, or at least, peerDependencies?
Thanks!

Fixed in 0.4.1


text:
TypeError: cannot use a string pattern on a bytes-like object

Hello:
Sorry, but I receive this error when I am trying to connect to my Garmin´s space.
Regards.

Same here :/

authors: jschierl pedrojcaamano

repo: magsol/garmin


text:
RuntimeError: element 0 of tensors does not require grad and does not have a grad_fn

Thank you for this amazing work.
I was trying to integrate the histogram loss into my own network, I copied the class as it is from the Colab notebook but I get the below error:
RuntimeError: element 0 of tensors does not require grad and does not have a grad_fn
Do you have any idea how can I sort this out. Thank You

Sorry, the problem was from my side only. Nothing to do with your code.

repo: mahmoudnafifi/HistoGAN


text:
Add missing MData functions

Add functions to MData that are implemented by its Seq and Unseq variants such as get, entries, values, etc. For example, entries should match on the variant and return MDataEntries instead of MDataSeqEntries and MDataUnseqEntries. This would simplify some code in SCL and vaults, for example:
(MDataKind::Seq, Ok(MData::Seq(mdata))) => {
    Response::ListMDataEntries(Ok(mdata.entries().clone().into()))
}
(MDataKind::Unseq, Ok(MData::Unseq(mdata))) => {
    Response::ListMDataEntries(Ok(mdata.entries().clone().into()))
}

could become:
(MDataKind::Seq, Ok(mdata)) if mdata.is_seq() |
(MDataKind::Unseq, Ok(mdata)) if mdata.is_unseq() => {
    Response::ListMDataEntries(Ok(mdata.entries().clone()))
}

This is low priority for now but it would make the API nicer to use.

Closing - mdata no longer used

authors: S-Coyle m-cat


text:
Passing variables to triggered build

Feature request:
When triggering a pipeline from release build, we would want to pass some variables.
Use case :
I am trying to use this extension to run tests against every deployment.
So from the release build, I would want to pass the name of the environment to the pipeline as a variable.

You can add value to trigger a specific stage.

authors: maikvandergaag nishants

repo: maikvandergaag/msft-extensions


text:
publish dataset from model.bim/xmla script instead of pbix file

it would be very nice if we could use model.bim or a xmla script to create/modify a dataset, instead of publishing from pbix file.
we many times build models independently from reports/dashboards in tabular editor and would like to deploy these.
something that can be done with cmdlet invoke-ascmd if i'm not mistaken.
are we missing something? is this already possible?
thanks!

Never seen this option, could you maybe share more info as I'm not a data expert?

Cheers Maik,
if you want to dig deep into the CI/CD topic for tabular models, Daniel the creator of TabularEditor has some excellent Blog Posts on this
The short version is: Inside the pbix-file lives a Model.bim - which is the data model that is created in the report (all the tables, measures, data sources, hierarchies, etc - but without the data itself).
In more advanced scenarios (bigger amounts of data, more than one developer, etc) models are developed separately from the reports that are built on top - and then deployed separately.
(Reports are built separately as well in PBI Desktop and have a Liveconnection to such a dataset/model).
Now, you have such a Model.bim (which is JSON) and/or a TSML/XMLA Script (which is also JSON) that can be executed against the XMLA endpoint of the PBI Premium workspace using the Invoke-AsCmd Cmdlet in order to create and/or modify such a dataset - no pbix-file is involved anymore if, say, there's a sprint with only changes to the model and none to the dashboards.
Now, it would be very cool to have a proper "pbi action" for this deployment in the pipeline instead of "handmade" powershell with what feels like clumsy handling of service principal vars, xmla endpoints and errors.
Does this help a bit? Can I clarify any further?

@datadu-de: I'm trying to understand the usecase a little more. But can not really find a usefull and clean way to git this up and running. Do you maybe have more information on this?

@datadu-de I added this functionality to the beta build. Would you care to test this out, as I have no access to a premium capacity workspace to do it myself?
An example task can be seen below.


text:
OSSM-3267: migrate cpu and ram flags to env variables

This PR is for migrating maistra prow jobs to Openshift CI jobs. It replaces the hard-coded CI cpu and RAM resources value with environment variables so that we can define and use more resources later.

/cherrypick maistra-2.3
/cherrypick maistra-2.2

/cherrypick maistra-2.2

authors: jwendell yxun

repo: maistra/envoy


text:
مشخص کردن تمامی تعطیلات رسمی

سلام
سپاس بابت کار بسیار زیباتون
چطور میتونم تمامی تعطیلات رسمی را با رنگ قرمز به مانند جمعه ها نمایش بدم؟
من به این شکل عمل میکنم ولی خب یجورایی فقط خط آخر کد رو برای تمام ماهها اعمال میکنه
            dayRendering: function (dayOptions, input) {                 return {                     isHollyDay: dayOptions.month === 1 && dayOptions.day <= 4 || dayOptions.day === 13,                     isHollyDay: dayOptions.month === 2 && dayOptions.day === 3 || dayOptions.day === 13 || dayOptions.day === 14,                     isHollyDay: dayOptions.month === 3 && dayOptions.day === 14 || dayOptions.day === 15,                     isHollyDay: dayOptions.month === 4 && dayOptions.day === 19 || dayOptions.day === 27,                     isHollyDay: dayOptions.month === 5 && dayOptions.day === 16 || dayOptions.day === 17,                     isHollyDay: dayOptions.month === 6 && dayOptions.day === 26,                     isHollyDay: dayOptions.month === 7 && dayOptions.day === 3 || dayOptions.day === 5 || dayOptions.day === 13,                 }             },

سلام
ممنون از همکاریتون
مشکل کد اینه که چندین مرتبه isHollyDay مقداردهی شده بنابرین آخرین مقداردهی معتبر هست.


text:
Usage from an external project

@fbessou we start thinking about making a releasable bundle, so angular2-schema-form could be used as an external dependency in any regular project.
But we do not need a bundle here, we just need the .ts files, because the project will have its own webpack setup to compile everything anyway.
Nevertheless, we need to clean up our dependencies (some are declared as devDependencies but should not, like z-schema).

Few related issues:

by using the master branch in my external project's package.json, npm run build is not executed, hence I do not get the right .js sources (it works with the dist branch https://github.com/plone/plone_client/blob/use-ng2-form/package.json#L81, where /dist folder is committed),
I need to provide FieldRegistryService in my external app https://github.com/plone/plone_client/blob/use-ng2-form/src/components/app/app.component.ts#L33, that's not cool. Maybe that should be done by form.component directly (but will we be able to use ot from our external app?),
I get a strange error:
EXCEPTION: Error in ./StringField class StringField - inline template:4:224
ORIGINAL EXCEPTION: No value accessor for ''
Is anything missing (something else to provide like FieldRegistryService?) ?

Is this still a thing?

no it is not

authors: daniele-pecora ebrehault


text:
Rhai Events are overriding each other

Hi!
Could be that I completely misunderstand events in this crate.
I've implemented a function that allows me to spawn a mod.
So via script, i can just spawn other mods.
and those spawned mods then get called the "on_init" function in their script!
problem is, as soon as there is more than just one at the same time, only one of them gets the init method called.
same thing for the Update call.
I can't use Recipients::All because i need to do some additional checks before calling on_update on that entity, so i use Recipient::Entity, and loop through all of them. and here the same problem!
Am I misunderstanding something or is this a "design flaw"?

Hi @zwazel fantastic catch! That's indeed a bug, the rhai implementation was not aligned with the Lua one here, thanks a lot for the PR! Please fire any more issues this way, I think not that many people have used the Rhai side of this crate so there might well be some more bumps along the way!

glad i could help, and that's exactly what i'll do as i'm working quite a lot with rhai right now :)

authors: makspll zwazel


text:
How to compile zig code to wasm and run it with zware ?

if this is possible,please  give me a exmple code . thank you !  Zware is a amazing tool !
Note: i want to call zig from wasm and call wasm from zig .

🙏

@acodervic thank you for your intereset.
Have a look at https://github.com/malcolmstill/zware-doom/blob/master/src/interface.zig. This repo is embedding Doom compiled to wasm (from https://github.com/malcolmstill/doom) in a zig program that provides graphics and input.
The interface.zig file is generated by running zware-gen and passing it the doom.wasm file. It will dump out zig code that defines a const Api = struct that let's you call exported functions and will stub out functions that the .wasm imports, you will need to provide implementations of these functions (other than the standard wasi functions which are provided by zware.wasi.
You can see for example:
pub fn ZwareDoomRenderFrame(vm: *zware.VirtualMachine) zware.WasmError!void {
    const screen_len = vm.popOperand(u32);
    const screen_ptr = vm.popOperand(u32);

    const memory = try vm.inst.getMemory(0);
    const data = memory.memory();
    const screen = data[screen_ptr .. screen_ptr + screen_len];

    glfw.renderFrame(screen);

    try vm.pushOperand(u64, 0);
}

...we have access to the WebAssembly stack and memory through vm.. The function "receives" arguments by popping from the stack and "returns" values by pushing to the stack.

The previous reply covered calling WebAssembly code (from zig) via the Api struct and WebAssembly calling zig code (registered via exposeHostFunction).
As to the issue title of compiling zig code to .wasm check out https://github.com/malcolmstill/DOOM/blob/master/build.zig. That's actually compiling C code to .wasm but with the zig build system. A couple of things to note:

I invoke the compilation of that build.zig with zig build -Dtarget=wasm32-wasi-musl -Doptimize=ReleaseFast. I.e. I explicitly set the target to wasm32-wasi-musl. This along with exe.linkLibC(); in build.zig will use musl backed by wasi "system calls".
The build.zig file also specifies exe.import_symbols = true;. What this does is make sure symbols that aren't found during linking are added to the .wasm imports section (so that we can provide them) rather than the linker erroring.

Let me know if that helps (or indeed if it doesn't help!) and I can try to clarify. Feel free to share any code you have and I can try and help from that direction.

Let me know if that helps (or indeed if it doesn't help!) and I can try to clarify. Feel free to share any code you have and I can try and help from that direction.

I get errors  when i build doom to wasm file.
zig build
/home/x/Downloads/chromeDownload/DOOM-master/build.zig:93:12: error: member function expected 1 argument(s), found 2
        exe.addCSourceFile(file, &flags);
        ~~~^~~~~~~~~~~~~~~
/home/x/.zvm/0.11.0/lib/std/Build/Step/Compile.zig:905:5: note: function declared here
pub fn addCSourceFile(self: *Compile, source: CSourceFile) void {
~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
referenced by:
    runBuild__anon_7164: /home/w/.zvm/0.11.0/lib/std/Build.zig:1638:27
    remaining reference traces hidden; use '-freference-trace' to see all reference traces

I just want to build a simple app (like a add  function  and return result (input:x,y output:z )  ) to wasm.  Is there has any easy way to do it ?

Forgive me, Build doom to wasm and run it with zware is amazing. But someone just need some example to clarify how it does it.

Forgive me, Build doom to wasm and run it with zware is amazing. But someone just need a simpile example to clarify how it does it.

@acodervic right, so there was an issue with the build.zig in https://github.com/malcolmstill/doom. I've pushed a change that I think works for both zig master and zig 0.11 (the version of zig used to build the .wasm)

Okay, so let's do this from scratch.
Step 1. Our WebAssembly program
We'll do this part in zig, but this could really be any language that emits wasm. We'll also lean here on wasi support.
Using the master version of zig, let's zig init-exe (it doesn't really matter what version of zig we use here in the same way it doesn't really matter our source language), in (say) a directory called program. We get the following main.zig (plus the standard `build.zig):
const std = @import("std");

pub fn main() !void {
    // Prints to stderr (it's a shortcut based on `std.io.getStdErr()`)
    std.debug.print("All your {s} are belong to us.\n", .{"codebase"});

    // stdout is for the actual output of your application, for example if you
    // are implementing gzip, then only the compressed bytes should be sent to
    // stdout, not any debugging messages.
    const stdout_file = std.io.getStdOut().writer();
    var bw = std.io.bufferedWriter(stdout_file);
    const stdout = bw.writer();

    try stdout.print("Run `zig build test` to run the tests.\n", .{});

    try bw.flush(); // don't forget to flush!
}

We don't need to make any changes to this. We can compile this to webassembly simply by running:
zig build -Dtarget=wasm32-wasi-musl -Doptimize=ReleaseFast

...and we should get a zig-out/bin/program.wasm
Step 2.  Our zware program
Let's init another exe, but this time we need to be particular about zig version, let's say this in a directory called wrapper. In particular we need to use zig 0.11

[!NOTE]
zware needs some updates to work with the current zig master. I'd like to aim for zware supporting the latest stable release and master at the same time.

Having inited the new exe we're going to make the following changes:

Copy the program.wasm from the program directory to wrapper/src/program.wasm
Add a build.zig.zon to define the dependency on zware
Add a couple of lines to build.zig to make the zware module available to our program.
Create an interface.zig file based upon the particular .wasm file. We could do this by hand, but the zware-gen program can do this for us.
Update main.zig to embed program.wasm, initialise zware, initialise some stuff from interface.zig and call the _start function of program.wasm

Change 1 is easy.
Change 2:
Our build.zig.zon will look like:
.{
    .name = "wrapper",
    .version = "0.0.1",
    .paths = .{""},
    .dependencies = .{
        .zware = .{
            .url = "https://github.com/malcolmstill/zware/archive/be5ccf4d741f2fab37ad4174779d3d4f465f19f1.tar.gz",
            .hash = "1220173793052d32ae35beb0e5412b1f57bd3cf4c4b2db585adbb292f558e20105e2",
        },
    },
}

Change 3:
After the definition of const exe definition in build.zig we make the zware module available to our wrapper:
    const zware = b.dependency("zware", .{ .target = target, .optimize = optimize });
    exe.addModule("zware", zware.module("zware"));

Change 4:
The interface.zig will look like this:
const std = @import("std");
const zware = @import("zware");

pub fn initHostFunctions(store: *zware.Store) !void {
    try store.exposeHostFunction("wasi_snapshot_preview1", "proc_exit", zware.wasi.proc_exit, &[_]zware.ValType{.I32}, &[_]zware.ValType{});
    try store.exposeHostFunction("wasi_snapshot_preview1", "fd_write", zware.wasi.fd_write, &[_]zware.ValType{ .I32, .I32, .I32, .I32 }, &[_]zware.ValType{.I32});
}

pub const Api = struct {
    instance: *zware.Instance,

    const Self = @This();

    pub fn init(instance: *zware.Instance) Self {
        return .{ .instance = instance };
    }

    pub fn _start(self: *Self) !void {
        var in = [_]u64{};
        var out = [_]u64{};
        try self.instance.invoke("_start", in[0..], out[0..], .{});
    }
};

Again, you can write this by hand, but zware-gen will generate this file.

[!NOTE]
In the case of program.wasm we are only calling from zig into wasm, and so we don't need to make any changes to interface.zig. However, if we are calling from wasm into zig, zware-gen will only have created stub functions that you will have to implement.

Change 5:
Update the zig init-exe main.zig to look like this:
const std = @import("std");
const zware = @import("zware");
const Store = zware.Store;
const Module = zware.Module;
const Instance = zware.Instance;
const GeneralPurposeAllocator = std.heap.GeneralPurposeAllocator;
var gpa = GeneralPurposeAllocator(.{}){};
const interface = @import("interface.zig");

pub fn main() !void {
    defer _ = gpa.deinit();
    const alloc = gpa.allocator();

    const bytes = @embedFile("program.wasm");

    var store = Store.init(alloc);
    defer store.deinit();

    var module = Module.init(alloc, bytes);
    defer module.deinit();
    try module.decode();

    try interface.initHostFunctions(&store);

    var instance = Instance.init(alloc, &store, module);
    try instance.instantiate();
    defer instance.deinit();

    var api = interface.Api.init(&instance);

    try api._start();
}

We initialise zware. We run try interface.initHostFunctions(&store); to setup imports / exports between zig and the wasm module. We init interface.Api.init(&instance); and finally call try api._start().
This should output:
➜  wrapper git:(master) ✗ zig-out/bin/wrapper
All your codebase are belong to us.
Run `zig build test` to run the tests.

@acodervic let me know if that clarifies things, or if there's any more detail I can give (which I am more than happy to do!)

@acodervic let me know if that clarifies things, or if there's any more detail I can give (which I am more than happy to do!)

Please tell me how to export a add function to wasm and call it with zware .Thanks !
//main.zig
const std = @import("std");

pub fn main() !void {
    // Prints to stderr (it's a shortcut based on `std.io.getStdErr()`)
    std.debug.print("All your {s} are belong to us.\n", .{"codebase"});

    // stdout is for the actual output of your application, for example if you
    // are implementing gzip, then only the compressed bytes should be sent to
    // stdout, not any debugging messages.
    const stdout_file = std.io.getStdOut().writer();
    var bw = std.io.bufferedWriter(stdout_file);
    const stdout = bw.writer();

    try stdout.print("Run `zig build test` to run the tests.\n", .{});

    try bw.flush(); // don't forget to flush!
}
export fn add(a: i32, b: i32) i32 {
    return a + b;
}

test "simple test" {
    var list = std.ArrayList(i32).init(std.testing.allocator);
    defer list.deinit(); // try commenting this out and see if zig detects the memory leak!
    try list.append(42);
    try std.testing.expectEqual(@as(i32, 42), list.pop());
}

Right, let's try starting our WebAssembly program with zig init-lib:
This gives us this main.zig (which we won't modify):
const std = @import("std");
const testing = std.testing;

export fn add(a: i32, b: i32) i32 {
    return a + b;
}

test "basic add functionality" {
    try testing.expect(add(3, 7) == 10);
}

Now the build.zig will contain the following:
  const lib = b.addStaticLibrary(.{
        .name = "libr",
        // In this case the main source file is merely a path, however, in more
        // complicated build scripts, this could be a generated file.
        .root_source_file = .{ .path = "src/main.zig" },
        .target = target,
        .optimize = optimize,
    });

It seems if we change addStaticLibrary to addSharedLibrary:
    const lib = b.addSharedLibrary(.{
        .name = "libr",
        // In this case the main source file is merely a path, however, in more
        // complicated build scripts, this could be a generated file.
        .root_source_file = .{ .path = "src/main.zig" },
        .target = target,
        .optimize = optimize,
    });

and build with:
zig build -Dtarget=wasm32-freestanding

[!WARNING]
This seems to print the following warning:
zig build-lib libr ReleaseFast wasm32-freestanding: error: warning(link): unexpected LLD stderr:
wasm-ld: warning: creating shared libraries, with -shared, is not yet stable
So maybe this isn't the "correct" way to build this library, or maybe this is just the state of things. I don't know.

We will get a zig-out/lib/libr.wasm which seems to have the add function as an export:
libr git:(master) ✗ wasm-objdump -x zig-out/lib/libr.wasm

libr.wasm:      file format wasm 0x1

Section Details:

Custom:
 - name: "dylink.0"
 - mem_size     : 0
 - mem_p2align  : 0
 - table_size   : 0
 - table_p2align: 0
Type[2]:
 - type[0] () -> nil
 - type[1] (i32, i32) -> i32
Import[3]:
 - memory[0] pages: initial=0 <- env.memory
 - global[0] i32 mutable=0 <- env.__memory_base
 - global[1] i32 mutable=0 <- env.__table_base
Function[3]:
 - func[0] sig=0 <__wasm_call_ctors>
 - func[1] sig=0 <__wasm_apply_data_relocs>
 - func[2] sig=1 <add>
Export[2]:
 - func[1] <__wasm_apply_data_relocs> -> "__wasm_apply_data_relocs"
 - func[2] <add> -> "add"
Code[3]:
 - func[0] size=2 <__wasm_call_ctors>
 - func[1] size=2 <__wasm_apply_data_relocs>
 - func[2] size=7 <add>
Custom:
 - name: ".debug_abbrev"
Custom:
 - name: ".debug_info"
Custom:
 - name: ".debug_str"
Custom:
 - name: ".debug_pubnames"
Custom:
 - name: ".debug_pubtypes"
Custom:
 - name: ".debug_line"
Custom:
 - name: "name"
 - func[0] <__wasm_call_ctors>
 - func[1] <__wasm_apply_data_relocs>
 - func[2] <add>
 - global[0] <__memory_base>
 - global[1] <__table_base>
Custom:
 - name: "producers"
Custom:
 - name: "target_features"
  - [+] mutable-globals
  - [+] sign-ext

[!NOTE]
It seems just adding the export fn add(... in the first example doesn't actually export that function when building a binary. Hence we're trying with zig init-lib

Running zware-gen against libr.wasm will give us:
const std = @import("std");
const zware = @import("zware");

pub fn initHostFunctions(store: *zware.Store) !void {
    _ = store;
}

pub const Api = struct {
    instance: *zware.Instance,

    const Self = @This();

    pub fn init(instance: *zware.Instance) Self {
        return .{ .instance = instance };
    }

    pub fn __wasm_apply_data_relocs(self: *Self) !void {
        var in = [_]u64{};
        var out = [_]u64{};
        try self.instance.invoke("__wasm_apply_data_relocs", in[0..], out[0..], .{});
    }

    pub fn add(self: *Self, param0: i32, param1: i32) !i32 {
        var in = [_]u64{ @bitCast(@as(i64, param0)), @bitCast(@as(i64, param1)) };
        var out = [_]u64{0};
        try self.instance.invoke("add", in[0..], out[0..], .{});
        return @bitCast(@as(u32, @truncate(out[0])));
    }
};

And so we can have a main.zig in our zware program that looks like:
const std = @import("std");
const zware = @import("zware");
const Store = zware.Store;
const Module = zware.Module;
const Instance = zware.Instance;
const GeneralPurposeAllocator = std.heap.GeneralPurposeAllocator;
var gpa = GeneralPurposeAllocator(.{}){};
const interface = @import("interface.zig");

pub fn main() !void {
    defer _ = gpa.deinit();
    const alloc = gpa.allocator();

    const bytes = @embedFile("libr.wasm");

    var store = Store.init(alloc);
    defer store.deinit();

    var module = Module.init(alloc, bytes);
    defer module.deinit();
    try module.decode();

    // In this case we don't have any host functions:
    // try interface.initHostFunctions(&store);

    var instance = Instance.init(alloc, &store, module);
    try instance.instantiate();
    defer instance.deinit();

    var api = interface.Api.init(&instance);

    const result = try api.add(56, -14);
    std.debug.print("result = {}\n", .{result});
}

...well actually, that's not quite right. As you can see from the wasm-objdump (which is part of https://github.com/WebAssembly/wabt), as built the libr.wasm is expecting the host to provide the memory and a couple of globals.
Let's add the memory and globals manually:
const std = @import("std");
const zware = @import("zware");
const Store = zware.Store;
const Module = zware.Module;
const Instance = zware.Instance;
const GeneralPurposeAllocator = std.heap.GeneralPurposeAllocator;
var gpa = GeneralPurposeAllocator(.{}){};
const interface = @import("interface.zig");

pub fn main() !void {
    defer _ = gpa.deinit();
    const alloc = gpa.allocator();

    const bytes = @embedFile("libr.wasm");

    var store = Store.init(alloc);
    defer store.deinit();

    var module = Module.init(alloc, bytes);
    defer module.deinit();
    try module.decode();

    // In this case we don't have any host functions:
    // try interface.initHostFunctions(&store);

    const mem_handle = try store.addMemory(0, null);
    const mem_base_handle = try store.addGlobal(.{ .valtype = .I32, .mutability = .Immutable, .value = 0 });
    const table_base_handle = try store.addGlobal(.{ .valtype = .I32, .mutability = .Immutable, .value = 0 });
    try store.@"export"("env", "memory", .Mem, mem_handle);
    try store.@"export"("env", "__memory_base", .Global, mem_base_handle);
    try store.@"export"("env", "__table_base", .Global, table_base_handle);

    var instance = Instance.init(alloc, &store, module);
    try instance.instantiate();
    defer instance.deinit();

    var api = interface.Api.init(&instance);

    const result = try api.add(56, -14);
    std.debug.print("result = {}\n", .{result});
}

and finally:
➜  wrapper-libr git:(master) ✗ zig-out/bin/wrapper
result = 42

@acodervic so this library case is not ideal at the moment (having to manually define the memory).
There are a couple of things to improve here:

Maybe I'm not building the libr.wasm correctly and there are some other options that change how it's built so that it defines its own memory and therefore doesn't require the host to supply it.
If that's not possible, or maybe regardless, improve zware-gen so as to do some of the lifting here.

I cant export "add" function in interface.zig by zware-gen.
test-wasm.zip
zig build -Dtarget=wasm32-freestanding
zware/tools/zware-gen$ zig build run  -- /home/w/Documents/localgitserver/zig-dnsshell/test-wasm/zig-out/lib/libr.wasm
const std = @import("std");
const zware = @import("zware");

pub fn initHostFunctions(store: *zware.Store) !void {
}

pub const Api = struct {
        instance: *zware.Instance,

        const Self = @This();

        pub fn init(instance: *zware.Instance) Self {
                return .{ .instance = instance };
        }

}

@acodervic that looks like it should work (I pulled down your .zip) and when I run zware-gen on the built .wasm I get:
const std = @import("std");
const zware = @import("zware");

pub fn initHostFunctions(store: *zware.Store) !void {
}

pub const Api = struct {
	instance: *zware.Instance,

	const Self = @This();

	pub fn init(instance: *zware.Instance) Self {
		return .{ .instance = instance };
	}

	pub fn __wasm_apply_data_relocs(self: *Self) !void {
		var in = [_]u64{};
		var out = [_]u64{};
		try self.instance.invoke("__wasm_apply_data_relocs", in[0..], out[0..], .{});
	}

	pub fn add(self: *Self, param0: i32, param1: i32) !i32 {
		var in = [_]u64{@bitCast(@as(i64, param0)), @bitCast(@as(i64, param1))};
		var out = [_]u64{0};
		try self.instance.invoke("add", in[0..], out[0..], .{});
		return @bitCast(@as(u32, @truncate(out[0])));
	}
};

authors: acodervic malcolmstill

repo: malcolmstill/zware


text:
Silence Xcode 'Conversion to Swift 4.2 is available' warning

I just migrated my project to Swift 4.2. After removing all warnings the only warning which remains is: Conversion to Swift 4.2 is available. When clicking on this warning Xcode wants to migrate the SwiftDate target to Swift 4.2.
Is it possible to silence this warning? I read in the release notes of SwiftDate 5.0.9 that it supports both Swift 4.2 and Swift 4.0.
I'm using Xcode 10, SwiftDate 5.0.9 and Cocoapods for my dependencies.

+1

+1

Does this just require a .swift-version file? Or is it something in the podspec that specifies the swift version to CocoaPods when it's building the Pods project?

The swift version is defined as 4.0 in the podspec.
A temporary solution to silence the warning would be to update you Podfile and set the Swift version to 4.2. In my case, the post_install for my Podfile looke like this:
post_install do |installer|
  installer.pods_project.targets.each do |target|
    next unless [
      'SwiftDate-iOS',
      'SwiftDate-macOS',
      'SwiftDate-tvOS'
    ].include? target.name

    target.build_configurations.each do |config|
      config.build_settings['SWIFT_VERSION'] = '4.2'
    end
  end
end

authors: cgoldsby jessecoding nizenyang phoney twiedow

repo: malcommac/SwiftDate


text:
Is the project dead?

ping

Nope but actually I’ve not so enough free time to work on a major release. Have you found a bug?

@malcommac Since you're asking, https://github.com/malcommac/SwiftRichString/issues/126 is an issue we keep running into.

authors: CraigSiemens letko-dmitry malcommac

repo: malcommac/SwiftRichString


text:
Logarithmic volume increments?

Just throwing it out there.. for those of us with external speakers set to near-max.. the first few increases have a more drastic change if you're casually working or listening to music, then if you're partying and you want to go from loud to louder :)
Would logarithmic increments be something supported? I guess it would require 3rvx to know what the current volume is.. then it can increase it by smaller amounts if it's low, and get increasingly larger increments as the volume is jacked.
Stackoverflow has some algorithms for implementing it :
http://stackoverflow.com/questions/1165026/what-algorithms-could-i-use-for-audio-volume-level

Hmm, that's a great idea, and probably should've been an option from the start. I'll do some experimenting and hopefully I can get this put into the next beta!

:+1: I was about to suggest the same!

I've just about got something ready for this, where the curve can be configured as well to make it more or less sensitive. Hopefully will have an update ready in the next few days!

Is there a build ready for testing?

I'll try to get something put together in the next couple days!

(I see that's what I said before -- but now I REALLY mean it... ;-))

Ok, I haven't finished reworking the settings app to support this yet (I'm in the process of adding an OSD settings tab where this will be), but I thought I'd push out a prerelease for testing the volume curve modification: http://3rvx.com/releases/3RVX-2.9.2-pre2.zip
If you replace the executables in your current install with these, you will also need to replace the "Classic" skin (it has been updated with Brightness images).
To activate the curve adjustment, you'll need to modify your Settings.xml (%APPDATA%\3RVX\Settings.xml if you're using an installer version) and add a curveAdjust tag like:
<curveAdjust>3</curveAdjust>

The number provided to curveAdjust represents the "strength" of the curve modification. Here's what the curves look like on my system (I believe these could vary based on hardware (?)):

Where 0 is the original unmodified curve, 4 gives a roughly linear increase in output dB. Beyond that, things start to get a little extreme on the loud end. In the next few days I'll also finish adding support for a volume limiter, which would put an upper bound on the high end of the curve (while still applying the desired curve adjustment)
For the UI of the settings app, I was planning on adding a simple dropdown for this with some predefined values (maybe 1 through 10). Let me know if you think there's a better way to adjust this/convey it to the user.

Oh man, it's heaven! It works really well at high volumes! It does scale
quickly at the high end, but 99% of the time I am listening at the low end.
Can you use either % or volume units and they are both affected by the
curve?
For the configuration, what about :
[checkbox] Enable Logarithmic Volume
[dropdown] Log strength (or correction?)
Low
Medium
High
Custom
Greg
On 22 October 2015 at 16:12, matthew notifications@github.com wrote:

Ok, I haven't finished reworking the settings app to support this yet (I'm
in the process of adding an OSD settings tab where this will be), but I
thought I'd push out a prerelease for testing the volume curve
modification: http://3rvx.com/releases/3RVX-2.9.2-pre2.zip
If you replace the executables in your current install with these, you
will also need to replace the "Classic" skin (it has been updated with
Brightness images).
To activate the curve adjustment, you'll need to modify your Settings.xml
(%APPDATA%\3RVX\Settings.xml if you're using an installer version) and add
a curveAdjust tag like:
3
The number provided to curveAdjust represents the "strength" of the curve
modification. Here's what the curves look like on my system (I believe
these could vary based on hardware (?)):
[image: curve]
https://cloud.githubusercontent.com/assets/2635718/10676891/56ca5a22-78c6-11e5-83e7-1cc553029670.png
Where 0 is the original unmodified curve, 4 gives a roughly linear
increase in output dB. Beyond that, things start to get a little extreme on
the loud end. In the next few days I'll also finish adding support for a
volume limiter, which would put an upper bound on the high end of the curve
(while still applying the desired curve adjustment)
For the UI of the settings app, I was planning on adding a simple dropdown
for this with some predefined values (maybe 1 through 10). Let me know if
you think there's a better way to adjust this/convey it to the user.
—
Reply to this email directly or view it on GitHub
https://github.com/malensek/3RVX/issues/32#issuecomment-150343313.

That sounds good to me. I'm working on getting the UI updated for this... What levels do you think should correspond to low, medium, and high?
For the % and units, both are affected. It would be possible to add an option to override it in the hotkey setup, though...

@malensek these are my results with test version:
0 | 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52
  | 54 56 58 60 62 64 66 68 70 72 74 76 78 80 82 84 86 88 90 92 94 96 98 100
--+-----------------------------------------------------------------------------
1 | 0 3 6 8 11 14 16 19 21 24 26 29 31 33 36 38 40 42 44 46 49 51 53 55 57 58 60
  | 62 64 66 68 70 71 73 75 77 78 80 82 83 85 86 88 90 91 93 94 96 97 99 100
--+-----------------------------------------------------------------------------
2 | 0 4 8 12 16 19 22 25 28 31 34 37 39 42 44 46 49 51 53 55 57 59 61 63 64 66
  | 68 69 71 73 74 76 77 79 80 82 83 84 86 87 88 90 91 92 93 94 96 97 98 99 100
--+-----------------------------------------------------------------------------
3 | 0 6 12 17 21 26 29 33 36 39 42 45 47 50 52 54 57 59 61 62 64 66 68 69 71 72
  | 74 75 77 78 79 81 82 83 84 85 86 88 89 90 91 92 93 94 95 96 97 98 99 100
--+-----------------------------------------------------------------------------
4 | 0 9 17 23 28 33 37 41 44 47 50 53 55 57 59 61 63 65 67 69 70 72 73 75 76 77
  | 78 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
--+-----------------------------------------------------------------------------
5 | 0 14 23 30 36 41 45 48 52 54 57 59 62 64 66 67 69 71 72 74 75 76 77 79 80 81
  | 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
--+-----------------------------------------------------------------------------
6 | 0 20 30 38 43 48 52 55 58 60 63 65 67 69 70 72 73 75 76 77 79 80 81 82 83 84
  | 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
--+-----------------------------------------------------------------------------
7 | 0 26 37 44 50 54 57 60 63 65 67 69 71 73 74 76 77 78 79 80 81 82 83 84 85 86
  | 87 88 89 90 91 92 93 94 95 96 97 98 99 100
--+-----------------------------------------------------------------------------
8 | 0 33 44 50 55 59 62 65 67 69 71 73 74 76 77 78 80 81 82 83 84 85 86 87 88 89
  | 90 91 92 93 94 95 96 97 98 99 100

This appears to give less control on the lower range, which is the exact
opposite of what I want. I want smaller increments on the soft range and larger
increments on the loud range.

That doesn't seem to be acting right. Are these values reported by the windows mixer? Also, what skin/hotkey/etc are you using so I can try to reproduce this behavior? Thanks!

Are these values reported by the windows mixer?

Yes

Also, what skin/hotkey/etc are you using

Vista Glass / Volume +

@malensek any comment?

Hey Steven, I think I have this solved, but it will take fixing another bug to fully fix the problem. Sorry for the long wait! I've been traveling, so don't always have a great internet connection. I need to go through a few commits that should have this working as expected. Thanks!

authors: Danita gcormier malensek svnpenn


text:
Taroify FAQ

淘宝镜像（npmmirror）和 NPM 的最新版本同步有延迟
iOS Input 组件点击穿透 @jiahui
375 设计稿，组件样式放大一倍

希望增加 button group组件

repo: mallfoundry/taroify