100-continue question for Creation with Upload

So in the discussion of Creation With Upload, in the example provided, the POST request seems to be missing the Expect: 100-continue as noted in the paragraph above the example.  Further the response seems not quite consistent with the 100-continue use, as laid out by rfc2616-sec8, sec 8.2.3, where it states concerning the server's response:

Upon receiving a request which includes an Expect request-header field with the "100-continue" expectation, an origin server MUST either respond with 100 (Continue) status and continue to read from the input stream, or respond with a final status code. The origin server MUST NOT wait for the request body before sending the 100 (Continue) response.

So going back to the example given in Creation With Upload,, the response was this:
HTTP/1.1 201 Created
Location: https://tus.example.org/files/24e533e02ec3bc40c387f1a0e460e216
Tus-Resumable: 1.0.0
Upload-Offset: 5

To be consistent to the quoted paragraph above, the response should not include the upload-offset because the server hasn't yet read the body, since the protocol is that it must first reply to the request before attempting to read the body and that response is suppose to just contain the 100 (Continue) status, no?

Good point. The Creation With Upload extension does not require the use of Expect: 100-continue, it only recommends the use of it. So the example is not incorrect by not using this header. In particular, the response is correct as no 100 Continue response is necessary in this case. Furthermore, I believe it makes the example a lot more readable by leaving that part out. What do you think?

I'm not sure I'm following you.  In the paragraph of Creation With Upload, it explicitly states:

In addition, the Client SHOULD include the Expect: 100-continue header in the request to receive early feedback from the Server on whether it will accept the creation request, before attempting to transfer the first chunk.

Based on that paragraph, if one wants to use the Creation with Upload, then they do need to include the Expect: 100-continue in the POST request.  The request example is not consistent to that paragraph above (e.g. it's missing the Expect: 100-continue).
It also notes that the client should get a response from the server on whether it accepts the creation request before attempting to transfer the first chunk, which is consistent to the description in  sec 8.2.3, of rfc2616-sec8.  So the response of the server is also not consistent to the quoted paragraph above.  Because it wouldn't have yet received the first chunk when it sends the response.  It has to first send the response to the client before the client sends the first chunk.  So having an Upload-Offset in that response just wouldn't make sense if the server hasn't yet received that chunk from the client.
Further, although the section on Creation With Upload does not mention that the response sent by the server has to have the 100-continue header in its response, because the response is a status on the 100-continue, it seems prudent to have it in its response.
I think this section on Creation With Upload  is missing a bit more on the sequence of events, in that as noted by sec 8.2.3, of rfc2616-sec8:

An origin server that sends a 100 (Continue) response MUST ultimately send a final status code, once the request body is received and processed, unless it terminates the transport connection prematurely.

For completeness, the section on Creation With Upload should provide the whole sequence of events that involves this interaction.  A sequence diagram would be very helpful.

Ok, I think there is a confusion in your side:

It also notes that the client should get a response from the server on whether it accepts the creation request before attempting to transfer the first chunk, which is consistent to the description in sec 8.2.3, of rfc2616-sec8. So the response of the server is also not consistent to the quoted paragraph above.

If the tus spec says "the Client SHOULD verify that it is supported by the Server" we are referring to sending an OPTIONS request and checking the returned Tus-Extensions header before sending the POST request. This precheck is completely unrelated to 100-continue, so I think you are confusing something there.

For completeness, the section on Creation With Upload should provide the whole sequence of events that involves this interaction. A sequence diagram would be very helpful.

I agree. Although the spec does not require the use, it's always helpful to add it. Would you be willing to open a PR for this?

If the tus spec says "the Client SHOULD verify that it is supported by the Server" we are referring to sending an OPTIONS request and checking the returned Tus-Extensions header before sending the POST request. This precheck is completely unrelated to 100-continue, so I think you are confusing something there.

I'm not suggesting the precheck is related to the 100-continue.  The sentence your quoting, yes, that refers to checking on what the server supports by sending an OPTIONS request, but that's not the sentence I quoted.
For clarity, let me quote the whole paragraph in question:

If the Client wants to use this extension, the Client SHOULD verify that it is supported by the Server before sending the POST request. In addition, the Client SHOULD include the Expect: 100-continue header in the request to receive early feedback from the Server on whether it will accept the creation request, before attempting to transfer the first chunk.

Yes, the first sentence does refer to the OPTIONS request, to check if the the server has thecreation-with-upload listed in its Tus-Extension.
But the 2nd sentence of the rest of that paragraph (which is the one I had quoted in my previous post), refers to the POST request, since it talks about the client waiting for the server's response "before attempting to transfer the first chunk" .  And it is in that 2nd sentence that notes that the Client SHOULD include the Expect: 100-continue header in the request  --- that is in reference to the POST request.
Further, we also know the 2nd sentence doesn't refer to an OPTIONS request, because an OPTIONS request never includes a Expect: 100-continue (that only ever makes sense in the context of a POST request as as noted in sec 8.2.3, of rfc2616-sec8).
If that quoted paragraph is confusing, then maybe it should be broken down to two paragraphs.  But then again, I never interpreted the precheck (first sentence of that paragraph) to be related to the rest of that paragraph (where it speaks about where the100-continue should be included).
So going back to my original point, based on that 2nd sentence, this is what I'm pointing out:

The POST request example shown in section the example of Creation With Upload, is missing this Expect: 100-continue.
In the same example referred to in 1), the server' response should not include the Upload-Offset, since the 2nd sentence implies that the client has to wait for the server's response before sending the first chunk (e.g. payload).  The Upload-Offset should be in the final response of the server after it receives that payload (and of which I quoted earlier from sec 8.2.3, of rfc2616-sec8).

And yes, I would create a PR to include a sequence diagram, since I think there's a bit more interaction going on with Creation with Upload than what is shown in this document, and as suggested by sec 8.2.3, of rfc2616-sec8, but it looks like I lack permissions to create a PR ... that is the PR button creation is greyed out for me (or can you refer me to the correct place to create it?).

Thank you very much for the clarification. I think I figured out what our differences were and I agree with you.
You can start a new PR by editing the protocol.md file directly at https://github.com/tus/tus-resumable-upload-protocol/edit/master/protocol.md. Let me know if that does not work!


Add EmptyNetworks struct

Add an EmptyNetworks struct similar to EmptyService.
Didn't think of this earlier, but we can use EmptyNetworks to get around having to always check that networks is non-nil like in #321.
Signed-off-by: Josh Curl<EMAIL_ADDRESS>

Didn't think of this earlier, but we can use EmptyNetworks to get around having to always check that networks is non-nil like in #321.

I like that 👼. I'm just wating for the CI to trigger to say LGTM :smile_cat:

LGTM 🐸


pip upgrade

The release notes mention that we need to uninstall the client before installing the new version.
Why not pip install --upgrade kubernetes ?

release notes updated. Thanks.


Make readOnly mount option optional (fixes #618)

Thanks. Fixed checkstyle error here https://github.com/spotify/docker-client/pull/633


Consider implementing Log::enabled

I was curious if there was a particular reason why Log::enabled was implemented to return true all the time: was it because it was never really implemented historically, or because it would entail taking the global lock more often? I think it would be nice to implement because log's log_enabled!() macro relies on this to decide whether to enter a code section or not, and this can have a pretty large performance impact, so it would be nice to have. If there's interest and no particular reason why it was not implemented, I'd be happy to write the simplest patch: take lock, compare config filters with what's in the metadata.

I don't remember - it could also be because I misunderstood the API. I think the lock overhead should not be an issue (and it can be even more optimized with an atomic if needed).


Avoid too many build_mprk_matrix! methods

WORK IN PROGRESS

MPRK22_old uses old implementation

MPRK22 now uses a single method of build_mprk_matrix! per data type

Benchmarks show that the new implementation is not slower than the old one

Benchmark 1:
julia> function linmodP!(P, u, p, t)
           P .= 0
           P[1, 2] = u[2]
           P[2, 1] = 5.0 * u[1]
           return nothing
       end
linmodP! (generic function with 1 method)

julia> prob_ip = ConservativePDSProblem(linmodP!, [0.9, 0.1], (0.0, 2.0), [5.0, 1.0])
ODEProblem with uType Vector{Float64} and tType Float64. In-place: true
timespan: (0.0, 2.0)
u0: 2-element Vector{Float64}:
 0.9
 0.1

julia> sol_ip = solve(prob_ip, MPRK22(1.0), dt = 0.25);

julia> sol_ip_old = solve(prob_ip, PositiveIntegrators.MPRK22_old(1.0), dt = 0.25);

julia> @assert sol_ip.u ≈ sol_ip_old.u

julia> @benchmark solve($prob_ip, $MPRK22(1.0), dt = 0.01, adaptive = false, save_everystep = false)
BenchmarkTools.Trial: 10000 samples with 1 evaluation.
 Range (min … max):  154.778 μs …   5.872 ms  ┊ GC (min … max): 0.00% … 95.70%
 Time  (median):     167.608 μs               ┊ GC (median):    0.00%
 Time  (mean ± σ):   177.819 μs ± 127.052 μs  ┊ GC (mean ± σ):  1.80% ±  2.53%

  ▆▆▇██▆▅▄▄▃▃▂▂▂▁                                               ▂
  ██████████████████████▇█▇▇▇▇██▇▇▇▇▆▆▆▆▆▆▆▆▅▆▆▆▆▃▃▅▆▄▁▄▆▅▅▆▆▅▅ █
  155 μs        Histogram: log(frequency) by time        346 μs <

 Memory estimate: 35.11 KiB, allocs estimate: 441.

julia> @benchmark solve($prob_ip, $PositiveIntegrators.MPRK22_old(1.0), dt = 0.01, adaptive = false,
                        save_everystep = false)
BenchmarkTools.Trial: 10000 samples with 1 evaluation.
 Range (min … max):  177.277 μs …   5.200 ms  ┊ GC (min … max): 0.00% … 91.24%
 Time  (median):     197.533 μs               ┊ GC (median):    0.00%
 Time  (mean ± σ):   207.737 μs ± 121.351 μs  ┊ GC (mean ± σ):  1.44% ±  2.50%

  ▄▄▅▆██▆▄▄▃▂▂▁                                                 ▂
  ███████████████▇██▇▇▇█▇▇▇▇▆▆▆▆▆▆▇▆▆▆▅▆▃▅▅▂▄▄▅▄▄▄▅▃▄▅▄▃▄▄▄▅▃▄▄ █
  177 μs        Histogram: log(frequency) by time        410 μs <

 Memory estimate: 35.12 KiB, allocs estimate: 442.

Benchmark 2:
julia> n = 100
100

julia> P_tridiagonal = Tridiagonal(zeros(n - 1), zeros(n), zeros(n - 1));

julia> u0 = collect(range(1.0,100.0,n));

julia> prod_1! = (P, u, p, t) -> begin
           fill!(P, zero(eltype(P)))
           for i in 1:(length(u) - 1)
               P[i, i + 1] = i * u[i]
           end
           return nothing
       end
#11 (generic function with 1 method)

julia> prob_tridiagonal_ip = ConservativePDSProblem(prod_1!, u0, (0.0, 1.0); p_prototype = P_tridiagonal);

julia> @benchmark solve($prob_tridiagonal_ip, $MPRK22(1.0), dt = 0.1, adaptive = false, save_everystep = false)
BenchmarkTools.Trial: 10000 samples with 1 evaluation.
 Range (min … max):  59.774 μs …  2.352 ms  ┊ GC (min … max): 0.00% … 80.07%
 Time  (median):     62.438 μs              ┊ GC (median):    0.00%
 Time  (mean ± σ):   68.431 μs ± 44.997 μs  ┊ GC (mean ± σ):  1.87% ±  3.13%

  ▇█▆▄▂▁▁▁▃▃▂▂▁▁                                              ▂
  ████████████████████▆█▇█▆▇▆▆▆▆▆▆▇▆▆▆▆▆▆▆▅▅▅▆▄▅▆▅▄▃▁▅▄▃▃▃▁▅▅ █
  59.8 μs      Histogram: log(frequency) by time       156 μs <

 Memory estimate: 59.66 KiB, allocs estimate: 113.

julia> @benchmark solve($prob_tridiagonal_ip, $PositiveIntegrators.MPRK22_old(1.0), dt = 0.1, adaptive = false, save_everystep = false)
BenchmarkTools.Trial: 10000 samples with 1 evaluation.
 Range (min … max):  60.218 μs …  1.393 ms  ┊ GC (min … max): 0.00% … 92.86%
 Time  (median):     63.247 μs              ┊ GC (median):    0.00%
 Time  (mean ± σ):   69.790 μs ± 44.118 μs  ┊ GC (mean ± σ):  1.85% ±  3.16%

  ▇█▆▄▂▁▂▃▃▂▂▁▁▁                                              ▂
  ██████████████████▇█▆█▇▆▇▆▇▆▆▆▅▅▃▅▅▆▆▅▁▅▅▅▄▁▄▅▄▅▅▄▄▄▅▃▄▃▃▃▅ █
  60.2 μs      Histogram: log(frequency) by time       178 μs <

 Memory estimate: 59.67 KiB, allocs estimate: 114.

I think we can get rid of the old implementation. What do you think @ranocha ?

Codecov Report
Attention: Patch coverage is 31.54362% with 102 lines in your changes are missing coverage. Please review.

Project coverage is 69.20%. Comparing base (7c66a3c) to head (08792b3).

Files
Patch %
Lines

src/mprk.jl
31.54%
102 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@             Coverage Diff             @@
##             main      #77       +/-   ##
===========================================
- Coverage   98.01%   69.20%   -28.81%
===========================================
  Files           4        4
  Lines         604      708      +104
===========================================
- Hits          592      490      -102
- Misses         12      218      +206

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

I think we can get rid of the old implementation. What do you think @ranocha ?

Nice! Yeah, I agree 👍

I think this PR can be merged now.


Fix i18n

Various fixes;

Issue #19
Issue #24
Was untranslated: "%1: Line %2","%1: Regel %2",module,Magento_Checkout

What do I need to do to get this merged?


File contents miss their first line

I've been playing with p4fuse today on OS X. It worked out of the box, in case you are interested.
However, file contents seem to miss the first line for any file I cat. This is caused by the code in p4.go in the Print function, where the first line is purposely stripped out. I suppose p4 print may print a header sometimes, but the client I have does not print such a line.

Ah, i forgot to push my fixes

fixed by https://github.com/hanwen/p4fuse/commit/fd38cd5f13cae00811a6d393f4a614a6aac65c1f

Confirmed fixed. Thanks.


Zero-extend variants of vmv.x.s and vmv.s.x

It looks a bit asymmetric that there are instruction for loading and zero-extending values from memory (for vector and non-vector loads) but when moving the first vector element it's always sign-extended.
For example, to move the first vector element into a scalar register without sign-extending it one has to mask the superfluous sign-bits again, e.g.:
vmv.x.s a5, v24
andi    a5, a5, 0xff

There was issue #254 - but from reading the discussion there I'm not sure if adding zero-extending variants of vmv.x.s/vmv.s.x is already off the table.
Adding those zero-extending variants would make some programs a bit shorter and arguably the instruction set more symmetric/less surprising.

FYI: there is a discussion to remove sign and zero extending vector loads from the spec:
https://github.com/riscv/riscv-v-spec/issues/362
People generally agree that they should be removed and fractional LMUL should be added to mitigate:
https://github.com/riscv/riscv-v-spec/issues/382


neovim: 0.4.4 -> 0.5.0

Motivation for this change
Upstream update.
~0.5.0 is not released yet - this branch tracks latest nightly until then.
I will be doing my best to keep this up-to-date with latest nightly.
While we're waiting for 0.5.0 to be released, we can already prepare for it in this PR.
Added a new neovim-nightly package, which tracks nightly https://github.com/neovim/neovim/releases/tag/nightly~
It's finally here! :tada:
Closes https://github.com/NixOS/nixpkgs/issues/128959
Things done

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

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

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[x] Fits CONTRIBUTING.md.

@GrahamcOfBorg build neovim

@GrahamcOfBorg build neovim

Updated PR with this approach https://github.com/NixOS/nixpkgs/pull/110837#discussion_r564504539

Updated PR with this approach https://github.com/NixOS/nixpkgs/pull/110837#discussion_r564504539

@GrahamcOfBorg build neovim-nightly

@GrahamcOfBorg build neovim-nightly

This is a semi-automatic executed nixpkgs-review which is checked by a human on a best effort basis and does not build all packages (e.g. lumo, tensorflow or pytorch).
If you have any questions or problems please reach out to SuperSandro2000 on IRC.
Result of nixpkgs-review pr 110837 run on x86_64-darwin 1

1 package failed to build and are new build failure:

neovim-nightly-unwrapped: log https://termbin.com/go51x

This is a semi-automatic executed nixpkgs-review which is checked by a human on a best effort basis and does not build all packages (e.g. lumo, tensorflow or pytorch).
If you have any questions or problems please reach out to SuperSandro2000 on IRC.
Result of nixpkgs-review pr 110837 run on x86_64-darwin 1

1 package failed to build and are new build failure:

neovim-nightly-unwrapped: log https://termbin.com/go51x

This is a semi-automatic executed nixpkgs-review which is checked by a human on a best effort basis and does not build all packages (e.g. lumo, tensorflow or pytorch).
If you have any questions or problems please reach out to SuperSandro2000 on IRC.
Result of nixpkgs-review pr 110837 run on x86_64-linux 1

1 package built:

neovim-nightly-unwrapped

This is a semi-automatic executed nixpkgs-review which is checked by a human on a best effort basis and does not build all packages (e.g. lumo, tensorflow or pytorch).
If you have any questions or problems please reach out to SuperSandro2000 on IRC.
Result of nixpkgs-review pr 110837 run on x86_64-linux 1

1 package built:

neovim-nightly-unwrapped

Why duplicate everything instead of an override with just treesitter ?
I am on the fence for this one. I've wanted to provide a neovim nightly in nixpkgs for a long time but was afraid it would be rejected (for valid reasons: if everyone starts packaging a pseudo-nigthly for its software, it can get out of hands). Instead I've added a flake to neovim so that one can install a true nightly via flakes see https://nixos.wiki/wiki/Neovim for doc.
As a datapoint, I hope we can release 0.5 in Ferbuary and no later than March so there is not long to wait.

Why duplicate everything instead of an override with just treesitter ?
I am on the fence for this one. I've wanted to provide a neovim nightly in nixpkgs for a long time but was afraid it would be rejected (for valid reasons: if everyone starts packaging a pseudo-nigthly for its software, it can get out of hands). Instead I've added a flake to neovim so that one can install a true nightly via flakes see https://nixos.wiki/wiki/Neovim for doc.
As a datapoint, I hope we can release 0.5 in Ferbuary and no later than March so there is not long to wait.

Why duplicate everything instead of an override with just treesitter ?
I am on the fence for this one. I've wanted to provide a neovim nightly in nixpkgs for a long time but was afraid it would be rejected (for valid reasons: if everyone starts packaging a pseudo-nigthly for its software, it can get out of hands). Instead I've added a flake to neovim so that one can install a true nightly via flakes see nixos.wiki/wiki/Neovim for doc.
As a datapoint, I hope we can release 0.5 in Ferbuary and no later than March so there is not long to wait.

I agree as well and will revert the PR to it's original state (draft simply updating the version to 0.5.0)

Why duplicate everything instead of an override with just treesitter ?
I am on the fence for this one. I've wanted to provide a neovim nightly in nixpkgs for a long time but was afraid it would be rejected (for valid reasons: if everyone starts packaging a pseudo-nigthly for its software, it can get out of hands). Instead I've added a flake to neovim so that one can install a true nightly via flakes see nixos.wiki/wiki/Neovim for doc.
As a datapoint, I hope we can release 0.5 in Ferbuary and no later than March so there is not long to wait.

I agree as well and will revert the PR to it's original state (draft simply updating the version to 0.5.0)

make sure it's ready https://neovim.discourse.group/t/neovim-0-5-release-stream-7-2-21-at-16-00-utc-12-00-pm-est/654 ;)

Updated locally to latest nightly, but build fails with
  /nix/store/aigvlxh2aqjqd1wcnk1dr8cjml6dq846-binutils-2.35.1/bin/ld: /build/nvim.Naorac.ltrans27.ltrans.o: in function `node_rawquery':
  <artificial>:(.text+0x11d8): undefined reference to `ts_query_cursor_set_match_limit'
  collect2: error: ld returned 1 exit status
  make[2]: *** [src/nvim/CMakeFiles/nvim.dir/build.make:3525: bin/nvim] Error 1
  make[1]: *** [CMakeFiles/Makefile2:3027: src/nvim/CMakeFiles/nvim.dir/all] Error 2
  make: *** [Makefile:171: all] Error 2

Caused by https://github.com/neovim/neovim/pull/14915 (see discussion below)
The issue is that current neovim build depends on unreleased tree-sitter functionality.
Should we patch tree-sitter? It doesn't sound like pathset would be small according to https://github.com/neovim/neovim/pull/14915#issuecomment-870423051
Otherwise, perhaps we can reach out to tree-sitter maintainters and ask if they would make a new release before Friday?

cc @teto

I opened tree-sitter/tree-sitter#1216 to see if they might cut a new release tag.

Upstream has an open PR to put the function call behind a feature guard (https://github.com/neovim/neovim/pull/14930). It builds successfully:
$ nix build 'github:neovim/neovim/7e8a8482e8e474b9ec45c1bd147dd0b0f4ff03af?dir=contrib'
$ ./result/bin/nvim --version
NVIM v0.5.0-dev
...

Upstream has an open PR to put the function call behind a feature guard (neovim/neovim#14930). It builds successfully:
$ nix build 'github:neovim/neovim/7e8a8482e8e474b9ec45c1bd147dd0b0f4ff03af?dir=contrib'
$ ./result/bin/nvim --version
NVIM v0.5.0-dev
...

Added it in https://github.com/NixOS/nixpkgs/pull/110837/commits/4069de517152e62aa1eed82bae8894edd60ca07c

FYI, latest nightly with tree-sitter 0.20.0 available in my nixos-unstable branch https://github.com/rvolosatovs/nixpkgs/tree/nixos-unstable
In particular, this commit https://github.com/rvolosatovs/nixpkgs/commit/c17c3eb2c52f29602a0022b708e6d7c21962e440 if you want to check it out

@GrahamcOfBorg build neovim

@ofborg eval

Testing this

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

7 packages built:

gnvim
neovim
neovim-qt
neovim-qt-unwrapped
neovim-remote
neovim-unwrapped
nvimpager

Result of nixpkgs-review pr 110837 run on aarch64-linux 1

7 packages built:

gnvim
neovim
neovim-qt
neovim-qt-unwrapped
neovim-remote
neovim-unwrapped
nvimpager


[WFLY-17887] The minimum support Java version for WildFly is still Java 11.

Archetypes would typically be used by new users, at the moment even though they have a valid JDK installed forcing the use of Java 17 triggers a risk of an early error they have to correct before they can proceed.
We should be looking to go the other direction and minimise the steps it takes for someone to get a project up and running.
https://issues.redhat.com/browse/WFLY-17887

I would have added the same change also in the upcoming pull request for the WildFly 28 archetypes - see https://issues.redhat.com/browse/WFLY-17831 ;-)

Thanks @darranl and @WolfgangHG


[Question] CPU subroutine within a GPU main routine

Hi,
What would be the best way to force a subroutine to run on the CPU whilst the main program would run on GPU? Intuitively I am doing the below: is it correct?
from functools import partial

from jax import jit, device_get
import jax.numpy as jnp

@partial(jit, backend="cpu")
def cpu_sub_func(n):
    return n

@partial(jit, backend="gpu")
def gpu_main_function(n):
    res = cpu_sub_func(n)
    return res

Your example isn't currently runnable; jitted functions can only run on a single type of device. However, you may be able to achieve something similar using id_tap, see https://jax.readthedocs.io/en/latest/jax.experimental.host_callback.html for details.
cc @gnecula who's working on id_tap.

Errr, it ran on colab....

As @skye said, this is work in progress. At the moment, id_tap will allow code on accelerators to callback to the host to run some Python computation, but this is only for side-effects only, such as logging or printing (the Python code will not be able to return results back to the accelerator). I am working on an extension that can be used to return the results back to the device also.

Ah, you're right this is runnable, my mistake! However, the inner jit's backend is ignored, so the whole thing will run on GPU in your example.

Ah, you're right this is runnable, my mistake! However, the inner jit's backend is ignored, so the whole thing will run on GPU in your example.

I think we could consider this behavior a bug. JAX should raise an error rather than ignoring explicit device/backend specifications on inner functions.

@shoyer instead of considering it a bug, I'd probably argue it's a desirable (not implemented) feature. This would be very useful for me to have to run lightweight loops to define for auxiliary variables used in more heavyweight calculations. A good example would be (if/when XLA allows for dynamic shape allocation) if I need to compute a small routine to know the size of a loop a priori so that I can use scan instead of while_loop for the real work.

I agree, full support for explicitly nested CPU computation would be a welcome feature. The bug is silent execution on the GPU when the user requested otherwise.

It turns out this usually does raise an error. I believe your example runs due to a special case where we short-circuit nested no-op jits calls (see #3169). If you change cpu_sub_func to return n + 1 (or anything beyond just n), you should get an error like this:
Outer-jit backend specification gpu must match explicit inner-jit backend specification cpu.

I think we can get rid of this special case now, but it's tricky so I wanna get a second opinion on that. You can follow #5240. But for now, this should generally raise an error, except in this special case.
I'm gonna close this issue because I don't think there's anything else left to do, but please continue to comment or re-open if you still have questions or issues.

I have just proposed PR #5243 with a feature that should allow you to call a Python function from a GPU computation. Perhaps it works for your use case?

I have just proposed PR #5243 with a feature that should allow you to call a Python function from a GPU computation. Perhaps it works for your use case?


Jarbas API doesn't filter by state parameter

Trying the Jarbas API, the state parameter seems do nothing:
https://jarbas.serenata.ai/api/chamber_of_deputies/reimbursement/?limit=7&state=DF
Return all, not filtered by state.

On the documentation, https://github.com/okfn-brasil/serenata-de-amor/blob/master/jarbas/README.md, appears on Filtering section.

No, it doesn’t. It might be confusing (and surely we can work on to clarify this in the docs), but the link you and I referred to says the content of the state field is indexed in the query generated by the search filter.
We try to communicate this by the indentation and the hierarchy of a nested unordered list. I’m sorry it didn’t work. Any ideas to better communicate it?

What do you think something like?
search. The value is searched in these fields:
and add in the sample the parameter search with, for exemple, DF, explainig that filters by state DF.

What about put another parameter, searchfield?

As I just mentioned adding state to the filters is indeed a good idea 🤘
But I do not belive that searching by state using the search field is very useful. If I got you example, ?search=DF is not actually filtering reimbursements from DF congresspeople… it is searching for the string DF in a series of fields (which happens to include
state).

How Jarbas Dashboard filter by state? It uses another API?

What about put another parameter, searchfield?

I really don’t see how searchfield might be better than simply search. Can you expand on that?
Regarding the dashboard, it doesn’t use any external API, it’s just Django Admin.

on searchfield could be specified the field used for search. For exemple, in this case, could be something like searchfield=state&search=DF

Hum… basically this would not work: the search happens in a pre-createda search vector, so you cannot choose whic field to look up. And enabling search in any firld without it would compromise our Postgres performance. I think the beat direction for this issue is to include state as a filtering field.

Closed by #418


Drop python3.7 since aresponses v3

Python 3.7 is end-of-life since 2023-06-27 (link)
@brycedrennan,
Should we drop it then?

Probably but I figured since the tests are still passing I might as well leave it.


Fix the issue gosec-G306 G307

Signed-off-by: Aisuko<EMAIL_ADDRESS>FIxed issue: #44

Hi @leecalcote The PR includes the ci changed. Because I found some issues with KinD(https://github.com/engineerd/setup-kind/pull/20). So, I believe our ci.yaml  also could include the scripts which I added to KinD.
And there also have an issue with the ci Security check and it looks like go get command's issue. I'm working on slove it.

@leecalcote Please take a look. I believe we can merge the PR with all CI passed.


Create lro-location-header rule to disable LroLocationHeader LintDiff rule

Closes https://github.com/Azure/typespec-azure-pr/issues/3896

:x: There is undocummented changes. Run chronus add to add a changeset or click here.
The following packages have changes but are not documented.

:x:@azure-tools/typespec-azure-resource-manager

You can try these changes at https://cadlplayground.z22.web.core.windows.net/typespec-azure/prs/514/
Check the website changes at https://tspwebsitepr.z22.web.core.windows.net/typespec-azure/prs/514/


set callback for java function

I had a java function whose parameter is a callback function. And I want to call that java function.
How can I achieve that using jpype? Please help me.

Assuming the callback is an interface then create a JProxy that implements the interface, create an instance of the JProxy and then feed the proxy instance to the method.  The exact formulation of how to do with is in the test code for proxies.
Once we release version 0.7 it will be much easier as all that is required is creating a python class with the appropriate annotations.  In some cases such as if the interface is marked in java as a functional interface, it will be automatic.  All that is required will be to place an object with the call interface defined.
--Karl
From: PraflyGod<EMAIL_ADDRESS>Sent: Monday, April 22, 2019 1:37 AM
To: jpype-project/jpype<EMAIL_ADDRESS>Cc: Subscribed<EMAIL_ADDRESS>Subject: [jpype-project/jpype] set callback for java function (#404)
I had a java function whose parameter is a callback function. And I want to call that java function.
How can I achieve that using jpype? Please help me.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHubhttps://github.com/jpype-project/jpype/issues/404, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AG5TEUPO37LBQNDLLLJTWZDPRV2MDANCNFSM4HHOJVCA.

Thanks for that. I will check the example and will give the feedback.

0.7 is on master now.  Release shortly.  The new docs should cover your usage.


New version: Paessler.PRTGDesktop version 22.4.0

[X] Have you signed the Contributor License Agreement?
[X] Have you checked that there aren't other open pull requests for the same manifest update/change?

[ ] Have you tested your manifest locally with winget install --manifest <path>?
[X] Does your manifest conform to the 1.0 schema?

Microsoft Reviewers: Open in CodeFlow

/azp run


Multi-column layout for authors

I was wandering if it could be possible to include an option in the YAML header for a multi-column layout for the authors block (example), as opposed to the one-column layout currently implemented. I figured out I had to change \\\\\\ for \And in title.tex like this:
# one-column layout
\author{${ by-author:_authors.tex()[\And] }}

# multicolumn-layout
\author{${ by-author:_authors.tex()[\And] }}

Maybe something like this? (I could not get it to work, though):
arxiv-pdf:
  authors-onecolumn: true

\author{${ by-author:_authors.tex()[$if(authors-onecolumn)\\\\\\$else$\And$endif$] }}

I whish I could be of more help implementing this (I'm a bit out of my depth with Pandoc), but I think this option would be handy to avoid devoting more than one page for the author section in papers with > 4 authors.
PS: Thanks a lot for this template, it has already saved me a lot of time formatting!

Thanks! This should be fixed now via the new authorcols option (I'll release a new version of the template momentarily).


Fixed formatting in the parameters description.

The description for nMaxCount accidentally used indentation that got interpreted by the Markdown processor as a code section (which it isn').

@tim-weis : Thanks for your contribution! The author(s) have been notified to review your proposed change.

@tim-weis : Thanks for your contribution! The author(s) have been notified to review your proposed change.

#sign-off


Fixed kelvin to celsius conversion ratio

Fixes #(23)Temperature: Celsius to Kelvin issue
Changes proposed
Refactored the Kelvin to Celsius conversion

Hi @prasadtelkikar
I've noticed that the "Merge pull request #24"  has failed due to the incorrect Nuget key.
Are you happy with the changes to be published to Nuget? If so then I will sort out the key and publish it to the Nuget over this weekend.
If you have any concerns just shout!
Thanks
A

@atulmish , Please add this changes to next nuget version.


Base access in expression body

Describe the bug
In the C# 7 standard, §12.8.14 (Base access) says:

A base_access is permitted only in the block of an instance constructor, an instance method, an instance accessor (§12.2.1), or a finalizer.

This should allow base_access also in a method_body, ref_method_body, property_body, ref_property_body, indexer_body, ref_indexer_body, constructor_body, or finalizer_body that is not a block.
Example
This should be allowed:
class A {
    private int i;

    public A() {}

    public int M() => 0;
    public ref int RM() => ref this.i;

    public int P => 0;
    public ref int RP => ref this.i;
    public int PA {
        get => 0;
        set {}
    }
    public ref int RPA {
        get => ref this.i;
    }

    public int this[short index] => 0;
    public ref int this[char index] => ref this.i;

    public event System.Action EA {
        add {}
        remove {}
    }
}

class B : A {
    public B() => base.M();

    public new int M() => base.M();
    public new ref int RM() => ref base.RM();

    public new int P => base.P;
    public ref int RP => ref base.RP;
    public new int PA {
        get => base.PA;
        set => base.PA = value;
    }
    public new ref int RPA {
        get => ref base.RPA;
    }

    public new int this[short index] => base[index];
    public new ref int this[char index] => ref base[index];

    public new event System.Action EA {
        add => base.EA += value;
        remove => base.EA -= value;
    }

    ~B() => base.M();
}

Expected behavior
Specify that the preceding is allowed.
Additional context
Exclude anonymous_function_body, local_function_body, and ref_local_function_body.  They can contain a base_access only when they occur within some other body.
Exclude static_constructor_body and operator_body.  They are not used in instance members.

@KalleOlaviNiemitalo – thanks.
I did wonder about shortening the text to reference "instance members" but went with the one word fix.


Initial implementation

Purpose

Ethereum is an open-source, public, blockchain-based distributed computing platform. This connector is used to listen to ethereum events.

Goals

This connector allows the user to receive block data and transaction data from ethereum blockchain.

Approach

Developed this ethereum connector using web3j.

User stories

User story of Ethereum connector for SP,
https://docs.google.com/document/d/1ld_YQY7zvyt5Kctgd7U-YHa0wEcg8Mn5uqh4h6ka-Ek/edit

Release note

Brief description of the new feature or bug fix as it will appear in the release notes

Documentation

Link(s) to product documentation that addresses the changes of this PR. If no doc impact, enter “N/A” plus brief explanation of why there’s no doc impact

Training

Link to the PR for changes to the training content in https://github.com/wso2/WSO2-Training, if applicable

Certification

Type “Sent” when you have provided new/updated certification questions, plus four answers for each question (correct answer highlighted in bold), based on this change. Certification questions/answers should be sent to<EMAIL_ADDRESS>and NOT pasted in this PR. If there is no impact on certification exams, type “N/A” and explain why.

Marketing

Link to drafts of marketing content that will describe and promote this feature, including product page changes, technical articles, blog posts, videos, etc., if applicable

Automation tests

Unit tests

Code coverage information : 90%

Integration tests

Details about the test cases and coverage

Security checks

Followed secure coding standards in http://wso2.com/technical-reports/wso2-secure-engineering-guidelines? yes/no
Ran FindSecurityBugs plugin and verified report? yes/no
Confirmed that this PR doesn't commit any keys, passwords, tokens, usernames, or other secrets? yes/no

Samples

Provide high-level details about the samples related to this feature

Related PRs

List any other related PRs

Migrations (if applicable)

Describe migration steps and platforms on which migration has been tested

Test environment

JDK versions: JDK 8, operating system: ubuntu 16.04 LTS

Learning

https://docs.web3j.io/
https://github.com/ethereum/wiki/wiki/JSON-RPC

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


Write Unit Tests

Currently the DSPO 'unit' tests are actually integration/api blackbox tests.  Write a suite of smaller whitebox/unit tests to verify basic code functionality.
Acceptance Criteria:
Set up unit test framework with ~20% min code coverage (feel free to over achieve).

We should also rename the prow jobs because currently they show up as prow/unit, and these are more functional/api tests for the dspo, and that's misleading, I think they are named here: https://github.com/openshift/release/blob/master/ci-operator/config/opendatahub-io/data-science-pipelines-operator/opendatahub-io-data-science-pipelines-operator-main.yaml#L35


Nearby places aren't sorted

On a Samsung Galaxy A3, if I open "Nearby Places", regardless of the GPS is turned on or off, the list shows the places not sorted by distance, but in the order as they appear in the CSV. I would expect an error message saying the nearby places cannot be determined if GPS is off, and of course sorted by distance if on. I have an Android Studio, but I don't know how to debug this issue; if you help me, I try to debug it—it can turn out that the problem is in my device.
P.S. Is there any convenient way (web service) to localize this app, or I have to edit the XML manually?

Strange, the list is always sorted for me! Would you mind pasting the logcat?
About localization: We are waiting for the translatewiki guys to create our project, I can't understand why it takes them so much time, feel free to ask them about the status of this at https://translatewiki.net/wiki/Support#Former_WMF_app_now_community-maintained,_where_to_crowdsource_localization?_49961 Thanks!

Hi @tacsipasci ,
It should already be sorted by distance if the GPS is on. I like your suggestion of displaying an error message if the GPS is off, though.
Do you have your GPS on the entire time or do you just enable it after loading the list of nearby places?

Now it sorted for the first time (I've tried it about five-ten times)—at least five minutes after opening the Nearby list.
@nicolas-raoul Where can I find the logcat?
@misaochan I tried it now and also earlier with GPS entirely turned off and GPS turned on before opening the list. (Sometimes I opened the list first by mistake, but usually not.)

Interesting. Do you have similar problems when accessing other location based apps, or is it just us?

How to get the logcat: http://android.stackexchange.com/a/157594/501

I did some tests with GPS spoofing. It takes the app a few tries to recover to the real position after the spoofer is turned off. That might be a related issue to this one.

@nicolas-raoul I can't get logcat working… I don't find any drivers for my phone on the Samsung website. :(

The Wikidata list is now sorted by distance and I don't think we will fix issues with the old list anymore. Please reopen if you feel there is something we can do to improve the situation.

Strange... When I open Nearby, it immediately says "No nearby places found", without even trying to get my position (Google Maps works normally). Android Marshmallow (6.0.1), Commons app v2.4.1 (latest beta).

@tacsipacsi Yeah, we are having issues with that currently (see #650 ). We are still trying to fix it, sorry about that!

OK, no problem (actually I don't use this feature, just opened it for testing; I don't like photographing with mobile, I use it only when I don't have a normal camera). It didn't work for me either after giving permission to the app – maybe I don't have real GPS signal, and Google Maps works with network-based location.


Adds to the elasticsearch mapping a dynaic_templates configuration

Now aggregations can be performed on alerts, for example in visualizations. This also enables ElastAlert to run over ElastAlert alerts.

Please note that I have only added this for ES6, an not to ES5. This can be a further contribution.


Create Nodes_Georgia.toml

Description
All previous genesis validators should name their PRs "Update {validator_alias}.toml for tesntet-15" and provide links to previous PRs merged.
If this is an UPDATE for a previous genesis validator
Checks are made against your net_address. If this has changed since the previous testnet, make sure you provide links of previous prs merged from your previous git username.
Thanks in advance!
Checklist before merging

[x] Only one toml is added in this PR
[x] The file being added is indeed a .toml file
[x] The toml being added is to the correct folder, and only to the correct folder
[x] The eth_hot_key and eth_cold_key are present
[x] The email, discord, elements telegram, and twitter fields are present and valid

Whitespace found in filename. Found filename namada-public-testnet-15/Create Nodes_Georgia.toml

Whitespace found in filename. Found filename namada-public-testnet-15/Create Nodes_Georgia.toml

can you check new one? #3181


Help on Hoverfly GUI  localhost:8888

Please help me what to do next.  As I am beginner to this topic.
I just logged in the GUI. But not getting any tab to explore more on  it.
Thanks in advance !!!

Hey @MohitIndian,
Currently the GUI provided with Hoverfly is fairly minimal in functionality.
Hoverfly is mainly controlled using the companion application, hoverctl. This application is a command line utility to easily interacting with Hoverfly's Rest API.

Thanks benjih for your quick reply ...
I have gone through the Hoverfly documentation.
Can you tell me what to do next ?
Thanks in advance !!!

Hi @MohitIndian - the best place to start after reading through the docs is the tutorials section.
The reference section contains information on the API, the simulation schema and CLI commands.

What is the prerequisite to start with Hoverfly ?
Any of the programming language or anything else ...

There are no prerequisites as long as you have the correct Hoverfly binary for your platform.

How can I run curl and export commands in windows
e.g.
curl http://hoverfly.io --proxy http://proxy-ip:port
export HTTP_PROXY="http://proxy-address:port"
Thanks in advance :)

Hi All,
Can I expect the reply on the above query ?
Thanks

cURL binaries are available for most platforms, including Windows, from the cURL website. You will need to install cURL on your machine to execute many of the commands in the tutorials.
export FOO="BAR" is the method for setting environment variables from a MacOS or Linux shell. On Windows, environment variables can be set either via the GUI, or I believe by using setx FOO "BAR" from the command prompt. You will need to set the HTTP_PROXY environment variable on your machine to point to the Hoverfly proxy (http://localhost:8500 by default).
The tutorials in the documentation are written for Linux/MacOS environments, as the majority of Hoverfly users are currently on Linux/MacOS.
I will set aside some time soon to create some tutorials for Windows users.

Thanks tjcunliffe !!
I think cygwin will also help for curl command ?
Thanks

Yes, you can easily get curl through cygwin.

Is it necessary to have http://time.jsontest.com in the command ?
curl --proxy http://localhost:8500 http://time.jsontest.com
Can we put any other website for the same ?
Thanks,
Mohitkumar

You don't have to use http://time.jsontest.com - that's just the example we use in the documentation examples.

Thanks tjcunliffe !!
Can you suggest me any other website instead of it ?

I was just implementing this example... Adding templates to a simulation
As per documentation, I have  executed these commands...
hoverctl start
hoverctl mode capture
curl --proxy http://localhost:8500 http://echo.jsontest.com/foo/baz/bar/spam
hoverctl export simulation.json
hoverctl stop
Now, when I opened the json file, It looks like this ..
{
"data": {
"pairs": [],
"globalActions": {
"delays": [
{
"urlPattern": "echo\.jsontest\.com\/a\/b",
"httpMethod": "",
"delay": 2000
},
{
"urlPattern": "echo\.jsontest\.com\/b\/c",
"httpMethod": "GET",
"delay": 2000
},
{
"urlPattern": "echo\.jsontest\.com\/c\/d",
"httpMethod": "GET",
"delay": 3000
}
]
}
},
"meta": {
"schemaVersion": "v1",
"hoverflyVersion": "v0.10.0",
"timeExported": "2017-02-08T14:23:56+05:30"
}
}
but in the document, it is given that

In short, I havn't got the parameter "requestType" in my exported json file.
Please help me on it.
Thanks a lot ....

The JSON you posted doesn't contain any request response pairs... it looks like you haven't captured anything. It looks like you have just followed the Applying different delays based on URI tutorial before following the Adding templates to a simulation tutorial.
I've just checked the steps in the tutorials and after completing them I have a simulation.json file with the delays and request response pairs: simulation.json.
If you follow the "Applying different delays based on URI" tutorial, then run the following commands:
hoverctl start
hoverctl mode capture
curl --proxy http://localhost:8500 http://echo.jsontest.com/foo/baz/bar/spam
hoverctl export my_simulation.json
hoverctl stop
cat my_simulation.json

you should see responses and requests in the JSON. Each request should have a requestType property.

Thanks tjcunliffe fro Reply. I will check.

While implementing  Using middleware to simulate network latency from documentation, I have executed the following commands:
hoverctl start
hoverctl mode capture
curl --proxy http://localhost:8500 http://time.jsontest.com
hoverctl mode simulate
hoverctl middleware --binary python --script middleware.py
curl --proxy http://localhost:8500 http://time.jsontest.com
hoverctl stop
but while going through this steps,
hoverctl middleware --binary python --script middleware.py.
I got an error  msg="Hoverfly could not execute this
Please find the attached snapshot for the same.

Hi All,
Can I expect the reply on it ?
Thanks and Regards,
Mohitkumar

This error indicates that Hoverfly cannot execute the binary specified. Please check that you have Python installed - you can do this by running python -V.

It should probably output standard error from the binary as well.

Thanks a lot  tjcunliffe and mogronalol  !!!

Please help me  as I am not clear what I am getting after this comand !!!
hoverctl middleware --binary python --script middleware.py

Any reply on this .....
Thanks and Regards,
Mohitkumar

Hi There,  I am having a similar error when attempted the hoverctl middleware --binary python --script middleware.py
I checked python is installed  with the python -V command.
This is the actual command:
hoverctl middleware --binary /System/Library/Frameworks/Python.framework/Versions/2.7/bin/python --script middleware.py
I am new to Mac, is the problem it is not resolving the relative path of /System/....?

Thanks!
Jenny

Hey @MohitIndian,
That message is just telling you that middleware has been successfully set. The output is just confirming which the middleware it will be executing.

Hey @jxlampdx,
I have tried to reproduce what you have provided and it has worked fine for me.
Could you please provide the middleware.py file that you are using? Could you also include the output of hoverctl logs after this error occurs.

Hi @benjih,  Thank for your reply.  I got it working, the problem was the PATH.  It's now producing the result in the middleware.py file!  Awesome! :)

Good news, @jxlampdx I'll make a note to check our documentation. If you think it could have been more helpful, do say.

Hi @benjih & Hoverfly fans,
Now that we got the command line middleware synthesis working, we  like to be able to invoke this from our android/java and Swift mobile apps.
I see that there is Hoverfly Java binding.  can you provide a quick sample of what the invocation looks like in the a Java app?  Essentially what we like to do is:
In the Java app:

Start hoverfly in simulation mode,
Then curl -- proxy local host with real URL
put hoverfly in simulate mode
execute the hoverctl middleware script
remain in simulation mode.
5  have the mobile app calling the simulation and getting back what is in the middleware script

Thank in advance!
Jenny

Hi @jxlampdx,
hoverfly-java lets you capture and simulate API for testing in JAVA. The most simple way to get started is to put the following JUnit rule in your test:
@ClassRule
public static HoverflyRule hoverflyRule = HoverflyRule.inCaptureOrSimulationMode("simulation.json");

The first run of your test will capture all HTTP requests to external services, and store the simulation.json into test resources folder. The next time you run it will use the recorded simulation.
There are more information in the docs:
https://hoverfly-java.readthedocs.io/en/latest/
At the moment, supporting middleware in hoverfly-java is still in the pipeline. Feel free to give your comments or suggestions on this issue: https://github.com/SpectoLabs/hoverfly-java/issues/7

@jxlampdx I've provided a work-around to your problem, please check out my comment for this issue: https://github.com/SpectoLabs/hoverfly-java/issues/7

@tommysitu we will try the workaround and provide feedback.  Thanks!

Hi @benjih and Team,
After executing this command,
hoverctl middleware --binary python --script middleware.py
I am getting this in console.

And I am getting this in middleware.log file

Kindly guide me know what to do next  as I am trying to achieve this.
Hoverfly is to capture HTTP(S) traffic to create API simulations which can be used in testing.
Hoverfly stores captured traffic as simulations.
Thanks in advance.
Mohitkumar

Hoverfly Team,
For an existing service for an api, we can capture/simulate/synthesized.  Let say now we like to add some new services and test against that.  Is there a way to accomplish this with Hoverfly without first adding these new services to the API.
The issue we are trying to solve is to enable the front end/client team to make progress and simulate new services without having to wait for backend team to make the modification.
thoughts?
Jenny

I am not entirely sure what you need but supposing your new API is similar to an existing one you could export the simulation and edit that and reimport it.
If you are thinking of something more extensive than that take a look at https://github.com/SpectoLabs/swagger-to-hoverfly

@JohnFDavenport, I thought about modifying an existing simulation.  Let me take a look at the swagger-to-hoverfly solution.  Thanks John!

Hoverfly Team,
If we like to edit a previously recorded simulation and essential create a new call.  Are these the correct steps in doing so?

modified a simulation file and save as new.
start up Hoverfly -webserver in simulation mode.
import the new simulation (successful).
inject the middleware file to handle the response.
when we issue the curl command to verify : curl -I http://localhost:8500/rooms/a7155e79-842e-11e6-a1a5-000d3a321a2e/booking,  got bad gateway error.  I also attached our new simulation file.  The assumption is it is matching by "path": "/rooms/a7155e79-842e-11e6-a1a5-000d3a321a2e/booking",

Thanks!
simulation-createBooking4Room.json.zip
APC02SVFZ4GTFM:hoverfly_bundle_OSX_amd64 jlam1$ hoverctl middleware --binary python --script middleware-bookRoom.py
INFO[0000] Hoverfly middleware configuration has been set to
INFO[0000] Binary: python
INFO[0000] Script: #!/usr/bin/env python
import sys
import json
import logging
import random
logging.basicConfig(filename='middleware.log', level=logging.DEBUG)
logging.debug('Middleware "modify_request" called')
def main():
payload = sys.stdin.readlines()[0]
logging.debug(payload)

payload_dict = json.loads(payload)
payload_dict['response']['status'] = random.choice([200, 201])

if "response" in payload_dict and "body" in payload_dict["response"]:
	payload_dict["response"]["body"] = "{'Message': '{success: \"true\",  EventID: \"123456\"}'}\n"

print(json.dumps(payload_dict))

if name == "main":
main()
APC02SVFZ4GTFM:hoverfly_bundle_OSX_amd64 jlam1$ curl -I http://localhost:8500/rooms/a7155e79-842e-11e6-a1a5-000d3a321a2e/booking
HTTP/1.1 502 Bad Gateway
Content-Type: text/plain
Req: /rooms/a7155e79-842e-11e6-a1a5-000d3a321a2e/booking
Resp:
Date: Mon, 06 Mar 2017 18:29:50 GMT
Content-Length: 119
APC02SVFZ4GTFM:hoverfly_bundle_OSX_amd64 jlam1$ hoverctl import simulation-createBooking4Room.json
INFO[0000] Successfully imported simulation from simulation-createBooking4Room.json
APC02SVFZ4GTFM:hoverfly_bundle_OSX_amd64 jlam1$ curl -I http://localhost:8500/rooms/a7155e79-842e-11e6-a1a5-000d3a321a2e/booking
HTTP/1.1 502 Bad Gateway
Content-Type: text/plain
Req: /rooms/a7155e79-842e-11e6-a1a5-000d3a321a2e/booking
Resp:
Date: Mon, 06 Mar 2017 18:31:05 GMT
Content-Length: 119
APC02SVFZ4GTFM:hoverfly_bundle_OSX_amd64 jlam1$ curl -I http://localhost:8500/rooms/a7155e79-842e-11e6-a1a5-000d3a321a2e/booking

We got pass the 502 error and now getting a "there was an error when Matching".  what should the requestType value be?  currently it is "recording" and the error is "could not find recorded request, please record it first!"
We couldn't record as this is a new service and hoping to accomplish the call with just a modified simulation file.  Is this doable with hoverfly?

Hey @jxlampdx,
Creating simulations that mock services yet to be created in definitely a use case we see Hoverfly supporting.
Having a look at your problem, I can see that your simulation is for a POST request with a JSON body attached. The matching problem you are seeing is because the curl request you are sending is a GET request without a body.
curl -X "POST" --data '{"Subject":"Architecture Meeting"<EMAIL_ADDRESS>"OrganizerUserUuid":"63", "Anonymous":"false"}' http://localhost:8500/rooms/a7155e79-842e-11e6-a1a5-000d3a321a2e/booking

You also mentioned the requestType. It is possible to define looser matching by setting the requestType to template and then removing unnecessary fields. This often helps keep the simulation leaner while also making it easier to match.
I have attached a modified version of your simulation, with the request being transformed into a loosely matching template. The reason for doing this was that your request recording had headers attached to it, meaning I would have had to configure my curl program to send the right headers (I'm using a slightly different version of curl so the request would never have matched as a recording).
simulation.json.zip

@benjih Thanks!  will give that a try.  I also like the ability to wildcard match with the template approach.

All done then. Closing the issue as there are no further actions.

A reminder that questions should be posted here: https://groups.google.com/a/specto.io/forum/#!forum/hoverfly


I added 4 files

one HTML, one CSS, and two images.
I made the page responsive i.e, it can be viewed on any device, smartphone, laptop e.t.c I used bootstrap for most of the elements of my page. I tried to make the page look more elegant by using hover effects. I added some icons from the font awesome, to make the page clear.

Hey, really good job at trying to make the form responsive and also include bootstrap in it, the hover effects are interesting!
A few suggestions:

There are two ul tags without a corresponding li tag to enclose them, which can cause issues with the formatting of the page.
The img tags are missing the alt attribute, which provides a text alternative for the image in case the image cannot be displayed.
Use tables to display the form in a tabular form, that way you can have options next to the question, then the next question in order.

Other than these, well done.


DEBUG env var in build.rs is incorrect if profile debug=0

The DEBUG environment variable set for a build script currently gets set to true if you have a profile with debug=0.  AFAIK, rustc treats debug=0 the same as no debug, so I think it should be false.
Repro:
cargo new --lib a
cd a
cat >> Cargo.toml <<EOL
[profile.dev]
debug = 0
EOL
cat > build.rs <<EOL
fn main() { println!("DEBUG={}", std::env::var("DEBUG").unwrap()); }
EOL
cargo build -vv

I can fix this if you'd like.

Ah yes thanks this'd be good to fix!


"Many" returns error 400

A POST request to https://api.waifu.pics/many/sfw/category returns Response code 400 with message:
{
    "message": "that was not a valid json body"
}

Recording:
https://user-images.githubusercontent.com/72270756/123290185-b2ce2b80-d52e-11eb-83cf-8d09e1eb8261.mp4

Many is a post request that needs the exclude field which lets you exclude a certain image/s. Make sure it is an empty array at least.


total newb question

I got to the Usage portion but don't understand how to actually launch goofys and mount my bucket. I have access keys ready. I'm not sure I understand the syntax of the 'usage' code.

You configure goofys the same way you configure aws-cli. Could you be more specific about what you need help with?

thanks for responding. i'm in over my head! no need for more help.


Codecs account for ~27% time spent

This only accounts for the time spent in the codecs to send on the wire / receive from it: codecs usage by the chain resolver is on top of that.
ChainCodec seems to consume most of that time.
Overall, the codecs generate about 830 MB of garbage per second.

While working on improving performance of the codecs, long-term maintenance of codecs and messages was considered too, especially w.r.t. forward/backward compatibility over future changes.
Protobuf was tried but its insistence on using immutable builders to create messages is a performance killer, especially since our largest messages are byte[]-based which require multiple in-memory copies.
The three other libs I looked at that do take performance into consideration are Cap'n Proto, SBE and FlatBuffers.
Cap'n Proto's java implementation requires JDK 1.8, is incomplete and has been left untouched for almost a year.
SBE has a cumbersome API, requires JDK 1.8, gratuitously (IMHO) uses s.m.Unsafe and has a few annoying bug/limitations like its inability to work on read-only ByteBuffers.
FlatBuffers is considered experimental and is only delivered as a code drop, binaries aren't even published to maven central.
After all, I could not find the Silver Bullet we are looking for, so it looks like we would need to come up with our own tool (that could be a fork of one of the above three) but I'm not certain it's worth the effort.

Are there any other benefits; if not performance; if we get rid of the hierarchies in our messages? I remember someone saying that it'd make forward/backward compatibility maintenance easier although I don't know how. So would it help in any way if we do at least that flattening of messages as part of this task?

If you omit performance, protobuf is really nice : instead of creating codec and message classes we could write a simple message descriptor and all the serialization/deserialization code would be generated for us, with a lot of options to modify them without breaking backward compatibility.
Using a protobuf-like lib would make our messaging layer a lot cleaner, leaner, easier to maintain and future-proof.

Is this the task we are going to use for adopting runnel in Ehcache?  If not I guess we should file a task for that, and close this one, right?

Opened #1482 for runnel adoption - closing this


Add more tests to ExpressionToSQL.cs which demonstrate regression

Pull Request Template
Description
This change adds failing unit tests that highlight a regression to ExpressionToSQL.cs between 3.31.2 and 3.32.0
Type of change

[x] Adds failing unit test to reproduce #3697

Closing issues
None

/azp run

@leminh98 please edit the PR title to match the format we use, to make sure the changelog entry looks readable

/azp run


test: disable FS router in react ITs temporarily

FS Router should not automatically be enabled in projects with the existing routes.tsx that routes are defined manually. This is just a workaround to disable the FS Router processing the views dir for the sake of ITs to pass.

Closing in favor of #2171


add the ability to change the duration of the mute without dming them

I would like if you add a command like -changemuteduration (muteid) (new_duration) -s(makes the command not dm them).

I would change this to just the suggestion about the -s flag since -mute already updates a duration

This is now doable , not using the -s flag but one can write a code in mute dm to check if they already have mute role and then conditionally send a response.


Changed color of input to #ffaf4b on focus

Changes proposed in this pull request:

Changed color of input to #ffaf4b on focus as requested

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@6d13cbc). Click here to learn what that means.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master     #215   +/-   ##
=========================================
  Coverage          ?   51.74%
=========================================
  Files             ?       66
  Lines             ?     3643
  Branches          ?      412
=========================================
  Hits              ?     1885
  Misses            ?     1663
  Partials          ?       95

Continue to review full report at Codecov.

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

Hi @nsjcorps, Thanks a lot for the PR. Can you edit the PR description with the screenshot of the UI changes?


[ML-224]Resolved table merge

What changes were proposed in this pull request?

Resolved the problem of wasted memory , because useless data didn't free immediately.
Resolved the problem of poor merge performance

closes https://github.com/oap-project/oap-mllib/issues/224
Does this PR also require the following changes?

CI
Documentation
Example

No.

can you only include code for this issue fix? Otherwise this cannot be reviewed. Or do we have to wait for other PRs to merge first?


Improve tty detection:

Standard input may not be a teletype or pseudo-teletype device, but /dev/tty might be relevant

But curl doesn't do this for example, -#, so idk

It appears this has been fixed


rule MD034 flags URL in fenced block as "bare url", unlike mdl

A URL inside of a fenced code block is marked as a "bare url" by markdownlint.
However, the ruby-based mdl doesn't mark the same line as a bare url.
Please resolve this difference. Thanks.
Example:
$ cat test-fenced-url.md

# Error with URL in Fenced Code Block

    ````text
http://lms.com/pens.cgi?command=collect&pens-version=1.0.0
&package-type=scorm-pif&package-type-version=1.2&package-format=zip
&package-id=http%3A%2F%2Fwww.author.com%3A994646572378864600-1085069139609
&package-url=http%3A%2F%2Fauthor.com%2Fpackages%2F1085069139609.zip
&package-url-expiry=2005-05-20T16%3A05%3A39Z&client=Author
&receipt=http%3A%2F%2Fauthor.com%2Fpens.cgi
&alerts=http%3A%2Fauthor.com%2Fpens.cgi
    ````

The above example will "pass" review by mdl, but markdownlint will trigger a warning:
$ mdl test-fenced-url.md
$ markdownlint test-fenced-url.md
test-fenced-url.md: 3: MD034 Bare URL used

I think the Ruby/mdl behavior is a more sensible default, so I will change this project to match it - and add a code_blocks option to opt into the current behavior for any scenarios that desire it. Thank you!

I've investigated and it turns out the Node implementation of markdownlint already implements the behavior you desire. The problem is that your sample is not what you think it is. :) A code fence may not be indented by more than three spaces and yours is indented by four. (Specification: http://spec.commonmark.org/0.27/#fenced-code-blocks) As such, the body of the fence doesn't appear as such and the bare URL isn't ignored as you're expecting. Converting the example to three-space indentation gives the desired behavior in the current implementation.
If you'd like to experiment with the underlying parser, here's your example in the markdown-it playground:
https://markdown-it.github.io/#md3={"source"%3A"%23 Error with URL in Fenced Code Block\n\n    ````text\nhttp%3A%2F%2Flms.com%2Fpens.cgi%3Fcommand%3Dcollect%26pens-version%3D1.0.0\n%26package-type%3Dscorm-pif%26package-type-version%3D1.2%26package-format%3Dzip\n%26package-id%3Dhttp%253A%252F%252Fwww.author.com%253A994646572378864600-1085069139609\n%26package-url%3Dhttp%253A%252F%252Fauthor.com%252Fpackages%252F1085069139609.zip\n%26package-url-expiry%3D2005-05-20T16%253A05%253A39Z%26client%3DAuthor\n%26receipt%3Dhttp%253A%252F%252Fauthor.com%252Fpens.cgi\n%26alerts%3Dhttp%253A%252Fauthor.com%252Fpens.cgi\n    ````"%2C"defaults"%3A{"html"%3Afalse%2C"xhtmlOut"%3Afalse%2C"breaks"%3Afalse%2C"langPrefix"%3A"language-"%2C"linkify"%3Atrue%2C"typographer"%3Atrue%2C"_highlight"%3Atrue%2C"_strict"%3Afalse%2C"_view"%3A"html"}}

Hmm, the spec and examples seem to conflict, or at best confuse, regarding the maximum of 3 spaces.
See example #102, just below this anchor http://spec.commonmark.org/0.27/#example-101
I'll try to quote it here:

Four spaces indentation produces an indented code block:
Example 102. Try It
aaa

```
aaa
```

It IS confusing. :| But I think it's consistent.
The output in the specification INCLUDES the backtick characters - in other words, 4-space indentation is how you can show a complete code block that includes backtick characters. Here's the sample as rendered by markdown-it:
https://markdown-it.github.io/#md3={"source"%3A"    ```\n    aaa\n    ```"%2C"defaults"%3A{"html"%3Afalse%2C"xhtmlOut"%3Afalse%2C"breaks"%3Afalse%2C"langPrefix"%3A"language-"%2C"linkify"%3Atrue%2C"typographer"%3Atrue%2C"_highlight"%3Atrue%2C"_strict"%3Afalse%2C"_view"%3A"html"}}
Where yours differs is the LACK of indentation on the content between - and if you modify the sample above, it turns into the mixed output that your original output produced.
Do you agree?

I did more digging and made an example where mdl and markdownlint differ (with 3 space indents, and 3 ticks for the fence). However, it is clearly an edge case involving both a list and a code fence.
Basically, a code fenced that is indented exactly 3 spaces is an issue if it is underneath a list item. Both markdown-it and markdownlint show the issue. It could be my error, a CommonMark spec issue, a general parser issue, a markdown-it issue or a combination of the above.
You might want to look at the example below.
Then again, you might just want to consider the original issue closed.  :-)
Permalink to a sample case with links to CommonMark Spec.
https://markdown-it.github.io/#md3={"source"%3A"%23 Code Fence List Issue\n\nThe \"CommonMark\" spec indicates that (emphasis added)%3A\n\n>A code fence is a sequence of at least three consecutive backtick characters\n>(`) or tildes (~). (Tildes and backticks cannot be mixed.) **A fenced code\n>block begins with a code fence%2C indented _no more than three spaces_.**\n\nSee%3A  <http%3A%2F%2Fspec.commonmark.org%2F0.27%2F%23fenced-code-blocks>\n\nHowever%2C it seems that _if preceded by a list item_%2C  an indent of\n**_exactly_** _three spaces_ **_FAILS_** to render with `markdown-it`.\nThough such cases (i.e. this source text) pass the `mdl` (ruby) lint\nprocessor%2C they trigger cascading warnings from `markdownlint` (node).\n\nYet%2C exactly three spaces **is** \"_no more than three spaces_\"%3B it is equal\nto three spaces.\n\nPerhaps the spec should be adjust to say _less_ than three%2C or parsers and\nlint processors should be adjusted. Or there should be caveats regarding\nparent blocks such as lists. Examples follow.\n\n1. One space before code fence begin%2Fend markers\n\n ```Text\nhttp%3A%2F%2Fauthor.com%2Fpens.cgi%3Fcommand%3Dreceipt%26pens-version%3D1.0.0\n%26package-type%3Dscorm-pif%26package-type-version%3D1.2\n ```\n\n2. Two spaces before code fence begin%2Fend markers\n\n  ```Text\nhttp%3A%2F%2Fauthor.com%2Fpens.cgi%3Fcommand%3Dreceipt%26pens-version%3D1.0.0\n%26package-type%3Dscorm-pif%26package-type-version%3D1.2\n  ```\n\n3. Three spaces before code fence begin%2Fend markers (no list item).\n\n   ```Text\nhttp%3A%2F%2Fauthor.com%2Fpens.cgi%3Fcommand%3Dreceipt%26pens-version%3D1.0.0\n%26package-type%3Dscorm-pif%26package-type-version%3D1.2\n   ```\n\nNotice the \"empty\" fenced code block above is is indented three\nspaces.\nHowever%2C it might not \"close\" and therefore this text may appear\nas if it were within a fenced code block.\n\nAlso note that if both the opening and closing fence are\nindented by four (or more) spaces%2C then%2C although the code\nblock does NOT _render_ properly%2C it does seem to \"close\".\n_However_%2C the spec indicates that a code fence should be\n\"indented no more than three spaces.\"\n"%2C"defaults"%3A{"html"%3Afalse%2C"xhtmlOut"%3Afalse%2C"breaks"%3Afalse%2C"langPrefix"%3A""%2C"linkify"%3Atrue%2C"typographer"%3Atrue%2C"_highlight"%3Atrue%2C"_strict"%3Afalse%2C"_view"%3A"html"}}

Interesting! I think your example starts to run into the rules for list items (http://spec.commonmark.org/0.27/#list-items) and indentation, most notably example 224. As you say, this behavior - correct or not - is an artifact of the underlying parser, so not something I would try to change unless it were presenting a problem in a common scenario.  The basic behavior that prompted your issue turns out to be the same for both implementations of markdownlint, so I will leave this issue closed and thank you for the interesting diversion. :)


Decorators on enum

I simply want this:
enum Country {
    // ...
    Uganda = 800,
    Ukraine = 804,
    @DisplayName("United States (Minor Outlying Islands)") UnitedStatesMinorOutlyingIslands = 581,
    @DisplayName("United States of America") UnitedStatesofAmerica = 840,
    Uruguay = 858
    // ...
}

So, I can auto populate a <select> list with the display names:

Same issue posted here: https://stackoverflow.com/questions/52197931/how-to-use-decorators-on-enum-in-typescript

Duplicate #3279; please search before logging new issues and respect the template


spinner not showing

Dear Sir,
Thanks for awesome script but its so fast that it creates problem for me. visitors keep on scrolling. i want to show spinner for 500 ms once they reach on image i tried this but not working.
/* fade image in while loading and show a spinner as background image (good for progressive images) */
.lazyload {
opacity: 0;
}
.lazyloading {
opacity: 1;
transition: opacity 300ms;
background: #f7f7f7 url(loader.gif) no-repeat center;
}
direct link http://way2enjoy.com/a/561666

I was just trying to do this. I'm guessing that you need to give the img dimensions e.g. width: 100px; height: 100px; or 100% if that makes sense. Otherwise the image has no dimensions so the background isn't visible.


AWS Batch Job stuck in "RUNNABLE" state

Hi there,
So I configured everything as outlined for S3 Datastore and Batch Environment and Job Queue.
I skipped the Metadata Service / RDS Setup for the meantime.
I tried running the HelloFlow for test after the setup,
but my job seems to be stuck in the "RUNNABLE" state forever.
Metaflow logs briefly showed a "1 tasks are running" message as shown in the screenshot below, but then again went back to RUNNABLE.
I have also attached my Compute Environment Setup on AWS for reference.

@Viveckh Looks like an issue with your AWS Batch config. Since you are using spot instances, container instance acquisition time would depend on your pricing constraints. Here is more information - https://aws.amazon.com/premiumsupport/knowledge-center/batch-job-stuck-runnable-status/

I am actually using on-demand instances... I would understand the delay if I was using spot instances.

It could also depend on the kind of resources you are requesting. The job would be stuck in RUNNABLE is AWS Batch cannot fulfill the resource constraints using the instance types you have specified in your compute environment.

I eventually figured it out. Turned out it was the outbound rule in the security group that was attached to the Batch Compute Environment. After allowing a <IP_ADDRESS>/0 egress, it worked.
Thanks for your inputs @savingoyal!


chore(avm-simulator): test improvements

Make tests more concise and remove some duplicated calls to AvmSimulator.execute().

[!WARNING]
This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

#4946  👈
#4926
#4915
#4863 : 1 other dependent PR (#4895 )
#4862
#4852
master

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @fcarreiro and the rest of your teammates on  Graphite

Benchmark results
Metrics with a significant change:

note_history_successful_decrypting_time_in_ms (5): 1,243 (-25%)
note_trial_decrypting_time_in_ms (8): 8.71 (-92%)

Detailed results
All benchmarks are run on txs on the Benchmarking contract on the repository. Each tx consists of a batch call  to create_note and increment_balance, which guarantees that each tx has a private call, a nested private call, a public call, and a nested public call, as well as an emitted private note, an unencrypted log, and public storage read and write.
This benchmark source data is available in JSON format on S3 here.
Values are compared against data from master at commit 8ffe5df7 and shown if the difference exceeds 1%.
L2 block published to L1
Each column represents the number of txs on an L2 block published to L1.

Metric
8 txs
32 txs
64 txs

l1_rollup_calldata_size_in_bytes
5,700
18,884
36,452

l1_rollup_calldata_gas
66,108
239,060
470,048

l1_rollup_execution_gas
194,056
500,366
909,306

l2_block_processing_time_in_ms
1,193
4,518 (-2%)
8,998

note_successful_decrypting_time_in_ms
203 (+2%)
544 (+1%)
1,000

note_trial_decrypting_time_in_ms
:warning: 8.71 (-92%)
62.7 (+7%)
37.9 (+3%)

l2_block_building_time_in_ms
15,922
62,850 (-1%)
126,738

l2_block_rollup_simulation_time_in_ms
12,108
47,828 (-1%)
96,708

l2_block_public_tx_process_time_in_ms
3,784 (-1%)
14,926 (-1%)
29,890 (-1%)

L2 chain processing
Each column represents the number of blocks on the L2 chain where each block has 16 txs.

Metric
5 blocks
10 blocks

node_history_sync_time_in_ms
14,600 (-4%)
27,948 (-1%)

note_history_successful_decrypting_time_in_ms
:warning: 1,243 (-25%)
2,426

note_history_trial_decrypting_time_in_ms
104 (-11%)
162 (+1%)

node_database_size_in_bytes
18,784,336
35,500,112 (+1%)

pxe_database_size_in_bytes
29,923
59,478

Circuits stats
Stats on running time and I/O sizes collected for every circuit run across all benchmarks.

Circuit
circuit_simulation_time_in_ms
circuit_input_size_in_bytes
circuit_output_size_in_bytes

private-kernel-init
247 (-1%)
44,736
28,001

private-kernel-ordering
176 (-2%)
52,625
14,627

base-rollup
1,284 (-1%)
177,932
933

root-rollup
70.5 (-1%)
4,192
825

private-kernel-inner
311 (-2%)
73,715
28,001

public-kernel-app-logic
191 (-1%)
32,254
25,379

merge-rollup
5.72 (-1%)
2,712
933

Tree insertion stats
The duration to insert a fixed batch of leaves into each tree type.

Metric
0 deployed contracts

tx_size_in_bytes
19,179

Transaction processing duration by data writes.

Metric
0 new note hashes
1 new note hashes

tx_pxe_processing_time_ms
2,540 (-4%)
1,345 (-1%)

Metric
0 public data writes
1 public data writes

tx_sequencer_processing_time_ms
0.0274 (-10%)
466 (-1%)

Merge activity

Mar 5, 3:45 PM EST: Graphite rebased this pull request after merging its parent, because this pull request is set to merge when ready.


BUG-INTALIO-001236 HTTPOnly Flag Not Set

Set httponly flag for cookie

reviewed by Andy.

please check it into main as well for 3.5


profunctors 5.2

profunctors-5.2 depended on by:

[x] foldl-1.1.2 (< 5.2). Gabriel Gonzalez<EMAIL_ADDRESS>@Gabriel439
[ ] opaleye-<IP_ADDRESS> (>=4.0 && < 5.2). Tom Ellis<EMAIL_ADDRESS>@tomjaguarpaw
[ ] product-profunctors-<IP_ADDRESS> (>=4.0 && < 5.2). Tom Ellis<EMAIL_ADDRESS>@tomjaguarpaw
[ ] these-<IP_ADDRESS> (>=3 && < 5.2). Oleg Grenrus<EMAIL_ADDRESS>@phadej. @isomorphism

This is also blocked by #1149

Fixed by foldl-1.1.3

these updated

bifunctors-5.2 is now blocked by this issue, due to invariant-0.3 which depends on both.


Feature request: Different themes for in match and in menu.

It would be great to have the ability to have two differen themes, one for the menu and one for in game. Since some themes got to much informations for in game and block to much of the screen, but a usefull to read in the menu. And other are perfect for in game, but hard to read or to less informations while in menu.

Hey, as discussed with you on the discord, this feature is very specific to your need, so it will not be develop by the team. However, this is a possible simple things to develop, if you or someone is brave enough, don't hesitate to fork and try implement it yourself, we will be happy to help ;)


Regression with Snowpack from 1.0.6 -> 1.0.7

🐛 bug report
🎛 Configuration (.babelrc, package.json, cli command)
index.html
<html>
  <body>
    <script type="module" src="/index.js"></script>
  </body>
</html>

index.js
import { proxy } from "valtio";
console.log(proxy);

package.json
{
  "name": "reproduce",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "dependencies": {
    "react": "^17.0.2",
    "snowpack": "^3.8.2",
    "valtio": "^1.0.7"
  },
  "devDependencies": {},
  "scripts": {
    "start": "snowpack dev",
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "keywords": [],
  "author": "",
  "license": "ISC"
}

Commands to run
npm i
npm start

🤔 Expected Behavior
It should properly imports the proxy export from Valtio.
😯 Current Behavior

🔦 Context
There seems to be a regression when using the latest valtio version and using it with Snowpack.
However if you downgrade to<EMAIL_ADDRESS>it properly imports the proxy export.
npm i<EMAIL_ADDRESS>npm start

Thanks for reporting. I was able to reproduce the issue with your instruction.
Looking at http://localhost:8080/_snowpack/pkg/valtio.v1.0.7.js,
it's using the esm/index.js, but from there it uses the cjs version of vanilla.js instead of esm/vanilla.js.
I'm not sure what is wrong. v1.0.6 was working because everything was cjs. As snowpack supports esm, we'd not want to use cjs. Hmmm..
cc @LXSMNSYC

It seems that snowpack uses the Node's default behavior:

Node.js treats JavaScript code as CommonJS modules by default. Authors can tell Node.js to treat JavaScript code as ECMAScript modules via the .mjs file extension, the package.json "type" field, or the --input-type flag. See Modules: Packages for more details.

so even if the package is sufficiently defined with exports, Node would still need the "type" field or the mjs file extension.
I tried this with node (node index) and valtio/vanilla still resolves to the CJS bundle (as proven by the bundle output from snowpack).
I'm not sure if specifying the "type" field may solve this issue (this requires both "proxy-compare" and "valtio" to resolve correctly.)
Note: I tested the same repro with Vite and it seems to resolve okay. It's either this is a Snowpack issue OR we fix "valtio" and "proxy-compare" to resolve correctly across bundlers (and Node).

I just tried "node": "./esm/index.mjs" which didn't help...
import { proxy } from 'valtio/vanilla' works, though.


Forms need better styling

The current survey has small radio buttons, and other styling details so that it doesn't compare well with "standard" offers (eg, survey monkey, qualtrics). For example, here is jspsych:

and if you browse something like codepen, there are so many ways to make forms with big input boxes, buttons, etc! I'd like to suggest beautifying the style of forms - even integration of bootstrap would do wonders! The reason is because we are getting a lot of feedback during our pilot about needing improvements, and instead of trying to hack something or use a different framework, I thought it would make sense to do this the open source way. Let me know your thoughts!

Here are forms / idea to spur thinking:

generating an entire form from json This would make Jspsych surveys an API akin to plotly.js - someone could specify questions / options in a json object, and the basic blocks for the entire survey would be generated based on the specification.
http://codepen.io/terned/pen/jbRqoL
blocks instead of radio: instead of radio, make the entire text clickable (nicer user experience)

Styling with pseudo selectors (download the example file to see this):

This seems like a really good option because it would just require tweaking the style sheet.

input boxes The radio buttons are still small here, but the inputs are nicely done.

I'm completely on board with this. It's related to the broader goal of making the CSS and markup more friendly in general, #163.
My initial thought is that the markup generated by the plugins should be overhauled to use Bootstrap classes. A custom Bootstrap-friendly style sheet could be provided by default, but using Bootstrap as the base would let people use custom themes easily.
I love the JSON to form idea. That's a nice way to implement #135.

Great! I might have some time this weekend to start working on this.

It would be amazing to have something like this to design experimental paradigms:
http://pingendo.com/

I agree! We're in the early stages of building a GUI for jsPsych, but it won't have anything this sophisticated in the first release.

Great! Maybe when the skeleton is done I could help as well. This is definitely an important need for the community.

I think a good candidate instead of bootstrap would be material design light - for example look here:
http://www.getmdl.io/components/index.html#toggles-section/radio
The user still has the basic classes that could be over-ridden and customized, but the cool thing about material design light is that the entire color / feel is changed based on just changing the style sheet, for example:
  <link rel="stylesheet" href="https://code.getmdl.io/1.1.1/material.blue-light_blue.min.css" />

would have a main color of blue with light blue accents
and you can generate a custom color scheme here:
http://www.getmdl.io/customize/index.html
I was looking at the code and I think you would be much faster to make these tweaks, let me know your thoughts!

I think you've identified the advantages of MDL. My concern is that it's not as flexible as Bootstrap, because it imposes a very particular kind of style. I'm not sure that style works for all experiments.
I don't have enough knowledge of either framework to make a well-informed decision. But, I lean towards Bootstrap for flexibility. My limited understanding is that Bootstrap supports more components at the moment. I could be convinced otherwise.

I just put together an example to show some of the components - they are really beautiful:
http://vsoch.github.io/md_experiment/
I think given that both come with classes, etc, it's always possible to customize. Material design is a Google product - they use it for their sites and it's a really clean, nice design. My concern with bootstrap is that the standard radio / inputs aren't really that different from what is provided by the browser - I did some testing to add bootstrap to a current jspsych experiment and realized even with bootstrap classes, they would still need the user to add customization.
What material design offers is a really great user experience, off the bat. I think what can make or break a survey is that one detail. Most people probably don't want to do too much work to change or customize things, they just want them looking awesome from the get go. At the end of the day, what is easiest and most professional / awesome looking is going to be used, and more white bread ("needs work to be customized") will not be chosen.

I agree with you that it looks great and that it needs to look great out of the box. There are lots of nice Bootstrap themes that could be dropped in to achieve this.
Your demo shows that MDL clearly looks great for surveys. If MDL can work well for non-survey type experiments, then I'm on board with using it.

Oh I see - you are looking for a style that could be applied to all experiment elements? What elements do you have in mind in particular?
For all of those themes, take a look at the form styles - checkboxes and radios are the standard / plain provided by the browser, so it doesn't add much.

Here are components if you want to take a look.

Sorry, my goal wasn't clear.
I want to replace all of the CSS with a CSS framework, and have all the plugins generate markup that's consistent with the framework (plus have appropriate IDs or classes that are related to the plugin for ease of customization).

ah, understood! Which components or elements are you concerned that bootstrap has that material design light does not?

+1 !

Here is a way you could have css style properties as variables, and give the user control to select:
https://justmarkup.com/log/2016/02/theme-switcher-using-css-custom-properties/

That's neat. I didn't know about that feature yet.
Are you planning to take some portion of this on? I'm not expecting a firm commitment, but for planning purposes it would be good to know so that efforts aren't duplicated.

I was planning on it, but looking at the code base over the weekend I don't think my JavaScript is up to chops to do this most efficiently. It would be a good learning experience for me and I could likely (slowly) contribute, but my thinking is that it would be less of a burden on you to just do it efficiently. My strong suite is python, so I am working on adding a simple survey module to the experiment factory as a workaround in the meantime.

I probably won't get to this for several months, so slow progress would still be welcome progress if you decide to take it on at some point.

ok cool! Definitely will give a go if I have some free time! Thanks for all this discussion, it is very helpful.

Going to close this because it is covered by #244.