Add benchmarking tests

Summary
Adding to qiskit asv based on bench_press, specifically qiskit_gym tests
Making changes to the qiskit benchmarking suite by adding more tests with different types of circuits. Not yet finished implementing and would appreciate feedback regarding how I could better improve the benchmarking tests, and any other params I could keep track of.
Details and comments
Fixes #12595

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Details

0 of 0   changed or added relevant lines in 0 files are covered.
5 unchanged lines in 2 files lost coverage.
Overall coverage decreased (-0.003%) to 89.75%

Files with Coverage Reduction
New Missed Lines
%

qiskit/transpiler/passes/synthesis/unitary_synthesis.py
2
88.2%

crates/qasm2/src/lex.rs
3
92.11%

Totals

Change from base Build<PHONE_NUMBER>:
-0.003%

Covered Lines:
63415

Relevant Lines:
70657

💛  - Coveralls

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Warning: This coverage report may be inaccurate.
This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

For more information on this, see Tracking coverage changes with pull request builds.
To avoid this issue with future PRs, see these Recommended CI Configurations.
For a quick fix, rebase this PR at GitHub. Your next report should be accurate.

Details

0 of 0   changed or added relevant lines in 0 files are covered.
811 unchanged lines in 54 files lost coverage.
Overall coverage increased (+0.03%) to 89.785%

Files with Coverage Reduction
New Missed Lines
%

qiskit/converters/circuit_to_gate.py
1
97.44%

qiskit/dagcircuit/dagdepnode.py
1
76.81%

qiskit/compiler/assembler.py
1
96.13%

qiskit/converters/circuit_to_instruction.py
1
98.21%

qiskit/assembler/assemble_schedules.py
1
98.35%

qiskit/qasm2/export.py
1
98.5%

qiskit/pulse/configuration.py
2
96.08%

qiskit/transpiler/passes/synthesis/unitary_synthesis.py
2
88.2%

qiskit/circuit/library/hamiltonian_gate.py
2
83.33%

qiskit/circuit/library/standard_gates/xx_plus_yy.py
2
95.74%

Totals

Change from base Build<PHONE_NUMBER>:
0.03%

Covered Lines:
63662

Relevant Lines:
70905

💛  - Coveralls

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Details

0 of 0   changed or added relevant lines in 0 files are covered.
2 unchanged lines in 1 file lost coverage.
Overall coverage increased (+0.03%) to 89.794%

Files with Coverage Reduction
New Missed Lines
%

crates/qasm2/src/lex.rs
2
92.88%

Totals

Change from base Build<PHONE_NUMBER>:
0.03%

Covered Lines:
63754

Relevant Lines:
71000

💛  - Coveralls

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Details

0 of 0   changed or added relevant lines in 0 files are covered.
2 unchanged lines in 1 file lost coverage.
Overall coverage increased (+0.02%) to 89.78%

Files with Coverage Reduction
New Missed Lines
%

crates/qasm2/src/lex.rs
2
91.86%

Totals

Change from base Build<PHONE_NUMBER>:
0.02%

Covered Lines:
63744

Relevant Lines:
71000

💛  - Coveralls

it's also worth adding random cliffords synthesis benchmarks for various numbers of qubits:
from qiskit.quantum_info import *
cliff = random_clifford(num_qubits)
qc = cliff.to_circuit()

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Warning: This coverage report may be inaccurate.
This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

For more information on this, see Tracking coverage changes with pull request builds.
To avoid this issue with future PRs, see these Recommended CI Configurations.
For a quick fix, rebase this PR at GitHub. Your next report should be accurate.

Details

0 of 0   changed or added relevant lines in 0 files are covered.
965 unchanged lines in 54 files lost coverage.
Overall coverage increased (+0.1%) to 89.905%

Files with Coverage Reduction
New Missed Lines
%

qiskit/circuit/library/standard_gates/r.py
1
97.73%

crates/accelerate/src/synthesis/permutation/utils.rs
1
98.88%

qiskit/synthesis/evolution/lie_trotter.py
1
96.77%

qiskit/circuit/library/standard_gates/rxx.py
1
97.56%

qiskit/transpiler/passes/routing/commuting_2q_gate_routing/pauli_2q_evolution_commutation.py
1
97.92%

qiskit/circuit/library/standard_gates/rzx.py
1
97.56%

qiskit/circuit/library/standard_gates/u.py
1
95.92%

crates/accelerate/src/isometry.rs
1
99.65%

crates/accelerate/src/sampled_exp_val.rs
1
88.71%

qiskit/synthesis/evolution/product_formula.py
1
98.64%

Totals

Change from base Build<PHONE_NUMBER>:
0.1%

Covered Lines:
65804

Relevant Lines:
73193

💛  - Coveralls


Minor changes to default theme

Connects to vaadin/components-team-tasks#121

This change is

Does this affect the screenshots which @Saulis just updated?

If the screenshots have the pink-highlighted today date visible or fullscreen mode with "year toolbar" visible then yez

The screenshots do actually have the pink highlight for today. :cry:  I will make another PR to update the screenshots.

Reviewed 2 of 2 files at r1.
Review status: all files reviewed at latest revision, all discussions resolved.

Comments from the review on Reviewable.io


Please update to Vue 2.0

Thanks ;)

yeah agree!

@kristianmandrup thanks for your opinion, will do it, and will get rid of jquery dependency as well

@JackGit Great! Thanks! Much appreciated :)

@JackGit sorry to ask, but is there any prevision to release?

there is any news about this ?


Repeaters

Draft PR adding an integrated way to add repeating tasks to tanjun.
Based off of https://github.com/FasterSpeeding/Yuyo/pull/29/, but missing some features atm.

Sorry for leaving this pr sitting for so long, i'm going to finish those changes that this requires today and then you can rebase onto that and implement starting up and stopping the repeaters in Component.open and Component.close

Looks like you'll need to rebase this but also random question, what do you think about calling these "scheduled callbacks" instead of "repeaters"?

Might be helpful to have the repeaters also implement tanjun.componentsComponentLoader once this has been rebased

I'ma finish this due to inactivity

I'ma finish this due to inactivity


[Feature] Colored nicks on irc.

Colored nicks on irc are a good way to distinguish different users at a glance since it breaks up walls of plain white text and just all around increases readability.

This irc -> discord bridge has the option, but it's node so I dunno if that'll help: https://github.com/reactiflux/discord-irc
https://github.com/myano/jenni/wiki/IRC-String-Formatting

Not a bad idea, but not high priority :)

See #423


how to current location for react native map

import Geolocation from '@react-native-community/geolocation';

Geolocation.getCurrentPosition(info => console.log(info));


Mention User

Hello, is it possible to mention a user when you upload a video?

Well... not at the moment.
I`ll plant it.
you can also add yourself. it is the same to add tag.

I see in the code that the hashtag data is created through
text_extra.append({"start":len(title)-len(verified_tag)-1,"end":len(title),"user_id":"","type":1,"hashtag_name":verified_tag})

and is posted to the url https://us.tiktok.com/api/v1/web/project/post/?aid=1988.
Unfortunately, I was unable to find any documentation for how the data should be formatted for posting to the URL, so I am unsure how to mention the user.
I assume that the type and hashtag_name fields need to be changed in order to indicate its a mention, not a hashtag.
{"start":len(title)-len(verified_tag)-1,"end":len(title),"user_id":"","type":1,"hashtag_name":verified_tag}

How would I go on doing so? Could you provide the needed code?

@stevesajeev1
update the latest script， i have add this feature


cmd/asm: VMOVQ misassembled to VMOVD on 386

What version of Go are you using (go version)?

$ go version
go version go1.15 linux/amd64

Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (go env)?
go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build142714031=/tmp/go-build -gno-record-gcc-switches"

What did you do?
Create an assembly file with the following content, assemble it for 386:

TEXT foo<>(SB), 4, $0
	VMOVQ (SI), AX

Then, dump the resulting object file.
What did you expect to see?
An instruction VMOVQ (SI), AX  with encoding c5fa7e06.
What do you see instead?
A weirdly assembled VMOVD (SI), AX with encoding c4e1f96e06.  It appears that the assembler mis-assembles VMOVQ to VMOVD on 386.

Does VMOVQ (SI), AX exist?
c5fa7e06  is vmovq  xmm0,QWORD PTR [esi] and https://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-vol-2b-manual.pdf seems to suggest it only works with xmm registers.

Sorry.  This was a typo.  I meant to write VMOVQ (SI), X0 of course.

@cherrymui


createFactory deprecation warning fix. See post https://blogreact.com…

…/react-v16-13-0/
createFactory deprecation warning fix.
Browser is showing warning:
React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.
As the warning states - React.createFactory() will be removed in a future release.
See post https://blogreact.com/react-v16-13-0/ for more info.

Bump...


Still uses deprecated sendJavascript which violates Content-Security-Policy

The current Android implementation still relies heavily on the sendJavascript method. That method is 1) deprecated and 2) causes a violation of HTML Content-Security-Policy settings unless 'unsafe-eval' is included. Including 'unsafe-eval' works but adds vulnerability to cross site scripting.

I made changes to one file, PushPlugin.java, for myself to fix this. I did not do a fork and pull request because it also changed the behavior. If you want that fix and my comments about it, they are in this github GIST: https://gist.github.com/nusculus/cf6c3463ded22db9e153

@EddyVerbruggen wht do you think?

:+1: to getting rid of sendJavascript!


[exprtk] Update ExprTk package

@ArashPartow, thanks for the PR! I will rerun this PR after the baseline  issue fixed.

@PhoebeHui  thank-you!

/azp run


Setting NoData before Description causes Description to not get written

Creating a new image and setting NoData prior to setting the a band description causes it to not write the band description.

Setting NoData, or writing data to a band.  I was having only the first band description get into the file when writing out bands in a loop.  I have adjusted my code to loop through and set the descriptions first, and the loop again to write the bands, and now I have labels on all bands.


Experiment

@MSoegtropIMC Do you have any idea why the windows 64 build for 8.16 is failing?  I certainly didn't touch coqdoc.  I cherry picked my modified fix on top of the v8.16 tag before generating the path.  Thanks.
    59	File "tools/coqdoc/dune", line 16, characters 7-11:
    60	16 |  (name main)
    61	            ^^^^
    62	(cd _build/default && C:\cygwin_coq_platform\home\runneradmin\.opam\__coq-platform.2022.09.0~8.16~2022.09~beta1\bin\ocamlopt.opt.exe -w -40 -rectypes -g -O3 -unbox-closures -o tools/coqdoc/main.exe C:/cygwin_coq_platform/home/runneradmin/.opam/__coq-platform.2022.09.0~8.16~2022.09~beta1/lib/ocaml\str.cmxa -I C:/cygwin_coq_platform/home/runneradmin/.opam/__coq-platform.2022.09.0~8.16~2022.09~beta1/lib/ocaml config/config.cmxa boot/boot.cmxa C:/cygwin_coq_platform/home/runneradmin/.opam/__coq-platform.2022.09.0~8.16~2022.09~beta1/lib/ocaml\unix.cmxa -I C:/cygwin_coq_platform/home/runneradmin/.opam/__coq-platform.2022.09.0~8.16~2022.09~beta1/lib/ocaml C:/cygwin_coq_platform/home/runneradmin/.opam/__coq-platform.2022.09.0~8.16~2022.09~beta1/lib/ocaml\threads\threads.cmxa -I C:/cygwin_coq_platform/home/runneradmin/.opam/__coq-platform.2022.09.0~8.16~2022.09~beta1/lib/ocaml clib/clib.cmxa tools/coqdoc/.main.eobjs/native/dune__exe.cmx tools/coqdoc/.main.eobjs/native/dune__exe__Cdglobals.cmx tools/coqdoc/.main.eobjs/native/dune__exe__Alpha.cmx tools/coqdoc/.main.eobjs/native/dune__exe__Index.cmx tools/coqdoc/.main.eobjs/native/dune__exe__Tokens.cmx tools/coqdoc/.main.eobjs/native/dune__exe__Output.cmx tools/coqdoc/.main.eobjs/native/dune__exe__Cpretty.cmx tools/coqdoc/.main.eobjs/native/dune__exe__FileUtil.cmx tools/coqdoc/.main.eobjs/native/dune__exe__Glob_file.cmx tools/coqdoc/.main.eobjs/native/dune__exe__LatexCompiler.cmx tools/coqdoc/.main.eobjs/native/dune__exe__Main.cmx)
    63	** Fatal error: Cannot run cygpath -m "libgcc" "libgcc.lib" "libgcc.dll.a" "libgcc.a"

The code I added is to just to convince me that the patch is indeed included in the build:
    try
      let fname = Filename.concat (Filename.get_temp_dir_name ())
          (Printf.sprintf "CREATE_FILE_%d" (!Shared.cvt_pid (Unix.getpid ()))) in
      let fd = open_out fname in
      close_out fd
    with _ -> ();

@jfehrle : the actual error is Fatal error: Cannot run cygpath -m "libgcc" "libgcc.lib" "libgcc.dll.a" "libgcc.a". This looks like an intemittent cygwin hickup - this happens rarely (say one in a few 100) but it happens. I would rerun.
As I said you would save you a lot of time (and a bit of CO2) if you would change -extent=x to -extent=i in all github runner files.

But I guess you can do a first test using the 32 bit installer - it shouldn't matter for this.

FYI The artifact files don't appear on the Summary page as described here, perhaps because some jobs failed.

As I said you would save you a lot of time (and a bit of CO2) if you would change -extent=x to -extent=i in all github runner files.

Got it.

I was able to run with my modified patch and verified that the patch was included in the build.

@jfehrle : good. Does it work as expected? Should we ask Andrew to test this build?

No, not ready for that.  The patch still doesn't work at all in platform and I don't see how to fix it.  I'm trying another approach.  I'll let you know.

OK. I wonder how this can be. You say it works when installed via opam? What environment do you use? A Coq Platform generated cygwin or something else?

It only works when I compile it in a developer build locally using dune in a cygwin bash shell.  I do this in a cygwin I installed a while ago, probably from when I was working on the debugger. Does anything from cygwin become part of the CoqIDE executable?  I don't have any good theory at the moment.

Coq Platform produces MinGW apps, so it uses the cygwin supplied MinGW cross compiler and includes various cygwin supplied MinGW libraries, but it does (or should) not contain anything from cygwin.
I would say the best development environment for Windows is provided by the cygwin created when installing Coq Platform via the batch file from sources. This batch file first creates a fresh cygwin tailored for Coq development. If it works in there, it should work in Coq Platform.
I remember that a while back you were working on plain cygwin (not MinGW cross), but this is said to be broken for all newer OCaml compilers and not supported - it would be interesting to know if it does work somehow, though - say what OCaml version you are using.
So my main quetsion is: is your coqc and coqide a MinGW app or a cygwin app. Say does coqc understand absolute cygwin paths like /home/ which is then redirected to C:\cygwin_path\home?

I would say the best development environment for Windows is provided by the cygwin created when installing Coq Platform via the batch file from sources.

That's what I'm using.
$ which ocaml
/home/jfehr/.opam/__coq-platform.2022.04.0~8.15~2022.04/bin/ocaml

$ ocaml --version
The OCaml toplevel, version 4.13.1

I remember that a while back you were working on plain cygwin (not MinGW cross), but this is said to be broken for all newer OCaml compilers and not supported - it would be interesting to know if it does work somehow, though - say what OCaml version you are using.

I use dune to build.  I'm happy to be rid or the old stuff.

Say does coqc understand absolute cygwin paths like /home/ which is then redirected to C:\cygwin_path\home?

Is this cygwin or MinGW?
$ ls -l /home/test.v
-rw-r--r-- 1 jfehr jfehr 0 Oct 20 11:04 /home/test.v

$ coqc /home/test.v  -coqlib _build/default
Error: Can't find file /home/test.v

$ cygpath -w /home/test.v
C:\cygwin64_coq_platform\home\test.v

$ which coqc
/home/jfehr/.opam/__coq-platform.2022.04.0~8.15~2022.04/bin/coqc

Is this cygwin or MinGW?

coqc - where will tell you. which coqc is something the shell does (which is cygwin).
But since you are using a Coq Platform OCaml, it will for sure be MinGW.
The build environment is a MinGW cross environment on cygwin. It is technically similar to building a Windows app on Linux, except that cygwin can easily run MinGW apps like coqc (while Linux can't easily run Windows apps). Just the paths cygwin supplies to MinGW apps must be relative or Windows absolute. Forward slashes are btw. no problem - all Windows apps which don't mess it up explicitly support this.

coqc -where will tell you. which coqc is something the shell does (which is cygwin).

Not working for me in Windows, but no point in spending more time on this.
$ coqc -where
cannot guess a path for Coq libraries; please use -coqlib option or ensure you have installed the package containing Coq's stdlib (coq-stdlib in OPAM) If you intend to use Coq without a standard library, the -boot -noinit options must be used.

$ coqc testB.v -where -coqlib _build/default
cannot guess a path for Coq libraries; please use -coqlib option or ensure you have installed the package containing Coq's stdlib (coq-stdlib in OPAM) If you intend to use Coq without a standard library, the -boot -noinit options must be used.

$ coqc testB.v -coqlib _build/default
Error: File C:\proj\coq2\_build\default\theories\Init\Prelude.vo has bad
version number 81600 (expected 81591). It is corrupted or was compiled with
another version of Coq.

But it does work in WSL:
/home/proj/coq2$ coqc -where
/home/jfehrle/.opam/__coq-platform.2022.01.0~8.15~beta1/lib/coq

Done with this

Not working for me in Windows, but no point in spending more time on this.

This has nothing to do with Windows, but with dune. Afaik you either have to install things or use shims when you use dune.

The shims don't work on Windows because they're shell scripts.  On Linux, you can exec them but Windows won't.  So I use a workaround.  I suggested to Emilio converting the shims to OCaml to fix this, how he eventually does that.


[SPARK-49225][SQL][CONNECT] Add ColumnNode sql & normalize

What changes were proposed in this pull request?
This PR adds the ColumnNode.sql and ColumnNode.normalize functions. Both are needed when we integrate ColumnNode in the Column. This PR also improves some of the UDF handling.
Why are the changes needed?
ColumnNode needs to support all the functionality needed by Column.
Does this PR introduce any user-facing change?
No.
How was this patch tested?
(Improved) existing tests, and added a test suite for sql and normalize.
Was this patch authored or co-authored using generative AI tooling?
No.

Merging to master


Integration with Elastic stack for login analytics

As a part of SIEM integrations - https://github.com/wso2/product-is/issues/8937, the product can be integrated with Elastic to publish and analyze login and session data
Effort::60

Implemented with https://github.com/wso2/product-is/issues/13310


chore: release  java-client 0.1.2

:package: Staging a new release
0.1.2 (2023-07-26)
Bug Fixes

service/chart/java-client: test release logic with some minor fixes (#46) (a215b6b)

This PR was generated with Release Please. See documentation.

:robot: Release is at https://github.com/carbynestack/ephemeral/releases/tag/java-client-v0.1.2 :sunflower:


Update Ruby version for building documentation

Summary
This PR updates the Ruby version used locally when building documentation to match what GitHub Pages uses.
Category

[ ] bolt (Bolt for Java)
[ ] bolt-{sub modules} (Bolt for Java - optional modules)
[ ] slack-api-client (Slack API Clients)
[ ] slack-api-model (Slack API Data Models)
[ ] slack-api-*-kotlin-extension (Kotlin Extensions for Slack API Clients)
[ ] slack-app-backend (The primitive layer of Bolt for Java)
[x] docs (Documentation)

Requirements
Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you agree to those rules.

@filmaj haha exact same thought... But oh well I guess. Thanks for the review!


feat: Curriculum page loads with current challenge block open

[x] I have read freeCodeCamp's contribution guidelines.
[x] My pull request has a descriptive title (not a vague title like Update index.md)
[x] My pull request targets the master branch of freeCodeCamp.
[x] None of my changes are plagiarized from another source without proper attribution.
[x] All the files I changed are in the same world language (for example: only English changes, or only Chinese changes, etc.)
[x] My changes do not use shortened URLs or affiliate links.

This PR addresses some of #34236, but not completely.  It changes how the tree expands when learn.freecodecamp.org loads.  On master, it expands the first super block, Responsive Web Design, and the first block within that: Basic HTML and HTML5.  This happens irrespective of what the user has been working on.  This PR changes it so that it opens the block and super block containing the user's current challenge.

Right, that should cover it.  To answer the questions I didn't address specifically: after I finally realised that everything could be done with booleans while keeping things stateless, I ended up reverting a lot of my changes.  Hope this version's okay!

I just tested this PR locally and notice that if you open two sections and close the browser, when you come back it only leaves the first open (closest to the top).  Is that intended?  I was kind of thinking that both would be opened or better yet, the last one opened and touched vs. just the one closest to the top.

@RandellDawson, the intended behaviour is for the map to be open at a users current challenge. I think tracking the map state across sessions would be confusing for the user.

First off, I'll take a look at the merge conflict ASAP, but I wanted to get your thoughts before I ploughed on any further.
The basic idea is that, as you suggested, the currentChallengeUrl returned by the server initializes the expanded state of the curriculum.  It does this via the Map component.  The initialization being done there because it should only happen once while the page is loaded.  As the user can load the curriculum directly or come to it from another page, the user details may have already returned from the server or not.  As such, there needs to be a check in both componentDidMount and componentDidUpdate.  Since componentDidMount has no notion of previous state, it's necessary to check if any blocks have been expanded to avoid toggling them closed.
The other option I considered was to simply open them, rather than checking if initialization has happened and toggling them if it hasn't.  That avoids having the check, but could be confusing if something a user was expecting to stay closed springs open of its own accord.

What remains?  As it stands, getSessionUser is only called once, so the currentChallengeUrl only updates once at the beginning.  If the user completes a block, starts a new one and then returns to the curriculum it will be expanded exactly as it was before they did the work.  To my mind this might feel like their work wasn't being registered.  I think it makes sense to have block completion fire off an action to close the finished block (and maybe super block) and open the next one, but I'm not 100% sure.

@raisedadead I've taken another look at this and I think it's basically working, though it does need a final review.
To summarise:

If you open up (or reload) your browser and go to learn it will expand the curriculum to show you the challenges in the block you last looked at.
If you toggle some blocks in the curriculum, navigate away and navigate back the curriculum will still be the same as when you left it.

I was slightly concerned that people might be confused by 2. since, if they complete a block and go back to the curriculum, it won't have collapsed.  However, people might also find it odd that a block they'd left open went and closed by itself.

@ValeraS I see that it could be annoying if the server is slow for some reason.  However, if we just rely on the store, I don't think we can solve the problem - since the store is recreated when the page is reloaded.
The only possibilities I can think of right now are

Prevent initializeExpandedState being called if the user has toggled something manually
Use a cookie to remember the current challenge

What do you think?

since the store is recreated when the page is reloaded

How about this: in this case, somehow propose the user to reveal the current challenge.

somehow propose the user to reveal the current challenge.

In all honesty, we want things to be simple. Its very difficult to explain users, if it's not obvious users will not get it in the first place. :(

somehow propose the user to reveal the current challenge.

In all honesty, we want things to be simple. Its very difficult to explain users, if it's not obvious users will not get it in the first place. :(

Agree. Maybe show the loading status while we fetch user data?
How often this page is the first page for the user?
How often does the user reload this page during his session?

How often this page is the first page for the user?
When the navigate from external places, news, forum etc.
How often does the user reload this page during his session?
If you mean a hard reload, that will be rarer. But the map is the only way to navigate the challenges. More so, when we remove it from the search soon.

But, if we do have a nice way to do a loader and then load the component, I would be okay with storing the current challenge on the user object.

As I see it there are two, more or less independent, issues.

What should happen when you navigate internally: should it remember the expanded state or recreate it based on the last challenge viewed?
What should happen when you reload: should it throw up a loader until the user state is loaded, show the curriculum immediately, but update it once the data arrives (assuming no user interaction) or use a cookie to track the last challenge viewed?

I don't have a strong feeling about 1, there are pros and cons to both.  However, I'm not keen on the loader idea, simply because we don't need the user data to show them the curriculum.  Even under normal conditions it takes a second or two before the user data comes back.  I don't think people like being made to wait.
I think you'd get a better user experience if you just used the local state if it exists, a cookie if it doesn't and default to having the first block open otherwise.

I think you'd get a better user experience if you just used the local state if it exists, a cookie if it doesn't and default to having the first block open otherwise.

Yes, I think this is going to be the best experience.

If we go with that, presumably we can just ditch all the server side stuff.  I guess it's not the end of the world if someone deletes their cookies and ends up seeing the default expansion.

If we go with that, presumably we can just ditch all the server side stuff. I guess it's not the end of the world if someone deletes their cookies and ends up seeing the default expansion.

That is correct.

I think, in most cases, a user goes through challenges one by one in order as it is and not often return to the Map. The Map is a start point, and if we will not change behavior on the first enter wy change it at all?
When you use FreeCodeCamp on two computers, a solution with the local state(cookie, localStorage, etc) for the first enter does not work well.

Sure, this won't fix all the possible problems, but it does help with the problems in #34236.
The only thing I can think of we could change to deal with, say, two computers, is to use the server's response to set a cookie.  However, that would only help if people logged in on a non-curriculum page and then navigated to learn.  If that's a common enough use case, I'd be happy to add that.

I deliberately haven't added tests for the Shows, since they have graphQL queries and that means we have to mock Gatsby which complicates things a bit.
Other than that, I've switched from cookies to store and changed the fallback order as Valeriy suggested.
@raisedadead There's more we could do, but I think this is in a reasonable state.

Hi @ojeytonwilliams just for the sake of posterity, can update the OP to reflect what this PR does.
I am going to be pulling this soon for a QA.
Thanks.

@ojeytonwilliams I still don't understand why do you not want to use the currentChallengeId instead of currentChallengeUrl?
const { superBlock, block } = nodes.find(node => node.id === curentChallengeId) || {};

IMHO, the behavior should be the same, whenever we go to the Map, i.e. do not save a state of the Map in the store.

The idea was to avoid having to search through every single challenge each time the browser is reloaded.  We can do that, of course, but I don't see why that's preferable to putting a url in the store.
In general I'd prefer not re-write working code when I don't see much to be gained by doing so.  In this case, as you say, the behaviour would be the same, so why change it?

Because you do not use information from the user data what.
https://github.com/freeCodeCamp/freeCodeCamp/pull/35421#discussion_r312576332

We get currentChallengeId from a user data, it can be more actual than challengeUrl.

If you do not want to use currentChallengeId, then putting currentChallengeUrl in the store is pointless in the current implementation.

From https://github.com/freeCodeCamp/freeCodeCamp/pull/35421#discussion_r317678168

find by currentChallengeId SuperBlock and Block to expand;

Isn't this an expensive lookup?
Hence I said, to break the deadlock on this PR:

... see how this behaves (on .dev) and then evaluate our decision.

Isn't this an expensive lookup?
Hence I said, to break the deadlock on this PR:

It will be done only on mount and nodes array contains about 1500 elements. it's not so many.

It will be done only on mount and nodes array contains about 1500 elements. it's not so many.

Agreed. And we can test this on our beta site? I have found the calls to API slow as it is :(

There we go.  @ValeraS, @raisedadead it should do what we want, but using currentChallengeId and componentDidMount rather than the constructor.
I changed it so that only signed in users can update any stores,  Since you can't make progress while logged out, it seemed inconsistent to allow the stores to change.  Unfortunately, this meant the saga became harder to test, so if anyone knows the right way to do that, I'd love to see it.

Let's make one another field currentChallengeId in the store, independent from the user data with the next behavior:

initialized with data from local storage or null;
updated on challengeMounted and fetchUserComplete actions;
used on the Map creation.

@ojeytonwilliams @raisedadead What do you think?

Out of curiosity, have you all considered tackling the issue reported in #https://github.com/freeCodeCamp/freeCodeCamp/issues/17778 while working on changing this map feature?

@ValeraS Makes sense to me.  currentChallengeId is now its own property.  I went with defaulting to null, since the store is there as a fallback. I also fixed a bug in the saga.
@RandellDawson while I think that issue needs dealing with (amongst other accessibility problems), I think we should try to keep PRs focused, if possible.

@ValeraS I've made the changes and re-checked the behaviour. Let me know if you spot anything else.

@ValeraS please merge if you are happy with the changes. I would deploy this for a QA on the dev instance.

Thanks for all the reviews @ValeraS.  I'm pretty happy with how it turned out.  Pending .dev QA, of course!

Thanks @ojeytonwilliams @ValeraS @RandellDawson ! 🎉
This was quite a tough feature to implement to be honest. I have triggered a build and it should be available within the hour.

Thanks everyone for all your hard work!


Support a prefix to prepend to the event_summary for PagerDuty.

@analytically  Can you please take a look at the Travis output.
Thanks!

"Warning: unrecognized cop FileName found in /home/travis/build/sensu/sensu-community-plugins/.rubocop.yml" - my PR doesn't touch this, so I think Travis is/was broken.

Gonna make a new PR.

@analytically  I have seen that on occasion as well, I am leaning towards it is a Rubocop issue.  I haven't had the time and frankly, the desire, to dig into it further.

https://github.com/sensu/sensu-community-plugins/pull/1024


Frequency editor radio button binding issue

The frequency editor would crash when trying to pop it out into its own window. Now that I have fixed that, I was testing the editor by clicking the radio buttons and I got several strange behaviors. The output is saying this:

The editor doesn't seem to have this problem when it is open in tab form.
Cody will investigate more.

For example, clicking "fit to flows" is not selecting that radio button:

I simplified the radio button bindings. I think the wires were getting crossed somehow. It seems to be working correctly now.
This is fixed in branch scenario_threshold_820

Thanks @codymccoy


fix: electron deployment

:tada: This PR is included in version 1.2.1 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Contextual menu for MudTable and MudDataGrid

Feature request type
Enhance component
Component name
MudTable / MudDataGrid
Is your feature request related to a problem?
No response
Describe the solution you'd like
Hello,
Is there a way to add contextual menu on MudTable and MudDataGrid. I use BlazorContextMenu from stavroskasidis but the integration in MudTable is not working 100% and on MudDataGrid does not work at all.
Thanks,
Have you seen this feature anywhere else?
BlazorContextMenu from stavroskasidis
Describe alternatives you've considered
No response
Pull Request

[ ] I would like to do a Pull Request

Code of Conduct

[X] I agree to follow this project's Code of Conduct

See https://github.com/MudBlazor/MudBlazor/issues/9076#issuecomment-2507905459


Support for multi-language default messages

In version 2 we're gonna support default messages for validations. We need a way to custom/translate these default messages.

Done!
https://github.com/andrebaltieri/Flunt/blob/dev/Flunt/Localization/ContractLocalization.cs


[SPARK-24386][SS] coalesce(1) aggregates in continuous processing

What changes were proposed in this pull request?
Provide a continuous processing implementation of coalesce(1), as well as allowing aggregates on top of it.
The changes in ContinuousQueuedDataReader and such are to use split.index (the ID of the partition within the RDD currently being compute()d) rather than context.partitionId() (the partition ID of the scheduled task within the Spark job - that is, the post coalesce writer). In the absence of a narrow dependency, these values were previously always the same, so there was no need to distinguish.
How was this patch tested?
new unit test

@HeartSaVioR @arunmahadevan @xuanyuanking @tdas @zsxwing

Can one of the admins verify this patch?

Can one of the admins verify this patch?

Test build #91816 has started for PR 21560 at commit 03cc20d.

Test build #91817 has finished for PR 21560 at commit 252f5c9.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds no public classes.

Test build #91816 has finished for PR 21560 at commit 03cc20d.

This patch fails due to an unknown error code, -9.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/91817/
Test FAILed.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/91816/
Test FAILed.

Test build #91882 has started for PR 21560 at commit 252f5c9.

Test build #92146 has started for PR 21560 at commit c0f769e.

Test build #92146 has finished for PR 21560 at commit c0f769e.

This patch fails Spark unit tests.
This patch does not merge cleanly.
This patch adds no public classes.

Build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/92146/
Test FAILed.

Test build #92310 has started for PR 21560 at commit 71a3568.

Test build #92310 has finished for PR 21560 at commit 71a3568.

This patch passes all tests.
This patch does not merge cleanly.
This patch adds no public classes.

Build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/92310/
Test PASSed.

Test build #92360 has started for PR 21560 at commit 468f134.

Test build #92360 has finished for PR 21560 at commit 468f134.

This patch passes all tests.
This patch merges cleanly.
This patch adds the following public classes (experimental):
case class ContinuousCoalesceRDDPartition(

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/92360/
Test PASSed.

Sorry, that wasn't meant to be a complete push. Added the tests now.

Test build #92387 has started for PR 21560 at commit f77b12b.

LGTM assuming tests pass.

Test build #92387 has finished for PR 21560 at commit f77b12b.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/92387/
Test PASSed.

Merged build finished. Test PASSed.


curl/Search function

Implementing the curl/search functionality using a script that iterates over each word in the recipe's title and create a new file with the word as a the file name and the recipe link as a it's content:
#!/bin/bash

URL="https://based.cooking"

# generate search indices next to 'generate_search_index.sh'
search_dir=$(dirname "$0")

# before regenerating search indices
# clean search directory except 'generate_search_index.sh'
find $search_dir ! -name `basename $0` -type f -delete

# list all recipes in src/
for filepath in $search_dir/../*.md; do
    # grab filename of the recipe
    filename=$(basename $filepath)

    # grab filename of the recipe WITHOUT it's extension: '.md'
    title=${filename%.*}

    # split title into words delimited by dash '-'
    title_delimited=$(echo $title | tr '-' "\n")

    # iterate over each word in the title
    for word in $title_delimited; do
        # for each word, create a new file that contains links to it's recipes
        echo "$URL/$title.html" >> $search_dir/$word
    done
done

$ tree
.
├── example.md
├── README.md
├── src
│   ├── search
│   │   ├── aelplermagronen
│   │   ├── almeirim
│   │   ├── ...
│   │   ├── fries
│   │   ├── generate_search_index.sh
│   │   ├── ginataang
│   │   ├── ginger
│   │   ├── gnocchi
│   │   ├── ...
│   │   ├── yam
│   │   └── yogurt

after running ./src/search/generate_search_index.sh before deployment, calling the endpoint /search with a keyword will return:
$ curl based.cooking/search/chicken

https://based.cooking/chicken-biscuit-potpie.html
https://based.cooking/chicken-parmesan.html
https://based.cooking/chicken-pasta-casserole.html
https://based.cooking/chicken-stock-bone-broth.html
https://based.cooking/chicken-tacos.html
https://based.cooking/chicken-tomato-spinach-curry.html
https://based.cooking/chicken-wings.html
https://based.cooking/pan-seared-chicken.html
https://based.cooking/roasted-chicken-breast.html

Also this PR has an attempt to fix the github's failing upload workflow by installing necessary packages first. but of course i cannot test that myself. i am not sure if you are using github's workflow to upload to the live site..
Thanks @sylGauthier for the cool Makefile...

Summary for reviewer.
one recipe filename renamed to snake case.
Readme.md changed.
modification to the github actions script made that now updates and installs wget.
actual script file added.

Personally, I think this is creating too many files. I understand the approach of having it generated on deploy time. But I don't think the existence of so many files is helpful.
This whole thing on its own has a functionality of a whole separate package.

PR has been adapted to the new makefile that @sylGauthier added.

curl/Search now support looking up tags (same endpoint).
$ curl http://based.cooking/search/german

https://based.cooking/sauerkraut.html

I haven't had a chance to actually test this out.
I'll go ahead and say, since we're talking about this being run from the command line, I'd prefer the /search/ url be something shorter, like /q/ or if possible, nothing at all and on 404, a search is run.
Additionally, I think it'd be nice to explicitly recommend people to make an alias or really function for for curl based.cooking/q/%s because I doubt people will want to type that out every time.
Again, I'll have to test if it actually works later.

I'll go ahead and say, since we're talking about this being run from the command line, I'd prefer the /search/ url be something shorter, like /q/ or if possible, nothing at all and on 404, a search is run.

There are some benefits to have a dedicated endpoint for searching:

Makes it easy to flush search index: simply rm -rf search
Avoid polluting blog directory.
Avoid any confusion that may occur if someone is looking for a recipe with a single word eg: aelplermagronen.

Despite all of that...
I went ahead and removed /search/.
$ curl http://based.cooking/german

https://based.cooking/sauerkraut.html

Additionally, I think it'd be nice to explicitly recommend people to make an alias or really function for for curl based.cooking/q/%s because I doubt people will want to type that out every time.

maybe something like this?
$ basedcooking () { curl -sL https://based.cooking/"$@" | fzf --preview 'curl -sL {} | bat --color=always' ; }
$ basedcooking foo

* curl + fzf + bat = bloat?

If have written my own script to curl the md files instead and with bat -pP looks pretty nice. If reading recipes in the terminal is the general use case for the curl/search it may be worth considering serving the md files in plain text.

@0jdxt the idea of offering each recipe in multiple formats has already came up few times already, and personally I like it.
#158 #170 #184
but I am not the one who calls the shots around here.

As I think more of this, I'm not really sure this can be done without server side scripting.  It looks like only single words, which I don't think anyone actually searches in the wild.
I might just want to look into a small PHP search engine that can be used on the site (and index recipe content as well), but could be extended to do this.

No one wants to see HTML

that's one more reason to consider multiple formats.

It looks like only single words, which I don't think anyone actually searches in the wild.

I agree. it's possible to follow the same approach and consider more words in different permutations.
but that's kinda stupid and would scale exponentially.

I'm not really sure this can be done without server side scripting

let's take a step back and rethink the whole thing.

how about delegating the search functionality to the user?

maybe something similar to this?
$ basedcooking () {lynx -dump -nonumbers -listonly https://based.cooking | fzf --preview 'lynx -dump -nonumbers -nolist {}'}
$ basedcooking

I understand it's still limited by the title and tags. however its easy to build on top of that.

and index recipe content as well

how about downloading all the recipes and recursively grep through them? (or something more sophisticated idk)

PHP

please please please no.

I think perhaps if we would like to keep the alias/function simple:
$ cook() { lynx -dump "https://based.cooking/$@" ;}

then multiple results could return the filenames e.g.
$ cook chicken curry
butter-chicken-curry
...

then one could do
cook butter-chicken-curry

to get the recipe. And of course a single result would return recipe instead of results. Then scripters can easily pipe it into fzf or dmenu for something more sophisticated.

I might just want to look into a small PHP search engine that can be used on the site (and index recipe content as well), but could be extended to do this.

As annoying as PHP can be it might be ok for this particular functionality since it's not complicated.

If you guys are willing to use PHP for search? then why not go full PHP??
PHP has string interpolation-ish functionality out of the box which makes generating page from templates trivial.
But then comes the question? why statically generating the site in the first place (using a sophisticated Makefile)?
Don't get me wrong, I admire all the engineering work that @sylGauthier spent into that Makefile. but there would be zero purpose for that if we went a server side rendering approach.

Here is my approach, using my homemade menu selector, and a generated list with the Makefile that just contains links and titles, but I will add tags as well.

generated list with the Makefile that just contains links and titles, but I will add tags as well.

if the list contains the links, title, tags and content as well, wouldn't that enable choice to search through the ingredients too? if so, that would be pretty good.
I ran some back of a napkin calculations, and found out that would be less than 200KB in bandwidth.

wouldn't that enable choice to search through the ingredients too?

Yes that would work, but I feel like stuffing all the content into a single line is a bit overkill. It's probably easy to extract just the ingredients.

stuffing all the content into a single line is a bit overkill

Do you mean "overkill" from a visual point of view (terminal output clutter)?
We don't have to show it, just search through it. an extra grep/sed on the recipe's content before piping everything else into choice.
and then after selecting, show the whole recipe.

I'd say @sylGauthier 's idea is better than either mentioned, because the script-ability of an output like that is supreme to any other output that we have seen so far.
This also allows making multiple lists if necessary in the future to separate the content if further categories are going to be made.
@Goblin80 This essentially ends up being a big CSV file, if we're going at it. If we add any more columns to it it's pretty much a database file all in one request. Whether it's good or bad is up to you. But I'd say just keeping the title and URL in the output is a less unreasonable idea.

This essentially ends up being a big CSV file, if we're going at it. If we add any more columns to it it's pretty much a database file all in one request.

yes, precisely that.

Whether it's good or bad is up to you.

The average recipe size (without images) is 1.2KB, without taking HTTP content encoding (gzip) nor any type of compression on server side (e.g: db.csv* as tarball).
That makes the request with other metadata (at the time of writing) about 200KB.
Loading this page to write this comment took 4.5MB.

I understand that might be not clever and wasteful, but on the other hand, upsides are:

search through link, title, tag, content, ingredients, author, ...
practically unlimited script-ability.

However, there are ways to avoid hammering the server with requests and reduce wasted traffic, one such way might be:
https://based.cooking/status
This status endpoint is generated on build and will offer a few metadata about the current state of the site like:

last build time
number of recipes
...
(and most importantly) a checksum of the latest state of the db.csv*

$ curl https://based.cooking/status

1616044660
119
...
ae5dd429f0549ad819958436d93c6f63 db.csv

and the script would honor that checksum and only fetch the whole db.csv* once (unless updated) and keep it somewhere locally.
* it doesn't have to be csv, just anything easy to work with in grep, sed, awk, etc...

I mean ok but why not have the script just pull the whole repo at this point, it will take care of checksums and "smart update" for free.
Actually you know what, I think I might just hard fork this thing and make it into a local database of recipes. You clone the repo, you make install, it converts all markdown pages into man-page like files, install them in /usr/share/cooking, then just have a script greping stuff and displaying it correctly and call it a day.
Updates are just a periodic git pull && make install whenever you feel like it.

why not have the script just pull the whole repo at this point, it will take care of checksums and "smart update" for free.

I was under the impression that git and make shouldn't be a prerequisite for looking up recipes.
but on a second thought, you right I am over complicating simple stuff.
pulling the repo and running make install makes perfect sense.

Some thing has to do the search, no way around it (or is there?). The solution with pre-generating search results scales terrible and has terrible UX. I personally think that's just misguided dogma taking over the practicality resulting with the worst possible outcome. Other alternatives are:

Search dynamically on the server, with server side scripting in any number of ways (nginx + grep?) then cache the search results to save server resources. This solution adds a lot of complexity to the code, because it brings the website from static to dynamic and effectively forces admins to worry about resources and security.

Search dynamically on the frontend.

If we (the server) don't want to search, and the user can't search, then the last alternative is "make someone else search for us". Leverage one of the many existing web search engines, just write good robots.txt and sitemap.xml and integrate with https://duckduckgo.com/search_box or similar. This solution is really not bad, except now we depend on a third party. We better choose one that we trust and like. (Extra benefit of this solutions is that it's easy to write a nginx redirect that will redirect to search results page of a search engine.)

But wait, there is one more solution. DON'T DO SEARCH! :exploding_head: Essentially, the static website is a digital form of a book. Cook books are solving this problem of searching quite well I would say.

Regarding the CLI interface, it's a classic scope creep, I'd suggest you guys worry about that in a separate PR/issue. No one likes reading html source in their terminal anyway, and I doubt most people have or want to have lynx on their machines, there must be a better way to do that, if it's even necessary. Less features is worse, not better. The whole point of this project is to fight  entropy, you don't fight entropy by adding more shit.

#232 I ended up going through with my autistic solution.

@LukeSmithxyz

So the ideal would be to run cook chicken parmesan and a chicken parmesan recipe is output on the terminal (provided there is only one found).

@0jdxt

then one could do cook butter-chicken-masala to get the recipe.

I have though about it for a while and came up with this:
Leverage comm/join
The idea is find the intersection between the lists of each keyword
$ cat chicken

https://based.cooking/butter-chicken-masala.html
https://based.cooking/chicken-biscuit-potpie.html
https://based.cooking/chicken-parmesan.html
https://based.cooking/chicken-pasta-casserole.html
https://based.cooking/chicken-stock-bone-broth.html
https://based.cooking/chicken-tacos.html
https://based.cooking/chicken-tomato-spinach-curry.html
https://based.cooking/chicken-wings.html
https://based.cooking/japanese-noodle-soup.html
https://based.cooking/pan-seared-chicken.html
https://based.cooking/roasted-chicken-breast.html
https://based.cooking/spatchcock-chicken.html
https://based.cooking/stir-fried-chicken-with-an-orange-sauce.html

$ cat parmesan

https://based.cooking/chicken-parmesan.html
https://based.cooking/parmesan-potatoes.html

$ join chicken parmesan

https://based.cooking/chicken-parmesan.html

$ cat butter | join - chicken | join - masala

https://based.cooking/butter-chicken-masala.html

building on that idea, this snippet uses curl instead of cat:

$ basedcooking() {
URL="https:\/\/based.cooking\/"
curl="curl -sL $URL"
eval `echo "$@" | sed -re "s/ (\w+)/ \| join - <(echo \"\$\($curl\1\)\")/g" -e "s/^/$curl/"` | fzf --preview 'lynx -dump -nonumbers -nolist {}'
}

$ basedcooking chicken parmesan

eval?! cringe
Recipe's content
Instead of considering the title and the tags only, the search index can be extended to include individual words in the recipe, which enables searching contents of a recipe.
Each word in the recipe's content will be treated as a keyword. same as the words in the title or the words in the tags.
The search index would be about 3k words/files max.

@pyzozord

The solution with pre-generating search results scales terrible and has terrible UX.

In my defense, if you read the curl/Search function in the future section in the README.md, you will find this PR is trying to solve exactly that.

Search dynamically on the server, with server side scripting in any number of ways (nginx + grep?) then cache the search results to save server resources. This solution adds a lot of complexity to the code, because it brings the website from static to dynamic and effectively forces admins to worry about resources and security.

100% agree.

just write good robots.txt and sitemap.xml

yea, good point. the site is missing robots.txt and security.txt
https://based.cooking/robots.txt
https://based.cooking/.well-know/security.txt
see: https://securitytxt.org/

No one likes reading html source in their terminal anyway, and I doubt most people have or want to have lynx on their machines.

You are absolutely right.

In Conclusion
@Godje @LukeSmithxyz
Hands down, @sylGauthier's "autistic" solution is light years better than all the gimmicks that I am trying do in this PR.
If you went ahead and merged his PR #232, please close mine. I don't think I can do any better.

@Goblin80 kudos for the sober attitude. Things we don't do have just as big, if not bigger, impact than the things we do. It's way more difficult to decide what not to do.

In my defense, if you read the curl/Search function in the future section in the README.md, you will find this PR is trying to solve exactly that.

Oh I actually didn't notice that. :man_facepalming: @LukeSmithxyz I think that's a really bad design decision. Cooking recipes in command line are a gimmick. Instead you can have a prominent section in readme.md with "satellite" repos with useful scripts and forks that don't fit to the primary functionality.
Also think again about the search. Curated lists, index and tags are way more based. Search is for soyboys.

Cooking recipes in command line are a gimmick

IMHO running a huge, bloated, millions-lines-of-code javascript sandbox aka modern web browser just to render 10 lines of instructions on how to mix ingredients is the real gimmick.
I'd say ideally, there would be one repo only for markdown recipes, a repo with the tools to generate the based.cooking website then as you said, other satellites repos with tools to convert the recipes into whatever floats people's boats. That would be the basedest solution.
Also this would allow @LukeSmithxyz to give (some) people collaborator status to the recipe repo so that a small team of moderators can review/merge recipes, while keeping control over the website's internal tools, CSS, templates, etc.

I'm still not quite sure why we need a curl interface when the recipes are in a git repo. Isn't it much easier and cheaper to just clone it and use whatever command line tools you'd like to search locally?

Isn't it much easier and cheaper to just clone it and use whatever command line tools you'd like to search locally?

Yes. #249 #232

This project is in a dire need of database. (maybe keep it portable and use sqlite + nginx caching?)
That way you can actually implement a decent search function, pagination(the index page will just keep getting slower and slower to load) and possibly including recipes in other recipes.

A simple Front End solution would be using a HTML  with a  and some  html tags with values that have cooking tags and recipe names. It just uses HTML with a HTTP GET request.
Here is an example

the index page will just keep getting slower and slower to load

We're at least 10 000 recipes short of the index page being too large to load quickly.

Search is bloat by the way. You don't need it. Just use command-f. That is the only way.

For those interested in man page recipes, I made a script to convert/install/read/search markdown recipes from any source. You can just clone this repo, run:
cook -i src/*.md

to install all recipes and that's it. Available here.
You can do
cook -s "word"

to grep for word in all recipes, something that you won't get with ctrl-f on the web-based solution without filthy PHP or javascript.

I agree with @sylGauthier that this whole thing has to be fragmented to keep everyone's sanity. https://github.com/LukeSmithxyz/based.cooking/issues/249
We can have people maintaining a satellite website repo that will generate the webpages and stuff, and we can have the people maintaining the Markdown list of recipes that has a strict ruleset.
This way people who want to have the whole recipe book in a terminal should either clone the MD repo and have their own based tool, or come together on a separate command line tool that will fetch the MD list and do all their stuff automatically, considering some people just want to see a gosh darn recipe, and not participate in this autistic pursuit of a perfect technological masterpiece.


Updates every tick

Updating every tick causes massive lag in large modpacks. Could we get an option to change how often it updates (like once per second or something)?

Sorry, I'm personally not supporting any versions below the upcoming 1.18.1 version.
Maybe someone else wants to pick things up for older versions - I simply don't have the time.


java 21 java -jar zipkin.jar

Describe the Bug
java.lang.IllegalArgumentException: Unsupported URL: jar:nested:/root/zipkin.jar/!BOOT-INF/lib/zipkin-lens-3.0.3.jar!/zipkin-lens/static/js/main.d21e7047.js (must start with 'file:', 'jar:file', 'jrt:' or 'bundle:').
And the ui load error.
Steps to Reproduce
curl -sSL https://zipkin.io/quickstart.sh | bash -s
java -jar zipkin.jar
java -version
openjdk version "21.0.1" 2023-10-17 LTS
OpenJDK Runtime Environment Corretto-<IP_ADDRESS>.1 (build 21.0.1+12-LTS)
OpenJDK 64-Bit Server VM Corretto-<IP_ADDRESS>.1 (build 21.0.1+12-LTS, mixed mode, sharing)
Expected Behaviour
ui showed

looking, thanks

opened https://github.com/line/armeria/issues/5390 while try to think about a workaround..

patching HttpFile to pass on the path starting with "nested" works, but adding a patched file from Armeria is a NOTICE pain, because it is not a file we wrote.. cc @openzipkin/armeria I'll try to find another way, but all the classes we couldl work around this with seem package protected. At the moment zipkin is toast over this

once https://github.com/openzipkin/zipkin/pull/3696 lands I'll release and raise a patch to homebrew also

verified back to working in 3.0.4

https://github.com/Homebrew/homebrew-core/pull/160208 for homebrew update


Add generics support for Query component.

This PR begins to address #213 by adding generics support to the Query component. I wanted to keep the diff small and reviewable so we can see how we like this pattern before adopting it in the other components and hooks.
Previously, the data returned by Query's render prop was typed as any, so users got no type safety around the data returned by their GraphQL API. With these changes, data becomes typed by a generic T that's supplied to the Query component.
For example, let's say our Query component returns data of the following shape:
{
   "data": {
      "todos": [
         "id": 1
         "text": "Todo"
         "complete": false
      ]
   }
}

We can then use generics to type data in our Query component.
interface Todo {
   id: number,
   text: string,
   complete: boolean;
}

interface Data {
   todos: Todo[];
}

const TodoQuery = gql`
  query {
    todos {
      id
      text
      complete
    }
  }
`;

const Example: FC = () => {
  return (
    <Query<Data> query={TodoQuery}>
      {({ data }) => data.todos.map(todo => <Todo key={todo.id} {...todo} />)}
    </Query>
  );
};

If we attempt to access an unknown field (i.e. data.todo) or use a property in a non-type safe way, the compiler will alert us 🎉 The generic T will default to any, so this doesn't affect any existing code using urql (it's 100% opt in), so <Query query={TodoQuery}> in the above example is still totally valid.

@parkerziegler Is #252 good enough as well? Since removes the discrete component implementations it might supersede this PR

@kitten yep, I just took a peak at #252 and I like that a lot! Looks like it should support the same passing of generics to components, so I'm all for it. I'll close this PR cc/ @dotansimha #252 should address #213.


Can no longer pick graphs in invoke

I would expect the "board" to be a drop down of existing boards that I've added.
Sample board: https://github.com/breadboard-ai/breadboard/blob/main/boards/tools/openapi/openapi-toolworker.json it links to aboard from the FS (which is a local copy of https://raw.githubusercontent.com/breadboard-ai/breadboard/main/boards/tools/openapi/openapi.json)

@aomarks would love your help here. The issue stems from
https://github.com/breadboard-ai/breadboard/blob/8e2c44d5b1650cce21701ab5aaa6ca2d99ed3921/packages/core-kit/src/nodes/invoke.ts#L104
when marked as "unknown" type, the resulting JSON Schema type is an array of all possible types. This breaks the UI, since we expect the type to be "object":
https://github.com/breadboard-ai/breadboard/blob/8e2c44d5b1650cce21701ab5aaa6ca2d99ed3921/packages/breadboard-ui/src/elements/node-info/node-configuration.ts#L773-L805
I tried changing "unknown" to "object" in invoke.ts, but it starts to complain. What's the best way to address this?

Got it!
-  type: "unknown",
+ type: object({})

(sorry, missed this thread earlier)

Got it!
-  type: "unknown",
+  type: object({})

Cool! But can't it also be a string URL?

Got it!
-  type: "unknown",
+  type: object({})

Also, note that the 2nd argument to object determines whether the object is open or closed (i.e. the value of additionalProperties in JSON schema). With no 2nd argument, it is closed. Examples:

object({}) creates:

{
  "type": "object",
  "additionalProperties": false
}

object({foo: "string"}) creates:

{
  "type": "object",
  "properties": {
    "foo": {
      "type": "string"
    }
  },
  "additionalProperties": false
}

object({}, "unknown") creates:

{
  "type": "object",
  "additionalProperties": true
}

object({}, array("number")) creates:

{
  "type": "object",
  "additionalProperties": {
    "type": "array",
    "items": "number"
  }
}

So I think in your case you want #3 (any kind of object) instead of #1 (an empty object).
(I'm open to switching up this syntax a bit to make this more intuitive)


add #repaginate_out_of_range method

This allows to define a custom behavior when #page is called with a value out of
range.
For example, when setting
  # given there are 100 articles
  Article.page(10).per(25).all
  # => []

  Article.when_page_is_out_of_range_set :first
  Article.page(10).per(25).all
  # => # the first 25 articles

  Article.when_page_is_out_of_range_set :last
  Article.page(10).per(25).all
  # => # the last 25 articles

This behavior is useful when you are deleting resources from a list and you are
on the last page. If the last page has only one resource, after deleting it you
can redirect the user to the previous (last) page or force the first page.

Thanks for your PR! I'll be bluntly honest, I have a strong no on this feature. From a user's perspective it's so weird to see the result of other page. Also, every app has a different need of how it should behave when the page is out of range and I don't see why only this one should be added to kaminari.
@amatsuda @zzak WDYT?

I'm closing this issue due to a low demand. I would recommend you to make a gem to see if this is something other people want.


use python3, not /usr/bin/python3

python3 might be in /usr/local/bin/python3
I am currently working on porting galaxy k8s to use the more convenient python:3.7-slim image. This will allow easier transition to newer versions of python.

Thanks @rhpvorderman!

This is failing builds when building (at least) 20.09 image:
#16 5.349 TASK [galaxy : Create Galaxy virtualenv] ***************************************
#16 6.214 fatal: [localhost]: FAILED! => {"changed": false, "msg": "Failed to find required executable python3 -m virtualenv in paths: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"}

Looks like all builds have been failing:
https://hub.docker.com/repository/registry-1.docker.io/galaxy/galaxy-min/builds?page=2

I've reverted this for now, since it's breaking existing dockerfiles.

hmm. This will hold the development of the image back in the long run. The Dockerfile and this playbook are in separate repos and one can't change without the other.
It may be better to freeze the current master branch for backwards compatibility and work on a non-default branch instead. Then pin the Dockerfile on specific comments, to prevent this very problem in the future.


Parity with the Nunjucks macros

@paulrobertlloyd has created a comprehensive list of differences between this library and the Nunjucks macros that are provided by the Design System.
Most of them fall into the categories of renaming arguments to match or adding slots to match the html: behaviour from Nunjucks. The most important ones will be included in version 2.0.0.

Component
GDS Design System
GOV.UK Components
Recommended change

✔   Accordion #203
attributes
html_attributes

classes
classes

id
id

headingLevel
MISSING
Add heading_level param, defaults to 2

items
sections

↳ heading.text
↳ title
Rename heading_text

↳ heading.html
↳ MISSING
Add heading_html slot

↳ su mmary.text
↳ summary
Rename summary_text

↳ summary.html
↳ MISSING
Add summary_html slot

↳ content.text
↳ MISSING
Add text param

↳ content.html
↳ content

↳ expanded
↳ expanded

✔  Back link #207
attributes
html_attributes

classes
classes

text
text

html
MISSING
Accept content block

href
href

✔  Breadcrumbs #211
attributes
html_attributes

classes
classes

collapseOnMobile
collapse_on_mobile

MISSING
hide_in_print

items
breadcrumbs

↳ text
↳ text

↳ html
MISSING

↳ href
↳ link
Rename href

↳ attributes
MISSING

↳ present

Cookie banner
attributes
html_attributes

classes
classes

ariaLabel
aria_label

hidden
html_attributes.hidden
Add hidden param

role
Remove, and determine based on type

messages
MISSING
Replace body with message slot. This would allow the component to take multiple messages which prevent having to render the component multiple times, as is the case on Apply.

↳ attributes

↳ classes

↳ headingText

↳ headingHtml

↳ text

↳ html

↳ hidden

↳ role

↳ actions
actions

↳ attributes
MISSING
Documentation suggests providing an array of link helpers, but should this be more structured? You could concievably provide an array of anything into actions right now.

↳ classes

↳ text

↳ type

↳ href

↳ name

↳ value

✔  Details #214
attributes
html_attributes

classes
classes

id
html_attributes.id
Add id param

open
html_attributes.open
Add open param

summaryText
summary_text

summaryHtml
summary_html

text
text

html
content

✔  Footer #209
attributes
html_attributes

classes
classes

containerClasses
MISSING
Add container_classes param

MISSING
copyright_text

MISSING
copyright_url

MISSING
meta_licence

meta
meta

↳ visuallyHiddenTitle
meta_items_title

↳ text
MISSING
Add meta_text param

↳ html
meta_content
Rename meta_html

↳ items
meta_items

↳ text
↳ text

↳ html
MISSING

↳ href
↳ href

↳ attributes
MISSING

navigation
MISSING
I’d be tempted to continue ignoring this, as use case served by allowing custom meta content.

↳ title

↳ columns

↳ items

↳ text

↳ html

↳ attributes

✔  Header #212
attributes
html_attributes

classes
classes

containerClasses
container_classes

homepageUrl
homepage_url

productName
product_name

serviceName
service_name

serviceUrl
service_url

menuButtonLabel
menu_button_label

navigationClasses
navigation_classes

navigationLabel
navigation_label

navigation
items
Rename navigation

↳ text
↳ text

↳ html
↳ html

↳ href
↳ href

↳ active
↳ active

↳ attributes
↳ html_attributes

MISSING
↳ classes

MISSING
logotype

MISSING
crown

✔  Inset text #208
attributes
html_attributes

classes
classes

id
html_attributes.id
Add id param

text
text

html
content

✔  Notification banner #213
attributes
html_attributes

classes
classes

MISSING
headings

text
MISSING
Add text param

html
content

titleText
title
Rename title_text

titleHtml
MISSING
Add title_html slot

titleHeadingLevel
title_heading_level

titleId
title_id

type
MISSING
Takes either success or nil

role
html_attributes.role
Add role param

disableAutoFocus
disable_auto_focus

Panel
attributes
html_attributes

classes
classes

id
html_attributes.id
Add id param

headingLevel
MISSING
Add heading_level param, defaults to 1

text
body
Rename text

html
content

titleText
title
Rename title_text

titleHtml
MISSING
Add title_html slot

✔  Phase banner #205
attributes
html_attributes

classes
classes

text
text

html
content

tag
phase_tag
Rename tag

✔  Skip link #206
attributes
html_attributes

classes
MISSING

text
text

html
MISSING
Accept content block

href
href

Start button
N/A
html_attributes

N/A
classes

N/A
text

N/A
html

N/A
href

Summary list
attributes
html_attributes

classes
classes

rows
rows

↳ key.text
↳ key
Rename key_text

↳ key.html
↳ MISSING
Add key_html slot

↳ key.classes
↳ MISSING
Add classes param

↳ value.text
↳ value
Rename value_text

↳ value.html
↳ MISSING
Add value_html slot

↳ value.classes
↳ MISSING
Add classes param

↳ actions.classes
↳ MISSING
Add classes param

↳ actions.items
↳ actions

↳ href
↳ href

↳ text
↳ text

↳ html
↳ MISSING
Accept content block

↳ visuallyHiddenText
↳ visually_hidden_text

↳ attributes
↳ html_attributes

↳ classes
↳ classes

Tabs
attributes
html_attributes

classes
classes

id
html_attributes.id
Add id param

idPrefix
MISSING
prefix appears in code but not initializer

title
title

items
tabs

↳ id
↳ MISSING

↳ label
↳ title
Rename label

↳ attributes
↳ MISSING

↳ panel.text
↳ MISSING
Add text param

↳ panel.html
↳ content

↳ panel.attributes
↳ html_attributes

MISSING
↳ classes

✔   Tag #204
attributes
html_attributes

classes
classes

text
text

html
MISSING
Accept content block

MISSING
colour

Warning text
attributes
html_attributes

classes
classes
_assistive

iconFallbackText
assistive_text
Rename icon_fallback_text

text
text

html
content

The notification banner component needs to follow the same means of enabling the success variant: this gem currently uses success: true, when really it should be type: 'success'.

I had a look at this and in the guidance it says:

You can use only the "success" or null values with this option.

This is setting a boolean value via a string, which I think is more complicated than it needs to be. Until there are more types I think sticking with the flag makes more sense.

Until there are more types I think sticking with the flag makes more sense.

Good point, fair enough.


Implement Game Analytics API

Using Game Analytics Rest API setup a Singleton that provides an interface to communicate with the Game Analytics servers.

@williamd1k0 :eyes:


Implement standardized error message output including the stacktrace

💡 Summary
Recently we analyzed how to modify ScubaGear to ensure that error message print statements are standardized and that they include the stacktrace. We also had problems that in some instances the stacktrace was wrong so that needs to be addressed too. Issue #1005 presents a solution with some sample code. The purpose of this issue is to formally incorporate those enhancements into ScubaGear.
Implementation notes

[ ] Codify the enhancements discusses and prototyped in #1005
[ ] The code must satisfy and be tested against the conditions noted below.

Conditions the code must satisfy:

[ ] Make sure error messages print the stack trace so that we can troubleshoot when problems occur.
[ ] Make sure the stack trace indicates the correct line where the error occurred. See example in comment below where the catch block inside the Invoke-ProviderList prints the wrong source lines.
[ ] Make sure the error handling logic correctly aborts execution under export provider failures. For example, right now the orchestrator continues to run additional logic if Export-AADProvider fails, which might not make sense.

At the stand-up meeting on 9/30 we received some feedback from the dev team that creating a new module to house the error message handling is the preferred option instead of putting the new function into an existing module.

Alex had worked on a standard error output function. That code will be linked with a separate GitHub issue in the near future since it will not make it into Kraken.


Implement cover sheet/instructions set up [hold off for now]

Eventually we'll want to bring in our new cover sheet and set it up so that it works for screen readers.
Emily is still working on some tweaks to the cover sheet. After that, should discuss/test to make sure the template-within-a-template method will work with these more complicated instructions. Emily thinks it should work. Then will need to implement for each set of instructions.

@RamiLorca cover sheet tweaks are finished, so I think this can go forward. Documentation is here. It's possible some adjustments to the method may be needed because of the multiple versions of the instructions in this tool. Happy to discuss/help as needed.


Train with a single GPU

Hi Sheng,
I wonder if the training script works for single GPU. I am facing this issue RuntimeErrorRuntimeError: : cuda runtime error (101) : invalid device ordinal and searched it might be related to the requirement of multiple GPUs.
Best,
Ruinian Xu

Hi @ruinianxu, which task are you trying to run? The caption code should work for a single GPU.


Can`t pass the CSS borders  test(chat not helping)

Challenge Add Borders Around your Elements has an issue.
User Agent is: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.87 Safari/537.36.
Please describe how to reproduce this issue, and include links to screenshots if possible.

Give your image a border style of solid.
The border around your img element should be green.
sorry for double screenshot

.think-green-border {  <----I notice you misspell thick you have it as think
border-width: 10px;
border-style: solid;
border-color: green;
And also in your imag class

the second___^ should be in inside with a space like this :

I had the same problem.
Doing some test I tried:
.thick-green-border {
color: green;
border:10px;
border-style:solid;
}
Notice: border-color    ->    color
I could pass the test.
I dont know if it is consider as bug.


HxD: modify shortcut to not run as admin

to allow drag and drop functionality

This should be just removing the RunAsAdmin flag here: https://github.com/mandiant/VM-Packages/blob/main/packages/hxd.vm/tools/chocolateyinstall.ps1#L11


MOD: w->next change to max in function walread

hello @kr
I think it's a good idea to use max to replace w->next in function walread.
void
walread(Wal *w, job list, int min, int max)
{
     File *f;
     int i, fd;
     int err = 0;

     for (i = min; i < w->next; i++) {
         ...
     }
}

I think it's a good idea to use max to replace w->next in function walread.

Could you elaborate why?

Looks like max is unused in walread. I don't know what I was thinking when I wrote that. It takes the same value as w->next, but "max" is the wrong name, because it's actually one more than the max. Anyway, why don't we just delete that param.

hi @JensRantil
As @kr said, max is unused in walread, and it may make confused if we want to use max to control min and max in walread.
@kr  yeah, it's also a good idea to delete param max. But it's  not differece between wal->next and max in walread, and use max would be more flexible.


Error when using LRN layer

I'm testing different layer configurations, and run into the following error whenever I had inserted LRN layer in to the model, running with the gpu backend:
  File "examples/cifar10_conv.py", line 74, in <module>     mlp.fit(train, optimizer=opt_gdm, num_epochs=num_epochs, cost=cost, callbacks=callbacks)   File "/home/twangcat/neon_demo/neon/neon/models/model.py", line 149, in fit     self._epoch_fit(dataset, callbacks)   File "/home/twangcat/neon_demo/neon/neon/models/model.py", line 171, in _epoch_fit     x = self.fprop(x)   File "/home/twangcat/neon_demo/neon/neon/models/model.py", line 202, in fprop     return self.layers.fprop(x, inference)   File "/home/twangcat/neon_demo/neon/neon/layers/container.py", line 181, in fprop     x = l.fprop(x, inference)   File "/home/twangcat/neon_demo/neon/neon/layers/layer.py", line 1153, in fprop     self.alpha, self.beta, self.ascale, self.bpower)   File "/home/twangcat/neon_demo/neon/neon/backends/nervanagpu.py", line 1772, in fprop_lrn     alpha, beta, ascale, bpower, kernel_args, shared, repeat)   File "/home/twangcat/neon_demo/neon/neon/backends/nervanagpu.py", line 1836, in _execute_lrn     kernel.prepared_async_call(*params, shared_size=shared)   File "/home/twangcat/neon_demo/neon/.venv/local/lib/python2.7/site-packages/pycuda/driver.py", line 511, in function_prepared_async_call     arg_buf = pack(func.arg_format, *args) pycuda._pvt_struct.error: pack requires exactly 41 arguments
I'm on ubuntu 12.04, cuda 7.0 and pycuda 2016.1, running on Titan X. Tried different depths for LRN and it all lead to the same error.
I can also reproduce this error by changing the 'backend_cpu64' argument to 'backend_tests' in test_lrnorm() inside test_gradient_lrn.py

Can you post the model code that causes this failure.  I added an LRN layer after the first pooling layer to and it ran without the error above.

Also please sync to the current tip of the repo master branch and try to run again.

Hi @twangcat, I'm going to close this old issue as we haven't been able to reproduce it. Please reopen and provide your model code if you are able to reproduce it on current tip of master. Thanks!


[Feature Request] More intuitive stream editing

I added a stream URL and long-pressed on it to edit. Since the name was set to the URL value, and the editor doesn't label the field - I thought I was editing the URL of the stream, not the name, and got frustrated with trying to figure out how to set a custom name.
It wasn't until I long-pressed on a stream that I added via search that I realized the field is actually the name.
Placing a label next to the field in the edit view to make it clear you're editing the stream name and not the stream URL would be a huge help, thank you!

Check the settings to see if the two boxes are checked to edit the stream name and stream addresses.
It's very easy, just long press on the station image to start the edit mode.
I see no need to change anything here, so I'll close here.


build with parallel hdf5

[x] test parallel hdf5 build

Hi! This is the friendly automated conda-forge-linting service.
I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

Unfortunately, I think this needs to wait for a conda-build release with this fix:
https://github.com/conda/conda-build/pull/3264

Success!


scarb test panic in cairo-lang-lowering-2.7.0/src/lower/context.rs:264:55

Problem
I got this weird error when running scarb test on a simple module.
scarb test
     Running cairo-test kron
   Compiling test(kron_unittest) kron v0.1.0 (/Users/m/projects/tmp/kron/Scarb.toml)
thread 'main' panicked at /Users/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cairo-lang-lowering-2.7.0/src/lower/context.rs:264:55:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Error: `scarb metadata` exited with error

Steps

Create a new scarb project with scarb init, select Cairo Test as the test runner.
Replace the contents of lib.cairo with the following:

#[derive(Drop, Copy, PartialEq)]
pub enum KronError {
    UnequalLength,
}

pub fn kron<T, +Mul<T>, +Copy<T>, +Drop<T>,>(
    mut xs: Span<T>, mut ys: Span<T>
) -> Result<Array<T>, KronError> {
    if xs.len() != ys.len() {
        return Result::Err(KronError::UnequalLength);
    }
    let mut array = array![];
    for x_value in xs {
        let ys_clone = ys;
        for y_value in ys {
            array.append(*x_value * *y_value);
        }
    };
    Result::Ok(array)
}

#[test]
#[available_gas(2000000)]
fn kron_product_test() {
    let xs = array![1_u64, 10, 100];
    let ys = array![5, 6, 7];
    let zs = kron(xs.span(), ys.span()).unwrap();
    assert_eq!(*zs[0], 5);
    assert_eq!(*zs[1], 6);
    assert_eq!(*zs[2], 7);
    assert_eq!(*zs[3], 50);
    assert_eq!(*zs[4], 60);
    assert_eq!(*zs[5], 70);
    assert_eq!(*zs[6], 500);
    assert_eq!(*zs[7], 600);
    assert_eq!(*zs[8], 700);
}

#[test]
#[available_gas(2000000)]
fn kron_product_test_check_len() {
    let xs = array![1_u64];
    let ys = array![];
    assert!(kron(xs.span(), ys.span()) == Result::Err(KronError::UnequalLength));
}

Run scarb test, you should see the following output:

scarb test
     Running cairo-test kron
   Compiling test(kron_unittest) kron v0.1.0 (/Users/m/projects/tmp/kron/Scarb.toml)
warn[E0001]: Unused variable. Consider ignoring by prefixing with `_`.
 --> /Users/m/projects/tmp/kron/src/lib.cairo:14:13
        let ys_clone = ys;
            ^******^

    Finished release target(s) in 2 seconds
testing kron ...
running 2 tests
test kron::kron_product_test ... ok (gas usage est.: 206110)
test kron::kron_product_test_check_len ... ok (gas usage est.: 66140)
test result: ok. 2 passed; 0 failed; 0 ignored; 0 filtered out;

Notice the warning on line 14. Now edit the code in lib.cairo, commenting out the whole line 14. Run scarb test again. That's when the issue happens:

scarb test
     Running cairo-test kron
   Compiling test(kron_unittest) kron v0.1.0 (/Users/m/projects/tmp/kron/Scarb.toml)
thread 'main' panicked at /Users/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cairo-lang-lowering-2.7.0/src/lower/context.rs:264:55:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Error: `scarb metadata` exited with error

Possible Solution(s)
No response
Notes
No response
Version
scarb --version
scarb 2.7.0 (e9a2b8716 2024-08-01)
cairo: 2.7.0 (https://crates.io/crates/cairo-lang-compiler/2.7.0)
sierra: 1.6.0

Hi @milancermak !
Thanks for the report. Moving to compiler repo https://github.com/starkware-libs/cairo/issues/6207

Fyi should no longer happen with nightlies.


feat(directives): Add support for options in events listeners used by createAttributesDirective

closes #672

Thanks @divdavem for the review. I modified a unit test to use the object and added a new unit test for the addEvent


Can't draw more than one arc in Canvas mode

Here's a minimal test case. I don't believe the Graphics calls are wrong, because if you uncomment the WebGL renderer it works perfectly. Use CanvasRenderer and it only draws one arc, as if the path isn't being properly closed or something.
Tested in Pixi 2-master and Pixi 3 RC4, happens in both.
    // var renderer = new PIXI.WebGLRenderer(1024, 768); // works
    var renderer = new PIXI.CanvasRenderer(1024, 768); // doesn't work :)

    document.body.appendChild(renderer.view);

    var graphics = new PIXI.Graphics();

    graphics.x = 400;
    graphics.y = 300;

    //  Our first arc will be a line only
    graphics.lineStyle(8, 0xffd900);

    graphics.arc(0, 0, 135, 0, 1.5707963267948966, false);

    //  As we wish to draw a 2nd arc on the SAME Graphics object, we need to move the drawing operation
    graphics.moveTo(-100, -100);

    //  This will reset the lineStyle
    graphics.lineStyle(0);

    //  And this draws a filled arc
    graphics.beginFill(0xFF3300);

    //  Note the 'true' at the end, this tells it to draw anticlockwise
    graphics.arc(-100, -100, 135, 0, 1.5707963267948966, true);

    graphics.endFill();

    renderer.render(graphics);

Here's another test - this one works as expected (beside the weird moveTo requirement). Which I think narrows this issue down to the beginFill / endFill functionality:
    // var renderer = new PIXI.WebGLRenderer(1024, 768); // works
    var renderer = new PIXI.CanvasRenderer(1024, 768); // doesn't work :)

    document.body.appendChild(renderer.view);

    var graphics = new PIXI.Graphics();

    graphics.x = 200;
    graphics.y = 200;

    graphics.lineStyle(8, 0xffd900);

    graphics.arc(0, 0, 135, 0, 1.5707963267948966, false);

    graphics.lineStyle(8, 0x00d900);

    //  If you don't issue a moveTo it will link this new arc with the old one with a line
    //  Maybe expected behaviour?

    //  This is nice and counter-intuitive :) You have to move
    //  to the x coordinate of the arc PLUS its radius, or you get weird lines appearing
    graphics.moveTo(200+135, 0);

    graphics.arc(200, 0, 135, 0, 1.5707963267948966, false);

    renderer.render(graphics);

Final test .. narrowing down even further to this lovely edge-case:
    // var renderer = new PIXI.WebGLRenderer(1024, 768); // works
    var renderer = new PIXI.CanvasRenderer(1024, 768); // doesn't work :)

    document.body.appendChild(renderer.view);

    var graphics = new PIXI.Graphics();

    graphics.x = 400;
    graphics.y = 300;

    graphics.lineStyle(8, 0xffd900);

    graphics.arc(0, 0, 135, 0, 1.5707963267948966, false);

    //  Method 1 - call moveTo FIRST and it breaks in CanvasRenderer
    // graphics.moveTo(-100, -100);
    // graphics.lineStyle(0);
    // graphics.beginFill(0xd90000);

    //  Method 2 - call beginFill BEFORE moveTo and it works in CanvasRenderer
    graphics.lineStyle(0);
    graphics.beginFill(0xd90000);
    graphics.moveTo(-100, -100);

    graphics.arc(-100, -100, 135, 0, 1.5707963267948966, true);

    graphics.endFill();

    renderer.render(graphics);

If you're interested here is how I fixed it:
https://github.com/photonstorm/phaser/commit/93dc67be71e1d6b5401572428dc4411f99e63d98
It's now perfectly consistent across WebGL and Canvas no matter what combination of fill or line style you specify, and handles anticlockwise arcs properly as well. I also adjusted when it bails out a little.

Merged, thanks for the heads up @photonstorm