This is a remidner for myself.

[x]  better bounding method needed for the interger slider
[x]  segmentation fault occur when the slider hits the limit, need to invetigate why
[ ]  proper orientation slicing for the file, needed to align with one of the software that similar to this (eg. MRIcron)
[ ]  support for linux and windows system (compilation flags for windows and linux, changes to DX12 or DX11 API calls for windows)
[ ]  mouse and keybord input interaction support
[ ] support for loading a second nifti, vmr or a voi file as a mask. since we support both nifti and bv formate, we have a lot of flexibility here.
[ ] automatic MP2RAGE denoising with three files with INV1, INV2, UNI as inputs.
[x] don't slice the data if the slice index did not changes.
[ ] change to metal API on macOS.
[x] disable imgui.ini file saving

Hi, I think there is something wrong with the building of the nifti_clib. Instead of using my init script, which is not optimized for windows. You can manually clone can build the https://github.com/NIFTI-Imaging/nifti_clib and copy library files and header files into this project. The overall project structure should look like this.
├── LICENSE
├── Makefile
├── README.assets
│   └── demo.png
├── README.md
├── compile_commands.json
├── include
│   ├── bv_io.h
│   ├── imgui
│   │   ├── LICENSE.txt
│   │   ├── backends
│   │   ├── docs
│   │   ├── examples
│   │   ├── imconfig.h
│   │   ├── imgui.cpp
│   │   ├── imgui.h
│   │   ├── imgui_demo.cpp
│   │   ├── imgui_draw.cpp
│   │   ├── imgui_internal.h
│   │   ├── imgui_tables.cpp
│   │   ├── imgui_widgets.cpp
│   │   ├── imstb_rectpack.h
│   │   ├── imstb_textedit.h
│   │   ├── imstb_truetype.h
│   │   └── misc
│   ├── implot
│   │   ├── LICENSE
│   │   ├── README.md
│   │   ├── TODO.md
│   │   ├── implot.cpp
│   │   ├── implot.h
│   │   ├── implot_demo.cpp
│   │   ├── implot_internal.h
│   │   └── implot_items.cpp
│   ├── nifti_clib
│   │   ├── dbh.h
│   │   ├── fslio.h
│   │   ├── nifti1.h
│   │   ├── nifti1_io.h
│   │   ├── nifti1_io_version.h
│   │   ├── nifti1_tool.h
│   │   ├── nifti2.h
│   │   ├── nifti2_io.h
│   │   ├── nifticdf.h
│   │   ├── nifticdf_version.h
│   │   ├── znzlib.h
│   │   └── znzlib_version.h
│   └── quicknii.hpp
├── init.sh
├── lib
│   └── nifti_clib
│       ├── libniftiio.a
│       └── libznz.a

Hello~
I have question in your "Quicknii" repos.
I've commanded by "Windows git bash" but...
================================================================================= User@DESKTOP-AAAAA MINGW64 ~/source/Repos/QuickNii (main) $ sh init.sh Cloning into 'C:/Users/User/source/Repos/QuickNii/include/imgui'... remote: Enumerating objects: 53546, done. remote: Counting objects: 100% (749/749), done. remote: Compressing objects: 100% (229/229), done. remote: Total 53546 (delta 561), reused 624 (delta 520), pack-reused 52797 Receiving objects: 100% (53546/53546), 90.59 MiB | 9.27 MiB/s, done. Resolving deltas: 100% (41397/41397), done. Updating files: 100% (217/217), done. Cloning into 'C:/Users/User/source/Repos/QuickNii/include/implot'... remote: Enumerating objects: 2574, done. remote: Counting objects: 100% (710/710), done. remote: Compressing objects: 100% (76/76), done. remote: Total 2574 (delta 657), reused 638 (delta 634), pack-reused 1864 Receiving objects: 100% (2574/2574), 1.61 MiB | 8.27 MiB/s, done. Resolving deltas: 100% (1671/1671), done. Cloning into 'nifti_clib'... remote: Enumerating objects: 4194, done. remote: Counting objects: 100% (442/442), done. remote: Compressing objects: 100% (165/165), done. remote: Total 4194 (delta 316), reused 372 (delta 277), pack-reused 3752 Receiving objects: 100% (4194/4194), 1.87 MiB | 2.44 MiB/s, done. Resolving deltas: 100% (2979/2979), done. init.sh: line 22: make: command not found mv: cannot stat './include/.h': No such file or directory mv: cannot stat './lib/.a': No such file or directory (base) User@DESKTOP-AAAAAA MINGW64 ~/source/Repos/QuickNii (main) $ make bash: make: command not found (base) User@DESKTOP-AAAAAAA MINGW64 ~/source/Repos/QuickNii (main) $ sh init.sh make fatal: destination path 'C:/Users/User/source/Repos/QuickNii/include/imgui' already exists and is not an empty directory. fatal: destination path 'C:/Users/User/source/Repos/QuickNii/include/implot' already exists and is not an empty directory. Cloning into 'nifti_clib'... remote: Enumerating objects: 4194, done. remote: Counting objects: 100% (442/442), done. remote: Compressing objects: 100% (165/165), done. remote: Total 4194 (delta 316), reused 372 (delta 277), pack-reused 3752 Receiving objects: 100% (4194/4194), 1.87 MiB | 29.52 MiB/s, done. Resolving deltas: 100% (2979/2979), done. init.sh: line 22: make: command not found mv: cannot stat './include/.h': No such file or directory mv: cannot stat './lib/.a': No such file or directory (base)
=================================================================================
line 22 problem in "init.sh"???
================================================================================= git clone https://github.com/NIFTI-Imaging/nifti_clib
# Ensure the directory exists before continuing cd nifti_clib || exit make
mkdir -p "${INCLUDE}/nifti_clib" "${LIB}/nifti_clib" mv ./include/.h "${INCLUDE}/nifti_clib" mv ./lib/.a "${LIB}/nifti_clib"
cd .. rm -rf nifti_clib
=================================================================================
So...I don't know what's the problem.. Maybe git clone https://github.com/NIFTI-Imaging/nifti_clib problem???
NIFTI-Imaging/nifti_clib#181 ↑ Is this solution for me?? Help me~~~~~

Hi, I think there is something wrong with the building of the nifti_clib. Instead of using my init script, which is not optimized for windows. You can manually clone can build the https://github.com/NIFTI-Imaging/nifti_clib and copy library files and header files into this project. The overall project structure should look like this.
├── LICENSE
├── Makefile
├── README.assets
│   └── demo.png
├── README.md
├── compile_commands.json
├── include
│   ├── bv_io.h
│   ├── imgui
│   │   ├── LICENSE.txt
│   │   ├── backends
│   │   ├── docs
│   │   ├── examples
│   │   ├── imconfig.h
│   │   ├── imgui.cpp
│   │   ├── imgui.h
│   │   ├── imgui_demo.cpp
│   │   ├── imgui_draw.cpp
│   │   ├── imgui_internal.h
│   │   ├── imgui_tables.cpp
│   │   ├── imgui_widgets.cpp
│   │   ├── imstb_rectpack.h
│   │   ├── imstb_textedit.h
│   │   ├── imstb_truetype.h
│   │   └── misc
│   ├── implot
│   │   ├── LICENSE
│   │   ├── README.md
│   │   ├── TODO.md
│   │   ├── implot.cpp
│   │   ├── implot.h
│   │   ├── implot_demo.cpp
│   │   ├── implot_internal.h
│   │   └── implot_items.cpp
│   ├── nifti_clib
│   │   ├── dbh.h
│   │   ├── fslio.h
│   │   ├── nifti1.h
│   │   ├── nifti1_io.h
│   │   ├── nifti1_io_version.h
│   │   ├── nifti1_tool.h
│   │   ├── nifti2.h
│   │   ├── nifti2_io.h
│   │   ├── nifticdf.h
│   │   ├── nifticdf_version.h
│   │   ├── znzlib.h
│   │   └── znzlib_version.h
│   └── quicknii.hpp
├── init.sh
├── lib
│   └── nifti_clib
│   ├── libniftiio.a
│   └── libznz.a

Dear ChengranAA,
Thank you~~~
Thank you for your reply.
I've tried to add that..
But the "nifit_clib" repo had no guideline to build code with CMake..(The
commenter "pmolfese https://github.com/pmolfese" just mentioned about
"NMake in VS Windows")
As you know (I'm not sure but I can feel...), To build codes by CMake, the
build guideline should be needed.
Excuse me but...
Can you help me with the CMake build options/procedures?
I've already experienced the CMake build, but I;m hesitate to use this
repos.
On Fri, May 3, 2024 at 8:05 PM AA @.***> wrote:

Hello~

I have question in your "Quicknii" repos.

I've commanded by "Windows git bash" but...

=================================================================================

@.*** MINGW64 ~/source/Repos/QuickNii (main) $ sh init.sh

Cloning into 'C:/Users/User/source/Repos/QuickNii/include/imgui'... remote:

Enumerating objects: 53546, done. remote: Counting objects: 100% (749/749),

done. remote: Compressing objects: 100% (229/229), done. remote: Total

53546 (delta 561), reused 624 (delta 520), pack-reused 52797 Receiving

objects: 100% (53546/53546), 90.59 MiB | 9.27 MiB/s, done. Resolving

deltas: 100% (41397/41397), done. Updating files: 100% (217/217), done.

Cloning into 'C:/Users/User/source/Repos/QuickNii/include/implot'...

remote: Enumerating objects: 2574, done. remote: Counting objects: 100%

(710/710), done. remote: Compressing objects: 100% (76/76), done. remote:

Total 2574 (delta 657), reused 638 (delta 634), pack-reused 1864 Receiving

objects: 100% (2574/2574), 1.61 MiB | 8.27 MiB/s, done. Resolving deltas:

100% (1671/1671), done. Cloning into 'nifti_clib'... remote: Enumerating

objects: 4194, done. remote: Counting objects: 100% (442/442), done.

remote: Compressing objects: 100% (165/165), done. remote: Total 4194

(delta 316), reused 372 (delta 277), pack-reused 3752 Receiving objects:

100% (4194/4194), 1.87 MiB | 2.44 MiB/s, done. Resolving deltas: 100%

(2979/2979), done. init.sh: line 22: make: command not found mv: cannot

stat './include/.h': No such file or directory mv: cannot stat './lib/.a':

No such file or directory (base) @.*** MINGW64

~/source/Repos/QuickNii (main) $ make bash: make: command not found (base)

@.*** MINGW64 ~/source/Repos/QuickNii (main) $ sh init.sh

make fatal: destination path

'C:/Users/User/source/Repos/QuickNii/include/imgui' already exists and is

not an empty directory. fatal: destination path

'C:/Users/User/source/Repos/QuickNii/include/implot' already exists and is

not an empty directory. Cloning into 'nifti_clib'... remote: Enumerating

objects: 4194, done. remote: Counting objects: 100% (442/442), done.

remote: Compressing objects: 100% (165/165), done. remote: Total 4194

(delta 316), reused 372 (delta 277), pack-reused 3752 Receiving objects:

100% (4194/4194), 1.87 MiB | 29.52 MiB/s, done. Resolving deltas: 100%

(2979/2979), done. init.sh: line 22: make: command not found mv: cannot

stat './include/.h': No such file or directory mv: cannot stat './lib/.a':

No such file or directory (base)

=================================================================================

line 22 problem in "init.sh"???

=================================================================================

git clone https://github.com/NIFTI-Imaging/nifti_clib

# Ensure the directory exists before continuing cd nifti_clib || exit

make

mkdir -p "${INCLUDE}/nifti_clib" "${LIB}/nifti_clib" mv ./include/*.h

"${INCLUDE}/nifti_clib" mv ./lib/*.a "${LIB}/nifti_clib"

cd .. rm -rf nifti_clib

=================================================================================

So...I don't know what's the problem.. Maybe git clone

https://github.com/NIFTI-Imaging/nifti_clib problem???

NIFTI-Imaging/nifti_clib#181

https://github.com/NIFTI-Imaging/nifti_clib/issues/181 ↑ Is this

solution for me?? Help me~~~~~

Hi, I think there is something wrong with the building of the nifti_clib.

Instead of using my init script, which is not optimized for windows. You

can manually clone can build the

https://github.com/NIFTI-Imaging/nifti_clib and copy library files and

header files into this project. The overall project structure should look

like this.

├── LICENSE

├── Makefile

├── README.assets

│ └── demo.png

├── README.md

├── compile_commands.json

├── include

│ ├── bv_io.h

│ ├── imgui

│ │ ├── LICENSE.txt

│ │ ├── backends

│ │ ├── docs

│ │ ├── examples

│ │ ├── imconfig.h

│ │ ├── imgui.cpp

│ │ ├── imgui.h

│ │ ├── imgui_demo.cpp

│ │ ├── imgui_draw.cpp

│ │ ├── imgui_internal.h

│ │ ├── imgui_tables.cpp

│ │ ├── imgui_widgets.cpp

│ │ ├── imstb_rectpack.h

│ │ ├── imstb_textedit.h

│ │ ├── imstb_truetype.h

│ │ └── misc

│ ├── implot

│ │ ├── LICENSE

│ │ ├── README.md

│ │ ├── TODO.md

│ │ ├── implot.cpp

│ │ ├── implot.h

│ │ ├── implot_demo.cpp

│ │ ├── implot_internal.h

│ │ └── implot_items.cpp

│ ├── nifti_clib

│ │ ├── dbh.h

│ │ ├── fslio.h

│ │ ├── nifti1.h

│ │ ├── nifti1_io.h

│ │ ├── nifti1_io_version.h

│ │ ├── nifti1_tool.h

│ │ ├── nifti2.h

│ │ ├── nifti2_io.h

│ │ ├── nifticdf.h

│ │ ├── nifticdf_version.h

│ │ ├── znzlib.h

│ │ └── znzlib_version.h

│ └── quicknii.hpp

├── init.sh

├── lib

│ └── nifti_clib

│ ├── libniftiio.a

│ └── libznz.a

—

Reply to this email directly, view it on GitHub

https://github.com/ChengranAA/QuickNii/issues/1#issuecomment-2092785504,

or unsubscribe

https://github.com/notifications/unsubscribe-auth/AZLGLBLYHSBGBZS3OSROM4DZANVQZAVCNFSM6AAAAABGRJRRX2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJSG44DKNJQGQ

.

You are receiving this because you commented.Message ID:

@.***>

Hi, what have worked for me was just adding the required files in my own project, copied from nifti_clib. Two folder we need was niftilib and znz lib. What u can do is goto the orginal nifti_clib repo and download all of these files in these two folder, and organize them in your own project, and keep in mind to make sure that all the "include" have the correct route in these folders since we are now using them as a local .h file. From there you can just use these functions like your own code.
And regarding on cmake, just add these file names, also remember absolute or relative directory before them, like "niftilib/nifti1_io.c" for each file into “add_executable”.
And thats it

Yes, I am Chinese.
I also don't like CMake tbh. That's why I stick with makefile for most of my projects. Porting to windows in one of my goal, however since I don't have a windows machine it might not be my priority. The project is more for my personal usage, also for people who constantly taking file in and out of brainvoyager.

Dear ChengranAA, As I expected.. CMake errors~~~ I've already ALL downloaded (git clone) but failed. I was a little bit uneasy to use CMake because of this damned error frequently. How did you succeed your own project? [image: image.png]
…
On Mon, May 6, 2024 at 7:46 PM B GM @.> wrote: And.. Excuse me but.. Are you Chinese? And so cute your penguin logo in your github. Haha~ Anyway, I will build CMake...(Just for my past experiences, I don't like CMake build. This make errors, bugs frequently) On Mon, May 6, 2024 at 3:34 PM B GM @.> wrote: > Thank you for your helps.. > > Well.. > > As you know, > > CMake sometimes makes developers angry when building.. > > Of course path is basic..But any other unexpected build bug make me "Not > easy to go through CMake build" feeling. > > Anyway, thank you but.. > > If you have total windows code, helpful for me. :-) > > > > > > On Sun, May 5, 2024 at 1:16 AM zifa25796 @.> > wrote: > >> Dear ChengranAA, >> >> Thank you~~~ >> >> Thank you for your reply. >> >> I've tried to add that.. >> >> But the "nifit_clib" repo had no guideline to build code with CMake..(The >> >> commenter "pmolfese https://github.com/pmolfese" just mentioned about >> >> "NMake in VS Windows") >> >> As you know (I'm not sure but I can feel...), To build codes by CMake, >> the >> >> build guideline should be needed. >> >> Excuse me but... >> >> Can you help me with the CMake build options/procedures? >> >> I've already experienced the CMake build, but I;m hesitate to use this >> >> repos. >> >> On Fri, May 3, 2024 at 8:05 PM AA @.> wrote: >> >> Hello~ >> >> I have question in your "Quicknii" repos. >> >> I've commanded by "Windows git bash" but... >> >> >> ================================================================================= >> >> @.*** MINGW64 ~/source/Repos/QuickNii (main) $ sh init.sh >> >> Cloning into 'C:/Users/User/source/Repos/QuickNii/include/imgui'... >> remote: >> >> Enumerating objects: 53546, done. remote: Counting objects: 100% >> (749/749), >> >> done. remote: Compressing objects: 100% (229/229), done. remote: Total >> >> 53546 (delta 561), reused 624 (delta 520), pack-reused 52797 Receiving >> >> objects: 100% (53546/53546), 90.59 MiB | 9.27 MiB/s, done. Resolving >> >> deltas: 100% (41397/41397), done. Updating files: 100% (217/217), done. >> >> Cloning into 'C:/Users/User/source/Repos/QuickNii/include/implot'... >> >> remote: Enumerating objects: 2574, done. remote: Counting objects: 100% >> >> (710/710), done. remote: Compressing objects: 100% (76/76), done. remote: >> >> Total 2574 (delta 657), reused 638 (delta 634), pack-reused 1864 >> Receiving >> >> objects: 100% (2574/2574), 1.61 MiB | 8.27 MiB/s, done. Resolving deltas: >> >> 100% (1671/1671), done. Cloning into 'nifti_clib'... remote: Enumerating >> >> objects: 4194, done. remote: Counting objects: 100% (442/442), done. >> >> remote: Compressing objects: 100% (165/165), done. remote: Total 4194 >> >> (delta 316), reused 372 (delta 277), pack-reused 3752 Receiving objects: >> >> 100% (4194/4194), 1.87 MiB | 2.44 MiB/s, done. Resolving deltas: 100% >> >> (2979/2979), done. init.sh: line 22: make: command not found mv: cannot >> >> stat './include/.h': No such file or directory mv: cannot stat './lib/ >> .a': >> >> No such file or directory (base) @.*** MINGW64 >> >> ~/source/Repos/QuickNii (main) $ make bash: make: command not found >> (base) >> >> @.*** MINGW64 ~/source/Repos/QuickNii (main) $ sh init.sh >> >> make fatal: destination path >> >> 'C:/Users/User/source/Repos/QuickNii/include/imgui' already exists and is >> >> not an empty directory. fatal: destination path >> >> 'C:/Users/User/source/Repos/QuickNii/include/implot' already exists and >> is >> >> not an empty directory. Cloning into 'nifti_clib'... remote: Enumerating >> >> objects: 4194, done. remote: Counting objects: 100% (442/442), done. >> >> remote: Compressing objects: 100% (165/165), done. remote: Total 4194 >> >> (delta 316), reused 372 (delta 277), pack-reused 3752 Receiving objects: >> >> 100% (4194/4194), 1.87 MiB | 29.52 MiB/s, done. Resolving deltas: 100% >> >> (2979/2979), done. init.sh: line 22: make: command not found mv: cannot >> >> stat './include/.h': No such file or directory mv: cannot stat './lib/ >> .a': >> >> No such file or directory (base) >> >> >> ================================================================================= >> >> line 22 problem in "init.sh"??? >> >> >> ================================================================================= >> >> git clone https://github.com/NIFTI-Imaging/nifti_clib >> >> # Ensure the directory exists before continuing cd nifti_clib || exit >> >> make >> >> mkdir -p "${INCLUDE}/nifti_clib" "${LIB}/nifti_clib" mv ./include/.h >> >> "${INCLUDE}/nifti_clib" mv ./lib/.a "${LIB}/nifti_clib" >> >> cd .. rm -rf nifti_clib >> >> >> ================================================================================= >> >> So...I don't know what's the problem.. Maybe git clone >> >> https://github.com/NIFTI-Imaging/nifti_clib problem??? >> >> NIFTI-Imaging/nifti_clib#181 >> <NIFTI-Imaging/nifti_clib#181> >> >> NIFTI-Imaging/nifti_clib#181 >> <NIFTI-Imaging/nifti_clib#181> ↑ Is this >> >> solution for me?? Help me~~~~~ >> >> Hi, I think there is something wrong with the building of the nifti_clib. >> >> Instead of using my init script, which is not optimized for windows. You >> >> can manually clone can build the >> >> https://github.com/NIFTI-Imaging/nifti_clib and copy library files and >> >> header files into this project. The overall project structure should look >> >> like this. >> >> ├── LICENSE >> >> ├── Makefile >> >> ├── README.assets >> >> │ └── demo.png >> >> ├── README.md >> >> ├── compile_commands.json >> >> ├── include >> >> │ ├── bv_io.h >> >> │ ├── imgui >> >> │ │ ├── LICENSE.txt >> >> │ │ ├── backends >> >> │ │ ├── docs >> >> │ │ ├── examples >> >> │ │ ├── imconfig.h >> >> │ │ ├── imgui.cpp >> >> │ │ ├── imgui.h >> >> │ │ ├── imgui_demo.cpp >> >> │ │ ├── imgui_draw.cpp >> >> │ │ ├── imgui_internal.h >> >> │ │ ├── imgui_tables.cpp >> >> │ │ ├── imgui_widgets.cpp >> >> │ │ ├── imstb_rectpack.h >> >> │ │ ├── imstb_textedit.h >> >> │ │ ├── imstb_truetype.h >> >> │ │ └── misc >> >> │ ├── implot >> >> │ │ ├── LICENSE >> >> │ │ ├── README.md >> >> │ │ ├── TODO.md >> >> │ │ ├── implot.cpp >> >> │ │ ├── implot.h >> >> │ │ ├── implot_demo.cpp >> >> │ │ ├── implot_internal.h >> >> │ │ └── implot_items.cpp >> >> │ ├── nifti_clib >> >> │ │ ├── dbh.h >> >> │ │ ├── fslio.h >> >> │ │ ├── nifti1.h >> >> │ │ ├── nifti1_io.h >> >> │ │ ├── nifti1_io_version.h >> >> │ │ ├── nifti1_tool.h >> >> │ │ ├── nifti2.h >> >> │ │ ├── nifti2_io.h >> >> │ │ ├── nifticdf.h >> >> │ │ ├── nifticdf_version.h >> >> │ │ ├── znzlib.h >> >> │ │ └── znzlib_version.h >> >> │ └── quicknii.hpp >> >> ├── init.sh >> >> ├── lib >> >> │ └── nifti_clib >> >> │ ├── libniftiio.a >> >> │ └── libznz.a >> >> — >> >> Reply to this email directly, view it on GitHub >> >> #1 (comment) >> <#1 (comment)> >> , >> >> or unsubscribe >> >> >> https://github.com/notifications/unsubscribe-auth/AZLGLBLYHSBGBZS3OSROM4DZANVQZAVCNFSM6AAAAABGRJRRX2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJSG44DKNJQGQ >> >> . >> >> You are receiving this because you commented.Message ID: >> >> @.> >> >> Hi, what have worked for me was just adding the required files in my own >> project, copied from nifti_clib. Two folder we need was niftilib and znz >> lib. What u can do is goto the orginal nifti_clib repo and download all of >> these files in these two folder, and organize them in your own project, and >> keep in mind to make sure that all the "include" have the correct route in >> these folders since we are now using them as a local .h file. From there >> you can just use these functions like your own code. >> And regarding on cmake, just add these file names, also remember >> absolute or relative directory before them, like "niftilib/nifti1_io.c" for >> each file into “add_executable”. >> And thats it >> >> — >> Reply to this email directly, view it on GitHub >> <#1 (comment)>, >> or unsubscribe >> https://github.com/notifications/unsubscribe-auth/AZLGLBPZF3VLN7V2JAJL6C3ZAUCT7AVCNFSM6AAAAABGRJRRX2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJUGI4DIMJVGM >> . >> You are receiving this because you commented.Message ID: >> @.> >> >

Yes, I am Chinese, thank you for appreciating my profile picture ; ). I also don't like CMake tbh. As for the official nifti_clib project, build for windows can be really troublesome. Tweaking it to work on windows might take some work reorganize their file structure. Sorry your images is not possible to view at my end. One alternative is to find nifti_clib community windows version on GitHub ( i guess many people has the same issue so maybe some are out there). My project is also not build for windows, I have plan to port to windows but i don't have a windows machine to test so this is not my current priority. I will probably also try to just remove the whole nifti_clib in the future, since I only need the nifti_image_read function.

Thank you for your helps.. Well.. As you know, CMake sometimes makes developers angry when building.. Of course path is basic..But any other unexpected build bug make me "Not easy to go through CMake build" feeling. Anyway, thank you but.. If you have total windows code, helpful for me. :-)
…
On Sun, May 5, 2024 at 1:16 AM zifa25796 @.> wrote: Dear ChengranAA, Thank you~~~ Thank you for your reply. I've tried to add that.. But the "nifit_clib" repo had no guideline to build code with CMake..(The commenter "pmolfese https://github.com/pmolfese" just mentioned about "NMake in VS Windows") As you know (I'm not sure but I can feel...), To build codes by CMake, the build guideline should be needed. Excuse me but... Can you help me with the CMake build options/procedures? I've already experienced the CMake build, but I;m hesitate to use this repos. On Fri, May 3, 2024 at 8:05 PM AA @.> wrote: Hello~ I have question in your "Quicknii" repos. I've commanded by "Windows git bash" but... ================================================================================= @.*** MINGW64 ~/source/Repos/QuickNii (main) $ sh init.sh Cloning into 'C:/Users/User/source/Repos/QuickNii/include/imgui'... remote: Enumerating objects: 53546, done. remote: Counting objects: 100% (749/749), done. remote: Compressing objects: 100% (229/229), done. remote: Total 53546 (delta 561), reused 624 (delta 520), pack-reused 52797 Receiving objects: 100% (53546/53546), 90.59 MiB | 9.27 MiB/s, done. Resolving deltas: 100% (41397/41397), done. Updating files: 100% (217/217), done. Cloning into 'C:/Users/User/source/Repos/QuickNii/include/implot'... remote: Enumerating objects: 2574, done. remote: Counting objects: 100% (710/710), done. remote: Compressing objects: 100% (76/76), done. remote: Total 2574 (delta 657), reused 638 (delta 634), pack-reused 1864 Receiving objects: 100% (2574/2574), 1.61 MiB | 8.27 MiB/s, done. Resolving deltas: 100% (1671/1671), done. Cloning into 'nifti_clib'... remote: Enumerating objects: 4194, done. remote: Counting objects: 100% (442/442), done. remote: Compressing objects: 100% (165/165), done. remote: Total 4194 (delta 316), reused 372 (delta 277), pack-reused 3752 Receiving objects: 100% (4194/4194), 1.87 MiB | 2.44 MiB/s, done. Resolving deltas: 100% (2979/2979), done. init.sh: line 22: make: command not found mv: cannot stat './include/.h': No such file or directory mv: cannot stat './lib/ .a': No such file or directory (base) @.*** MINGW64 ~/source/Repos/QuickNii (main) $ make bash: make: command not found (base) @.*** MINGW64 ~/source/Repos/QuickNii (main) $ sh init.sh make fatal: destination path 'C:/Users/User/source/Repos/QuickNii/include/imgui' already exists and is not an empty directory. fatal: destination path 'C:/Users/User/source/Repos/QuickNii/include/implot' already exists and is not an empty directory. Cloning into 'nifti_clib'... remote: Enumerating objects: 4194, done. remote: Counting objects: 100% (442/442), done. remote: Compressing objects: 100% (165/165), done. remote: Total 4194 (delta 316), reused 372 (delta 277), pack-reused 3752 Receiving objects: 100% (4194/4194), 1.87 MiB | 29.52 MiB/s, done. Resolving deltas: 100% (2979/2979), done. init.sh: line 22: make: command not found mv: cannot stat './include/.h': No such file or directory mv: cannot stat './lib/ .a': No such file or directory (base) ================================================================================= line 22 problem in "init.sh"??? ================================================================================= git clone https://github.com/NIFTI-Imaging/nifti_clib # Ensure the directory exists before continuing cd nifti_clib || exit make mkdir -p "${INCLUDE}/nifti_clib" "${LIB}/nifti_clib" mv ./include/.h "${INCLUDE}/nifti_clib" mv ./lib/.a "${LIB}/nifti_clib" cd .. rm -rf nifti_clib ================================================================================= So...I don't know what's the problem.. Maybe git clone https://github.com/NIFTI-Imaging/nifti_clib problem??? NIFTI-Imaging/nifti_clib#181 <NIFTI-Imaging/nifti_clib#181> NIFTI-Imaging/nifti_clib#181 <NIFTI-Imaging/nifti_clib#181> ↑ Is this solution for me?? Help me~~~~~ Hi, I think there is something wrong with the building of the nifti_clib. Instead of using my init script, which is not optimized for windows. You can manually clone can build the https://github.com/NIFTI-Imaging/nifti_clib and copy library files and header files into this project. The overall project structure should look like this. ├── LICENSE ├── Makefile ├── README.assets │ └── demo.png ├── README.md ├── compile_commands.json ├── include │ ├── bv_io.h │ ├── imgui │ │ ├── LICENSE.txt │ │ ├── backends │ │ ├── docs │ │ ├── examples │ │ ├── imconfig.h │ │ ├── imgui.cpp │ │ ├── imgui.h │ │ ├── imgui_demo.cpp │ │ ├── imgui_draw.cpp │ │ ├── imgui_internal.h │ │ ├── imgui_tables.cpp │ │ ├── imgui_widgets.cpp │ │ ├── imstb_rectpack.h │ │ ├── imstb_textedit.h │ │ ├── imstb_truetype.h │ │ └── misc │ ├── implot │ │ ├── LICENSE │ │ ├── README.md │ │ ├── TODO.md │ │ ├── implot.cpp │ │ ├── implot.h │ │ ├── implot_demo.cpp │ │ ├── implot_internal.h │ │ └── implot_items.cpp │ ├── nifti_clib │ │ ├── dbh.h │ │ ├── fslio.h │ │ ├── nifti1.h │ │ ├── nifti1_io.h │ │ ├── nifti1_io_version.h │ │ ├── nifti1_tool.h │ │ ├── nifti2.h │ │ ├── nifti2_io.h │ │ ├── nifticdf.h │ │ ├── nifticdf_version.h │ │ ├── znzlib.h │ │ └── znzlib_version.h │ └── quicknii.hpp ├── init.sh ├── lib │ └── nifti_clib │ ├── libniftiio.a │ └── libznz.a — Reply to this email directly, view it on GitHub #1 (comment) <#1 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZLGLBLYHSBGBZS3OSROM4DZANVQZAVCNFSM6AAAAABGRJRRX2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJSG44DKNJQGQ . You are receiving this because you commented.Message ID: @.> Hi, what have worked for me was just adding the required files in my own project, copied from nifti_clib. Two folder we need was niftilib and znz lib. What u can do is goto the orginal nifti_clib repo and download all of these files in these two folder, and organize them in your own project, and keep in mind to make sure that all the "include" have the correct route in these folders since we are now using them as a local .h file. From there you can just use these functions like your own code. And regarding on cmake, just add these file names, also remember absolute or relative directory before them, like "niftilib/nifti1_io.c" for each file into “add_executable”. And thats it — Reply to this email directly, view it on GitHub <#1 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZLGLBPZF3VLN7V2JAJL6C3ZAUCT7AVCNFSM6AAAAABGRJRRX2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJUGI4DIMJVGM . You are receiving this because you commented.Message ID: @.>

If u still want, i have extracted the nifti_clib part from my project which runed from windows. Its basicly the same, and all i have changed is just include dir. Hope this can help.
https://github.com/zifa25796/Nifti_Clib_Wrapper/tree/main

Thank you for your reply. You're so kind~ Today, I've succeeded to build it in my office. Well..You might be university BS? MS? course now? I'm in my 40s. Haha.. I'm a first worker in brainvoyager. The main different with fail and success is... [image: image.png] "nVidia Anaconda" S/W installed or not..(Office and my home difference) I don't know why "NIFTI-IMAGING" (Not YOU~) does not (And other git repos are almost same. Why build/install guidelines are so poor like that...) make detailed windows CMake build procedure. So, you're using Mac PC? Linux PC? Anyway, If there are some roadblocks to work with your code, Can you help me then? I'm also not sure your PJT is working well for just 1 time or give hard burden to me. :-)
…
On Mon, May 6, 2024 at 8:56 PM AA @.> wrote: Yes, I am Chinese. I also don't like CMake tbh. That's why I stick with makefile for most of my projects. Porting to windows in one of my goal, however since I don't have a windows machine it might not be my priority. The project is more for my personal usage, also for people who constantly taking file in and out of brainvoyager. Dear ChengranAA, As I expected.. CMake errors~~~ I've already ALL downloaded (git clone) but failed. I was a little bit uneasy to use CMake because of this damned error frequently. How did you succeed your own project? [image: image.png] … <#m_-2445840311026473632_> On Mon, May 6, 2024 at 7:46 PM B GM @.> wrote: And.. Excuse me but.. Are you Chinese? And so cute your penguin logo in your github. Haha~ Anyway, I will build CMake...(Just for my past experiences, I don't like CMake build. This make errors, bugs frequently) On Mon, May 6, 2024 at 3:34 PM B GM @.> wrote: > Thank you for your helps.. > > Well.. > > As you know, > > CMake sometimes makes developers angry when building.. > > Of course path is basic..But any other unexpected build bug make me "Not > easy to go through CMake build" feeling. > > Anyway, thank you but.. > > If you have total windows code, helpful for me. :-) > > > > > > On Sun, May 5, 2024 at 1:16 AM zifa25796 @.> > wrote: > >> Dear ChengranAA, >> >> Thank you~~~ >> >> Thank you for your reply. >> >> I've tried to add that.. >> >> But the "nifit_clib" repo had no guideline to build code with CMake..(The >> >> commenter "pmolfese https://github.com/pmolfese https://github.com/pmolfese" just mentioned about >> >> "NMake in VS Windows") >> >> As you know (I'm not sure but I can feel...), To build codes by CMake, >> the >> >> build guideline should be needed. >> >> Excuse me but... >> >> Can you help me with the CMake build options/procedures? >> >> I've already experienced the CMake build, but I;m hesitate to use this >> >> repos. >> >> On Fri, May 3, 2024 at 8:05 PM AA @.> wrote: >> >> Hello~ >> >> I have question in your "Quicknii" repos. >> >> I've commanded by "Windows git bash" but... >> >> >> ================================================================================= >> >> @.** MINGW64 ~/source/Repos/QuickNii (main) $ sh init.sh >> >> Cloning into 'C:/Users/User/source/Repos/QuickNii/include/imgui'... >> remote: >> >> Enumerating objects: 53546, done. remote: Counting objects: 100% >> (749/749), >> >> done. remote: Compressing objects: 100% (229/229), done. remote: Total >> >> 53546 (delta 561), reused 624 (delta 520), pack-reused 52797 Receiving >> >> objects: 100% (53546/53546), 90.59 MiB | 9.27 MiB/s, done. Resolving >> >> deltas: 100% (41397/41397), done. Updating files: 100% (217/217), done. >> >> Cloning into 'C:/Users/User/source/Repos/QuickNii/include/implot'... >> >> remote: Enumerating objects: 2574, done. remote: Counting objects: 100% >> >> (710/710), done. remote: Compressing objects: 100% (76/76), done. remote: >> >> Total 2574 (delta 657), reused 638 (delta 634), pack-reused 1864 >> Receiving >> >> objects: 100% (2574/2574), 1.61 MiB | 8.27 MiB/s, done. Resolving deltas: >> >> 100% (1671/1671), done. Cloning into 'nifti_clib'... remote: Enumerating >> >> objects: 4194, done. remote: Counting objects: 100% (442/442), done. >> >> remote: Compressing objects: 100% (165/165), done. remote: Total 4194 >> >> (delta 316), reused 372 (delta 277), pack-reused 3752 Receiving objects: >> >> 100% (4194/4194), 1.87 MiB | 2.44 MiB/s, done. Resolving deltas: 100% >> >> (2979/2979), done. init.sh: line 22: make: command not found mv: cannot >> >> stat './include/.h': No such file or directory mv: cannot stat './lib/ >> .a': >> >> No such file or directory (base) @.*** MINGW64 >> >> ~/source/Repos/QuickNii (main) $ make bash: make: command not found >> (base) >> >> @.*** MINGW64 ~/source/Repos/QuickNii (main) $ sh init.sh >> >> make fatal: destination path >> >> 'C:/Users/User/source/Repos/QuickNii/include/imgui' already exists and is >> >> not an empty directory. fatal: destination path >> >> 'C:/Users/User/source/Repos/QuickNii/include/implot' already exists and >> is >> >> not an empty directory. Cloning into 'nifti_clib'... remote: Enumerating >> >> objects: 4194, done. remote: Counting objects: 100% (442/442), done. >> >> remote: Compressing objects: 100% (165/165), done. remote: Total 4194 >> >> (delta 316), reused 372 (delta 277), pack-reused 3752 Receiving objects: >> >> 100% (4194/4194), 1.87 MiB | 29.52 MiB/s, done. Resolving deltas: 100% >> >> (2979/2979), done. init.sh: line 22: make: command not found mv: cannot >> >> stat './include/.h': No such file or directory mv: cannot stat './lib/ >> .a': >> >> No such file or directory (base) >> >> >> ================================================================================= >> >> line 22 problem in "init.sh"??? >> >> >> ================================================================================= >> >> git clone https://github.com/NIFTI-Imaging/nifti_clib >> >> # Ensure the directory exists before continuing cd nifti_clib || exit >> >> make >> >> mkdir -p "${INCLUDE}/nifti_clib" "${LIB}/nifti_clib" mv ./include/.h >> >> "${INCLUDE}/nifti_clib" mv ./lib/.a "${LIB}/nifti_clib" >> >> cd .. rm -rf nifti_clib >> >> >> ================================================================================= >> >> So...I don't know what's the problem.. Maybe git clone >> >> https://github.com/NIFTI-Imaging/nifti_clib problem??? >> >> NIFTI-Imaging/nifti_clib#181 <NIFTI-Imaging/nifti_clib#181> >> < NIFTI-Imaging/nifti_clib#181 <NIFTI-Imaging/nifti_clib#181>> >> >> NIFTI-Imaging/nifti_clib#181 <NIFTI-Imaging/nifti_clib#181> >> < NIFTI-Imaging/nifti_clib#181 <NIFTI-Imaging/nifti_clib#181>> ↑ Is this >> >> solution for me?? Help me~~~~~ >> >> Hi, I think there is something wrong with the building of the nifti_clib. >> >> Instead of using my init script, which is not optimized for windows. You >> >> can manually clone can build the >> >> https://github.com/NIFTI-Imaging/nifti_clib and copy library files and >> >> header files into this project. The overall project structure should look >> >> like this. >> >> ├── LICENSE >> >> ├── Makefile >> >> ├── README.assets >> >> │ └── demo.png >> >> ├── README.md >> >> ├── compile_commands.json >> >> ├── include >> >> │ ├── bv_io.h >> >> │ ├── imgui >> >> │ │ ├── LICENSE.txt >> >> │ │ ├── backends >> >> │ │ ├── docs >> >> │ │ ├── examples >> >> │ │ ├── imconfig.h >> >> │ │ ├── imgui.cpp >> >> │ │ ├── imgui.h >> >> │ │ ├── imgui_demo.cpp >> >> │ │ ├── imgui_draw.cpp >> >> │ │ ├── imgui_internal.h >> >> │ │ ├── imgui_tables.cpp >> >> │ │ ├── imgui_widgets.cpp >> >> │ │ ├── imstb_rectpack.h >> >> │ │ ├── imstb_textedit.h >> >> │ │ ├── imstb_truetype.h >> >> │ │ └── misc >> >> │ ├── implot >> >> │ │ ├── LICENSE >> >> │ │ ├── README.md >> >> │ │ ├── TODO.md >> >> │ │ ├── implot.cpp >> >> │ │ ├── implot.h >> >> │ │ ├── implot_demo.cpp >> >> │ │ ├── implot_internal.h >> >> │ │ └── implot_items.cpp >> >> │ ├── nifti_clib >> >> │ │ ├── dbh.h >> >> │ │ ├── fslio.h >> >> │ │ ├── nifti1.h >> >> │ │ ├── nifti1_io.h >> >> │ │ ├── nifti1_io_version.h >> >> │ │ ├── nifti1_tool.h >> >> │ │ ├── nifti2.h >> >> │ │ ├── nifti2_io.h >> >> │ │ ├── nifticdf.h >> >> │ │ ├── nifticdf_version.h >> >> │ │ ├── znzlib.h >> >> │ │ └── znzlib_version.h >> >> │ └── quicknii.hpp >> >> ├── init.sh >> >> ├── lib >> >> │ └── nifti_clib >> >> │ ├── libniftiio.a >> >> │ └── libznz.a >> >> — >> >> Reply to this email directly, view it on GitHub >> >> #1 <#1> (comment) >> <#1 (comment) <#1 (comment)>> >> , >> >> or unsubscribe >> >> >> https://github.com/notifications/unsubscribe-auth/AZLGLBLYHSBGBZS3OSROM4DZANVQZAVCNFSM6AAAAABGRJRRX2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJSG44DKNJQGQ >> >> . >> >> You are receiving this because you commented.Message ID: >> >> @.> >> >> Hi, what have worked for me was just adding the required files in my own >> project, copied from nifti_clib. Two folder we need was niftilib and znz >> lib. What u can do is goto the orginal nifti_clib repo and download all of >> these files in these two folder, and organize them in your own project, and >> keep in mind to make sure that all the "include" have the correct route in >> these folders since we are now using them as a local .h file. From there >> you can just use these functions like your own code. >> And regarding on cmake, just add these file names, also remember >> absolute or relative directory before them, like "niftilib/nifti1_io.c" for >> each file into “add_executable”. >> And thats it >> >> — >> Reply to this email directly, view it on GitHub >> <#1 (comment) <#1 (comment)>>, >> or unsubscribe >> https://github.com/notifications/unsubscribe-auth/AZLGLBPZF3VLN7V2JAJL6C3ZAUCT7AVCNFSM6AAAAABGRJRRX2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJUGI4DIMJVGM https://github.com/notifications/unsubscribe-auth/AZLGLBPZF3VLN7V2JAJL6C3ZAUCT7AVCNFSM6AAAAABGRJRRX2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJUGI4DIMJVGM >> . >> You are receiving this because you commented.Message ID: >> @.> >> > Yes, I am Chinese, thank you for appreciating my profile picture ; ). I also don't like CMake tbh. As for the official nifti_clib project, build for windows can be really troublesome. Tweaking it to work on windows might take some work reorganize their file structure. Sorry your images is not possible to view at my end. One alternative is to find nifti_clib community windows version on GitHub ( i guess many people has the same issue so maybe some are out there). My project is also not build for windows, I have plan to port to windows but i don't have a windows machine to test so this is not my current priority. I will probably also try to just remove the whole nifti_clib in the future, since I only need the nifti_image_read function. — Reply to this email directly, view it on GitHub <#1 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZLGLBJ2OE6ZO6PS6SFHJK3ZA5VVLAVCNFSM6AAAAABGRJRRX2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJVHAZTSMRWGA . You are receiving this because you commented.Message ID: @.***>

No worries, this is what this comunity is for, I will try to help you if I know the answer. I use Mac/Unix and Linux mainly, therefore I might not be the best person for windows specific questions. I am currently a master student at Maastricht University, that's the reason for brainvoayger format support. This project started because i wanted something to fast check some files without opening brainvoyager. Some more features are also included in the roadmap including beta/t map visualization, mask visualization for segmentation quality check etc.

Hi, could you submitted your pictures through GitHub.com website, because the images you sent are unviewable for me.

I think the solution is straightforward, cloning the nift_club manually and make the project, since it's Linux it will not be a problem anymore. Mv the file accordingly in the init script. Then the makefile will appropriately find those library and header files.


Allow style function to return a style

In addition to returning an array of styles, a style function should be able to return a single style.
Since things can't be optimized if at runtime a function does not return a consistent type, people are discouraged from sometimes returning an array and sometimes returning a single style.  But if you consistently return one or the other, this change doesn't make it any harder for runtime optimization.
This change also makes it easier for people to avoid extra array allocation when they only need to render with a single style.  In short, it makes things better for the common case, and doesn't change anything for the more complex case of an array of styles.
Fixes #1838.

This is ready for review.
If our example use is any indication, a style function returning an array of styles is not the most common use case.  Arrays of styles are nice, but we can do a better job supporting the common case.
cc @bartvde

happy to see this @tschaub ;-)
I'll review this today.

Good idea, I tripped on this several times. Your changes look good to me.

LGTM as well, I also wondered the same thing as @tsauerwein

+1

@tsauerwein and @bartvde - regarding the extra array, there is really no need for it.  The underlying ol.renderer.vector.renderFeature() function takes a single ol.style.Style object.  The common use case is to use a single style object.  So there is no reason to have the extra array allocation (for every feature at every frame) just to normalize for the more advanced style case.
Despite the claims about support for a single style being bad for performance (see https://github.com/openlayers/ol3/issues/1838#issuecomment-37284332), we can actually handle the common and more advanced case efficiently.


Error while running tests

I added react-storybook to a project with react-boilerplate. When I try to run tests I get this error
Uncaught Error: dataId is not supplied via queryString   at webpack:///~/@kadira/storybook/dist/client/preview/index.js:64:0 <- test-bundler.js:54610
Has anyone experienced this issue or know what it belongs to?

Is there anyway we could re-produce these errors?

@arunoda I will create an example soon when I have time

+1, I get this in the UI

And all I have is this:
import { configure } from '@kadira/storybook'

function loadStories() {
  require('../Link/story')
}

configure(loadStories, module)

import React from 'react'
import { storiesOf } from '@kadira/storybook'

storiesOf('Link', module)
  .add('with text', () => (
    My First Button
  ))

Mmm, solved by removing some plugins I had in the webpack config. I just copied and pasted the real one...

Hi @joaomilho
Which plugins were causing this error?

Gonna close this since the original issue has been fixed.


cmd/go: miscompilation of codependent global var assigments in go1.12

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

$ PATH=$HOME/tmp/go/bin:$PATH go version
go version go1.12.1 linux/amd64

Does this issue reproduce with the latest release?
It reproduces with go 1.12.1 so I believe yes. I downloaded it from https://dl.google.com/go/go1.12.1.linux-amd64.tar.gz
$ sha256sum ~/tmp/go1.12.1.linux-amd64.tar.gz
2a3fdabf665496a0db5f41ec6af7a9b15a49fbe71a85a50ca38b1f13a103aeec  /home/ijc/tmp/go1.12.1.linux-amd64.tar.gz

I've also reproduced on darwin/amd64 from https://golang.org/doc/install?download=go1.12.1.darwin-amd64.pkg:
$ sha256sum ~/Downloads/go1.12.1.darwin-amd64.pkg
8da4d8a7c5c4fb5d144b5c18e48ca5f0a35677dc71517822ab41bdc7766d3175  /home/ijc/Downloads/go1.12.1.darwin-amd64.pkg

What operating system and processor architecture are you using (go env)?
linux/amd64 (Debian).
go env Output on linux/amd64
$ PATH=$HOME/tmp/go/bin:$PATH go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/ijc/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/ijc/go"
GOPROXY=""
GORACE=""
GOROOT="/home/ijc/tmp/go"
GOTMPDIR=""
GOTOOLDIR="/home/ijc/tmp/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/ijc/development/Docker/go1.12-initvar-miscompile/go.mod"
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-build327430398=/tmp/go-build -gno-record-gcc-switches"

I have also reproduced on darwin/amd64:
go env Output on darwin/amd64
$ /usr/local/go/bin/go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/ijc/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/ijc/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/ijc/go1.12-initvar-miscompile/go.mod"
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 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/4k/lv46d_kx3sn71k23yltwyhf40000gn/T/go-build732469803=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?
I have a program which includes:
import "github.com/blang/semver"

var (
	Version0_2_0  = semver.MustParse("0.2.0")
	VersionLatest = Version0_2_0
)

The types are semver.Version which is a struct with a handful of fields (Major, Minor etc).
I am seeing corruption of VersionLatest where the major field is<PHONE_NUMBER>00 (always that number, AFAICS) after init and not 0. Version0_2_0 is never corrupted.
I have narrowed it down to this minimal case: go1.12-initvar-miscompile.zip
$ PATH=$HOME/tmp/go/bin:$PATH go build ./
$ ./miscompile  # this is a pass
"0.2.0"
$ ./miscompile # this is a fail
panic: VersionLatest corrupt: "0.2.0" "824638766896.2.0"

goroutine 1 [running]:
main.main()
	/home/ijc/development/Docker/go1.12-initvar-miscompile/main.go:186 +0x1b5

Note that the test program includes a massive bunch of anonymous imports, these seem to be necessary to trigger the runtime/gc load and cause the issue (they are derived from all the vendoring in my actual project which have init() functions). Trying to minimise the set of imports is non-linear (since the issue is non-deterministic AFAICT) and also reduces the probability of the issue occurring. I got it down to a dozen or so imports and a 1/10,000 incidence, since it is much easier to reproduce with the larger import set that is what I included here.
What did you expect to see?
On success VersionLatest is "0.2.0".
What did you see instead?
It is corrupted to "824638766896.2.0".
Analysis
After the call to semver.MustParse there is a runtime.writeBarrier slow path:
  main.go:177		0x1799233		e8182f30ff		CALL github.com/blang/semver.MustParse(SB)
  main.go:177		0x1799238		833d31cc050100		CMPL $0x0, runtime.writeBarrier(SB)
  main.go:177		0x179923f		0f8588000000		JNE 0x17992cd

The issue occurs precisely when this jump is taken and is during this sequence:
// Result of semver.MustParse is on the stack at 0x10(SP). First copy it
// to `Version0_2_0`, effectively `memcpy(Version0_2_0, «stack temporary»)`

  main.go:177		0x17992cd		488b442410		MOVQ 0x10(SP), AX
  main.go:177		0x17992d2		48898424a0000000	MOVQ AX, 0xa0(SP)
  main.go:177		0x17992da		0f10442418		MOVUPS 0x18(SP), X0
  main.go:177		0x17992df		0f118424a8000000	MOVUPS X0, 0xa8(SP)
  main.go:177		0x17992e7		0f10442428		MOVUPS 0x28(SP), X0
  main.go:177		0x17992ec		0f118424b8000000	MOVUPS X0, 0xb8(SP)
  main.go:177		0x17992f4		0f10442438		MOVUPS 0x38(SP), X0
  main.go:177		0x17992f9		0f118424c8000000	MOVUPS X0, 0xc8(SP)
  main.go:177		0x1799301		0f10442448		MOVUPS 0x48(SP), X0
  main.go:177		0x1799306		0f118424d8000000	MOVUPS X0, 0xd8(SP)

// This sequence overwrites 0x10(SP) with some value before calling
// `runtime.typedmemmove`

  main.go:177		0x179930e		488d058bd22800		LEAQ type.JyaB60kV(SB), AX
  main.go:177		0x1799315		48890424		MOVQ AX, 0(SP)
  main.go:177		0x1799319		488d0d00f00301		LEAQ main.Version0_2_0(SB), CX
  main.go:177		0x1799320		48894c2408		MOVQ CX, 0x8(SP)
  main.go:177		0x1799325		488d8c24a0000000	LEAQ 0xa0(SP), CX
  main.go:177		0x179932d		48894c2410		MOVQ CX, 0x10(SP)
  main.go:177		0x1799332		e8b9e520ff		CALL runtime.typedmemmove(SB)

// Now we try to copy the result of `semver.MustParse` from the stack into
// `VersionLatest`, effectively `memcpy(VersionLatest, «stack temporary»)`,
// but the values at 0x10(SP) has been changed by the `CALL` above,
// thus `VersionLatest` is corrupted.

  main.go:178		0x1799337		488b442410		MOVQ 0x10(SP), AX
  main.go:178		0x179933c<PHONE_NUMBER>		MOVQ AX, 0x58(SP)
  main.go:178		0x1799341		0f10442418		MOVUPS 0x18(SP), X0
  main.go:178		0x1799346		0f11442460		MOVUPS X0, 0x60(SP)
  main.go:178		0x179934b		0f10442428		MOVUPS 0x28(SP), X0
  main.go:178		0x1799350		0f11442470		MOVUPS X0, 0x70(SP)
  main.go:178		0x1799355		0f10442438		MOVUPS 0x38(SP), X0
  main.go:178		0x179935a		0f11842480000000	MOVUPS X0, 0x80(SP)
  main.go:178		0x1799362		0f10442448		MOVUPS 0x48(SP), X0
  main.go:178		0x1799367		0f11842490000000	MOVUPS X0, 0x90(SP)

On go1.11.4 the same code is compiled differently and the second copy is memcpy(VersionLatest, Version0_2_0) instead which does not use the corrupted stack copy
  main.go:178		0x170888a		488b056fbcef00		MOVQ main.Version0_2_0(SB), AX
  main.go:178		0x1708891		488905c8bcef00		MOVQ AX, main.VersionLatest(SB)
  main.go:178		0x1708898		0f100569bcef00		MOVUPS main.Version0_2_0+8(SB), X0
  main.go:178		0x170889f		0f1105c2bcef00		MOVUPS X0, main.VersionLatest+8(SB)
  main.go:178		0x17088a6		0f10056bbcef00		MOVUPS main.Version0_2_0+24(SB), X0
  main.go:178		0x17088ad		0f1105c4bcef00		MOVUPS X0, main.VersionLatest+24(SB)
  main.go:178		0x17088b4		0f10056dbcef00		MOVUPS main.Version0_2_0+40(SB), X0
  main.go:178		0x17088bb		0f1105c6bcef00		MOVUPS X0, main.VersionLatest+40(SB)
  main.go:178		0x17088c2		0f10056fbcef00		MOVUPS main.Version0_2_0+56(SB), X0
  main.go:178		0x17088c9		0f1105c8bcef00		MOVUPS X0, main.VersionLatest+56(SB)

BTW, the code pattern is the same in the fast pass, but that lacks the call to runtime.typedmemmove which overwrites the stack value, thus the issue only occurs if we manager to hit the slow path.

For completeness here is the actual full type which is slightly more complex than I let on above:
// Version represents a semver compatible version
type Version struct {
	Major uint64
	Minor uint64
	Patch uint64
	Pre   []PRVersion
	Build []string //No Precedence
}

ping @bradfitz PTAL

Tentatively marking as 1.12 since it appears to be a recent regression.
cc @randall77 @cherrymui

Thanks!

Thanks for the bug report! If you/anyone wants to try to minimize further, setting GOGC=1 might help reproduce more reliably. (Bisection would also be super useful.)

FWIW I just tested on linux/arm64 using a binary I cross-built with the linux/amd64 toolchain described above and the issue did not occur neither with qemu-aarch64-state nor on a real machine (I tried 10,000 iterations on the latter).
The go tool objdump output on arm64 lacks most of the symbolic information to (easily) eyeball the code.

GOGC=1 doesn't seem to make a noticeable difference to the reproducibility.

Interesting. I'll take a careful look.

The go tool objdump output on arm64 lacks most of the symbolic information to (easily) eyeball the code.

On ARM64, many address operations are split into multiple instructions, as it cannot load a 64-bit address in a single instruction, and currently objdump is not smart enough to recombine them.

The same "volatile" stack temporary is used in two stores, both with write barriers. I think we don't generate this before, so the write barrier pass doesn't handle this case. Now we optimize X =f(); Y = X to storing the result of f() to both X and Y directly. I think we can fix this in the write barrier pass.

My bisect fingered 6c631ae227cb6f15d5b0b8cc39c1715b8f4e9187 "cmd/compile: in wasm, allocate approximately right number of locals for functions", but that doesn't pass the sniff test and I couldn't confirm manually. I suspect that is a misbisect (I probably got distracted and failed to test some rev but still entered a result).
I've scripted it this time and git bisect run is underway now, although I'll have to head off soon so it might be tomorrow before I see the result.

It's not done but I really have to run. It's narrowed it down so far to:
$ git log --oneline bisect/bad...bisect/good-6c631ae227cb6f15d5b0b8cc39c1715b8f4e9187~1
3bf9b77c0c (refs/bisect/bad) encoding/gob: increase "tooBig" from 1GB to 8GB on 64-bit machines
7c2718b12a doc: tweak example in Effective Go
f5df0a9575 cmd/internal/xcoff: don't use io.SeekCurrent for go1.4 compatibility
035f9e8102 (HEAD) doc: update docs.html with new tour import path
ecccdccf3e misc/wasm: fix panic on os.Stdout.Sync() in the browser
2e88689168 go/types: temporarily disable a verification in Stdlib test
2578ac54eb cmd/compile: move argument stack construction to SSA generation
6c631ae227 (refs/bisect/good-6c631ae227cb6f15d5b0b8cc39c1715b8f4e9187) cmd/compile: in wasm, allocate approximately right number of locals for functions

At this point I'd probably guess at 2578ac54eb "cmd/compile: move argument stack construction to SSA generation".

@ijc thanks for the bisects. I think CL https://golang.org/cl/168677 should fix this. You don't have to do more.

https://play.golang.org/p/5DpJ673vnSJ
On tip (700e969d5b), this fails quite reliably.

@gopherbot please backport this to Go 1.12.

The bisect was automated so I may as well report the result which was that it blamed 2578ac54eb417488c70324e7f3fc25565ec3f03d "cmd/compile: move argument stack construction to SSA generation", which seems legit.
git bisect log
git bisect start
# bad: [05e77d41914d247a1e7caf37d7125ccaa5a53505] [release-branch.go1.12] go1.12
git bisect bad 05e77d41914d247a1e7caf37d7125ccaa5a53505
# good: [41e62b8c49d21659b48a95216e3062032285250f] [release-branch.go1.11] runtime: mark sigInitIgnored nosplit
git bisect good 41e62b8c49d21659b48a95216e3062032285250f
# good: [e0faedbb5344eb6f8f704005fe88961cdc6cf5f8] cmd/go: add missing newlines in printf formats
git bisect good e0faedbb5344eb6f8f704005fe88961cdc6cf5f8
# bad: [2dda040f19aa6a7551f090d8c5a3941e416b21df] cmd/compile/internal/gc: represent labels as bare Syms
git bisect bad 2dda040f19aa6a7551f090d8c5a3941e416b21df
# good: [9a033bf9d3f5f7485d82836ec95e51a3fa74a926] cmd/compile: optimize 386's assembly generator
git bisect good 9a033bf9d3f5f7485d82836ec95e51a3fa74a926
# good: [29907b13db0455eded50263b4e37445045c82e6e] crypto: add AIX operating system
git bisect good 29907b13db0455eded50263b4e37445045c82e6e
# good: [2d6a7593b5cde33546be7bb69f420d32df060a47] cmd/doc: minor code simplification
git bisect good 2d6a7593b5cde33546be7bb69f420d32df060a47
# bad: [6994731ec2babb6a4f2bbbb08dbe649767a25942] internal/bytealg: improve asm for memequal on ppc64x
git bisect bad 6994731ec2babb6a4f2bbbb08dbe649767a25942
# skip: [e9b39417e4448d6001b2707d9cf42bba4673e9ab] go/types: copy embedded methods unchanged when completing interfaces
git bisect skip e9b39417e4448d6001b2707d9cf42bba4673e9ab
# bad: [ddf83eeb2359f28f81bce78a6d4521852d5e6dfe] cmd/compile: s/eqtype/types.Identical/ (fix build)
git bisect bad ddf83eeb2359f28f81bce78a6d4521852d5e6dfe
# good: [6c631ae227cb6f15d5b0b8cc39c1715b8f4e9187] cmd/compile: in wasm, allocate approximately right number of locals for functions
git bisect good 6c631ae227cb6f15d5b0b8cc39c1715b8f4e9187
# bad: [3bf9b77c0c8f123728fcfc802599232e9bd95476] encoding/gob: increase "tooBig" from 1GB to 8GB on 64-bit machines
git bisect bad 3bf9b77c0c8f123728fcfc802599232e9bd95476
# bad: [035f9e8102d3b46877b7462fcd365324272d1d0e] doc: update docs.html with new tour import path
git bisect bad 035f9e8102d3b46877b7462fcd365324272d1d0e
# bad: [2e88689168a57ae550ddae7ad0966fa14c877c5f] go/types: temporarily disable a verification in Stdlib test
git bisect bad 2e88689168a57ae550ddae7ad0966fa14c877c5f
# bad: [2578ac54eb417488c70324e7f3fc25565ec3f03d] cmd/compile: move argument stack construction to SSA generation
git bisect bad 2578ac54eb417488c70324e7f3fc25565ec3f03d
# first bad commit: [2578ac54eb417488c70324e7f3fc25565ec3f03d] cmd/compile: move argument stack construction to SSA generation

I also confirmed that at f23c601bf9f66ef4a0d9d2dcd003b95e78fb28f8 both my test case and my actual usecase are fixed. Thanks for the super fast turnaround!
Is this sort of miscompile something which might precipitate a quick turnaround on a go 1.12.2? We need to decide if we should roll back our projects to 1.11.x or wait a few days.

Is this sort of miscompile something which might precipitate a quick turnaround on a go 1.12.2? We need to decide if we should roll back our projects to 1.11.x or wait a few days.

@katiehockman and @andybons about the 1.12.2 release. (I don't know the answer.)

We try to do minor point releases on the first of the month, so the next one would be April 1 ideally.

@ALTree curious to know why this is in 1.13 milestone and not 1.12.2 ?

Thanks @andybons  that should help us figure out what to do.

@ALTree I see the milestone was changed from 1.12.2 to 1.13

Is a separate tracking-issue needed to track it for Go 1.12.2?

@thaJeztah That's #30996. It was opened a week ago, and that's the reason I moved this one to 1.13.

oh! I see now; I overlooked the bot's comment as it's usually commenting related to changes in Gerrit.
Apologies; still getting the hang of the bots and flow in this repository 🤗

@thaJeztah No problem. Feel free to

monitor that issue
ping Cherry on the linked CL (https://golang.org/cl/168817) in gerrit to merge the fix in the release branch

if you are worried we may forget it before the 1.12.2 release gets finalized. It happened once, unfortunately. The cherry-picked fix for an issues was ready, but it didn't get merged and the release scripts ignored it.


Fix #979 - validators must not parse with toml

#979 #905
3 years ago I made the wrong decision to pass validators defaults to TOML parser.
Validator object is created at Python level, or at YAML level where there is no need to use toml as parser.
TOML parser must ideally be used only on environment variables where there is no type system available.
That said, this PR ensures toml will keep parsing values coming from envvars, but setdefault method will stop passing tomlfy=True so the type informed on the validator will be the type set as default value.
The only possible breaking change on this is if someone is setting defaults relying on TOML to parse the data, in that case, user will need to manually call parse_with_toml on default data.
I think that is not a common case, if someone reports it as a broken change, we can provide a new argument parse_default_with_toml on the Validator object later.

@rochacbruno This section of the docs needs to be updated:
https://github.com/dynaconf/dynaconf/blob/297eefc1aa8cd097d296d39e48fda32ddb3de68c/docs/validation.md?plain=1#L533-L550

And it would be good to add the motivation for tomlfy on parse_conf_data docstring, it may be usefull for someone digging in the codebase.

This implementation will be obsolete and replaced by #981


[TwitCastingLive] Broken extractor; password protected livestreams incorrectly parsed as offline

Checklist

[X] I'm reporting a broken site
[X] I've verified that I'm running yt-dlp version 2022.02.04. (update instructions)
[X] I've checked that all provided URLs are alive and playable in a browser
[X] I've checked that all URLs and arguments with special characters are properly quoted or escaped
[X] I've searched the bugtracker for similar issues including closed ones. DO NOT post duplicates
[X] I've read the guidelines for opening an issue
[X] I've read about sharing account credentials and I'm willing to share it if required

Region
No response
Description
"TwitCastingLive" extractor is broken for live streams that are protected by a secret word. Rather than prompt the user for the password the extractor fails and incorrectly reports that the stream is not live. Additionally attempting to pass the link using --video-password results in the same error.
Log is below but has been redacted. Since you need to test using a private stream you'll have to use your own account to make it easy to test against, there was no need to include my credentials.
Verbose log
[debug] Command-line config: ['-vU', 'https://twitcasting.tv/REDACTED']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, err utf-8, pref UTF-8
[debug] yt-dlp version 2022.02.04 [c1653e9ef]
[debug] Python version 3.8.10 (CPython 64bit) - Linux-5.13.0-28-generic-x86_64-with-glibc2.29
[debug] exe versions: ffmpeg 4.3.1 (fdk)
[debug] Optional libraries: Cryptodome, secretstorage, mutagen, sqlite, websockets
[debug] Proxy map: {}
Latest version: 2022.02.04, Current version: 2022.02.04
yt-dlp is up to date (2022.02.04)
[debug] [TwitCastingLive] Extracting URL: https://twitcasting.tv/REDACTED
[TwitCastingLive] Downloading live video of user REDACTED. Pass "https://twitcasting.tv/REDACTED/show" to download the history
[TwitCastingLive] REDACTED: Downloading webpage
ERROR: [TwitCastingLive] REDACTED: The user is not currently live; please report this issue on  https://github.com/yt-dlp/yt-dlp , filling out the "Broken site" issue template properly. Confirm you are on the latest version using -U; please report this issue on  https://github.com/yt-dlp/yt-dlp , filling out the "Broken site" issue template properly. Confirm you are on the latest version using -U
  File "/home/REDACTED/.local/lib/python3.8/site-packages/yt_dlp/extractor/common.py", line 612, in extract
    ie_result = self._real_extract(url)
  File "/home/REDACTED/.local/lib/python3.8/site-packages/yt_dlp/extractor/twitcasting.py", line 217, in _real_extract
    raise ExtractorError('The user is not currently live')

This is partially fixed df635a09a4458e21896436e8fc1c7, at least for passing full URL (you can find in live history page) to password-protected livestreams.


For those, who searching download link

Use this download link instead:
Download from Web Archive

Thanks for notifying me of the broken download link! I uploaded the webarchived MoveMeNow and IPWhitelist on SpigotMC.


Question: device change orientation

Case: Specific layout for Landscape / Portrait  for multiple pages
How to prevent device.on change orientation to turn off the listener after the page is changed? Specific layouts for specific pages cannot be applied on other context. How I can determine the context where I should turn off the orientation listener? Maybe the page isn't changed but only the parent()...? Or I can turn on the listener only on specific context. How can I do that?

It is hard to understand the question could you rephrase it a bit? What do you try to achieve?

@mpost Sorry, Let me rephrase:
When I call tabris.device.on('change:orientation', function(target, value) on a page, after a leave it, the call remain. So, is impossible to change a specific page layout , because after I go to another one, if The device orientation is changed, the app try to appply the layout from the other page.

You can disable to listen with the tabris.device.off(..) call.

@mpost This is the solution, but how to check the context when to disable / enable the call. I need some ideas in this direction, I don't know how to manage globally this calls in almost every page I have

Currently the appear/disappear events are your only option.

I think this can be considered answered.


Implement connection wrapper logic

This pull request adds the implementation of a connection wrapper logic. The ConnectionWrapper struct provides methods for sending messages and closing connections, with the ability to add custom wrappers for these operations.

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

Project coverage is 84.28%. Comparing base (c9b385a) to head (553f9ef).

Files
Patch %
Lines

channel/connection_wrapper.go
0.00%
33 Missing :warning:

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #36      +/-   ##
==========================================
- Coverage   88.94%   84.28%   -4.66%
==========================================
  Files          16       17       +1
  Lines         597      630      +33
==========================================
  Hits          531      531
- Misses         51       84      +33
  Partials       15       15

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


PubSub API: standardize err msgs

Description
Making this a draft since I need to add integration tests.
This is the code to standardize many of the PubSub api errors to use the newly merged kit pkg for standardizing errors around the richer error model based on this proposal: https://github.com/dapr/proposals/blob/main/0009-BCIRS-error-handling-codes.md.
I added todos for a follow up PR to enrich more of the pubsub errors, as there were already so many that were updated in this PR.
Issue Reference
https://github.com/dapr/dapr/issues/6068
Checklist

[x] Code compiles correctly
[x] Created/updated tests
[x] Unit tests passing
[x] End-to-end tests passing
[x] Extended the documentation: Elena has a PR for it: https://github.com/dapr/docs/pull/3908
[ ] Provided sample for the feature / Created issue in the https://github.com/dapr/docs/ repo: dapr/docs#[issue number]

@cicoyle  had a thought like instead of keeping under pkg/api we could keep it in pkg/utils something like that so we don't make the packages confusing between pkg/api and pkg/apis

@cicoyle had a thought like instead of keeping under pkg/api we could keep it in pkg/utils something like that so we don't make the packages confusing between pkg/api and pkg/apis

We decided to go with this location, as we want to avoid pkg/utils becoming a catch all location of flat packages.

@cicoyle you can "fix" the failing windows tests by adding this check to your tests:
if runtime.GOOS == "windows" {
		t.Skip("skipping unix socket based test on windows")
	}

Check out Josh's PR for details: https://github.com/dapr/dapr/pull/7377/files#diff-63a8642d7d0d77c4c1c98a0b9a603522277d8bef886479027e0d7030d9cdfa47R57

Does any of the current reviewers have any concern before I merge this?

/test-sdk-all

@cicoyle you can "fix" the failing windows tests by adding this check to your tests:
if runtime.GOOS == "windows" {
		t.Skip("skipping unix socket based test on windows")
	}

Check out Josh's PR for details: https://github.com/dapr/dapr/pull/7377/files#diff-63a8642d7d0d77c4c1c98a0b9a603522277d8bef886479027e0d7030d9cdfa47R57

If you look at the commit right before your comment, that's where I added the 'fix'. Its the actor health that is failing for me on Windows. I assume that is somewhat flaky bc I've seen it before.


Add defaults for all sampling strategies

Coverage decreased (-0.08%) to 94.244% when pulling 22647bb6577044089eb1160ecae9d58d7374f840 on defaults_for_everything into<PHONE_NUMBER>b948ef19364fa71a3de0496ea7ce0a on master.

Coverage increased (+0.06%) to 94.383% when pulling f2c18a41f103258eb0b4ba741047b4f5ed2f419a on defaults_for_everything into<PHONE_NUMBER>b948ef19364fa71a3de0496ea7ce0a on master.


[storage] update get_block_timestamp with db reverse iter

Motivation
improve performance.
Have you read the Contributing Guidelines on pull requests?
yes
Test Plan
unit test
Related PRs

Great work. It might be worth adding a comment to get_block_metadata about the performance characteristics due to how the I/O is performed. Ie, that it doesn't cause more i/o since the blocks since the last metadata block are cached along with the metadata block.
@bors-libra delegate+

:v: @msmouse can now approve this pull request

@bors-libra r=metajack

:pushpin: Commit 8568e65 has been approved by metajack

:hourglass: Testing commit 8568e65c1158477474a25f984bd2b27a09118ea0 with merge b85ed53659ccad3ece2197925d575e61b2db8902...

:broken_heart: Test failed - checks-actions_land_blocking_test

@bors-libra  retry

:hourglass: Testing commit 8568e65c1158477474a25f984bd2b27a09118ea0 with merge 7805fa7c211654773ba792d4a7bdcc71c1427a44...

:sunny: Test successful - checks-actions_land_blocking_test, checks-circle_commit_workflow
Approved by: metajack
Pushing 7805fa7c211654773ba792d4a7bdcc71c1427a44 to master...


Request for educational license for PyCharm #18492

Request for educational license for PyCharm #18492

There are several files in the request, along with file.zip. It must not be there. Please remove file.zip and make pull request again.  I have to close this request without merging. Thank you for your understanding.

So, where is the license?


Book 13 work with external articles

Add logic for checking and adding default assets folders for back end

Refactor social auth services

Check problems with images in articles from onliner


Point devs to how to set args when launching

Not sure if the formatting will work for comments. But here it is :)
cc @devoncarew

Thanks! One slight tweak to the text.

fixed!


feat: provide upgrade sub command for egctl

Description:
Provide upgrade feat for egctl, thereby enhancing
[optional Relevant Links:]
comes from: comment

+1


Base stat/expr checking on the type system in IRChecker

This allows us to remove some duplicate code for trees that can be in both statement or expression position.

Note that typecheckExpect at this point essentially encodes the notion that AnyType <:< NoType. We might go one step further and put this into Types.isSubtype itself.

Note that typecheckExpect at this point essentially encodes the notion that AnyType <:< NoType. We might go one step further and put this into Types.isSubtype itself.

It's worth investigating, at least.

Hmmm... this might expose some genuine failures. In fact, in this version the IR checker is much stricter: It expects intermediate trees to be properly typed as well. Consider:
Block(
  If(<cond>, IntLiteral(1), Skip()),
  IntLiteral(2)
)

In the previous version of the IR checker, the If node may have any (!) type, even something completely unrelated. This new version will fail (correctly so IMO), if the If subtree isn't properly typed; independent of its usage.
For example this failure:
scala-js/javalib/src/main/scala/java/util/regex/GroupStartMapper.scala(447:9:If): any expected but <notype> found for tree of type org.scalajs.ir.Trees$Block

hints at that being the problem.
The relevant if block:
https://github.com/scala-js/scala-js/blob/46d094daa1576969fdd4948bf7a7571d9db1b156/javalib/src/main/scala/java/util/regex/GroupStartMapper.scala#L447-L481
if ((baseNode !== null)) {
  val x1$2{x1}: char = this.java.util.regex.GroupStartMapper$Parser::pattern.charAt;I;C(this.java.util.regex.GroupStartMapper$Parser::pIndex);
  match (((int)x1$2)) {
    case 43 | 42 | 63:
      {
        val startIndex$3{startIndex}: int = this.java.util.regex.GroupStartMapper$Parser::pIndex;
        if ((((int)this.java.util.regex.GroupStartMapper$Parser::pattern.charAt;I;C((startIndex$3 +[int] 1))) ==[int] ((int)'?'))) {
          this.java.util.regex.GroupStartMapper$Parser::pIndex = (this.java.util.regex.GroupStartMapper$Parser::pIndex +[int] 2)
        } else {
          this.java.util.regex.GroupStartMapper$Parser::pIndex = (this.java.util.regex.GroupStartMapper$Parser::pIndex +[int] 1)
        };
        val repeater: java.lang.String = this.java.util.regex.GroupStartMapper$Parser::pattern.substring;I;I;Ljava.lang.String(startIndex$3, this.java.util.regex.GroupStartMapper$Parser::pIndex);
        sequence["push"](new java.util.regex.GroupStartMapper$RepeatedNode().<init>;Ljava.util.regex.GroupStartMapper$Node;Ljava.lang.String;V(baseNode, repeater)).asInstanceOf[int]
      };
    case 123:
      {
        val startIndex$4{startIndex}: int = this.java.util.regex.GroupStartMapper$Parser::pIndex;
        this.java.util.regex.GroupStartMapper$Parser::pIndex = (this.java.util.regex.GroupStartMapper$Parser::pattern.indexOf;Ljava.lang.String;I;I("}", (startIndex$4 +[int] 1)) +[int] 1);
        if ((((int)this.java.util.regex.GroupStartMapper$Parser::pattern.charAt;I;C(this.java.util.regex.GroupStartMapper$Parser::pIndex)) ==[int] ((int)'?'))) {
          this.java.util.regex.GroupStartMapper$Parser::pIndex = (this.java.util.regex.GroupStartMapper$Parser::pIndex +[int] 1)
        };
        val repeater$2{repeater}: java.lang.String = this.java.util.regex.GroupStartMapper$Parser::pattern.substring;I;I;Ljava.lang.String(startIndex$4, this.java.util.regex.GroupStartMapper$Parser::pIndex);
        sequence["push"](new java.util.regex.GroupStartMapper$RepeatedNode().<init>;Ljava.util.regex.GroupStartMapper$Node;Ljava.lang.String;V(baseNode, repeater$2)).asInstanceOf[int]
      };
    default:
      {
        val sequenceLen: int = sequence["length"].asInstanceOf[int];
        if ((sequenceLen !=[int] 0) && baseNode.isInstanceOf[java.util.regex.GroupStartMapper$LeafRegexNode] && sequence[(sequenceLen -[int] 1)].isInstanceOf[java.util.regex.GroupStartMapper$LeafRegexNode]) {
          val fused: java.util.regex.GroupStartMapper$LeafRegexNode = new java.util.regex.GroupStartMapper$LeafRegexNode().<init>;Ljava.lang.String;V((sequence[(sequenceLen -[int] 1)].asInstanceOf[java.util.regex.GroupStartMapper$LeafRegexNode].regex;Ljava.lang.String() +[string] baseNode.asInstanceOf[java.util.regex.GroupStartMapper$LeafRegexNode].regex;Ljava.lang.String()));
          sequence[(sequenceLen -[int] 1)] = fused;
          (void 0)
        } else {
          sequence["push"](baseNode).asInstanceOf[int]
        }
      };
  }
} else {
  (void 0)
}

is in statement position, so the inner block may indeed be a statement. However, the If might end-up being typed as any, hence the failure. This is only a hypothesis at this point. I couldn't reproduce this with a smaller example.

Ouch, that would be bad. It seems like a plausible explanation to me, though. I wouldn't be surprised if scalac left If nodes typed as Object if one of the branches is () but the other isn't; and I wouldn't be surprised if we didn't do anything about it.

Yes, adjusting printers to print the type, confirms this:
if [any] ((baseNode !== null)) {

Further, it is interesting to observe that the else branch actually contains (void 0) rather than a Skip() (and hence not being printed).

I'm coming back to this, after fixing the underlying problems. We'll probably need to put a deser hack in place, that changes the type of the following trees to NoType, if they are in statement position:

If
TryCatch
Match

We have two ways to do this:

When we read each individual tree => nicely local, but wiring to get stat/expr pos or not is non-local, and duplicates the transformer logic. Further, we must not use it for non-hack deser logic.
Post read, using a Transformer => Transformer keeps track of stat/expr pos for us, but now we need to intercept the reading sites (in readClassDef / readMemberDef).

That seems like a good analysis. Overall I think I prefer the second option. It seems to be less intrusive to the design of the deserializer. It is also probably more efficient for reading newer IR (version 1.6+).

@gzm0 I updated the PR with:

Rebase, and fix conflicts
The new IR checker comes first, with a deser hack
It is followed by the compiler fix, conditioning the deser hack
Also apply the fix to TryCatch nodes, to make run/interpolationMultiline2.scala pass

Updated.


feat(Analysis/Convex): homeomorphism to the ball

Prove that for a convex bounded set s with nonempty interior,
there exists a homeomorphism
that sends interior s to ball 0 1 and closure s to closedBall 0 1.
Motivated by lemmas in Shamrock-Frost/BrouwerFixedPoint

[ ] depends on: #10134
[ ] depends on: #10135

@Shamrock-Frost, do you want to add yourself as a co-author?

I think @Shamrock-Frost proved the same thing (see Zulip) so pinging him


Support certificates configuration in TLSStore CRD

What does this PR do?
This pull request allows adding certificates to a TLSStore (as of now, only to the default one) by using the TLStore CRD.
Motivation
Fixes #7880
More

[X] Added/updated tests
[X] Added/updated documentation

Additional Notes
Co-authored-by: Romain<EMAIL_ADDRESS>

is it possible to make a key (secret) per domain?

Hello @pkarrot,

is it possible to make a key (secret) per domain?

Yes, with the new certificates property, it is possible to define multiple Kubernetes secrets containing a TLS certificate which will be added to the default TLS store.

Hi @pkarrot, how do i typically know which https://hub.docker.com/_/traefik?tab=tags docker tag will the be merged to ? I just tried with the following Helm Values:

image:
  name: traefik
  pullPolicy: Always
  tag: v2.8

pilot:
  enabled: false

I still get the following:
 error validating data: ValidationError(TLSStore.spec): unknown field "certificates" in us.containo.traefik.v1alpha1.TLSStore.spec; if you choose to ignore these errors, turn validation off with --validate=false

Btw, I did a helm helm uninstall --namespace=traefik traefik and then:
helm install --namespace=traefik \
  --values=values/traefik-values.yaml \
  traefik \
  traefik/traefik

to upgrade from an older version of Traefik.
Any advise?

Ok so it may just be an issue with my Helm Install. I tried the following and the new CRD's seem to work just fine.
kubectl apply -f https://raw.githubusercontent.com/traefik/traefik/v2.8/docs/content/reference/dynamic-configuration/kubernetes-crd-definition-v1.yml
kubectl apply -f https://raw.githubusercontent.com/traefik/traefik/v2.8/docs/content/reference/dynamic-configuration/kubernetes-crd-rbac.yml


Bug: cursor in the code editor jumps to the top while typing.

What did you do?
In the code editor, I selected the code path preview option in the right pane and began typing some code.
What did you expect to happen?
The cursor should move smoothly and as intended while typing, without jumping to the top.
What actually happened?
When I started typing in the code editor, the cursor jumped to the top.
https://github.com/user-attachments/assets/e69dee87-64db-4a6a-97e3-093441e38fa9
Participation

[x] I am willing to submit a pull request for this issue.

Additional comments
No response

That is strange. I've tried on Firefox and Edge on Windows, but I'm not seeing this behavior. Do you have any browser extensions enabled that might cause this?


[doc] Expand tutorials

Codecov Report

Merging #1692 (231d817) into master (cbc5bd1) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #1692   +/-   ##
=======================================
  Coverage   87.21%   87.21%
=======================================
  Files          45       45
  Lines        7546     7546
=======================================
  Hits         6581     6581
  Misses        965      965

Impacted Files
Coverage Δ

reframe/frontend/executors/policies.py
99.33% <0.00%> (ø)

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 cbc5bd1...231d817. Read the comment docs.

Codecov Report

Merging #1692 (231d817) into master (cbc5bd1) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #1692   +/-   ##
=======================================
  Coverage   87.21%   87.21%
=======================================
  Files          45       45
  Lines        7546     7546
=======================================
  Hits         6581     6581
  Misses        965      965

Impacted Files
Coverage Δ

reframe/frontend/executors/policies.py
99.33% <0.00%> (ø)

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 cbc5bd1...231d817. Read the comment docs.

docs/tutorial_advanced.rst
typo on line 158 (configuration)

docs/tutorial_advanced.rst
typo on line 158 (configuration)

Hello @vkarak, Thank you for updating!

In the file tutorials/deps/osu_benchmarks.py:

Line 120:80: E501 line too long (99 > 79 characters)

Do see the ReFrame Coding Style Guide

Hello @vkarak, Thank you for updating!

In the file tutorials/deps/osu_benchmarks.py:

Line 120:80: E501 line too long (99 > 79 characters)

Do see the ReFrame Coding Style Guide


Update pureconfig, pureconfig-core, ... to 0.17.5

About this PR
📦 Updates

com.github.pureconfig:pureconfig
com.github.pureconfig:pureconfig-core
com.github.pureconfig:pureconfig-generic
com.github.pureconfig:pureconfig-generic-base

from 0.17.4 to 0.17.5
📜 GitHub Release Notes - Changelog - Version Diff
Usage
✅ Please merge!
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

⚙ Adjust future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "com.github.pureconfig" } ]

Or, add this to slow down future updates of this dependency:
dependencyOverrides = [{
  pullRequests = { frequency = "30 days" },
  dependency = { groupId = "com.github.pureconfig" }
}]

labels: library-update, early-semver-minor, semver-spec-patch, commit-count:1

Superseded by #414.


Is the SSO support GA already?

Hi Team,
Is the SSO support GA already?
We can use it in production right?
Thanks!

@kafka-yu , Yes it is available for web and desktop. Mobile will be available soon.

Thank you! @Subhasish-msft
BTW, I have another question, it is very appreciated if you can help look https://github.com/MicrosoftDocs/msteams-docs/issues/1898
Thank you!!


Heads-up: repo can't be installed with Node.js 22

Provide your feedback here.
The repository fails to install on Node.js 22, soon to become a widely used LTS version.
The cause is eslint-plugin-jsdoc which has engines specified as "node": "^14 || ^16 || ^17 || ^18 || ^19". Latest version, in turn, has it set to "node": ">=18", while minimum Node.js version currently supported by this repo for development is 14.15.0.
🔦 Context
This can cause unnecessary disruptions for collaborators.
💻 Code Sample
No response
Version
n/a
What browsers are you seeing the problem on?
Other
If other, please specify
n/a
What operating system are you using?
macOS Sonoma

Unfortunately it looks like more than just eslint-plugin-jsdoc is problematic. node-gyp and everything which depends on it fails.
One of the things depending on node-gyp is lerna, which we should be able to remove once we update to Yarn 4
PR to discover issues here: https://github.com/adobe/react-spectrum/pull/6385


Export VG metrics as well under thinpool subsystem

What should the feature do:

thinpool subsytem should also send vg data points
below is the minimal diff for the anticipated changes

diff --git a/lvmd/proto/lvmd.proto b/lvmd/proto/lvmd.proto
index 11b547c6..f7cacbb2 100644
--- a/lvmd/proto/lvmd.proto
+++ b/lvmd/proto/lvmd.proto
@@ -79,6 +79,8 @@ message ThinPoolItem {
   double data_percent = 1; // Data percent occupied on the thinpool, used for monitoring.
   double metadata_percent = 2; // Metadata percent occupied on the thinpool, used for monitoring.
   uint64 overprovision_bytes = 3; // Free space on the thinpool with overprovision, used for annotating node.
+  uint64 vg_size_bytes = 4; // Size of volume group that this thinpool belongs to.
+  uint64 vg_free_bytes = 5; // Free space of volume group that this thinpool belongs to.
 }

 // Represents the response corresponding to device class targets.
diff --git a/runners/metrics_exporter.go b/runners/metrics_exporter.go
index 9d6e9b97..45132b8c 100644
--- a/runners/metrics_exporter.go
+++ b/runners/metrics_exporter.go
@@ -44,6 +44,8 @@ type thinPoolMetricsExporter struct {
        tpSizeBytes     *prometheus.GaugeVec
        dataPercent     *prometheus.GaugeVec
        metadataPercent *prometheus.GaugeVec
+       vgSizeBytes     *prometheus.GaugeVec
+       vgFreeBytes     *prometheus.GaugeVec
 }

 type metricsExporter struct {

What is use case behind this feature:

when every device-class targets only thinpool we'll never send the metrics of volume group
if we have a dummy device-class corresponding to each thinpool target it'll not be a cleaner implementation
it's better if we can segregate vg metrics as well as part of thinpool subsystem so that admin can get overall idea of device-class by only looking a thinpool subsystem metrics family
we'll take the implementation if above sounds good or else pls comment on the alternatives, thanks.

I think it would be better to review #463 first, so we can discuss this issue after that is done.

@cupnes , this issue  is unrelated to the snapshot feature and should not require a lot of time to review. Can it be taken up in parallel?

when every device-class targets only thinpool we'll never send the metrics of volume group

We agree with outputting metrics of VG size and VG free for thin pool.
But we can output these metrics using available_bytes and size_bytes of volumegroup subsystem instead of added metrics. Is there any problem with this way of doing things?

@cupnes we thought of that approach as well, however in below scenario it didn't sound correct and so raised this issue
let's say:

We only support thinpool and no lv is allowed to create on the volume group
lvmd config file will have only device-classes[].device-class.thin-pool but no standalone vg
in this scenario if we want to send vg metrics as well then a dummy device-class(es) targeting vg should be created and also make sure pv creation on this vg is prohibited

so, as a gist, how best to get metrics of volume group if all device-classes targets thinpools?

@leelavg I understand that we cannot get metrics in the case of thinpool. I am thinking that it would be enough to set the available_bytes and size_bytes of the volumegroup subsystem in the case of thinpool without adding the grpc field.

With your scenario, I was able to reproduce the inability to export VG metrics with my proposal. Please give me some time before I answer this issue.

In your scenario, I was able to export the VG metrics.
$ curl -s http://localhost:8080/metrics | grep -E '^topolvm_(thinpool_size_bytes|volumegroup_available_bytes)'
topolvm_thinpool_size_bytes{device_class="ssd-thin",node="topolvm-example-worker"} 2.147483648e+09
topolvm_volumegroup_available_bytes{device_class="ssd-thin",node="topolvm-example-worker"} 0

The changes are in the following commit.
https://github.com/cupnes/topolvm/commit/7b6ccc93e8403a8185ec89197a7a5b221782b828
This commit is explained below.

runners/metrics_exporter.go

In the case of thinpool, VG FreeBytes are not exported, so I added a process to export them.

example/Makefile

I run this commit in the TopoLVM demonstration environment.
To apply the change, I set BUILD_IMAGE to true.

deploy/lvmd-config/lvmd.yaml

To reproduce your scenario, only thinpool VG is created.

How about this?

@cupnes

I understood your implementation and at the same it does seem a bit confusing (IMHO you'd also agree with that having a field will different meaning for different scenario)
My initial proposal was also not clean and we thought about it again
How about we separate the concerns of volume group and thinpool metrics like below

# gd lvmd
diff --git a/lvmd/proto/lvmd.proto b/lvmd/proto/lvmd.proto
index 11b547c6..f105047c 100644
--- a/lvmd/proto/lvmd.proto
+++ b/lvmd/proto/lvmd.proto
@@ -79,13 +79,14 @@ message ThinPoolItem {
   double data_percent = 1; // Data percent occupied on the thinpool, used for monitoring.
   double metadata_percent = 2; // Metadata percent occupied on the thinpool, used for monitoring.
   uint64 overprovision_bytes = 3; // Free space on the thinpool with overprovision, used for annotating node.
+  uint64 size_bytes = 4; // Size of the thinpool.
 }

 // Represents the response corresponding to device class targets.
 message WatchItem {
-    uint64 free_bytes = 1; // Free space in the device class.
+    uint64 free_bytes = 1; // Free space in the volume group.
     string device_class = 2;
-    uint64 size_bytes = 3; // Size of device class in bytes.
+    uint64 size_bytes = 3; // Size of volume group.
     ThinPoolItem thin_pool = 4;
 }

By above, we'll not be leaving out existing messages and they (free & size bytes) always refer volume group
And everything related to ThinPool will be concentrated in a different struct?
Irrespective of device-class target being VG or TP we always have unique deviceClass names and so we export above metrics under VG subsystem only with thinpool device class name.

This sounds like a good approach to me. @cupnes , what do you think?

Thank you for your response. But I have not yet checked your response. Please wait for few days.


subscription.stop method has no input, causing crash with superjson transformer

I noticed a crash when using this lib with superjson. The stack trace indicated that superjson.deserialize was being called with the input being undefined.
A little digging and console logging led me to notice that this was happening for subscription.stop methods (which are being emitted here: https://github.com/jsonnull/electron-trpc/blob/main/packages/electron-trpc/src/renderer/ipcLink.ts#L77-L80) because they don't have an input property.
Thus when the handleIPCOperation function picks this up on the main thread, it is calling deserialize on an empty object (here: https://github.com/jsonnull/electron-trpc/blob/main/packages/electron-trpc/src/main/handleIPCOperation.ts#L23).
Seems like this function needs to look for the presence of operation.input before calling deserialize, or else filter by the operation method if it is a stable API.

Hey @jthrilly, thanks so much for reporting this issue! I don't think I would have personally run into this anytime soon 😅
Sorry for the delay getting back to you... I've pushed a patch up and it's out now in<EMAIL_ADDRESS>Please let me know if you have any more issues. Thanks again!


queryFeesCollected  should be more or equal (queryFeeRebates + delegationFees)

As per fee distribution logic: queryFeesCollected > = queryFeeRebates + delegationFees
But if you query (for instance: id 0x5a8904be09625965d9aec4bffd30d853438a053e )
{
    allocations (orderBy: closedAtEpoch,  where: {
    indexer: "0x5a8904be09625965d9aec4bffd30d853438a053e",
    status = Claimed
  }) {
      id
    status
    queryFeesCollected
    queryFeeRebates
    closedAtEpoch
    delegationFees
    effectiveAllocation
    allocatedTokens
    }
}

you will find that almost in all cases (41 out of 49 ) queryFeesCollected < queryFeeRebates + delegationFees
Could you please take a look into this.

Thank you! Great investigation work. I took a quick look but could not find anything. Seems like it could be a bug .
I am too busy this week to check it out, waiting until Ariel gets back from holiday. Maybe this week @juanmardefago could take a quick look into it. If not, I will look next week

Because of the way the rebate formula works the following statement is not always true queryFeesCollected < queryFeeRebates + delegationFees.
When there is a rebate claim the rebate formula does:
reward = (indexerFees/totalFees)^(alpha) * (indexerAllocation/totalAllocation)^(1-alpha) * totalFees

Being:

IndexerFees: tokens collected from queries on the indexer allocation
TotalFees: total tokens collected for all queries for allocations closed in the epoch
IndexerAllocation: effective allocated tokens by the allocation (amount of tokens * number of epochs from start to close)
TotalAllocation: sum of all effective tokens allocated from all allocations closed in the epoch
Alpha: Rebate ratio configuration that weights capital and work. Capital meaning tokens allocated and work meaning fees collected from queries. This is currently 0.77

Depending on the relationship between those variables the rewards can be higher or lower, sometimes even higher than the indexerFees if the indexer has a better work to capital ratio than other indexers.

What I am saying that correct relatonship should be queryFeesCollected >= queryFeeRebates + delegationFees,
where
queryFeeRebates + delegationFees = reward = (indexerFees/totalFees)^(alpha) * (indexerAllocation/totalAllocation)^(1-alpha) * totalFees
I that correct?

Unfortunately, no that relationship is not correct. The cobbs douglas formula (i.e. the reward formula), will return query fee rebates that could be very different from the query fees collected.
The reason I thought it still may be a subgraph bug is because we still only have 1 subgraph in the network. Which reduces the dynamism of this calculation. Still, Ariel could be right, that the formula is working as intended. We need to dig into it a big deeper to confirm if it is right, or find a bug if it is wrong

I see.
So, for example (roughly), reward (queryFeeRebates + delegationFees) cacluclation would look like:
|   | K, indexer/total
-- | -- | --
Indexer Fee Collected | 33.5 | 0.095
Indexer Allocation | 464 000 000 | 0.29
Total Collected | 345 |
Total Allocation | 1 600 000 000 |
  |   |
Final K, Cobb | 0.1228 |
Reward | 42.36 |  0.1228 x 345

The queryFeesCollected and rebates fields are not calculated within the subgraph, since they just use the same values provided by the contracts in the events. I don't think that it's a subgraph bug.
Collect: https://github.com/graphprotocol/contracts/blob/master/contracts/staking/Staking.sol#L926
Claim: https://github.com/graphprotocol/contracts/blob/master/contracts/staking/Staking.sol#L1200
Having said that, my understanding of the Cobb-Douglas function is that the rebates can be higher or lower than the collected fees, depending on your performance within the function, but it should be a zero sum game, right? @abarmat
If so, we could probably check that, and if it's not the case then it probably is an error within the subgraph, although it doesn't seem likely since from what I could see, it's just using the value sent by the event and adding it whenever necessary.

So, let's say if we take Epoch 39 and sum all query rewards across all claimed allocations for this epoch, the total should be equal query fees collected - 10% (curator reward).
Is that correct?
The only issue is some allocation can be "Unclaimed" yet.

I think so, it might not be a zero sum within a single epoch though, as allocations can generate rewards within various epoches, so I'll have to double check that too. @davaymne

An allocation generates rewards across various epochs but for the purpose of the rebate calculations it is done on the epoch when the allocation was closed. The way the cobbs-douglas formula works could make that not all allocations are optimally claimed due to the proportion of capital to work ratio. Even if all the allocations on the rebate pool for a particular epoch are claimed there could be a remainder of tokens, so not always sum of query fees collected = sum of claimed rewards, the remainder is burnt on the last claimed allocation.

An allocation generates rewards across various epochs but for the purpose of the rebate calculations it is done on the epoch when the allocation was closed. The way the cobbs-douglas formula works could make that not all allocations are optimally claimed due to the proportion of capital to work ratio. Even if all the allocations on the rebate pool for a particular epoch are claimed there could be a remainder of tokens, so not always sum of query fees collected = sum of claimed rewards, the remainder is burnt on the last claimed allocation.

So, on a big picture scale: queryFeesCollected >= queryFeeRebates + delegationFees (considering the totals on the whole network), right?
Epoch by epoch we might not draw any conclusions because of what you just described, but on the totals there could never be more rebates than collected query fees

I think, in total formula queryFeesCollected >= queryFeeRebates + delegationFees across allocations in epoch could be correct, but not for particular allocation


Update Rotation Animation

Description
We have a motion designer now! Per request of design team we are updating some of our existing animations to be better.
Acceptance Criteria

Rotation animation to update from -135degress to 45 degrees, 1 second long, while position update takes .87 seconds.

(Screen shot of slide deck as of May 19, 2021 12PM PST)

https://docs.google.com/presentation/d/1Ny9o8qAiVmiQiJ4_wSIOhInBM_h2_O5p_IlfZT-xi0E/edit#slide=id.gdb3242d678_0_21

We can't apply easing like this directly since we're constrained to beziers and keyframes. we can do our best to recreate it tho using beziers and keyframes

Just commenting on here. We can't set the final angle at all. Breaks the first rule of our animations:

Animations final position must be the static position the user set

That being said, gonna make the amount it rotates 135deg + 45deg = 180deg  so it travels the same amount of rotation as what was requested

Verified in QA


CAN YOU INTEGRATE FB MESSAGING INTO OSX MESSAGES?

Hi,
I've just discovered that FB is pulling Jabber usage so I can no longer use the FB account on OSX Messages. Instead of a separate app, is there a way to instead make an add-on that works in Messages, to bring logging into an account again? That would be so useful.
I hope you find a solution and stop this FB stupidity of taking out basic functionality from apps.
Thanks!

I do not think that this is aim of this project. This is a standalone native client for messenger.com, not an add-on for Apple's Messages

Coolio. I must say it is much better than the Jabber equivalent in Messages. But if someone chooses to make a plug-in for Messages, that would be terrific. :)

invalid