Add cmake install target

I added a cmake install target that installs the libraries, headers and the CLI binaries to CMAKE_INSTALL_PREFIX.
This is how I built and installed luau with this PR (on a linux machine):
cmake -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo -G Ninja -DCMAKE_INSTALL_PREFIX=$PWD/build/install
cmake --build build
cmake --install build

Sorry for not working on this lately. I almost forgot that I need to change CMAKE_SOURCE_DIR here to CMAKE_CURRENT_SOURCE_DIR so that it works inside of FetchContent or add_subdirectory.

I forgot that cmake projects tend to provide some kind of .cmake file that can be used with find_package. I will try to figure this out soon.

I have added find_package support, however it requires a few additional changes to the CMakeLists.txt file to provide the ability to require a minimum version of Luau. This would have to be updated every time a new version is released.
If Luau is not found it will error when configuring an example project. The prefix required for CMake to find Luau can be specified with CMAKE_PREFIX_PATH or specified in a FindLuau.cmake file that is able to be included with CMAKE_MODULE_PATH.
cmake_minimum_required(VERSION 3.27)
project(test LANGUAGES CXX VERSION 0.0.1)

find_package(Luau REQUIRED)

add_executable(test main.cpp)
target_link_libraries(
	test PRIVATE
	Luau.VM
	Luau.Compiler
	Luau.Ast
	Luau.Config
	Luau.CodeGen
	Luau.Analysis
)
target_compile_features(test PRIVATE cxx_std_23)

I wonder if the lua*.h headers should be installed to include/Luau instead of include so that it doesn't conflict with existing lua headers.


Move Calendar to floating sidebar

Moves calendar to the floating sidebar and reworks useSidebar to not depend on the components that are rendered in the content.

Note that there is currently a discussion on the calendar still needing to be directly under the field and just not having to be contained in the sidebar but always being on top of everything:
https://github.com/google/web-stories-wp/issues/788#issuecomment-607378855
Likely this will need some reworking again unless we'd want to merge it as-is to alpha and follow up ASAP in a separate PR.

Should the arrow change direction when clicked. See https://material-components.github.io/material-components-web-catalog/#/component/select

Closing as superseded by #986


Updated Reporter code

Updated popupUtils

To resolve the Arcade expression involving map and layer
To use async executor
Updated related components using this utils

Implemented code review comments from previous pull request

Working sample for Feature-list
Working sample for Layer-list
More than one attribute to list on separate lines

Updated Reporter for map view only prop

Emit event togglePanel
Removed extra code related to map container
Updated Sample to pass mobile prop and listen togglePanel event

@sumitzarkar can we avoid running the query again when we switch between mobile and desktop?

@sumitzarkar can we avoid running the query again when we switch between mobile and desktop?

@jmhauck
Seems like these queries are fired by the api as the map is resized


User search not working as intened

The input lags behind 1 search. Please see the video to see this issue.
https://github.com/epicweb-dev/epic-stack/assets/61059807/9946cedf-e1f7-4230-94ea-04413a6db971
I couldn't reproduce this issue in a codesandbox
I don't know what's causing it. I've tried creating a new search box, removing debounce, using a fetcher, etc but nothing solved. Only using HTML form solved it as it refreshes the whole page but that isn't a good UX either.

Thanks for reporting this @arpitdalal.
This is the last straw for me with the dev tools. I'm tired of the issues that keep coming up as a result of them. I've removed them and don't plan on adding them back. Very disappointing.

Too bad it's remix dev tools. Is there an issue opened on its repo for this behaviour?

Not that I know of. Sorry.

Too bad it's remix dev tools. Is there an issue opened on its repo for this behaviour?

will look into this

@arpitdalal the issue has been resolved with v3!


Support new Philips Hue Entertainment API

I currently have a good working Hyperion Setup on a Rasberry PI Zero and LED Strips on my TV. I also have the Philips Hue White and Ambiance lights all throughout my living room. Philips Hue finally announced the API for spatial lights and was curious if this could be intergrated in to the project. I am a developer and can help out. Any ideas?
https://developers.meethue.com/entertainment-blog
https://developers.meethue.com/content/huestacean-low-latency-screen-sync-using-entertainment-api
https://www.reddit.com/r/Hue/comments/7pi19t/heads_up_hue_entertainment_api_is_now_available/

This would be cool - not for me, but for others
I can help tho - I’ve done a bit of Hyperion led device driver worn previously.
I’d recommend doing it for https://github.com/hyperion-project/hyperion.ng/pulse
As it will replace Hyperion classic at some point.
Alll the existing drivers are here:
https://github.com/hyperion-project/hyperion.ng/tree/master/libsrc/leddevice

Awesome! I'll check it out.

Does it happen if you ssh into the pi? Or the pi directly output video?

Im logged into the pi via ssh to start Hyperion
Then i start a video in Kodi and the screen turns black

Gotcha, I don't use Kodi because I use a video grabber. Make sure the PI is getting plenty of power. It may be going black because of that. I had something similar happen on Retro PI

YouTube are right. Wirth another power supply it is better

Hey @zlokomatic , out of interest, how is the development going?
This would fit nicely on a Raspberry zero.

I already pushed it in my fork
https://github.com/zlokomatic/hyperion if you want to try it and did not switch to hyperion.ng yet.
In the config you need to provide the type phillipshueentertainment, the username, clientkey and groupId from the hue api.
Get the username and key from the api with:
{     "devicetype":"hyperion#pi",     "generateclientkey":true }
I just started porting it to .ng but as time is always limited i dont think i will have  it pushed before the end of the week.

Hey @zlokomatic,
Very nice work indeed. The difference is amazing! I'm using the v4l2 grabber method on a Pi and the instructions provided worked great. The only variation was that the libmbedtls-dev package was required for I assume the clientkey part. Also there was a typo in the device type that tripped me up, it should be "philipshueentertainment" with 1 "l".
In my device section I have also commented out "transitiontime","lightIds" and "switchOffOnBlack" as I assume these are now redundant.
Do you have any further tips on optimising the config for the new API now that we can send more requests to the bridge i.e. smoothing and capture frequencies. I'm also assuming the location settings for Entertainment lights in the Hue App have no effect so the "leds" config section can stay as is.
Thanks again.

@zlokomatic @jazz1138
Could you provide a guide how I can test this on my raspberry?
Currently I have hyperion running for a led strip and additionally for a PhilipsHue-Device. I set it up as described here: https://hyperion-project.org/wiki/PhilipsHue-Device
How do I install hyperion from your fork? Can you provide the part of the config for the Philips Hue Entertainment device?

Hopefully, Philips Hue Integrates directly with Xbox One and PS4. They just launched support for MacOS and Windows so we are getting close. Hyperion support, of course, would be best.

If you are able to compile hyperion then just checkout my repository, install libmbedtls-dev
and compile.
To generate the username and clientkey to a POST request to http://<ip-address.of.the.bridge>/api
with body:
{
    "devicetype":"myapplication#myiphone",
    "generateclientkey":true
}

Get the groupId of the Entertainment group with a
GET request to http://<ip-address.of.the.bridge>/api/<username>/groups/
Now in the hyperion.conf.json
        "device" :
        {
                "name"       : "HueConfig",
                "type"       : "philipshueentertainment",
                "output"     : "\<ip-address.of.the.bridge\>",
                "username"     : "",
                "clientkey"     : "",
                "colorOrder" : "rgb",
                "groupId"   : 5
        },

Im not able to compile it myself. Will this be merged sometime?
How do I install libmbedtls-dev and qt4 to be able to compile?

Sorry i dont know osmc but you could try getting it from
https://github.com/ARMmbed/mbedtls and compile it manually

This is really much appreciated. I would also love to see a guide for this! <3

@zlokomatic Can you please create a pull request with your changes?

Quickstart guide
Here's a quick rundown of how I built this. It is not a complete guide but should be enough to get you started. Hope it helps.
My setup:
RPi 2 running (minimal) Raspbian GNU/Linux 9.4 (stretch)
Fushicai usbtv007 USB capture device
Get dependencies
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install git cmake build-essential libqt4-dev libusb-1.0-0-dev python-dev \
libxrender-dev python libmbedtls-dev
Set environment variables
export HYPERION_DIR="hyperion-master"
export FIRMWARE_DIR="raspberrypi-firmware"
Clone repo
git clone --recursive https://github.com/zlokomatic/hyperion.git "$HYPERION_DIR"
git submodule init
git submodule update
Create build directory
mkdir "$HYPERION_DIR/build"
cd "$HYPERION_DIR/build"
Generate make files with Hue Entertainment enabled
cmake -DENABLE_HUEENTERTAINMENT=ON -DCMAKE_BUILD_TYPE=Release -DPLATFORM="rpi-pwm" -Wno-dev ..
Build hyperion
make -j $(nproc)
Remove non-release files, copy binaries to /usr/bin
Create effects folder and copy effects.
strip bin/*
sudo cp ./bin/hyperion-remote /usr/bin/
sudo cp ./bin/hyperiond /usr/bin/
sudo mkdir -p /opt/hyperion/effects && sudo cp -R ../effects/ /opt/hyperion/

@zlokomatic
At first, thank you for the great work!!!

I just started porting it to .ng but as time is always limited i dont think i will have it pushed before the end of the week.

I know time is always limited, but I'm very interested in your hyperion.ng port ;)
When can we expect your push, because the targeted end of the week lays more than one month in the past ;) #nopressure THX

@SJunkies you are right. I didnt have the time to get stuff done on hyperion.ng but i pushed what i have done so far. Porting to ng is much more work than i initially thought but it should already be working more or less. I cant really tell because i dont have the time to test atm :/

@zlokomatic great thx!!! 🥇I will try out your repository next weekend. 👍

i really don't know what the f... im doing, don't get me wrong i have experience but the howtwo is to less.
can someone please help me out here,
i have tried everything from openelec to osmc to raspbian.
i can get the user and group id with the api but i don't know how my config should look after the install.
just the entrys from zlokomatic? please someone help me

@kingunlim Here is my working config.json :
`{
// DEVICE CONFIGURATION
"device" :
{
"name"       : "HueConfig",
"type"       : "philipshueentertainment",
"output"     : "",
"username"     : "",
"clientkey"     : "",
"colorOrder" : "rgb",
"groupId"   :
},
// COLOR CALIBRATION CONFIG
"color" :
{
"transform" :
[
{
"id"   : "default",
"leds" : "*",
"hsv" :
{
"saturationGain" : 1.0000,
"valueGain"      : 1.0000
},
"red" :
{
"threshold"  : 0.0000,
"gamma"      : 1.0000,
"blacklevel" : 0.0000,
"whitelevel" : 1.0000
},
"green" :
{
"threshold"  : 0.0000,
"gamma"      : 1.0000,
"blacklevel" : 0.0000,
"whitelevel" : 1.0000
},
"blue" :
{
"threshold"  : 0.0000,
"gamma"      : 1.0000,
"blacklevel" : 0.0000,
"whitelevel" : 1.0000
}
}
],
"smoothing" :
{
"type"            : "linear",
"time_ms"         : 200,
"updateFrequency" : 20.0000
}
},
    // BLACKBORDER CONFIG
    "blackborderdetector" :
    {
            "enable" : true,
            "threshold" : 0.38,
            "unknownFrameCnt" : 600,
            "borderFrameCnt" : 50,
            "maxInconsistentCnt" : 10,
            "blurRemoveCnt" : 1,
            "mode" : "default"
    },

// BOOTEFFECT CONFIG
"bootsequence" :
{
	"color" : [0,0,0],
	"effect" : "Rainbow swirl fast",
	"duration_ms" : 3000,
	"priority" : 700
},

// JSON SERVER CONFIG
"jsonServer" :
{
	"port" : 19446
},

// PROTO SERVER CONFIG
"protoServer" :
{
	"port" : 19447
},

// EFFECT PATH
"effects" :
{
	"paths" :
	[
		"/storage/hyperion/effects",
		"/usr/share/hyperion/effects"
	]
},

// NO FRAME GRABBER CONFIG
// NO KODI CHECK CONFIG
// NO BOBLIGHT SERVER CONFIG
// NO JSON/PROTO FORWARD CONFIG

// LED CONFIGURATION
"leds" :
[
	{
		"index" : 1,
		"hscan" : { "minimum" : 0.0000, "maximum" : 0.2000 },
		"vscan" : { "minimum" : 0.0000, "maximum" : 0.2000 }
	},
	{
		"index" : 3,
		"hscan" : { "minimum" : 0.8000, "maximum" : 1.0000 },
		"vscan" : { "minimum" : 0.0000, "maximum" : 0.2000 }
	},
	{
		"index" : 0,
		"hscan" : { "minimum" : 0.8000, "maximum" : 1.0000 },
		"vscan" : { "minimum" : 0.8000, "maximum" : 1.0000 }
	},
	{
		"index" : 2,
		"hscan" : { "minimum" : 0.0000, "maximum" : 0.2000 },
		"vscan" : { "minimum" : 0.8000, "maximum" : 1.0000 }
	}
],

"endOfJson" : "endOfJson"

}
`
This config has no frame grabber information because I am running it as a secondary Hyperion instance. It receives frame information forwarded by they primary instance using this entry in the primary config.json:
"forwarder" : {   "proto" : [ "<IP_ADDRESS>:19447" ],   "json"  : [ "<IP_ADDRESS>:19446" ] },
This should help you put together your own config.

Ok, I’ll start from scratch now:
First i’ll flash my raspberry again with raspbian?
after that, i’ll go on with your first quickstart quide @croaker-1 ?
I must first do all your steps, after the last points: Create effects folder and copy effects.
I must edit my hyperion.conf.json file like yours but with my edits,
I make a conf file and edit it with my changes that i get before like @zlokomatic said.
"name"       : "HueConfig",
"type"       : "philipshueentertainment",
"output"     : "",
"username"     : "",
"clientkey"     : "",
"colorOrder" : "rgb",
"groupId"   :
And put the conf file in which directory?
I don’t have a usb grabber or anything just the raspberry and the hue lamps with hue bridge v2 with entertainment group.
Does your config work form me?
How can i start the hyperion plugin after that, i think i must start it again after every reboot?
How can i test the plugin, just install kodi and start a movie?
Thanks for your help.

i don't know i make everything as i said in my previous post, but i don't think hyperion ist installed after i follow the quickstart guide from @croaker-1
because i just see a folder unter /home/pi/hyperion-master
is this the right path?
can someone please help me out, as i said i just want to install hyperion with the new entertainment groups under raspian and i have kodi installed and want to config the grabber for this kodi invironment.

ok, i'll reinstall everything again ;(
@croaker-1
1.
can you please tell me, is there anything i must do after i attempt all steps from your quickstart guide, other than put my hyperion.config.json file in the right location?

as i see your quickstart guide pulled the hyperion install from the @zlokomatic repo git,
so the paths are different?
normally hyperion would install itself to /pi/home/hyperion
but this script will install to /pi/home/hyperion-master

is there anything differnt to the normal hyperion installation, for example:
can i connect with HyperCon.jar to check my configs and stop and start hyperion?

maybe you can also have a look at my posted config file here to check if everything is ok, it should  grabb my kodi instance on the same pi

the finish steps would be that my raspberry would grab the kodi from my secound amazon fire tv device if its possible but this is the future plan.
my config file:

{
// DEVICE CONFIGURATION
"device" :
{
"name"       : "HueConfig",
"type"       : "philipshueentertainment",
"output"     : "192.168.",
"username"     : "wAGylqqkqt",
"clientkey"     : "9348956",
"colorOrder" : "rgb",
"groupId"   : 2
},
// COLOR CALIBRATION CONFIG
"color" :
{
"transform" :
[
{
"id"   : "default",
"leds" : "*",
"hsv" :
{
"saturationGain" : 1.0000,
"valueGain"      : 1.0000
},
"red" :
{
"threshold"  : 0.0000,
"gamma"      : 1.0000,
"blacklevel" : 0.0000,
"whitelevel" : 1.0000
},
"green" :
{
"threshold"  : 0.0000,
"gamma"      : 1.0000,
"blacklevel" : 0.0000,
"whitelevel" : 1.0000
},
"blue" :
{
"threshold"  : 0.0000,
"gamma"      : 1.0000,
"blacklevel" : 0.0000,
"whitelevel" : 1.0000
}
}
],
"smoothing" :
{
"type"            : "linear",
"time_ms"         : 200,
"updateFrequency" : 20.0000
}
},

    // BLACKBORDER CONFIG
    "blackborderdetector" :
    {
            "enable" : true,
            "threshold" : 0.38,
            "unknownFrameCnt" : 600,
            "borderFrameCnt" : 50,
            "maxInconsistentCnt" : 10,
            "blurRemoveCnt" : 1,
            "mode" : "default"
    },

// BOOTEFFECT CONFIG
"bootsequence" :
{
	"color" : [0,0,0],
	"effect" : "Rainbow swirl fast",
	"duration_ms" : 3000,
	"priority" : 700
},

// JSON SERVER CONFIG
"jsonServer" :
{
	"port" : 19446
},

// PROTO SERVER CONFIG
"protoServer" :
{
	"port" : 19447
},

// EFFECT PATH
"effects" :
{
	"paths" :
	[
		"/storage/hyperion/effects",
		"/usr/share/hyperion/effects"
	]
},

// NO FRAME GRABBER CONFIG
// NO KODI CHECK CONFIG
// NO BOBLIGHT SERVER CONFIG
// NO JSON/PROTO FORWARD CONFIG

// LED CONFIGURATION
"leds" :
[
	{
		"index" : 1,
		"hscan" : { "minimum" : 0.0000, "maximum" : 0.2000 },
		"vscan" : { "minimum" : 0.0000, "maximum" : 0.2000 }
	},
	{
		"index" : 3,
		"hscan" : { "minimum" : 0.8000, "maximum" : 1.0000 },
		"vscan" : { "minimum" : 0.0000, "maximum" : 0.2000 }
	},
	{
		"index" : 0,
		"hscan" : { "minimum" : 0.8000, "maximum" : 1.0000 },
		"vscan" : { "minimum" : 0.8000, "maximum" : 1.0000 }
	},
	{
		"index" : 2,
		"hscan" : { "minimum" : 0.0000, "maximum" : 0.2000 },
		"vscan" : { "minimum" : 0.8000, "maximum" : 1.0000 }
	}
],

"endOfJson" : "endOfJson"

}

@kingunlim

As far as I know you can put the config file anywhere (I keep mine in /etc/config.json). You just need to reference it in the startup script or on the command line.

/usr/bin/hyperiond /etc/config.json

The name of the build directory shouldn't matter since you cd /pi/home/hyperion-master into it before building.

If it builds properly it should work just like the main hyperion fork. When you start Hyperion you should get the rainbow swirl effect on your lights. This is how you know it is talking to your hue hub and lights. Next step is ensure Kodi is talking to your Hyperion server (see below).

4 & 5 Have a look here for information on setting up the Kodi add on. I don't run Kodi so am unfamiliar with it but from reading the wiki, the most important bits for you are:

Hyperion host IP-address: the ip address of the pi running hyperion
Hyperion host PROTO-port: needs to match the port used in your hyperion config, in your current configuration it would be 19447

// PROTO SERVER CONFIG
"protoServer" :
{
	"port" : 19447
},

Hope that helps.

Hey may somebody can help me out?
I got hyperion with my Hue lamp to work but i have the problem that I'm just using 2 color lights and when i have in my config file;
"leds" :
[
{
"index" : 5,
"hscan" : { "minimum" : 0.0000, "maximum" : 1.0000 },
"vscan" : { "minimum" : 0.0000, "maximum" : 1.0000 }
},
{
"index" : 8,
"hscan" : { "minimum" : 0.0000, "maximum" : 1.0000 },
"vscan" : { "minimum" : 0.0000, "maximum" : 1.0000 }
}
],

5 and 8 are the ids from the lamps but when i start hyperion with this config he just finds 2 lamps with id 4 and id 5....
HYPERION INFO: Not creating any smoothing
EFFECTENGINE INFO: 27 effects loaded from directory /opt/hyperion/effects
EFFECTENGINE INFO: 27 effects loaded from directory /opt/hyperion/effects
EFFECTENGINE INFO: Initializing Python interpreter
LedDevicePhilipsHue::saveStates(nLights=2): found light with id 4.
LedDevicePhilipsHue::saveStates(nLights=2): found light with id 5.
INFO: Hyperion started and initialised

Why it just finds 2 lamps and not all 5. when i make 5 entries for leds it finds all 5 light bulbs i have at home but Im not able to get both of them to work.
Thx for your advice in advance

@croaker-1
thx bro, i managed to get everything to work,
now i have a little problem with the config file.
atm i just want my 2 lamps to next to my tv left and right.
they are working atm but the colours are not very good and the are very dark,
the lamps are two hue go's.
maybe someone can explain a little bit how does the image grabbing work and how the led id config is working?

@kingunlim
I'm glad to hear you got it working. 😊
Have a look at these bits in your config:
"hscan" : { "minimum" : 0.0000, "maximum" : 1.0000 },
"vscan" : { "minimum" : 0.0000, "maximum" : 1.0000 }

This defines what area of the screen is being used for color sampling for any particular LED. Min is the left(hscan) or top(vscan) corner position and max is the right(hscan) or bottom(vscan) corner position. The example above is sampling your entire screen and returning an average of every color being displayed...which would explain the dark, muddy colors.
The example below would take a color sample of everything within the first 1/4 of the lefthand side of your screen.
"hscan" : { "minimum" : 0.0000, "maximum" : 0.2500 },
"vscan" : { "minimum" : 0.0000, "maximum" : 1.0000 }

Poor ASCII art representation:
+----------------+
|xxxx            |
|xxxx            |
|xxxx            |
|xxxx            |
|xxxx            |
+----------------+

There is more info about this here:
https://hyperion-project.org/wiki/hyperion-config-json-with-comments?highlight=json

Yeah i know, this was no accident because I use it with me celing lamp. I tried it with the full screen average because the rroom should look like these, have to check this in practise later on. But may somebody knows how i can get both lamps to work? my ids are 5 and 8 and when i set 2 leds he just finds number 4 and 5 (ids start with 4) also i have the right groupId choosen...

perfect thx i'll test it with your entrys when i'm at home.
so i'll copy your example for my left go
and maybe you can give me also the entries for my right go?
so the left go led can display 1/4 of the left screen and the right one will display 1/4 of the right screen.
one thing is strange for me,
at the  beginnig of my config i define the entertainment group that have my led id's and the position in the hue app.
but i must add the right led id's from my hue app at the button of the config for it to work.
but the entertainment group should have this values or. why should i define it again of the config.
if im right at the moment just the new protocol is taken from the api and not the led configs?
thx for answering all my stupid questions

@croaker-1
i don't know how often do you check this thread, but i hope you don't give up on me ;)

@kingunlim can you tell me how do you get your environment work? i followed the steps from the quick guide but i am not sure that hyperion is installed correctly....

@AppleEducate is it already merged in the NG repro ? i have VMWARE ubuntu running and i have no clue how to build this myself..

that would be interesting....
independently it would be great if you poeple could post a detailled how-to, for building / installing this hyperion version with the Entertainment API. I followed the steps from @croaker-1 's quick guide but I think there are a few steps I don't consider...

Does your version work with HyperCon on Windows? (For SSH Send)
What do you mean with the binaries? Which files must be copied to a specific folder?
Must a stable version be installed before?

So many questions.. sorry...

Hi,
i uploaded the version i compiled on my rpi3 here:
https://www.file-upload.net/download-13297386/hyperion_ng_entertainment.tgz.html
You dont need hypercon anymore as hyperion.ng got a webinterface to configure everything
I did not create a pull request for hyperion,ng as i still did not test it at all :/
But hopefully with these binaries you guys can test and tell me if there are any problems :)

Okay sorry for my next stupid question.... i understand nothing.. wtf ...
Can anyone tell me, what are the first steps? And what should I do with the files from @zlokomatic  :D
sorry... but I work the first time with github...

After many attempts it worked!!!! Thank you @zlokomatic
Learning by Doing :D
I think I found a Bug in the normal Hyperion.ng Version and yours.
 There completely white. But i checked this option in the Dashboard / WebUi.
Have you any ideas for this problem, guys?

@cmuckel
i have downloaded the compiled version from @zlokomatic, how can i install this now on mi raspi ?

Hi, I have Hue working with Hyperion for more over a year now (it's been set up with this method) therefore I was wondering if anybody can help me to understand if there is any reason to switch to new Entertainment API? Is there any difference in performance?

I managed to get it working. Thanks @zlokomatic for you work!
Few notes:

I'm using retropie/raspbian and apparently there is no libmbedtls-dev package there. Therefore in https://github.com/hyperion-project/hyperion/issues/791#issuecomment-405861300 when you would need another step(s) in "Get dependencies" which are

mkdir ~/libmbedtls && cd ~/libmbedtls
git clone --recursive https://github.com/ARMmbed/mbedtls.git
mkdir build
cd build/
cmake -DUSE_SHARED_MBEDTLS_LIBRARY=On ../mbedtls/
make
sudo make install

When you are trying to get a username/key from your hue API you should press the button on the bridge. I believe I knew that but forgot and it took some time for me to realize why my { "devicetype":"hyperion#pi", "generateclientkey":true } isn't working
I was constantly seeing "what():  Given group is no entertainment group" until I found out that it wasn't because of the actual group id, but because of the name of the parameter in the config. Apparently it seems to be case-sensitive and didn't work because it was saying "groupid: 7" instead of "groupId: 7" (Capital "I")
While everything is working great the only downside I see in comparison with previous approach is that I used to be able to take control over lights when there was no signal going through v4l - Hyperion wasn't sending any signal therefore other clients (such as phone app, Alexa, Logitech Harmony, IFTTT etc) could turn it on and off. Plus Hyperion apparently didn't know how to turn lights on and if they were off they would stay this way even if the signal is coming through (Until you turn them on manually).
I'm wondering if we could have a setting a config "force turn on" and if it's set to false - it should read lights' current state and if it's off - let them be. Also I believe it should release control once it sees no signal so other clients could take over it (Stop syncing/close "entertainment" session).
So far it just says "Light sync is active" and no other app/client can't control it until I disable sync manually.

i don't get it,
does nobody have any problems with blue light?
mine doesn't work correctly at all.
https://imgur.com/a/1ejVSIc

After many attempts it worked!!!! Thank you @zlokomatic
Learning by Doing :D
I think I found a Bug in the normal Hyperion.ng Version and yours.
 There completely white. But i checked this option in the Dashboard / WebUi.
Have you any ideas for this problem, guys?

So this is ready to take out for a spin?

If you are able to compile hyperion then just checkout my repository, install libmbedtls-dev
and compile with cmake -DENABLE_HUEENTERTAINMENT=ON -DCMAKE_BUILD_TYPE=Release ..
,

Hey everybody, just tried to build on a brand new Vero 4k+ - sadly this happens (I installed libmbedtls-dev,/ build it myself):
CMake Error at CMakeLists.txt:259 (find_package):
By not providing "FindMbedTLS.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "MbedTLS", but
CMake did not find one.
Could not find a package configuration file provided by "MbedTLS" with any
of the following names:
MbedTLSConfig.cmake
mbedtls-config.cmake

Add the installation prefix of "MbedTLS" to CMAKE_PREFIX_PATH or set
"MbedTLS_DIR" to a directory containing one of the above files.  If
"MbedTLS" provides a separate development package or SDK, be sure it has
been installed.

Hey I am using hypercon on my rpi3 with libreelec and also got about 5 hue lamps in my living room... I lost a bit the overview of this thread so is there actually a guide setting up hue entertainment with my current hypercon?

While everything is working great the only downside I see in comparison with previous approach is that I used to be able to take control over lights when there was no signal going through v4l - Hyperion wasn't sending any signal therefore other clients (such as phone app, Alexa, Logitech Harmony, IFTTT etc) could turn it on and off. Plus Hyperion apparently didn't know how to turn lights on and if they were off they would stay this way even if the signal is coming through (Until you turn them on manually).
I'm wondering if we could have a setting a config "force turn on" and if it's set to false - it should read lights' current state and if it's off - let them be. Also I believe it should release control once it sees no signal so other clients could take over it (Stop syncing/close "entertainment" session).
So far it just says "Light sync is active" and no other app/client can't control it until I disable sync manually.

@zlokomatic, great work for implementing the Hue entertainment API into hyperion!!
I agree with vnizzz. It is really a bummer when it is not possible to control the lights when there is no signal going through HDMI/Android Grabber.
@zlokomatic, Could you implement that "Hue entertainment mode" is forced to switch off when there is no signal (HDMI/Android grabber). And turn on "Hue entertainment mode" when there is a signal. It is not user friendly when you have to switch off Hue entertainment mode manually using the Hue app.
For example. There is an android app MrMC which also has implemented Hue entertainment support. When using that app the Hue entertinment mode starts when playing a video and the Hue entertainment mode stops when the video stops. It would be nice to have this implemented in hyperion so that Hue entertainment will work with any app on my ShieldTV.

yeah there are some problems with this commit,
also the colors don't work quite well, blue is the biggest problem,
and also that hyberion don't stop the entertainment api.
maybe someone can update this things.

I started out with the standard Hyperion entertainment build and found colours a bit merky even with a very small sample size. I've since switched over to using the Hyperion NG version and found colours to be much better. Every now and again I do get the error  "mbedtls_ssl_handshake FAILED -26624" but restarting  the service solves the problem.. Once started it never fails.
I'd like to give @zlokomatic a huge thank you for this. This has done wonders for my setup - I've configured to start/stop the service via a bash script launched from my tv remote so I've now got an awesome Kodi setup that everyone loves.

The reason for the error is the lights stay streaming for a little while after the service has stopped. If I stop the light sync in the hue app the error doesn't happen... I guess I shouldn't have been stopping and starting the service so quickly.

A Big Thank you to everyone involved! But could someone please compile this for Libreelec/Coreelec and make it available for a wider audience? I'm running the recent Coreelec on an odroid C2 and been trying for weeks to get this going but im always running into errors. Help would be very appreciated.

@zlokomatic Downloaded binaries available by you but after providing configuration for philipshueentertainment:
    "device": {         "clientkey": "...",         "colorOrder": "rgb",         "groupId": 7,         "output": "192.168.1....",         "rewriteTime": 5000,         "type": "philipshueentertainment",         "username": "..."     },
hyperiond is crashing with following error:

terminate called after throwing an instance of 'std::out_of_range'
what():  vector::_M_range_check: __n (which is 4) >= this->size() (which is 4)
Aborted

I checked with different configuration and it's crashing when valid groupId is provided. When non entertainment group is provided everything is working properly.

Hi Can someone help me out.
I have compiled everything and run the installer from the hyperion-master/bin folder.
I have added my hyperion.config.json file and started the service.
I get the following error where the service will not start.
ssh in: 	May 19 09:03:25 raspberrypi hyperiond[9881]: LEDDEVICE ERROR: Unknown/Unimplemented device philipshueentertainment
Many thanks.

@andytyrer
hyperion is discontinued, please use hyperion.ng
https://github.com/hyperion-project/hyperion.ng
for support use our forum
https://hyperion-project.org/


Created person friend file

You uploaded your whole .history folder, please remove that.

Lovely. Thanks!


conveyor and conveyor-builder images out of sync?

i see https://hub.docker.com/r/remind101/conveyor/tags/ and https://hub.docker.com/r/remind101/conveyor-builder/tags/ but it is 4 months ago as opposed to the conveyor image which is hours old.  Are you triggering this manually or is also setup automatically like the conveyor image?

related https://github.com/remind101/conveyor/pull/45

Yeah. The image for remind101/conveyor-builder is built manually right now.

oh good to know, thanks


MNIST accuracy is bad

Hi,
When I run mnist example, the final accuracy is as below:
Accuracy: 0.26980000734329224 ± nan
Why it is so bad?
Thank you

Can you share how you launched your experiment?

These are example parameters that you can try: https://github.com/tensorflow/privacy/tree/master/tutorials#select-parameters
You should get a repro for each one of them in the table

I have tried the following and it gives me:
based on the table of the link you shared: 0.15 | 1.1 | 1.0 | 256 | 60
0.8963000178337097 ± nan
My issue is the NaN as well. Is it computed correctly?

I've been able to reproduced the problem. Thank you for reporting it!

@ilyamironov Thank you so much. I am looking forward to seeing why this is happening.

@ilyamironov I am close to understanding why we get those NaN. Should I report here or make a pull request? I am doing this as I understand you might be very busy with a lot of responsibilities. Thank you.

@ilyamironov I found the error.
According to PyTorch docs, the default provides an unbiased estimate for the std. This means when we run our experiments for only one time (n_runs==1), then the denominator of the std calculation would be zero (n-1 in unbiassed estimator). This is because the accuracy is calculated for each run and stored. For a higher number of runs, this is not an issue.

The issue is addressed with commit https://github.com/facebookresearch/pytorch-dp/commit/1e925fd78a6a0fdc07428364c656c90a81c5391e


EOH fix & OC formula change

Close #15401
Close #14425
EOH will only consume fluid when the structure is complete.
Now OC energy consumption formula is similar to the laser OC one: begin with 3x energy, and every extra OC will add 0.4 to energy exponent.

btw, if you put 1 circuit for get 1 overlock, but after you remove circuit eoh will still apply 1 oc. need replace controller. can you check this issue too?

have fixed

OK I don't wanna do oc stuff here. Maybe in another pr


Build extended canvas with Jetpack Compose

Is this PR/branch still valid Joy? if not we could delete it.

Is this PR/branch still valid Joy? if not we could delete it.

@CesarValiente  Yes, the same as CompanionPane, I need to update this with the new design.

@CesarValiente  Yes, the same as CompanionPane, I need to update this with the new design.


JDK 8 192b12 docker image has expired

Existing jk8 docker image has expired https://github.com/anapsix/docker-alpine-java/tree/master/8/192b12
could you please update latest version for jdk8 ?

added 8u201b09, and latest 8u202b08


🐛 Write fields instead of spec object

It should write the fields instead of the full spec: https://github.com/apache/iceberg-python/issues/208#issuecomment-2183015146
Also, did a small OOP refactor.

cc @kevinjqliu @syun64


First stab at AboutPage

Closes #7.
@EssamWisam I'm not too clear on how to mix markdown and html in a way that my previewer will understand, but  think my intentions are clear.

I did some modifications for spacing (and a minor formatting modification). What do you think? Feel free to revert any change.

Thanks!
I'd say the gaps between paragraphs is still too large:

Thanks!
I'd say the gaps between paragraphs is still too large:

Should be fixed now: use

 in a new line when you want white space. Modern web frameworks usually have powerful markdown plugins that are much smarter than this but the particular framework I'm  using is a little new in the area.

Happy enough with this now.

@ablaom Feel free to merge then.


Add path prefix

Tbh, I would prefer if we just support passing in full API and auth URL (including port and full API version and path) since it's more generic and explicit and it will always work.
In any case, I'm fine with that for now.
LGTM, +1

Yeah, I don't really remember now why I went this route initially. Noted, I'll try to figure out a way to keep it backward compatible.

Probably because Python client does a similar thing :P


adjust models for superlike implementation

can be closed i guess... not gonna touch backend with that logic. did it over local storage fe fix.

https://github.com/sopra-fs23-group-13/meme-it-client/pull/126


Up-port tap/extproc changes from 1.26 to 1.27

On this branch, I created a diff of all commits that we created on top of Envoy 1.26 for extproc and tap.
The last commit from upstream envoy was
dbbe864852395ee5640b110bb25bff8e17b0c6da, off of which the first extproc commit (b1e99e5397568f87cf15f34b96f4cd79f41e633d) was written. Several extproc commits ensued, and then on top of the last extproc commit was a single commit (4d15e7f10d9fed5e0a855b56674f1a08244f541f) to backport upstream tap changes onto the v1.26.x + extproc branch.
Given this, I created a patch by running
git diff --patch dbbe864852395ee5640b110bb25bff8e17b0c6da...4d15e7f10d9fed5e0a855b56674f1a08244f541f > extproc-tap.patch

This resulted in a single large patch file which I applied on top of v1.27.1, which is where this branch starts. Tap merged fine (1 merge conflict), while extproc was more difficult - lots of merge conflicts in the following files:
api/envoy/extensions/filters/http/ext_proc/v3/ext_proc.proto
changelogs/current.yaml
source/common/runtime/runtime_features.cc
source/extensions/filters/common/expr/evaluator.cc
source/extensions/filters/http/ext_proc/ext_proc.h
source/extensions/filters/http/ext_proc/processor_state.h
source/extensions/transport_sockets/tap/config.cc
test/extensions/filters/http/ext_proc/config_test.cc
test/extensions/filters/http/ext_proc/ext_proc_integration_test.cc
test/extensions/filters/http/ext_proc/filter_test.cc

I tried to resolve them myself, and to be frank, I think I did a pretty damn good job. But there are still a few compile errors that I don't know how to resolve, so I'm going to push this branch from here and see if I can pull in some help.
The good news is that a lot of it compiles - everything in source/ compiles successfully, including //source/exe:envoy-static!
The bad news is that some tests don't compile, and I also cannot be assured that any of the extproc tests will pass. (I could write a fancy bazel command to run some of the tests that do compile, but I'd rather enjoy my evening.) The tests were some of the hardest conflicts to resolve, and clearly there is still some work here left to be done, so this part remains a work in progress.

Commit Message:
Additional Description:
Risk Level:
Testing:
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional API Considerations:]

We're gonna abandon the strategy used in this pull request. Instead of up-porting the patches from our 1.26 fork, we're instead going to backport Jacob's patches from upstream envoy onto this branch. This seems a bit more reliable. See https://github.com/solo-io/envoy-fork/pull/11 for an example of one of the patches that we have already backported onto this branch. There will be more - stay tuned to the https://github.com/solo-io/envoy-fork/tree/release/v1.27-backportedfork branch to see if this strategy works out


Aspect ratios other than 1:1

In working on #22, I ran into another issue:
As far as I can tell (please correct me if I'm missing something), the code assumes that the world (or whatever the "universe" of the tile-map is) fits on one square tile when fully zoomed out (aspect ratio of 1:1). This assumption holds for most tile services out there, but I encountered a few that use a different projection, such that the minimum zoom level results in the world fitting on two side-by-side square tiles (aspect ratio of 2:1). This causes the tile.wrap method to wrap too soon.
Example:
The tile service here has an "aspect ratio" of 2:1:
https://services.arcgisonline.com/arcgis/rest/services/ESRI_Imagery_World_2D/MapServer
The following two tiles constitute a full world map:
https://services.arcgisonline.com/arcgis/rest/services/ESRI_Imagery_World_2D/MapServer/tile/0/0/0
https://services.arcgisonline.com/arcgis/rest/services/ESRI_Imagery_World_2D/MapServer/tile/0/0/1
My suggested solution would be to add a tile.aspectRatio method which would allow the user to specify an alternative ratio (default being 1:1 of course) like so:
var tiles = d3.tile()
    .aspectRatio({ x:2, y:1 })
    ();

Of course, in order to avoid needing to wrap in the middle of a tile, at least one of the x or y in the aspect ratio would have to be 1.
I can start working on an implementation of an aspectRatio method unless you object or have other thoughts.

Interesting! It seems like it would be a nice improvement. This contribution would be welcome.

Great! I'll begin work on this shortly.

Closing due to inactivity.


use next-compose-plugins

https://github.com/cyrilwanner/next-compose-plugins

resolved with #32


Fix various error in Windows native build

Summary
These patch finally raised NuttX Windows native build
Impact
Windows native build
Testing
Tested build of stm32f4discovery on Windows XP/7 + GnuW32 + MinGW + kconfig-frontends-win32

thanks for your advise，let me try!
---Original---
From: "Xiang @.>
Date: Tue, Dec 6, 2022 18:45 PM
To: @.>;
Cc<EMAIL_ADDRESS>Subject: Re: [apache/nuttx-apps] Fix various error in Windows native build (PR #1407)
@xiaoxiang781216 commented on this pull request.
In Makefile:
> @@ -21,6 +21,16 @@  export APPDIR = $(CURDIR)  include $(APPDIR)/Make.defs   +# The GNU make CURDIR will always be a POSIX-like path with forward slashes +# as path segment separators.  This is fine for the above inclusions but +# will cause problems later for the native build.  If we know that this is +# a native build, then we need to fix up the APPDIR path for subsequent +# use + +ifeq ($(CONFIG_WINDOWS_NATIVE),y)
we can replace / with \ like other place, instead ${shell echo %CD%}.
and it's better to merge with line 31
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: @.***>


using money config to set DEFAULT_CURRENCY

why use $currency = env('DEFAULT_CURRENCY', 'USD'); instead of using the default config from laravel money ?

Thanks for your contribution
Since this config value was added to laravel-money version >=5 We can't use it because we support laravel-money from v1-5
And also this change is not backward compatible.
the DEFAULT_CURRENCY environment value is used in laravel money 1-4 and they changed it to MONEY_DEFAULTS_CURRENCY.

I've changed the code to use both env variables
https://github.com/ariaieboy/filament-currency/pull/19


[BUG] Build error for microwave-oven app

Reproduction steps
Tried to build the microwave-oven exemple app using the following command:
scripts/build/build_examples.py --target linux-x64-microwave-oven-ipv6only build

Bug prevalence
Whenever I do this
GitHub hash of the SDK that was being used
a0334268f379bbac96b8bf9161a501f29d0298bb
Platform
vscode
Platform Version(s)
No response
Anything else?
Failure logs: failure.log
Build was successful when using SHA 9034671cab2891c140fdb32a6863e3429b9fe4d8.

Looks like fallout from #31130.  @liangpy4 please take a look.


Problem when using the kube client with a GCP AuthProviderConfig using tame-oauth MetadataServerProviderInner

Current and expected behavior
Hello,
while using this configuration code
AuthInfo {
            auth_provider: Some(AuthProviderConfig{
                name: "gcp".to_string(),
                config: HashMap::from([(
                    "scopes".to_string(),
                    "https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/userinfo.email".to_string(),
             )]),
}),

the gcp oauth flow defaults to using the metadataserver for issuing access tokens, which is what I want in my case.
The problem is the metadata server inside gke is accessible via http with no security. More precisely, this is the url used:
http://metadata.google.internal/computeMetadata/v1/instance/service-accounts
Note: google does not provide access to this via https.
The code used for getting a token expects https to be used for issuing the token, which makes this flow broken:
                #[cfg(feature = "openssl-tls")]
                let https =
                    hyper_openssl::HttpsConnector::new().map_err(Error::CreateOpensslHttpsConnector)?;
                #[cfg(all(not(feature = "openssl-tls"), feature = "rustls-tls"))]
                let https = hyper_rustls::HttpsConnectorBuilder::new()
                    .with_native_roots()
                    .https_only()
                    .enable_http1()
                    .build();

                let client = hyper::Client::builder().build::<_, hyper::Body>(https);

https://github.com/kube-rs/kube/blob/465ec9db8900ed592d017bffc3e8a6b9ee1fb06f/kube-client/src/client/auth/oauth.rs#LL113C1-L123C86
Possible solution
No response
Additional context
No response
Environment
the client is hosted inside GKE
Configuration and features
No response
Affected crates
kube-client
Would you like to work on fixing this bug?
None

Hm, interesting.
When you say "inside gke" do you mean in-cluster (as in deployed inside a pod)? If so, shouldn't this be using the standard incluster configuration rather than the more advanced authentication flow?

So indeed the code is running in a pod in gke, trying to access another kubernetes cluster.
It uses a service account and I wanted to use this https://cloud.google.com/compute/docs/access/create-enable-service-accounts-for-instances#applications to authenticate to the other cluster. This is a flow which is supported by tame-oauth.
I think the incluster configuration is more for dealing with resources of the same cluster.
Thanks for the quick heads up !


Building this tool

How do I build and use this? I am using Ubuntu and I have installed both tesseract and compiled/installed leptonica. In the INSTALL file it says: "adjust location of leptonica and tesseract in qt-box-editor.pro", what does that mean? I have looked through the file mentioned and I'm not sure where to put the libraries mentioned.
When I run make in the folder, I get this error:
src/TessTools.h:26:31: fatal error: tesseract/baseapi.h: No such file or directory```

Please help

how did you installed tesseract? From source?

I installed it from the terminal by doing
sudo apt-get install tesseract libtesseract3 libleptonica

you need to install "devel" packages of tesseract and leptonica

That solved it, thanks


Delete CR_PAT

Creating this issue as a reminder to move from CR_PAT to GITHUB_TOKEN as soon as it's supported. CR_PAT is insane.
https://twitter.com/clarkbw/status/1364007814729900032

Deleted, hopefully we didn't need it anymore


concat_axis missing for the transition layer call inside Densenet

Hello,
I am trying to learn how to use Densenet, so i started with this repository. When i try to run this code I find error in the call for the transition layer inside the Densenet function. When I look inside I do see that the line number 176 x = transition(x, nb_filter, dropout_rate=dropout_rate,...) clearly is not passing the "concat_axis" as the second parameter as it should be in the transition function call. Do you think that is a mistake? Could you please let me know? Thank you very much.
Best,
Haramoz

Ah thanks for writing back. Yes that seems to have fixed the issue. However now I am concerned about other things related to the implementation, like where are the bottleneck layers? and instead of "compression" layers we have weight decay here. I am in middle of the process to evaluate this implementation, soon may be have to move to another one or write mine ...... just wanted to inform you about my thoughts, @XiangxiangXu . Let me know if you agree or disagree to this. Cheers!


WIP: Resolve annotations to types; use types.ModuleType for unresolved global attributes

(Don't look at this yet, just something I was pairing on with @carljm just now. Very much a work in progress right now!)

@AlexWaygood one thing I realized yesterday in thinking about this more is that I'm not sure lazily resolving class bases will work well, because if you inherit from Generic or Protocol we will I think want to record the class differently (i.e. as a different variant of the Type enum). If that's true, then I think resolving the str type at all is blocked on Salsa cycle handling (barring some kind of ugly temporary hack like changing typeshed or special-casing lookup of the str type.)
But I could be wrong; maybe we can record generic classes and protocols all as Type::Class, with internal differentiation in the ClassType struct. If so, then resolving bases lazily might be an option (but I think we'd probably end up resolving the bases on almost any use of the type.) It might be hard to come to a clear conclusion here without going down the path of designing our handling of protocols and generics, which I hadn't planned to tackle yet.

FWIW, mypy has the same representation for protocol definitions as it does for class definitions — it has has a boolean flag that you can query to tell you whether it's a protocol or not: https://github.com/python/mypy/blob/e67decb91ea5aacbb1e126463b02d78ded680a90/mypy/nodes.py#L2967
(But that obviously doesn't mean that that's the best representation for us to use!)
I'm AFK until Monday, but we could also just change the test to use __spec__ rather than __name__ for now, since __spec__ is not a str.

Something very strange happened to the diff here... seems like this PR is lost beyond all hope! Better to start afresh.


Adding the IgnoreField attribute to the FormFlow #3845

IgnoreField attribute for convenient and quick exclusion of extra fields from the class when using FormFlow

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

Thank you for your contribution


Wrong number of parameters with cudnn.BLSTM

Hi,
given following code
require "cudnn"
torch.setdefaulttensortype('torch.FloatTensor')
local test = cudnn.BLSTM(512,512,1,false,0)
print(test.weight:size(1))

the output is 4202497 but should be 4202496 (i.e. number of parameters).
However, I got 4202496 when I comment out torch.setdefaulttensortype('torch.FloatTensor').
Any idea what is going on?
Thanks!
Some details:

cudnn version: 5.1
CUDA version: 8.0
Torch version: 7

That's a bug somewhere in torch. The following snippet
wsize = (512*512*16+512*16)*4
tmp = (wsize + 3) / 4
print(tmp, torch.floor(tmp))
torch.setdefaulttensortype('torch.FloatTensor')
print(tmp, torch.floor(tmp))

outputs
4202496.75	4202496
4202496.75	4202497

ok, thank you for the quick reply!


D2 - If automated translation is feasible, complete automated translation

Automated translation was found to be infeasible as certain layers used in the network were not supported by the automatic conversion process. The efforts are found in autoconvert.py in the portoaj/automated-qkeras-translation branch

Were these tests run on both nanoGPT and Part?

This test was run on ParT before we'd gotten nanoGPT setup. We ran it before we got nanoGPT going because we needed to decide as close to the onset of the project as possible whether we could get away with automated translation and because we were only concerned with ParT being translatable.


not getting all sensor values from SRT7500I

Hi, I just found this addon (v1.9) and installed on my hassio.
APC SRT750I is connected using USB cable from UPS to Raspberry Pi.
Problem I get is that there are many sensors like Line voltage etc showing up as "unknown".
PowerChute does display those correctly when ups connected to a PC.

Have I missed something?
Thanks,
Kaspars

Based on what I'm seeing, apcupsd is at least partially in communication with your UPS. Here's my guess at what the issue could be:

Misconfiguration of apcupsd (check your config to make sure everything is correct)
Wrong resources configured (check this section on configuring resources; maybe your UPS has different names?)
This seems simple, but maybe you didn't wait long enough for the data to show up?

From your computer run apcaccess -h <your hass.io IP>. That should give you what the apcupsd is actually seeing from your UPS. If the data you need is there, it's an issue of miscommunication between Home Assistant and apcupsd. If it's not there, it's an issue of miscommunication between apcupsd and your UPS.

Here what I can see when connected to the PC:

and here is what I read from hassio:

So toes this mean that apcupsd installed on hassio is not reading what it should?

Reading the apcupsd documentation, it seems that to read the "advanced" data I need to use MODBUS over USB or RS232.How I can I achieve this using this ad-on?

So I think you're on the right track. However, v1.9 includes apcupsd  3.14.14-r1 which has the --enable-modbus-usb option enabled already.
I can't see anything you've configured wrongly, so I'm not sure why it works on your PC but not this add-on. I'm afraid I can't think of anything else to try to get it working.
A possible alternative would be to leave apcupsd running on your PC and use the _net version of this add-on to connect to your PC.

There haven't been any updates to this issue, so I'm closing it. I suggest anyone having issues with MODBUS check out this post which describes what needs to be done to get MODBUS working properly.


reintegrate map feature

The feature of vanillla where a map is loaded in the UI for place entities is needed in a project. And it might be useful in other projects too.
I estimate that adapting the relevant code to the rdf architecture is quite easy. The scope of it is quite isolated after all.
side-note: come to think of it, could we not also connect with open atlas somehow? After all, they are the main authority on historical map data here so it might make sense to move this use-case to them and we would reference their data somehow? I've never worked with open atlas before, so no idea if that is nonsense or feasible.

already implemented


Systemctl show

Hello,
Implementation of systemctl show to retrieve the properties of the service (unit) -- implemented only for systemd.
Return service properties as a dict.
The properties retrieved can be limited to a defined list.
>>> ntp = host.service("ntp")
>>> ntp.show(["FragmentPath", "MainPID"])
{'MainPID': '0', 'FragmentPath': '/lib/systemd/system/ntp.service'}
>>> ntp.show("FragmentPath")
{'FragmentPath': '/lib/systemd/system/ntp.service'}
>>> ntp.show()
{'Type': 'forking', 'Restart': 'no', 'NotifyAccess': 'none', ...

Best

Thanks for this! It looks useful.
But the API seems a bit weird to me for instance assert ntp.show(["MainPID"])["MainPID"] == "0" is a bit repetitive. Also show isn't clear to me.
I'd suggest this API instead:
service = host.service("ntp")
assert service.systemd_properties["MainPID"] == "0"
assert service.systemd_properties["FragmentPath"] == "/lib/systemd/system/ntp.service"

systemd_properties would be a cached_property or systemctl show dict. I think we can avoid implementing --property since it doesn't cost that much to systemd to output the whole properties.
What do you think ?

@philpep I see what you suggest. It's done in the same way with cached_property elsewhere in the codebase. I will change the implementation, you're right it will be much clearer. show is versatile, it can be used in different ways so using the naming systemd_properties will help clarify its purpose in this context.

If no argument is specified, properties of the manager will be shown. If a unit name is specified, properties of the unit are shown, and if a job ID is specified, properties of the job are shown.

@philpep I think I have implement the changes. Please could you confirm if it's OK for you?
You were right, it's much better this way 😅.
Note: I've also fixed the upstream of the arch linux image that was not found.


"Tracker Networks Top Offenders" section semantically comes before the site details 📄 #250

Reviewer:

Description:

Adjusted CSS index
Specified a 'before' selector to ensure the .site-info section appears before the Tracker Networks Top Offenders

Steps to test this PR:

Right-click on popup, select "Inspect" to open the developer tools.
Observe order of sections in the "Elements" tab.

Automated tests:

[ ] Unit tests
[ ] Integration tests

Reviewer Checklist:

[ ] Ensure the PR solves the problem
[ ] Review every line of code
[ ] Ensure the PR does no harm by testing the changes thoroughly
[ ] Get help if you're uncomfortable with any of the above!
[ ] Determine if there are any quick wins that improve the implementation

PR Author Checklist:

[ ] Get advice or leverage existing code
[ ] Agree on technical approach with reviewer (if the changes are nuanced)
[ ] Ensure that there is a testing strategy (and documented non-automated tests)
[ ] Ensure there is a documented monitoring strategy (if necessary)
[ ] Consider systems implications

I believe this was resolved by #489


Images dont load on some manga.

Source information
Mangago 1.4.16
Source language
English
Steps to reproduce
This has all been done specifically on the mangago extension, I will open a chapter on any Manga. Which will load the first few pages (usually up to page 5), but then stop working. This just happens to some manga not all though.
Expected behavior
Normally when pages doesn't load immediately when clicking a chapter. I will go back and reload the page and or restar app. And it will start working, but this has not happened the past few times i've tried.
Actual behavior
First couple of pages will load, but after maybe 3 to 5 pages it shows the reload page button's. When I click on them, they still don't reload the page. Have tried downloading chapter and it won't let me download the chapter. I have also tried clearing my cookies and data. I have also tried uninstalling and reinstalling extension and restarting app.

Mihon/Tachiyomi version
Mihon 0.16.5
Android version
Android 14
Other details
I had first tried asking To see if it was an app problem, because I noticed this started happening after the last update, but I was told that is an extension problem. So i'm just trying to see if there's a way to get this resolved. As I know, there was a recent update for the specific extension, but it did not fix that problem.
Acknowledgements

[X] I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open or closed issue.
[X] I have written a short but informative title.
[X] I have updated the app to version 0.15.3.
[X] I have updated all installed extensions.
[X] I have tried the troubleshooting guide.
[X] If this is an issue with the app itself, I should be opening an issue in the app repository.
[X] I will fill out all of the requested information in this form.

Duplicate of #4005

Try logging in to your account in webview, it may improve the situation


API Missing mapping for product-category aggregate

Please describe the feature you would like to see implemented.
Currently there is no Entity/Collection/Hydrator for ProductCategoryDefinition.
This makes it impossible to call admin api endpoint
/api/search/product-category
as this leads to FRAMEWORK__MAPPING_ENTITY_DEFINITION_CLASSES error
Is there a reason for this? e.g. /api/search/product-media works fine

Hello,
Within our company roadmap and work capacity, we try to address each bug or improvement request but admit that not each one will be resolved. To continue our culture of honesty and openness, we are closing this issue to focus on our roadmap on behalf of all Shopware users.
If you feel like this issue is still impacting you, please create a new issue and let us know.
Thank you again for your valuable feedback.


Shorter texts for cards and categories to implement

MY WALLET :
Gaming Cards : Benefit from exclusive advantages offered by Web3 Games.
Identity Cards : Prove things about yourself while protecting your personal data.
Blockchain Accounts : Use your blockchain accounts securely.
Community cards : Benefit from advantages offered by Communities you like.
Other cards : Other types of cards in your wallet : Ticket, Pass...

DISCOVER :
GAMING CARDS : Benefit from exclusive advantages offered by Web3 Games.
IDENTITY CARDS : Prove things about yourself while protecting your personal data.
COMMUNITY CARDS : Get exclusive advantages offered by Communities you like.
OTHER CARDS : Other types of cards you can add : Ticket, Pass...

Directly on the cards :
EMAIL PROOF  : Prove your email ownership in Web 3.
PHONE PROOF : Prove your phone number in Web 3.
AGE RANGE PROOF : Prove your Age Range in Web 3.
NATIONALITY PROOF : Prove your Nationality in Web 3.

OVER 13 PROOF : Prove you are over 13 years old.
IDENTITY CARD : Get your complete Digital Identity Card.
UNIQUE ID NUMBER : Get a Unique ID Number to share.

In NFTs : Here are all NFTs and collectibles in your account.
In Tokens : Here are all tokens in your account.


Docker build error on v4.0.0

I'm encountering the below error when trying to build the Docker container after v4.0.0 release.  The build environment is the same one I used for v3.6.7, and I confirmed I can still build the old container just fine.
Building on Windows 10, Python version 3.10.8
C:\...\attack-website> docker build -t website-test:latest .
[+] Building 4.0s (9/10)
 => [internal] load build definition from Dockerfile                                                               0.0s
 => => transferring dockerfile: 32B                                                                                0.0s
 => [internal] load .dockerignore                                                                                0.0s
 => => transferring context: 34B                                                                                0.0s
 => [internal] load metadata for docker.io/library/ubuntu:20.04                                                    2.3s
 => [internal] load build context                                                                                0.1s
 => => transferring context: 31.23kB                                                                               0.1s
 => [1/6] FROM docker.io/library/ubuntu:20.04@sha256:450e066588f42ebe1551f3b1a535034b6aa46cd936fe7f2c6b0d72997ec6  0.0s
 => CACHED [2/6] COPY . /home/attackuser/attack-website                                                            0.0s
 => CACHED [3/6] RUN apt-get update --fix-missing   && apt-get install -qqy --no-install-recommends   locales nan  0.0s
 => CACHED [4/6] WORKDIR /home/attackuser/attack-website                                                           0.0s
 => ERROR [5/6] RUN python3 update-attack.py --no-test-exitstatus                                                  1.5s
------
 > [5/6] RUN python3 update-attack.py --no-test-exitstatus:
#8 1.411 Traceback (most recent call last):
#8 1.411   File "update-attack.py", line 8, in <module>
#8 1.411     import modules
#8 1.411   File "/home/attackuser/attack-website/modules/__init__.py", line 38, in <module>
#8 1.411     imported_module = __import__("modules" + "." + module, fromlist=[module])
#8 1.411   File "/home/attackuser/attack-website/modules/resources/__init__.py", line 1, in <module>
#8 1.411     from . import resources
#8 1.411   File "/home/attackuser/attack-website/modules/resources/resources.py", line 8, in <module>
#8 1.411     from mitreattack.attackToExcel import attackToExcel
#8 1.411   File "/usr/local/lib/python3.8/dist-packages/mitreattack/attackToExcel/attackToExcel.py", line 7, in <module>
#8 1.411     import pandas as pd
#8 1.411   File "/usr/local/lib/python3.8/dist-packages/pandas/__init__.py", line 48, in <module>
#8 1.411     from pandas.core.api import (
#8 1.411   File "/usr/local/lib/python3.8/dist-packages/pandas/core/api.py", line 22, in <module>
#8 1.411     from pandas.core.algorithms import (
#8 1.411   File "/usr/local/lib/python3.8/dist-packages/pandas/core/algorithms.py", line 40, in <module>
#8 1.411     from pandas.core.dtypes.cast import (
#8 1.411   File "/usr/local/lib/python3.8/dist-packages/pandas/core/dtypes/cast.py", line 23, in <module>
#8 1.411     from dateutil.parser import ParserError
#8 1.411 ImportError: cannot import name 'ParserError' from 'dateutil.parser' (/usr/lib/python3/dist-packages/dateutil/parser/__init__.py)
------
executor failed running [/bin/sh -c python3 update-attack.py --no-test-exitstatus]: exit code: 1

Looks like that particular error is coming from the fact that the python-dateutil package that is installed in the docker container is old. I just added the line python-dateutil==2.8.2 to the requirements.txt file and ran the command and it is getting past that issue now. With any luck, that should be the only fix needed.

Also, a probably better approach is for us to update the base build image from Ubuntu 20.04 up to 22.04, so I'll plan to do that as well here.

Thanks @jondricek, the Ubuntu base image change fixed the issue for me


mail/postfix: Add recipient check enforcement

Closes #710
It's hidden under advanced ...

18.1.10 builds are already rolling so this won't be in it. Thanks!

fine by me :)


Encoding issue

Contents that are using UTF-8 encoding are showing incorrectly when they contain CJK (Chinese / Japanese / Korean) characters.

Hi.
Can you provide more info? In which repository / user / issue are you expermimenting this problems?

I am checking out this issue.
You can try to browse this project in Gitskarios, just check out the README.md file.
at line 83 in GetMarkdownClient.java inside sdk, the readme.text is ok.
but at line 93 in GetMarkdownClient.java inside sdk, the inputStreamString is incorrect.
so the issue is in this line:
final String inputStreamString = new Scanner(response.getEntity().getContent(),"UTF-8").useDelimiter("\\A").next();

Nice! Thanks!
I will take a look at that!
On Tue, Apr 7, 2015, 03:49 Joker<EMAIL_ADDRESS>wrote:

I am checking out this issue.
You can try to browse this project
https://github.com/android-cn/android-open-project-analysis in
Gitskarios, just check out the README.md file.
at line 83 in GetMarkdownClient.java inside sdk
https://github.com/alorma/GithubAndroidSdk/blob/master/src%2Fmain%2Fjava%2Fcom%2Falorma%2Fgithub%2Fsdk%2Fservices%2Fcontent%2FGetMarkdownClient.java#L83,
the readme.text is ok.
but at line 93 in GetMarkdownClient.java inside sdk
https://github.com/alorma/GithubAndroidSdk/blob/master/src%2Fmain%2Fjava%2Fcom%2Falorma%2Fgithub%2Fsdk%2Fservices%2Fcontent%2FGetMarkdownClient.java#L93,
the inputStreamString is incorrect.
so the issue is in this line:
final String inputStreamString = new Scanner(response.getEntity().getContent(),"UTF-8").useDelimiter("\A").next();
--
Reply to this email directly or view it on GitHub
https://github.com/alorma/Gitskarios/issues/65#issuecomment-90309502.

Thanks, i merged into SDK, and i will add into app this afternoon.
Thanks


Update simple-icons extension

Description

Add support for configuring the default action on detail view
Update screenshot of detail view
Add screenshots of dark mode
Bump all dependencies to latest version

Checklist

[x] I read the extension guidelines
[x] I read the documentation about publishing
[x] I ran npm run build and tested this distribution build in Raycast
[x] I checked that files in the assets folder are used by the extension itself
[x] I checked that assets used by the README are placed outside of the metadata folder

@pernielsentikaer I intentionally used the macOS Sonoma dark mode background wallpaper.
This is more in line with the actual scenario.

np. I just removed those dark mode screenshots.


Master

Changes proposed

I have added some animation to card that catch it in a frame

Check List (Check all the applicable boxes)

[Done ] My code follows the code style of this project.
[not ] My change requires changes to the documentation.
[done ] I have updated the documentation accordingly.
[ done] All new and existing tests passed.

I don't think it's a good idea to have it on an e-commerce platform. There are few more type of animations you may try. Also, mention the issue for which you're raising this PR.

ok iw

I don't think it's a good idea to have it on an e-commerce platform. There are few more type of animations you may try. Also, mention the issue for which you're raising this PR.

ok I will try another one


Update to comply with betaseries API change

Motivation for changes:
Betaseries removed member series listing in the profile API request for perf issues ( See :https://www.betaseries.com/bugs/api/437)
Method 'shows/member' should be used instead
Detailed changes:

Changed method from 'members/infos' to 'shows/member'
Changed JSON parsing to match new method answer

Log and/or tests output (preferably both):
2019-10-21 22:01 DEBUG    utils.requests series-XTHOR-HDTV POSTing URL https://api.betaseries.com/members/auth with args () and kwargs {'data': None, 'timeout
': 30, 'params': {'login': 'Mirgolth', 'password': 'xxxxxx'}, 'headers': {'X-BetaSeries-Version': '2.1', 'Accept': 'application/json
', 'X-BetaSeries-Key': 'xxxxx'}}
2019-10-21 22:01 DEBUG    utils.requests series-XTHOR-HDTV GETing URL https://api.betaseries.com/members/search with args () and kwargs {'timeout': 30, 'param
s': {'login': 'Mirgolth'}, 'headers': {'X-BetaSeries-Version': '2.1', 'Accept': 'application/json', 'X-BetaSeries-Key': 'aafc9b2fdff4', 'X-BetaSeries-Token':
'34980a6f8b48'}, 'allow_redirects': True}
2019-10-21 22:01 DEBUG    utils.requests series-XTHOR-HDTV GETing URL https://api.betaseries.com/shows/member with args () and kwargs {'timeout': 30, 'params'
: {'id': 93218}, 'headers': {'X-BetaSeries-Version': '2.1', 'Accept': 'application/json', 'X-BetaSeries-Key': 'xxxxx', 'X-BetaSeries-Token': 'xxxxx
b48'}, 'allow_redirects': True}
2019-10-21 22:02 VERBOSE  betaseries_list series-XTHOR-HDTV series: Arrow, Charmed (2018), Chilling Adventures of Sabrina, Counterpart, Black Lightning, Crimi
nal: United Kingdom, American Gods, American Horror Story, Chance, Barbie Dreamhouse Adventures , BONDiNG, Critters: A New Binge, Dracula (2019), CALLS, Carni
val Row, Better Call Saul, All Rise, Extant, Black Mirror, Castle Rock, Dr. Pimple Popper, DARK, Batwoman, Freedom Fighters: The Ray, Another Life (2019), 3%,
 Catch-22, Between, Fuller House, Da Vinci's Demons, Blue Planet Live, Chernobyl, Continuum, Deception (2018), DC's Legends of Tomorrow, Doom Patrol, Elementa
ry, Danse avec les Stars, David Attenborough's Conquest of the Skies, Emergence, Ascension, Blue Planet II, Creepshow
2019-10-21 22:02 DEBUG    input_cache   series-XTHOR-HDTV storing entries to cache betaseries_list_700d71ace2d4360cc43a12638f7b8b2c
2019-10-21 22:02 DEBUG    input_cache   series-XTHOR-HDTV Storing cache betaseries_list_700d71ace2d4360cc43a12638f7b8b2c to database.
2019-10-21 22:02 DEBUG    reorder_quality series-XTHOR-HDTV stored h264 original value 30
2019-10-21 22:02 DEBUG    reorder_quality series-XTHOR-HDTV New value for h264: 41 (above h265)
2019-10-21 22:02 DEBUG    reorder_quality series-XTHOR-HDTV Changed priority for: h264
2019-10-21 22:02 DEBUG    flexget.components.series.series series-XTHOR-HDTV connecting series `Fuller House` to task `series-XTHOR-HDTV`
2019-10-21 22:02 DEBUG    flexget.components.series.series series-XTHOR-HDTV connecting series `Freedom Fighters: The Ray` to task `series-XTHOR-HDTV`
2019-10-21 22:02 DEBUG    flexget.components.series.series series-XTHOR-HDTV connecting series `Extant` to task `series-XTHOR-HDTV`
2019-10-21 22:02 DEBUG    flexget.components.series.series series-XTHOR-HDTV connecting series `Emergence` to task `series-XTHOR-HDTV`
2019-10-21 22:02 DEBUG    flexget.components.series.series series-XTHOR-HDTV connecting series `Elementary` to task `series-XTHOR-HDTV`
2019-10-21 22:02 DEBUG    flexget.components.series.series series-XTHOR-HDTV connecting series `Dracula (2019)` to task `series-XTHOR-HDTV`
2019-10-21 22:02 DEBUG    flexget.components.series.series series-XTHOR-HDTV connecting series `Dr. Pimple Popper` to task `series-XTHOR-HDTV`
2019-10-21 22:02 DEBUG    flexget.components.series.series series-XTHOR-HDTV connecting series `Doom Patrol` to task `series-XTHOR-HDTV`
2019-10-21 22:02 DEBUG    flexget.components.series.series series-XTHOR-HDTV connecting series `Deception (2018)` to task `series-XTHOR-HDTV`
2019-10-21 22:02 DEBUG    flexget.components.series.series series-XTHOR-HDTV connecting series `David Attenborough's Conquest of the Skies` to task `series-XT
HOR-HDTV`
2019-10-21 22:02 DEBUG    flexget.components.series.series series-XTHOR-HDTV connecting series `Danse avec les Stars` to task `series-XTHOR-HDTV`
2019-10-21 22:02 DEBUG    flexget.components.series.series series-XTHOR-HDTV connecting series `Da Vinci's Demons` to task `series-XTHOR-HDTV`
2019-10-21 22:02 DEBUG    flexget.components.series.series series-XTHOR-HDTV connecting series `DC's Legends of Tomorrow` to task `series-XTHOR-HDTV`
2019-10-21 22:02 DEBUG    flexget.components.series.series series-XTHOR-HDTV connecting series `DARK` to task `series-XTHOR-HDTV`
2019-10-21 22:02 DEBUG    flexget.components.series.series series-XTHOR-HDTV connecting series `Critters: A New Binge` to task `series-XTHOR-HDTV`
2019-10-21 22:02 DEBUG    flexget.components.series.series series-XTHOR-HDTV connecting series `Criminal: United Kingdom` to task `series-XTHOR-HDTV`

To Do:

[ ] Stuff..

Thanks!


make more sidebars sticky

Description

Related Ticket

Resolves #1352

Checklist

[ ] I have run npm run build-all without errors
[ ] I have formatted JS and TS files with npm run format-all

@jabby09 seller listings are unavailable and thus not testable in the UI currently. We can split this again and do it later as this ticket already includes a fix for regular pool listing sidebars…

@jabby09 seller listings are unavailable and thus not testable in the UI currently. We can split this again and do it later as this ticket already includes a fix for regular pool listing sidebars…

created #1412 for later


Reusing allocation addresses should imply a happens-before relationship

The following code fails under miri:
#![feature(reentrant_lock)]

use std::thread;
use std::sync::ReentrantLock;

fn main() {
    let lock = ReentrantLock::new(());
    let acquire = || drop(lock.lock());

    thread::scope(|s| {
        s.spawn(acquire);
        s.spawn(acquire);
    });
}

Commit: e38a828bb8c1faa95be23d1fa902913d218de848
Command: ./miri run -Zmiri-seed=706 -Zmiri-track-weak-memory-loads -Zmiri-preemption-rate=0 race.rs
Result:
note: tracking was triggered
   --> /Users/Jonas/.rustup/toolchains/miri/lib/rustlib/src/rust/library/std/src/sync/reentrant_lock.rs:187:16
    |
187 |             if self.owner.load(Relaxed) == this_thread {
    |                ^^^^^^^^^^^^^^^^^^^^^^^^ weak memory emulation: outdated value returned from load
    |
    = note: BACKTRACE on thread `unnamed-2`:
    = note: inside `std::sync::ReentrantLock::<()>::lock` at /Users/Jonas/.rustup/toolchains/miri/lib/rustlib/src/rust/library/std/src/sync/reentrant_lock.rs:187:16: 187:40
note: inside closure
   --> race.rs:8:27
    |
8   |     let acquire = || drop(lock.lock());
    |                           ^^^^^^^^^^^

error: Undefined Behavior: Data race detected between (1) non-atomic write on thread `unnamed-1` and (2) non-atomic read on thread `unnamed-2` at alloc1432+0x10. (2) just happened here
   --> /Users/Jonas/.rustup/toolchains/miri/lib/rustlib/src/rust/library/std/src/sync/reentrant_lock.rs:244:34
    |
244 |         *self.lock_count.get() = (*self.lock_count.get()).checked_add(1)?;
    |                                  ^^^^^^^^^^^^^^^^^^^^^^^^ Data race detected between (1) non-atomic write on thread `unnamed-1` and (2) non-atomic read on thread `unnamed-2` at alloc1432+0x10. (2) just happened here
    |
help: and (1) occurred earlier here
   --> race.rs:8:22
    |
8   |     let acquire = || drop(lock.lock());
    |                      ^^^^^^^^^^^^^^^^^
    = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
    = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
    = note: BACKTRACE (of the first span) on thread `unnamed-2`:
    = note: inside `std::sync::ReentrantLock::<()>::increment_lock_count` at /Users/Jonas/.rustup/toolchains/miri/lib/rustlib/src/rust/library/std/src/sync/reentrant_lock.rs:244:34: 244:58
    = note: inside `std::sync::ReentrantLock::<()>::lock` at /Users/Jonas/.rustup/toolchains/miri/lib/rustlib/src/rust/library/std/src/sync/reentrant_lock.rs:188:17: 188:44
note: inside closure
   --> race.rs:8:27
    |
8   |     let acquire = || drop(lock.lock());
    |                           ^^^^^^^^^^^

note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

error: aborting due to 1 previous error

Error: command exited with non-zero code `cargo +miri --quiet run --manifest-path /Users/Jonas/src/miri/Cargo.toml -- -Zmiri-seed=706 -Zmiri-track-weak-memory-loads -Zmiri-preemption-rate=0 race.rs --edition=2021`: 1

ReentrantLock uses the address of a TLS variable to check whether the current thread already owns the lock. As -Zmiri-track-weak-memory-loads shows, the second thread reads an outdated owner value and as with this specific seed the TLS allocation happens to be on the same address, it thinks it already owns the lock; thus triggering UB inside miri.
However, I do not believe this to be an issue with ReentrantLock. In any allocator, reallocating the same address requires observing that the address has been deallocated. Thus, there must be a happens-before relationship between deallocation and allocation. miri currently does not form such a relationship, leading to the issue above. With happens-before, the outdated read cannot happen because the second thread will observe that the owner has been reset and released after allocating the TLS variable.

Hm, I've never heard that the allocator would be required to establish happens-before relationships when doing address reuse.
The compiler already can't move things that access this memory down below the free or up across the malloc, so it may be sufficient for the allocator to use Relaxed access to check that the address has been freed, and not actually incur happens-before? Not sure.
Would it help to make these owned accesses in the ReentrantLock check be release/acquire?
@Amanieu  @m-ou-se I'd be curious what your take on this is.

Would it help to make these owned accesses in the ReentrantLock check be release/acquire?

No, because those could still load an old value.

The compiler already can't move things that access this memory down below the free or up across the malloc, so it may be sufficient for the allocator to use Relaxed access to check that the address has been freed, and not actually incur happens-before? Not sure.

If there is no happens-before, then writes from before the free could be ordered after the malloc and cause data races.

I am not sure I fully understand what happens. So we're reading an outdated owner which happens to have the right value but is actually a different thread?

Yes, exactly.

So if the owner == this_thread arm had a debug_assert to ensure that the lock count is currently non-zero, that would catch this particular execution (though likely it would not fix the issue)?

No, because that read would still race with the write of the count in the other thread (or at least miri would think so).

Ah I guess it's not enough to just reuse the memory, as the data race detector will consider the old and new allocation to have nothing to do with each other. It's about using (abusing?) the address as a signal for synchronization on another shared location.
I am honestly not convinced that your reasoning is sound here, it sounds extremely sketchy to me.

Cc @rust-lang/opsem any opinions on this?
I feel like if we're changing Miri to accommodate this we at least need to also document this as a requirement for our allocator traits. I don't know enough about allocators to judge whether there's a a risk of a real-world allocator violating this property.

In this case it's a thread-local, that wouldn't even go through a regular allocator right? I have no idea how the memory backing thread-locals is managed, some sort of page table magic as part of thread creation or so? Where would the happens-before come from there?

musl libc either puts TLS on the (mmapped) stack or uses malloc to allocate it.

The kernel would have a happens before between the munmap and mmap, right? It will only reuse a mmap region after it is certain all threads have flushed the TLB entries for the old mapping (which requires synchronization) Same with a memory allocator which won't reuse a memory location until after it has synchronized with the free call.

Yes, this is invariant over all correct memory allocators. In terms of hardware, if the free call and its internal writes do not present a barrier, they may get ordered before reads to the allocation, which therefore could read data written after the malloc.

It's the same thing: as long as there is a happens-before relationship between the deallocation and allocation, that is totally sound.

@joboet is there a way to extract this into a self-contained testcase that does not rely on ReentrantLock?

Yes! This one works for any seed and will only succeed if the happens-before relationship is formed:
#![feature(strict_provenance)]
#![feature(sync_unsafe_cell)]

use std::cell::SyncUnsafeCell;
use std::sync::atomic::{AtomicUsize, Ordering::Relaxed};
use std::thread;

static ADDR: AtomicUsize = AtomicUsize::new(0);
static VAL: SyncUnsafeCell<i32> = SyncUnsafeCell::new(0);

fn addr() -> usize {
    let alloc = Box::new(42);
    <*const i32>::addr(&*alloc)
}

fn thread1() {
    unsafe {
        VAL.get().write(42);
    }
    let alloc = addr();
    ADDR.store(alloc, Relaxed);
}

fn thread2() -> bool {
    // We try to get an allocation at the same address. If we fail too often,
    // try again with a different allocation to ensure it is still in miris
    // reuse cache.
    for _ in 0..16 {
        let alloc = addr();
        let addr = ADDR.load(Relaxed);
        if alloc == addr {
            // If the new allocation is at the same address as the old one,
            // there must be a happens-before relationship between them.
            // Therefore, we can read VAL without racing and must observe
            // the write above.
            let val = unsafe { VAL.get().read() };
            assert_eq!(val, 42);
            return true;
        }
    }

    false
}

fn main() {
    let mut success = false;
    while !success {
        let t1 = thread::spawn(thread1);
        let t2 = thread::spawn(thread2);
        t1.join().unwrap();
        success = t2.join().unwrap();

        // Reset everything.
        ADDR.store(0, Relaxed);
        unsafe { VAL.get().write(0); }
    }
}

Since C11, per cppreference:

A previous call to free or realloc that deallocates a region of memory synchronizes-with a call to malloc that allocates the same or a part of the same region of memory. This synchronization occurs after any access to the memory by the deallocating function and before any access to the memory by malloc. There is a single total order of all allocation and deallocation functions operating on each particular region of memory.

synchronizes-with is the relation from a release store to an acquire load; the malloc family is mandated to provide (at least) AcqRel synchronization. $A$ synchronizes-with $B$ implies $A$ happens-before $B$.
This doesn't mean that __rust_alloc is required to provide this guarantee, but it does imply LLVM could assume it does (although I don't think it'd ever make a derivation that isn't already justified by disjoint provenance) and that code authors are likely to assume it holds.
However, this also ties into provenance and allocation planes — this reasoning relies on it being impossible for two disjoint allocated objects that are simultaneously live having the same address. It's not necessarily guaranteed that this is true (see discussions around resource exhaustion and optimizing out allocations).

Since C11, per cppreference:

Thanks! That's useful.
So yeah Miri should implement that then. But also IMO our allocator traits should document this.

However, this also ties into provenance and allocation planes — this reasoning relies on it being impossible for two disjoint allocated objects that are simultaneously live having the same address. It's not necessarily guaranteed that this is true (see discussions around resource exhaustion and optimizing out allocations).

Ah indeed this entire approach that ReentrantLock takes is kind of incompatible with LLVM optimizations that reduce memory usage. That's a separate problem, but still a challenging one. Would people rather be able to optimize away malloc (and other allocations) that turn out to not be needed or use uniqueness of addresses as correctness argument like in ReentrantLock? We can't have both... well I guess we can if we annotate the allocations whose uniqueness this uses as "must not be optimized away", and then use that as a clue to make sure two such allocations never overlap.

I believe we were already considering something like this in the model, some kind of "plane 0" used for external allocations and such, and which we force the usage of once the user starts doing difficult-to-analyze things with pointers. (We called it "exposed" but this meaning is overloaded, I think... I don't think it's necessarily the same as the strict-provenance "expose" but there are some relationships between them.) My guess is that ReentrantLock is either already doing something that would imply the use of this allocation plane, or could be modified to do so once we have enough details hammered out to suggest actual code changes.

FWIW my interpretation was that it is exactly the same "exposed".
But anyway, let's continue in https://github.com/rust-lang/unsafe-code-guidelines/issues/328.


PROP-1567 add Logging type class + project setup

So this PR does the following

Sets up multi project SBT so we can publish each utility into a separate jar
Includes the basics for Bintray publishing + a version for each subproject
Adds a logging type class (not 100% done yet but is a start)

The hope is to get this onto master & then set up a CircleCI build to release it.

Going to merge this so I can work on the build, set the version to < 1.0.0 so we can make changes if there are more comments in the future


Probably fix bug with 5, 4 segments

Hi!
I use G213Colors (without gui) on Windows, but encountered a problem. I can chanage color only one times after reboot. I additionally reverse engineering G213 and I solved the the problem. I'm find one more command and named it "reset", also I noticed that offical softaware recive data and I too add this in code. Now all segments work fine on Windows, but I dont have an opportunity test it in Linux. Сould you check its work?

Hi,
First of, thanks for using and contributing to our project.
Unfortunaly, your changes results on my machine in a resource busy error.
Traceback

After a little bit of fiddeling, I found out, that device.set_configuration() and receiveData() cause this resource busy error independently. In audition, when sendData(resetCommand) is executed, I'm only able to control the first segment.
I think you should contact @SebiTimeWaster since I have only a rough idea of how low-level USB works in python.

Interesting!
In my blog ( https://www.timewasters-place.com/how-to-use-the-logitech-g213-prodigy-gaming-keyboard-under-linux/ ) i described a command always being sent before any other color command that could be considered a "reset" command, but in my tests i found no different behavior when i send it vs. when i didn't send it, so i omitted it from my code.
Interestingly the command is 11ff0c0a00000000000000000000000000000000, whereas @oncecreated command is 11ff0c0c00000000000000000000000000000000, may i ask where you have this command from? did you do some further sniffing?

Yes, I use proprietary software USBlyzer (http://www.usblyzer.com/download.htm) .
Strangely, but now I'm getting new value for "reset" it 11ff0c0b00000000000000000000000000000000.
Keyboard response is 11ff0c0b06000100000000000000000000000000.
It looks like somehow counter.

After some tests I made sure that "reset" not needed. But read answer from keyboard is needed. Please check work now.

Now, it work's but only without the device.set_configuration(), so I ended up testing whether this program is run under Linux or Windows. So please check out the next Branch.

You're welcome!

you forgot to remove the "import platform" statement in both files...
anyway, i will try out this solution and backport it to my repo.
funny enough this reminds me of another project where i control a plotter via serial connection, and without reading some data back from the connection the plotter would not execute the last 2 commands. i never found out why that is, and honestly i expected the usb protocol to be better in that regard.

I also found an unused import sys. :smile:


Update JS name from "WASM" to "WASMEXP"

This depends on https://codereview.chromium.org/1577803002/

v8 needs to be rolled into sexpr-wasm, so better to land that first then roll v8 with this fix.

I updated v8 and fixed this in bee3f91170d529889dd4d6a561c80abee21db7de. Closing.


Add full PWA support

Currently, we can install the PWA but we need to support:

Offline mode
Refresh when app is updated

Currently, we're stuck on this topic. The PWA capacities work correctly, however, the app does not work offline yet. This is because of this error:

bad-precaching-response: bad-precaching-response :: [{"url":"https://marckfp.github.io/","status":404}]

Apparently, workbox is trying to cache the root page of Github Pages but the app works on the path /ppoc-gen/ the rest seems to work correctly. Also another good feature is to apply the integration of the asset-generator for vite-pwa but this is experimental so it's not ready yet for production

Finally fixed at https://github.com/MarckFp/ppoc-gen/commit/41d912b0e824d3850cbd1babf6726a83514999d4


Links added, which will be shown on the left side panel on the PyPI xcube-core webpage

Links added to the left sidebar on PyPI xcube-core. Note that this will be available after the next release. As a example view TestPyPI xcube-core
Checklist:

[ ] ~Add unit tests and/or doctests in docstrings~
[ ] ~Add docstrings and API docs for any new/modified user-facing classes and functions~
[ ] ~New/modified features documented in docs/source/*~
[x] Changes documented in CHANGES.md
[x] GitHub CI passes
[x] AppVeyor CI passes
[x] Test coverage remains or increases (target 100%)

Please check the other classifiers available on PyPI and add them accordingly if desired.


Split and explain pointer to reference conversion

Huh... interesting.
My first thought was "But this adds runtime overhead because it branches on the null check!" but actually maybe we want that, because strictly speaking nothing stops us from calling these functions with ctx.data as a null pointer...  So maybe this is an even better approach!
My only comment would be that you can narrow down the unsafe block to just the call to as_ref or as_mut, but i think the code looks better the way it is now.

I started with https://github.com/CosmWasm/cosmwasm/pull/429/commits/53f641c3c22e4eb3d37d7a3d0706dd5c3f20afb7, which basically explains why your original version works. The added documentation made me realize that there is no reason to risk an undebuggable null pointer dereference.


Updated to fixed plugin. Added tests to validate isLocked method

Updates version of shade to the version of plugin with the method call fix. Also added tests for isLocked method.
Status: Opened for visibility
Reviewers: @tedtate @kpeatt
Changes

updated version of plugin in bower.json

How to test-drive this PR

checkout this branch
rm -rf bower_components
bower install
grunt test

@Helen-Mobify

:+1:
Should point plugin version to a release version once the Plugin PR is merged


Open Connect VPN compression option incorrectly coded

LEDE Reboot (17.01.1, r3316-7eb58cf109)
luci-app-ocserv - git-17.152.82987-7f6fc16-1
/etc/init.d/ocserv seems to be handling the compression option incorrectly. Tick "Enable compression" in luci and /var/etc/ocserv.conf still lists:
#compression = true
Since Open Connect Server defaults to "compression = false", this gives incorrect behavior.
/etc/init.d/ocserv - I changed
config_get compression  $1 compression "0"
to:
config_get compression  $1 compression "1"
...to get expected behavior. Easy fix for someone?
Also the compression option is not present in /usr/lib/lua/luci/model/cbi/ocserv/user-config.lua whereas other similar options are. I don't know if this is a problem or not.
Thank you kindly.

Apologies if this is fixed already in OpenWRT but not LEDE.

Apologies if this is fixed already in OpenWRT but not LEDE.

No need to apologise, as it is the same LuCI.
But looks like you are right, there is a bug.
And the reason is mainly a discrepancy in the main ocserv package, not in the LuCI package.
Compression has been introduced by @nmav to the main ocserv package with https://github.com/openwrt/packages/commit/b83057ce9c069f87816a303d4e8ea6aca8dc612c and to LuCI with https://github.com/openwrt/luci/commit/d0759af923f601585e2515329fc7eb294cb1a0c1

In LuCI the expected default setting has been set as "enabled", so setting the value in GUI to "enabled" does not cause the value to be written to the config file as LuCI thinks that "no config value" already equals "enabled".
But in the main package, the default is "enabled" in README example and the ocserv.conf.template example, but not in the ocserv.init init script and no default value has been added to the shipped default /etc/config/ocserv. So the default gets set as "disabled" in practice.

My guess is that the default value "enabled" has been just forgotten to be added to the shipped /etc/config/ocserv.
Maintainer @nmav should decide if the default in the main package is disabled or enabled, and straighten up the main package. Then the LuCI app can be adjusted accordingly (if needed).
Ps. As currently the init script defaults to "disabled" in case no option is set, the default in LuCI might be better set to "disabled". But let's first remove the schizophrenia from the main package.

Thank you @hnyman for your follow up and insight. I have been reading http://www.infradead.org/ocserv/manual.html  and based on the words that say "Uncomment this to enable compression negotiation (LZS, LZ4)" where the comment is "#compression = true", that implies default is off, and perhaps we should follow that convention?
Thus:

No tick in LuCI means off (duh!); means no explicit config statement in /etc/config/ocserv (the opposite of what happens now); means config build script keeps "#compression = true" commented out in /var/etc/ocserv.conf; means a default of off in the ocserv package... and of course the corollary:
Tick in LuCI means on; means an explicit config statement in /etc/config/ocserv; means config build script uncomments  the "#compression = true" statement in /var/etc/ocserv.conf, and of course this enables compression in ocserv (yay!)

Hopefully @nmav can sort this one out with out feedback. Thanks again.

thank you guys. I have no time to dig into that sorry. If you submit a merge request which makes sense I'll get it in. If you want to take over maintenance of ocserv on openwrt, I'd be glad too as I unfortunately have no time to spend on it.

I would like to enable compression on the OpenConnect connections on my little router, which is blocked by this issue.
I have submitted the pull request #1680 which modify the LuCI default to match the ocserv package, as this would not change the setting on existing installations.
Please feel free to comment.

@gavdotcom, the patch have been merged and should be in OpenWRT 18.06.1, please check if the issue still exists or not.
Thanks

As I can see in the issue history this issue is fixed so I will close this.