posit<64,3> warnings on 32bit platform

Hello Devs.
First of all, thanks for taking on this very important piece of work.
I'm using your 3.0 project on 32bit windows. I get some warnings that I'm uncomfortable with, given the operations involved.
Here they are (for the type posit<64,3>):
posit.hpp(159): warning C4244: 'argument': conversion from 'int64_t' to 'size_t', possible loss of data
posit.hpp(176): warning C4244: 'argument': conversion from 'unsigned __int64' to 'size_t', possible loss of data
so on my platform size_t is 32 bit. I can understand that there might be a need to cast to size_t sometimes, but can't help thinking that e.g. defining any member variable (e.g. es) as size_t is unfortunate. Should std::uint32_t not be sufficient for es?
The first warning is in this code:
_exp[size_t(es - 1ull - i)]

so the problem here is the suffix ull. Writing ul should fix it. Maybe the size_t cast is not really needed.
The second warning appears in this code:
_frac[fbits - 1ull - (msb - i)]

here changing 1ull is not enough as msb is also 64bit.

@thorsten-ottosen thanks for reporting this.
In a nutshell, these explicit casts were introduced to make MSVC compiler happy. However, we do not test on 32-bit platforms, and that is an oversight we will fix. Let me take a look and I'll report back here.

Thanks.
I have one additional question: (I apologize if this the wrong place to ask it) I was looking at the implementation, also the fast specializations; they don't work for my compiler (visual C++ 2017) right now, but that's probably fixable ...  my question is if you have considered using C++ bit fields to define sign, es, regime & fraction? I can't say if this improves the speed of posit<32,2>/posit<64,3>, but perhaps if makes the code easier to write/read.

@thorsten-ottosen : bit fields to manipulate a posit won't work as the bit fields in posits are variable. We do use them for native float code/decode, but since that is not C++ constexpr capable, we have just removed the bit fields with the proper C++20  library implementation. So now the newer floating-point types (bfloat and areal) support constexpr.

@thorsten-ottosen
I double checked the Win32 regression results and they pass for the native 32bit platform:
Build started...
1>------ Build started: Project: RUN_TESTS, Configuration: Release Win32 ------
1>Test project C:/Users/tomtz/Documents/dev/win32/universal/build
1>        Start   1: posit_api
1>  1/162 Test   #1: posit_api ................................   Passed    0.06 sec
1>        Start   2: posit_assignment
1>  2/162 Test   #2: posit_assignment .........................   Passed    0.04 sec
1>        Start   3: posit_casting
1>  3/162 Test   #3: posit_casting ............................   Passed    0.03 sec
1>        Start   4: posit_constexpr_test
1>  4/162 Test   #4: posit_constexpr_test .....................   Passed    0.03 sec
1>        Start   5: posit_decode
1>  5/162 Test   #5: posit_decode .............................   Passed    0.04 sec
1>        Start   6: posit_numeric_limits
1>  6/162 Test   #6: posit_numeric_limits .....................   Passed    0.04 sec
1>        Start   7: posit_postfix
1>  7/162 Test   #7: posit_postfix ............................   Passed    0.03 sec
1>        Start   8: posit_prefix
1>  8/162 Test   #8: posit_prefix .............................   Passed    0.03 sec
1>        Start   9: posit_quire_accumulation
1>  9/162 Test   #9: posit_quire_accumulation .................   Passed    0.05 sec
1>        Start  10: posit_reciprocal_tables
1> 10/162 Test  #10: posit_reciprocal_tables ..................   Passed    0.03 sec
1>        Start  11: posit_serialization
1> 11/162 Test  #11: posit_serialization ......................   Passed    0.03 sec
1>        Start  12: posit_conversion
1> 12/162 Test  #12: posit_conversion .........................   Passed    1.37 sec
1>        Start  13: posit_conversion_functions
1> 13/162 Test  #13: posit_conversion_functions ...............   Passed    0.05 sec
1>        Start  14: posit_logic
1> 14/162 Test  #14: posit_logic ..............................   Passed    0.24 sec
1>        Start  15: posit_addition
1> 15/162 Test  #15: posit_addition ...........................   Passed    0.46 sec
1>        Start  16: posit_complex_add
1> 16/162 Test  #16: posit_complex_add ........................   Passed    3.76 sec
1>        Start  17: posit_decrement
1> 17/162 Test  #17: posit_decrement ..........................   Passed    0.05 sec
1>        Start  18: posit_division
1> 18/162 Test  #18: posit_division ...........................   Passed    0.59 sec
1>        Start  19: posit_fma
1> 19/162 Test  #19: posit_fma ................................   Passed    0.03 sec
1>        Start  20: posit_increment
1> 20/162 Test  #20: posit_increment ..........................   Passed    0.03 sec
1>        Start  21: posit_literals
1> 21/162 Test  #21: posit_literals ...........................   Passed    2.86 sec
1>        Start  22: posit_multiplication
1> 22/162 Test  #22: posit_multiplication .....................   Passed    0.43 sec
1>        Start  23: posit_negation
1> 23/162 Test  #23: posit_negation ...........................   Passed    0.09 sec
1>        Start  24: posit_reciprocation
1> 24/162 Test  #24: posit_reciprocation ......................   Passed   11.39 sec
1>        Start  25: posit_sqrt
1> 25/162 Test  #25: posit_sqrt ...............................   Passed    0.23 sec
1>        Start  26: posit_subtraction
1> 26/162 Test  #26: posit_subtraction ........................   Passed    0.41 sec
1>        Start  27: posit_classify
1> 27/162 Test  #27: posit_classify ...........................   Passed    0.03 sec
1>        Start  28: posit_exponent
1> 28/162 Test  #28: posit_exponent ...........................   Passed    0.35 sec
1>        Start  29: posit_hyperbolic
1> 29/162 Test  #29: posit_hyperbolic .........................   Passed    0.04 sec
1>        Start  30: posit_logarithm
1> 30/162 Test  #30: posit_logarithm ..........................   Passed    0.03 sec
1>        Start  31: posit_pow
1> 31/162 Test  #31: posit_pow ................................   Passed    0.27 sec
1>        Start  32: posit_trigonometry
1> 32/162 Test  #32: posit_trigonometry .......................   Passed    0.05 sec
1>        Start  33: posit_truncate
1> 33/162 Test  #33: posit_truncate ...........................   Passed    0.03 sec
1>        Start  34: fast_posit_128_4
1> 34/162 Test  #34: fast_posit_128_4 .........................   Passed    3.83 sec
1>        Start  35: fast_posit_16_1
1> 35/162 Test  #35: fast_posit_16_1 ..........................   Passed   24.68 sec
1>        Start  36: fast_posit_256_5
1> 36/162 Test  #36: fast_posit_256_5 .........................   Passed   12.78 sec
1>        Start  37: fast_posit_2_0
1> 37/162 Test  #37: fast_posit_2_0 ...........................   Passed    0.04 sec
1>        Start  38: fast_posit_32_2
1> 38/162 Test  #38: fast_posit_32_2 ..........................   Passed   39.01 sec
1>        Start  39: fast_posit_3_0
1> 39/162 Test  #39: fast_posit_3_0 ...........................   Passed    0.04 sec
1>        Start  40: fast_posit_48_2
1> 40/162 Test  #40: fast_posit_48_2 ..........................   Passed   14.62 sec
1>        Start  41: fast_posit_4_0
1> 41/162 Test  #41: fast_posit_4_0 ...........................   Passed    0.04 sec
1>        Start  42: fast_posit_64_3
1> 42/162 Test  #42: fast_posit_64_3 ..........................   Passed   22.25 sec
1>        Start  43: fast_posit_8_0
1> 43/162 Test  #43: fast_posit_8_0 ...........................   Passed    0.14 sec
1>        Start  44: fast_posit_8_1
1> 44/162 Test  #44: fast_posit_8_1 ...........................   Passed    0.36 sec
1>        Start  45: fast_quire_32_2
1> 45/162 Test  #45: fast_quire_32_2 ..........................   Passed    2.31 sec
1>        Start  46: aposit_add
1> 46/162 Test  #46: aposit_add ...............................   Passed    0.04 sec
1>        Start  47: areal
1> 47/162 Test  #47: areal ....................................   Passed    0.03 sec
1>        Start  48: double
1> 48/162 Test  #48: double ...................................   Passed    0.03 sec
1>        Start  49: fixpnt
1> 49/162 Test  #49: fixpnt ...................................   Passed    0.03 sec
1>        Start  50: float
1> 50/162 Test  #50: float ....................................   Passed    0.03 sec
1>        Start  51: float2posit
1> 51/162 Test  #51: float2posit ..............................   Passed    0.03 sec
1>        Start  52: ieee
1> 52/162 Test  #52: ieee .....................................   Passed    0.03 sec
1>        Start  53: lns
1> 53/162 Test  #53: lns ......................................   Passed    0.03 sec
1>        Start  54: longdouble
1> 54/162 Test  #54: longdouble ...............................   Passed    0.03 sec
1>        Start  55: plimits
1> 55/162 Test  #55: plimits ..................................   Passed    0.03 sec
1>        Start  56: posit
1> 56/162 Test  #56: posit ....................................   Passed    0.03 sec
1>        Start  57: propenv
1> 57/162 Test  #57: propenv ..................................   Passed    0.03 sec
1>        Start  58: propp
1> 58/162 Test  #58: propp ....................................   Passed    0.03 sec
1>        Start  59: propq
1> 59/162 Test  #59: propq ....................................   Passed    0.03 sec
1>        Start  60: signedint
1> 60/162 Test  #60: signedint ................................   Passed    0.03 sec
1>        Start  61: unsignedint
1> 61/162 Test  #61: unsignedint ..............................   Passed    0.03 sec
1>        Start  62: utils_lookup_arithmetic
1> 62/162 Test  #62: utils_lookup_arithmetic ..................   Passed    0.03 sec
1>        Start  63: utils_reverse_view
1> 63/162 Test  #63: utils_reverse_view .......................   Passed    0.03 sec
1>        Start  64: edu_tables_areals
1> 64/162 Test  #64: edu_tables_areals ........................   Passed    0.04 sec
1>        Start  65: edu_tables_bfloats
1> 65/162 Test  #65: edu_tables_bfloats .......................   Passed    0.06 sec
1>        Start  66: edu_tables_fixpnts
1> 66/162 Test  #66: edu_tables_fixpnts .......................   Passed    0.15 sec
1>        Start  67: edu_tables_posits
1> 67/162 Test  #67: edu_tables_posits ........................   Passed    0.06 sec
1>        Start  68: edu_integer_basic_operators
1> 68/162 Test  #68: edu_integer_basic_operators ..............   Passed    0.03 sec
1>        Start  69: edu_fixpnt_basic_operators
1> 69/162 Test  #69: edu_fixpnt_basic_operators ...............   Passed    0.03 sec
1>        Start  70: edu_bfloat_basic_operators
1> 70/162 Test  #70: edu_bfloat_basic_operators ...............   Passed    0.03 sec
1>        Start  71: edu_areal_basic_operators
1> 71/162 Test  #71: edu_areal_basic_operators ................   Passed    0.03 sec
1>        Start  72: edu_unum_basic_operators
1> 72/162 Test  #72: edu_unum_basic_operators .................   Passed    0.03 sec
1>        Start  73: edu_posit_basic_operators
1> 73/162 Test  #73: edu_posit_basic_operators ................   Passed    0.03 sec
1>        Start  74: edu_posit_components
1> 74/162 Test  #74: edu_posit_components .....................   Passed    0.03 sec
1>        Start  75: edu_posit_conversion
1> 75/162 Test  #75: edu_posit_conversion .....................   Passed    0.03 sec
1>        Start  76: edu_posit_discretization_curves
1> 76/162 Test  #76: edu_posit_discretization_curves ..........   Passed    0.03 sec
1>        Start  77: edu_posit_enumeration
1> 77/162 Test  #77: edu_posit_enumeration ....................   Passed    0.03 sec
1>        Start  78: edu_posit_exceptions
1> 78/162 Test  #78: edu_posit_exceptions .....................   Passed    0.03 sec
1>        Start  79: edu_posit_exponents
1> 79/162 Test  #79: edu_posit_exponents ......................   Passed    0.03 sec
1>        Start  80: edu_posit_extract
1> 80/162 Test  #80: edu_posit_extract ........................   Passed    0.03 sec
1>        Start  81: edu_posit_fractions
1> 81/162 Test  #81: edu_posit_fractions ......................   Passed    0.07 sec
1>        Start  82: edu_posit_raw_bit_patterns
1> 82/162 Test  #82: edu_posit_raw_bit_patterns ...............   Passed    0.03 sec
1>        Start  83: edu_posit_regimes
1> 83/162 Test  #83: edu_posit_regimes ........................   Passed    0.03 sec
1>        Start  84: edu_posit_scales
1> 84/162 Test  #84: edu_posit_scales .........................   Passed    0.04 sec
1>        Start  85: edu_posit_serialization
1> 85/162 Test  #85: edu_posit_serialization ..................   Passed    0.03 sec
1>        Start  86: edu_posit_signalling_nar
1> 86/162 Test  #86: edu_posit_signalling_nar .................   Passed    0.03 sec
1>        Start  87: edu_posit_ulp
1> 87/162 Test  #87: edu_posit_ulp ............................   Passed    0.54 sec
1>        Start  88: edu_posit_values
1> 88/162 Test  #88: edu_posit_values .........................   Passed    0.03 sec
1>        Start  89: edu_quire_quires
1> 89/162 Test  #89: edu_quire_quires .........................   Passed    0.03 sec
1>        Start  90: edu_valid_intervals
1> 90/162 Test  #90: edu_valid_intervals ......................   Passed    0.03 sec
1>        Start  91: edu_lns_basic_operators
1> 91/162 Test  #91: edu_lns_basic_operators ..................   Passed    0.03 sec
1>        Start  92: blas_hilbert
1> 92/162 Test  #92: blas_hilbert .............................   Passed    0.33 sec
1>        Start  93: blas_inverse
1> 93/162 Test  #93: blas_inverse .............................   Passed    0.06 sec
1>        Start  94: blas_l1_fused_dot
1> 94/162 Test  #94: blas_l1_fused_dot ........................   Passed    0.03 sec
1>        Start  95: blas_l2_fused_mv
1> 95/162 Test  #95: blas_l2_fused_mv .........................   Passed    0.03 sec
1>        Start  96: blas_l3_fused_mm
1> 96/162 Test  #96: blas_l3_fused_mm .........................   Passed    0.04 sec
1>        Start  97: blas_lu
1> 97/162 Test  #97: blas_lu ..................................   Passed    0.04 sec
1>        Start  98: blas_norms
1> 98/162 Test  #98: blas_norms ...............................   Passed    0.03 sec
1>        Start  99: chaos_bakers_map
1> 99/162 Test  #99: chaos_bakers_map .........................   Passed    0.04 sec
1>        Start 100: chaos_time_precision_lyapunov
1>100/162 Test #100: chaos_time_precision_lyapunov ............   Passed    0.03 sec
1>        Start 101: cheby_nodes
1>101/162 Test #101: cheby_nodes ..............................   Passed    0.03 sec
1>        Start 102: cheby_skeleton
1>102/162 Test #102: cheby_skeleton ...........................   Passed    0.03 sec
1>        Start 103: complex_compute
1>103/162 Test #103: complex_compute ..........................   Passed    0.03 sec
1>        Start 104: crypto_fermat
1>104/162 Test #104: crypto_fermat ............................   Passed    3.03 sec
1>        Start 105: crypto_large_lcm
1>105/162 Test #105: crypto_large_lcm .........................   Passed   20.24 sec
1>        Start 106: crypto_pollard_rho
1>106/162 Test #106: crypto_pollard_rho .......................   Passed    0.04 sec
1>        Start 107: crypto_quadratic_sieve
1>107/162 Test #107: crypto_quadratic_sieve ...................   Passed    0.03 sec
1>        Start 108: dsp_adc_mapping
1>108/162 Test #108: dsp_adc_mapping ..........................   Passed    0.04 sec
1>        Start 109: dsp_fir_filter
1>109/162 Test #109: dsp_fir_filter ...........................   Passed    0.04 sec
1>        Start 110: engineering_chem_equilibrium
1>110/162 Test #110: engineering_chem_equilibrium .............   Passed    0.03 sec
1>        Start 111: engineering_water
1>111/162 Test #111: engineering_water ........................   Passed    0.03 sec
1>        Start 112: math_decimal_lpp
1>112/162 Test #112: math_decimal_lpp .........................   Passed    8.34 sec
1>        Start 113: math_distinct_powers
1>113/162 Test #113: math_distinct_powers .....................   Passed    0.03 sec
1>        Start 114: math_largest_palindrome_product
1>114/162 Test #114: math_largest_palindrome_product ..........   Passed    0.30 sec
1>        Start 115: math_numbers_irrational
1>115/162 Test #115: math_numbers_irrational ..................   Passed    0.07 sec
1>        Start 116: math_numbers_rational
1>116/162 Test #116: math_numbers_rational ....................   Passed    0.03 sec
1>        Start 117: math_pascals_triangle
1>117/162 Test #117: math_pascals_triangle ....................   Passed    0.35 sec
1>        Start 118: math_primes
1>118/162 Test #118: math_primes ..............................   Passed   11.72 sec
1>        Start 119: math_sincospi
1>119/162 Test #119: math_sincospi ............................   Passed    0.03 sec
1>        Start 120: math_stirlings_approximation
1>120/162 Test #120: math_stirlings_approximation .............   Passed    0.10 sec
1>        Start 121: numeric_limits
1>121/162 Test #121: numeric_limits ...........................   Passed    0.03 sec
1>        Start 122: numeric_midpoint
1>122/162 Test #122: numeric_midpoint .........................   Passed    0.03 sec
1>        Start 123: numeric_numbers
1>123/162 Test #123: numeric_numbers ..........................   Passed    0.03 sec
1>        Start 124: numeric_posit_properties
1>124/162 Test #124: numeric_posit_properties .................   Passed    0.04 sec
1>        Start 125: numeric_residual
1>125/162 Test #125: numeric_residual .........................   Passed    0.06 sec
1>        Start 126: numeric_rump_equation
1>126/162 Test #126: numeric_rump_equation ....................   Passed    0.04 sec
1>        Start 127: numeric_ulp_math
1>127/162 Test #127: numeric_ulp_math .........................   Passed    0.03 sec
1>        Start 128: ode_first-order-ode
1>128/162 Test #128: ode_first-order-ode ......................   Passed    0.04 sec
1>        Start 129: ode_general-runge-kutta
1>129/162 Test #129: ode_general-runge-kutta ..................   Passed    0.03 sec
1>        Start 130: ode_rungekutta
1>130/162 Test #130: ode_rungekutta ...........................   Passed    0.05 sec
1>        Start 131: pde_cg
1>131/162 Test #131: pde_cg ...................................   Passed    5.02 sec
1>        Start 132: pde_gauss_seidel
1>132/162 Test #132: pde_gauss_seidel .........................   Passed    0.05 sec
1>        Start 133: pde_jacobi
1>133/162 Test #133: pde_jacobi ...............................   Passed    0.03 sec
1>        Start 134: pde_laplace
1>134/162 Test #134: pde_laplace ..............................   Passed    0.03 sec
1>        Start 135: pde_sor
1>135/162 Test #135: pde_sor ..................................   Passed    0.05 sec
1>        Start 136: roots_bisection
1>136/162 Test #136: roots_bisection ..........................   Passed    0.04 sec
1>        Start 137: roots_rpoly_ak1
1>137/162 Test #137: roots_rpoly_ak1 ..........................   Passed    0.03 sec
1>        Start 138: science_iso_constants
1>138/162 Test #138: science_iso_constants ....................   Passed    0.03 sec
1>        Start 139: science_physics_constants
1>139/162 Test #139: science_physics_constants ................   Passed    0.04 sec
1>        Start 140: sequences_fibonacci
1>140/162 Test #140: sequences_fibonacci ......................   Passed    0.05 sec
1>        Start 141: sequences_tribonacci
1>141/162 Test #141: sequences_tribonacci .....................   Passed    0.05 sec
1>        Start 142: stl_sequential_containers
1>142/162 Test #142: stl_sequential_containers ................   Passed   27.00 sec
1>        Start 143: trig_arbitrary_precision_pi
1>143/162 Test #143: trig_arbitrary_precision_pi ..............   Passed    0.33 sec
1>        Start 144: weather_error_growth_atmospheric_model
1>144/162 Test #144: weather_error_growth_atmospheric_model ...   Passed    0.03 sec
1>        Start 145: mp_secant
1>145/162 Test #145: mp_secant ................................   Passed    0.03 sec
1>        Start 146: mp_taylor
1>146/162 Test #146: mp_taylor ................................   Passed    0.03 sec
1>        Start 147: mp_simpson
1>147/162 Test #147: mp_simpson ...............................   Passed    0.04 sec
1>        Start 148: mp_trapezoidal
1>148/162 Test #148: mp_trapezoidal ...........................   Passed    0.03 sec
1>        Start 149: mp_spline
1>149/162 Test #149: mp_spline ................................   Passed    0.03 sec
1>        Start 150: optimal_secant
1>150/162 Test #150: optimal_secant ...........................   Passed    0.02 sec
1>        Start 151: mp_cg
1>151/162 Test #151: mp_cg ....................................   Passed    0.04 sec
1>        Start 152: mp_cg_mvdot_cmpdot
1>152/162 Test #152: mp_cg_mvdot_cmpdot .......................   Passed    3.71 sec
1>        Start 153: mp_cg_mvdot_cmpfdp
1>153/162 Test #153: mp_cg_mvdot_cmpfdp .......................   Passed    3.78 sec
1>        Start 154: mp_cg_mvfdp_cmpdot
1>154/162 Test #154: mp_cg_mvfdp_cmpdot .......................   Passed    4.67 sec
1>        Start 155: mp_cg_mvfdp_cmpfdp
1>155/162 Test #155: mp_cg_mvfdp_cmpfdp .......................   Passed    3.71 sec
1>        Start 156: playground_efunc_posits
1>156/162 Test #156: playground_efunc_posits ..................   Passed    0.04 sec
1>        Start 157: playground_efunc_valids
1>157/162 Test #157: playground_efunc_valids ..................   Passed    0.03 sec
1>        Start 158: playground_gismo_test
1>158/162 Test #158: playground_gismo_test ....................   Passed    0.04 sec
1>        Start 159: playground_meta_programming
1>159/162 Test #159: playground_meta_programming ..............   Passed    0.04 sec
1>        Start 160: playground_serialization
1>160/162 Test #160: playground_serialization .................   Passed    0.04 sec
1>        Start 161: playground_skeleton
1>161/162 Test #161: playground_skeleton ......................   Passed    0.06 sec
1>        Start 162: playground_type_test
1>162/162 Test #162: playground_type_test .....................   Passed    0.03 sec
1>
1>100% tests passed, 0 tests failed out of 162

The reason this is the case is that the 64bit-ness of the expression addresses a bit by value. That implies that for a 64-bit posit with a max of 61 fraction bits (posit<64,0>) the expression would only use the bottom 6 bits. Otherwise stated, any truncation of a 64bit index value to 32bits will always yield a correct index for a 64-bit posit.
I do need to find a way to clean up that code so that these warnings are removed, so I won't close this issue until I got that done.

Thanks for the explanation.

I'm now getting a direct crash with visual C++ from the code in line 159:
	_exp[size_t(es - 1ull - i)] = tmp[msb - i];

The problem is with msb:
	// start of exponent is nbits-1 - (sign_bit + regime_bits)
	int64_t msb = static_cast<int64_t>(nbits - 1ul - (1ul + nrRegimeBits));

nbits is 64 and nrRegimeBits 63. So the sum (63 - 1) - 64 wraps around since its unsigned, well-defined, but leads to a very large msb, which then leads to failure in line 159. I think it could be useful to employ some assertions on the range of things to catch breaking expectations early on (for example assert( msb >= 0 && msb <= nbits ) ).
Minimal test case to reproduce:
        using T = sw::universal::posit<64,3>;
        auto val = T(9.01);
        auto product = val * std::numeric_limits<T>::min();

Let me expand a little on how one could add a small helper class that could make the code more explicit in its assumptions (untested code)
template< class T, T min, T max >
struct constrained_value
{
   T value;

    template< class U >
    constrained_value( U u ) noexcept :  value( static_cast<T>( u ) )
    {
         assert( static_cast<U>( value ) == u );
         assert( value >= min );
         assert( value <= max );
    }

    constrained_value( T t ) noexcept : value( t )
    {
         assert( value >= min );
         assert( value <= max );
    }
    operator T() const noexcept
    {
         return value;
    }
};

using msb_type = constained_value<int64_t,0,X>;

@thorsten-ottosen thanks for that RCA. Can you share the driver/application that triggered it, I would like to add those to the regression suite. Looks like a minpos/maxpos case, but I like to know more.

I can share the code, but the example above is all that should be needed to trigger the problem. But it depends on boost (boost.test and other libs).
My compiler is the following:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional>cl
Microsoft (R) C/C++ Optimizing Compiler Version 19.16.27044 for x86
Copyright (C) Microsoft Corporation.  All rights reserved.

running on windows. In release mode it just crashed, in debug mode an assertion fire in bitset. Do you need more?

Not able to reproduce your error:

I need more context to reproduce your error.

Ok. It's a 32-bit binary, built on 64 bit windows 10 OS. It is version 3.0.0 of the universal lib. Compile flags include:
-std:c++17  /GR /EHsc  /GS- /Zc:rvalueCast,referenceBinding

I am postulating that you found some dead code in the library. I am cleaning that up and will merge that into master.

I am now guarding the fast specialization requests, if we don't have a fast specialization implementation available yet:
5>Fast specialization of posit<2,0>
4>Fast specialization of posit<256,4> requested but ignored as fast implemention is TBD
2>Fast specialization of posit<128,4> requested but ignored as fast implemention is TBD
6>Fast specialization of posit<32,2>
7>Fast specialization of posit<3,0>
11>Fast specialization of posit<8,0>
13>Fast specialization of posit<32,2>
9>Fast specialization of posit<4,0>
10>Fast specialization of posit<64,3> requested but ignored as fast implemention is TBD
8>Fast specialization of posit<48,2> requested but ignored as fast implemention is TBD

You found the dead code that I had guarded in the header <universal/posit/posit>. I am now guarding it in the actual specialization file, providing better compilation feedback.
Thank you for taking the time to RCA it, so that we can make the library better.

commit fixes this issue

I tried again after a complete cleanup of my cmake build-folders, and now the code works without problems.
Apologies for the noise. Thanks for the feedback.

You did find a problem, so you raised just the right level of noise.
I am glad this resolved the issue. Let me know if you use posit<64,3> (or the new standard posit<64,2>) a lot. We can work on making it faster.

My plan was to use posit<64,4> (based on the range given in  Gustafson & Yonemoto), but I can see that I actually used posit<63,3> since that is what you used in your paper. Is there any particluar reason you choose to specialize posit<32,2> and posit<64,3> instead of posit<32,3> and posit<64,4> ?

The posit reference standard started off with this set of byte-aligned posits:
posit<8,0>
posit<16,1>
posit<32,2>
posit<64,3>
posit<128,4>
posit<256,5>

That is what you will see being used throughout the Universal library educational and application examples.
However, application usage revealed that the posit<8,0> doesn't have quite the dynamic range needed to be widely useful. In particular, for DL, the posit<8,2> was found to be a good fit, enabling training at accuracy competitive with fp32. This has lead to the latest posit standard to propose the following 'standard' byte-aligned posits:
posit<8,2>
posit<16,2>
posit<32,2>
posit<64,2>

This design also supports up and down conversions at lower cost.
As I indicated, the Universal roadmap includes a new block-based computational class (the blocktriple) to make all the Real number systems faster. This is being development with the bfloat and areal and when we feel we have the basics in place, we will upgrade the posit class to use the blocktriple, instead of the bitset.

Ok.
In terms of performance, I think 100M pops is absolutely necessary for it to be used in production. In the short term, I can easily test with slower versions. I think I prefer posit<64,3>, but can test if it makes any practical difference to posit<64,2>. We work with Bayesian AI, so precision in [0,1] is important, but we need some precision around larger number too (using a quire seems prohibitive).

@thorsten-ottosen ok, let's make it a task to get you a fast posit<64,#>

Thanks!


Fixed detecting pointers as a Scanner.

Hi!
I have code like this:
type File struct {
  ID        int
  Info *FileInfo `sql:"type:jsonb"`
}

type FileInfo struct {
  // ... some stuff
}

func (f FileInfo) Value() (driver.Value, error) {
  valueString, err := json.Marshal(f)
  return string(valueString), err
}

func (f *FileInfo) Scan(value interface{}) error {
  if err := json.Unmarshal(value.([]byte), &f); err != nil {
    return err
  }
  return nil
}

And it works pretty cool. Except auto migrations. It refuse to create a column for FileInfo filed.
This PR fixes it.
Am I doing something wrong maybe?

Hi @NOX73,
Thank you for your pull request, just fixed that issue.


Create a PDF version of main content

Having content in pdf will let people to read it offline. Update the content in pdf version.

book_en.pdf
[Missing] The initial content is converted into pdf but following chapters are missing.

ES6 Concepts
File System
Functions
- Closures
- Recursive Functions
- Set Interval
- Set Timeout

Closing this as we have created separate issues  [#209  #210].


junest: include VERSION file in the package so --version works properly

This pull request adds the file VERSION from the source code to the package so that the $ junest --version works properly.
Before this fix:
$ junest --version

cat: /nix/store/4gxxgvh6w7kvzmf75jfdxhaj9lpvg4vr-junest-7.4.9/VERSION: No such file or directory
JuNest

After this fix
$ junest --version

JuNest 7.4.10

Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[x] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[x] Tested basic functionality of all binary files (usually in ./result/bin/)
24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[ ] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

Would be better to substitute https://github.com/fsquillace/junest/blob/0037f96e159a143e37db978e537e3fb362ba3a5b/bin/junest#L81 instead, since it's not a really good practice to add more nonstandard locations. Also installPhase lacks preInstall and postInstall.

Would be better to substitute https://github.com/fsquillace/junest/blob/0037f96e159a143e37db978e537e3fb362ba3a5b/bin/junest#L81 instead, since it's not a really good practice to add more nonstandard locations. Also installPhase lacks preInstall and postInstall.

I opted to replace the cat command entirely with the package version.


The subscriptions tree must be pruned in order to prevent severe performance issues

We have detected a severe performance issue in the following scenario:

clients connect with the cleanSession flag setted to true.
after establishing a new connection against the broker, clients subscribe to a different MQTT topic of their own. These topics are not shared among clients.

Each time a client disconnects, its subscriptions are removed from the subscription tree. But the nodes remain on the tree with an empty subscriptions list.
When the broker processes a publish message, it traverses the whole subscription tree. The number of empty nodes grows each time a client disconnects, and this increments the time the broker takes to handle a PUBLISH message (from less than 20 ms after starting up the broker to 200 ms after several hours).
This issue also makes the broker vulnerable to very simple DDoS attacks, an can be easily fixed by modifying the SubscriptionsStore and TreeNode classes.

Thanks @lbarriosh fro the PR, but there some things I don't understand.
How the modifications to NettyAcceptor influence the solution to the bug? if they are not part of the solution, they shouldn't be part of the PR.
Instead wrapping TreeNode with PrunedTreeNode I would have fixed directly the TreeNode, at the end PrunedTreeNode is just a bean to wrap a TreeNode and a flag, so probably is better to move that flag into TreeNode.

Hi @andsel

How the modifications to NettyAcceptor influence the solution to the bug? if they are not part of the solution, they shouldn't be part of the PR.

You're right. You can ignore all the changes except the ones at the TreeNode.java file. It seems that your codebase has evolved a lot since our last PR: that's where the other changes come from.

Instead wrapping TreeNode with PrunedTreeNode I would have fixed directly the TreeNode, at the end PrunedTreeNode is just a bean to wrap a TreeNode and a flag, so probably is better to move that flag into TreeNode.

If the TreeNode instances are not serialized anywhere, the alternative you suggest is the best one. The TreeNode class is used at the core of the broker, and we didn't want to break anything up.
Regards,
Luis

Hi @lbarriosh thanks for your suggestion, fixed this PR directly on master with e5c46e7a55591840fd4fc7eebedb9c719d5d0ba9


Add a github workflow to run shellcheck on shellscripts

Add shellcheck to the builder image https://github.com/build-trust/ockam/blob/develop/tools/docker/builder/Dockerfile
Add a new workflow here https://github.com/build-trust/ockam/tree/develop/.github/workflows
that will run whenever any shellscript in the repo is added or changed

Shellcheck also ships with an official container, if that is well maintained then we can just use that container instead of the ockam-builder image
https://github.com/koalaman/shellcheck

Hey, can I work on this?

@mohitsaxenaknoldus of course, all yours. Let me know if you have any questions

I've opened an PR for adding shellcheck to the CI.

Added in https://github.com/build-trust/ockam/pull/3689, thank you @elpiel


refactor: move ShowCreateTable and CreateDatabase to StatementExecutor

I hereby agree to the terms of the GreptimeDB CLA
What's changed and what's your intention?
refactor: move ShowCreateTable and CreateDatabase to StatementExecutor
Checklist

[ ]  I have written the necessary rustdoc comments.
[ ]  I have added the necessary unit tests and integration tests.

Refer to a related PR or issue link (optional)

@WenyXu There are some conflicts.

@fengjiachun @zhongzc PTAL


mutt: 1.5.24 -> 1.6.0

Things done:

[ ] Tested using sandboxing (nix-build --option build-use-chroot true or nix.useChroot on NixOS)
Built on platform(s)

[x] NixOS
[ ] OS X
[ ] Linux

[x] Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[x] Fits CONTRIBUTING.md.

Release notes: http://www.mutt.org/changes.html

Sidebar patches currently do not apply cleanly.

I wonder if we should pin mutt-with-sidebar to its own release. The patches lack behind on any other release.

I updated the diff for Makefile.am and the patch applied.

@the-kenny I'd vote against another dedicated package. Mutt releases do not happen that often. It would be more effort to maintain another package, IMHO!

If the changes are quite easy to backport I'm fine with that. Testing this PR now. Stay tuned.

Merged as 81e23c5.


pretrained model

Can you provide a pre-trained bacckdoor model? This will be of great help to us. Thank you!

Thank you for your interest in our work!
I'm sorry to say that we haven't intentionally retained the backdoored models, due to the substantial storage space needed for the SD models.
However, with the released code and the experiment setup outlined in our paper, it is not difficult to obtain backdoored models. And I'm more than happy to assist with any issues you encounter during replication.


Remove duplicate class types

Is your feature request related to a problem? Please describe.
Not really. Might improve bundle size if unused classes are removed.
Describe the solution you'd like
Similarly to removing exact duplicate classes Headwind should be able to remove duplicate class types. If I add two color classes, like text-red-400 and text-red-600, 400 is redundant and will be overridden by 600 which means 400 could be removed.

Thats an interesting idea, how would you do it?
Even if it doesn't automatically replace it maybe we can get it to emit a warning saying "there are redundant classes"?

Even if it doesn't automatically replace it maybe we can get it to emit a warning saying "there are redundant classes"?

I like this better since I feel most of the conflicts could lead to unexpected resolutions. Of course the applied styles would be the same but imho it's better to let users know and let them deal with that on their own like most linters do. Maybe we could add a fix option to automatically handle those like eslint or stylelint do? Should this feature become its own stylelint plugin then?

Would be perfect to have it into stylelint, agreed ! 🙏🏻

Core's tailwindcss-intellisense has been taking care of this for a while so I guess we can close? No need to duplicate functionality unless required by some kind of incompatible tooling.


Account status

Hi physics!
i had this error while i was checking the account status, it shows 2 cities and then goes error.
when you update if it easy could you when we choose 4( account status) then asks us or show a list with our cities so we can choose what city we like to see ?
it is easier than scrolling 11 times if i want to see some info in 12 city
thanks!
also the activation miracle got me error
MIRACLE
Traceback (most recent call last):
File "/usr/local/bin/ikabot", line 10, in
sys.exit(main())
File "/usr/local/lib/python3.6/dist-packages/ikabot/command_line.py", line 110, in main
start()
File "/usr/local/lib/python3.6/dist-packages/ikabot/command_line.py", line 103, in start
menu(s)
File "/usr/local/lib/python3.6/dist-packages/ikabot/command_line.py", line 85, in menu
menu(s)
File "/usr/local/lib/python3.6/dist-packages/ikabot/command_line.py", line 85, in menu
menu(s)
File "/usr/local/lib/python3.6/dist-packages/ikabot/command_line.py", line 82, in menu
menu_actionseleccion - 1
File "/usr/local/lib/python3.6/dist-packages/ikabot/funcion/activarMilagro.py", line 57, in activarMilagro
islas = obtenerMilagrosDisponibles(s)
File "/usr/local/lib/python3.6/dist-packages/ikabot/funcion/activarMilagro.py", line 20, in obtenerMilagrosDisponibles
idsIslas = getIdsdeIslas(s)
File "/usr/local/lib/python3.6/dist-packages/ikabot/helpers/pedirInfo.py", line 217, in getIdsdeIslas
ciudad = getCiudad(html)
File "/usr/local/lib/python3.6/dist-packages/ikabot/helpers/getJson.py", line 95, in getCiudad
ciudad['consumo'] = getConsumoDeVino(html)
File "/usr/local/lib/python3.6/dist-packages/ikabot/helpers/recursos.py", line 20, in getConsumoDeVino
return int(rta.group(1))
ValueError: invalid literal for int() with base 10: ''
ACCOUNT STATUS
[Enter]
Traceback (most recent call last):
File "/usr/local/bin/ikabot", line 10, in
sys.exit(main())
File "/usr/local/lib/python3.6/dist-packages/ikabot/command_line.py", line 110, in main
start()
File "/usr/local/lib/python3.6/dist-packages/ikabot/command_line.py", line 103, in start
menu(s)
File "/usr/local/lib/python3.6/dist-packages/ikabot/command_line.py", line 82, in menu
menu_actionseleccion - 1
File "/usr/local/lib/python3.6/dist-packages/ikabot/funcion/getStatus.py", line 30, in getStatus
ciudad = getCiudad(html)
File "/usr/local/lib/python3.6/dist-packages/ikabot/helpers/getJson.py", line 95, in getCiudad
ciudad['consumo'] = getConsumoDeVino(html)
File "/usr/local/lib/python3.6/dist-packages/ikabot/helpers/recursos.py", line 20, in getConsumoDeVino
return int(rta.group(1))
ValueError: invalid literal for int() with base 10: ''

Yes, i agree, is tedious to scroll 11 times, i will fix that.
in what server did you get the errors?
It seems that the same city caused both errors. Do you have a city where there is no wine consumption? May be it doesn't even have a tabern?
sounds like a really easy fix, but i need to be able to replicate the error first.

would you check if it is by any chance fixed?
plus, try the getStatus feature, now it should be easier to use.
let me know!

sorry for my delay!
the error was in both cities with tavers and without.
i did checked now after the update , both miracles and status works great!
i didn't try to get status from a city without wine consumption or without tavern.
i will try it later tonight and i will let you know.
thanks for the super fast update!

great!
thank you for letting me know :)


move NetworkManager.UpdateScene code into OnSceneLoaded

from discord (mrgadget): supposedly this wouldn't work with addressables?


[Doc] Fix wrong argument name

Motivation
Wrong document is confusing.

pulsar API documentation

Modifications
Fixed. Correct argument name is send_timeout_millis not send_timeout_seconds
https://github.com/apache/pulsar/blob/62e3df39155599f56f736f103a71069d1778a6c6/pulsar-client-cpp/python/pulsar/__init__.py#L437
Verifying this change

[ ] Make sure that the change passes the CI checks.

This change is a trivial rework / code cleanup without any test coverage.
Does this pull request potentially affect one of the following parts:

Dependencies (does it add or upgrade a dependency): (no)
The public API: (no)
The schema: (no)
The default values of configurations: (no)
The wire protocol: (no)
The rest endpoints: (no)
The admin cli options: (no)
Anything that affects deployment: (no)

Documentation

Does this pull request introduce a new feature? (no)

@yuku nice catch. I'm not sure if it will be clearer to use "millisecond" in the description.


Update MD file on new branch 2017-25-10_10-11-08

:warning: Validation status: warnings

File
Status
Preview URL
Details

split/ref2.yml
:warning:Warning

Details

split/updateTestRef.md
:white_check_mark:Succeeded

split/ref2.yml

[Warning] Uid(Microsoft.SqlServer.Server) has already been defined in test_link_to_con.yml.
Line 1: [Warning] Invalid file link:(~/content2.md).

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


GIF export

Summary
export traffic simulation screen to gif
Detail

move assets/ to example/assets/
change the example commands in README accordingly
add pillow==10.4.0 to environment.yml
add plot_gif option for exporting gif
add simulation example to README

Thanks for the PR! @jhoon-cho is the expected behavior that the user runs the entire simulation? How long should this take? Is it possible to only render and save the gif on the last simulation? I think right now, all 15 simulations are being rendered.

@cathywu At the current stage, I hard-coded to record only second to the last simulation since the last simulation has only one vehicle running under the given random seed. It may depend on the screen size, but it takes less than 10 secs for my 14-inch MacBook pro.

Hm, when I run $ python example/simulator.py --run-idm --plot-gif, I get multiple simulation runs... should I expect only one?
pygame 2.6.0 (SDL 2.28.4, Python 3.8.0)
Hello from the pygame community. https://www.pygame.org/contribute.html
INFO:root:Arugments {'run_idm': True, 'run_custom': False, 'no_render': False, 'plot_gif': True}
INFO:root:Starting the simulator...
INFO:root:Created info_object...
INFO:root:Set screen_width...
INFO:root:Created Environment Object...
INFO:root:Running IDM Simulation No.  1 with 11 vehicles and road length of  41 meters.
INFO:root:Running IDM Simulation No.  2 with  2 vehicles and road length of  27 meters.
INFO:root:Running IDM Simulation No.  3 with 80 vehicles and road length of 145 meters.
INFO:root:End of the simulation...

plot-gif option includes all 15 simulation runs to have fundamental diagrams with multiple points. Only at the 14th run does it capture the screen to plot a gif video.

Then, how does your run complete in 10 seconds if you need to render the first 14 simulations first? I don't want to wait that long!

@cathywu The recent commit (0b40ffcf8942cb0451767e25cd78ec4a80488e07) is for rendering only at 14th simulation.


Newsletter 10: Initial draft

Added a "Learning Material Updates" section for tutorial videos, posts, and books.
Part of #111 ("Newsletter 9: Coordination/Tracking")
Part of #139 ("Newsletter 10: Coordination/Tracking")

I really like the idea of having a seperate section for guides/posts/etc, they've felt a bit shoehorned into the other sections until now 👍


[Feature Request] ServerSync for Mic Drop

May you please add ServerSync to Mic Drop so dedicated servers admins can configure the play settings for their players? This helps not having to have players have to go into the config generated; and improves play consistency.

this mod was written in a few minutes on request, sure I can add that when I get around to (non emergency) valheim modding


We should capture the error from #662 and display a more useful message

#662

Changing so that we only default to the local port if we can actually connect to it (i.e. it's currently running).

We're still getting people reporting this error, so we need to actually do the work to catch it and improve the error message.

Dupe of https://github.com/microsoft/vscode-cosmosdb/issues/866


The input element value is not working

Challenge Add Placeholder Text to a Text Field has an issue.
User Agent is: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36.
Please describe how to reproduce this issue, and include links to screenshots if possible.
My code:

<link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">

CatPhotoApp

Click here for cat photos.

<input type="text" placeholder="this is placeholder text" value="https://bit.ly/fcc-relaxing-cat">

Things cats love:

cat nip

laser pointers

lasagna

Top 3 things cats hate:

flea treatment

thunder

other cats

![1](https://cloud.githubusercontent.com/assets/25280098/22512416/8c4608aa-e85e-11e6-8116-d607b8751d2d.jpg)

**<input type="text" placeholder="cat photo URL" value="https://bit.ly/fcc-relaxing-cat">**

Why you add an input box after the img element after you modified the one on the bottom? If you set the placeholder of that higher input box to "cat photo URL", you'll pass the test.

@nehaypatel you have an error in your code. Check out the chat room to ask for help by clicking the Help button on the challenge page.


pythran in conda-forge

Currently pythran does not seem to be in conda-forge. Is that because the GCC there is not sufficiently recent? Would you mind me giving a try at packaging it there?

That's a great proposal. I maintain my own conda channel (https://anaconda.org/serge-sans-paille/pythran) but I'm okay to switch to conda-forge. The only trick i use is the following:
#!/bin/bash
sed -i -e 's,CC=,CC=/opt/anaconda1anaconda2anaconda3/bin/gcc-4.9,' -e 's,CXX=,CXX=/opt/anaconda1anaconda2anaconda3/bin/g++-4.9,' -e 's,library_dirs=,library_dirs=/opt/anaconda1anaconda2anaconda3/lib ,' -e 's,include_dirs=,include_dirs=/opt/anaconda1anaconda2anaconda3/include ,' -e 's|ldflags=|ldflags=-Wl,-rpath /opt/anaconda1anaconda2anaconda3/lib64 |' pythran/pythran-linux2.cfg
sed -i -e 's,CC=,CC=/opt/anaconda1anaconda2anaconda3/bin/gcc-4.9,' -e 's,CXX=,CXX=/opt/anaconda1anaconda2anaconda3/bin/g++-4.9,' -e 's,library_dirs=,library_dirs=/opt/anaconda1anaconda2anaconda3/lib ,' -e 's,include_dirs=,include_dirs=/opt/anaconda1anaconda2anaconda3/include ,' -e 's|ldflags=|ldflags=-Wl,-rpath /opt/anaconda1anaconda2anaconda3/lib64 |' pythran/pythran-linux.cfg

$PYTHON setup.py install

in the build.sh
Concerning the releases, what is the process when using conda forge? i usually

upload the new version on pypi
update my build recipe on my conda setup
build the conda packages and upload them

With conda-forge you create a new release on pypi or github, and either wait for the @regro-cf-autotick-bot to pick it up automatically or just bump the version number in the recipe. Building and uploading is fully automatic.

This would probably also fix #747.

@serge-sans-paille is third_party/boost patched, or can I use standard boost headers here?

The standard header are ok, they just also include a copy of the non
official boost.simd package.
I can merge #733 if that's helpful for you.

No worries, I don't mind distributing the boost headers for a first version.

Is there a reason why setup.py asks for pytest-runner at build time?

for testing purpose, some users wanted to be able to run the tests and choke on the missing dep, so i included it.

I think the correct way is to add tests_require=['pytest'] in the setup.py:setup call. This way, python setup.py test will install and run the tests, and pip install pythran[test] will pull it in too, but not by default.

Thanks @saraedum for the good work: https://anaconda.org/conda-forge/pythran


[e2e] Find a way to use different jest config files

Problem
We have split views for tablets, and that means there are different behaviours, or scenarios, depending on whether you're on tablet or mobile. That means it is somewhat difficult to do e2e testing because of that in the current setup:
I would like to use <title>.tablet.spec.js for tablet specific e2e tests, but jest will pick on it even when executing yarn e2e-iphone, because I cannot specify that jest should ignore tablet.spec.js when executing that command.
Similarly, we could have <title>.phone.spec.js for phone specific e2e tests.
Finally, the  tests <title>.spec.js would be general and apply to both phones and tablets.
The way detox can be configured at the moment only allows for one jest config file; it would be nice to allow more.
Any ideas? @tbergq

@RobinCsl Just throwing a guess here but https://jestjs.io/docs/en/configuration.html#projects-array-string-projectconfig the projects config might be useful for you.

I will have a look at that, thanks @ferrannp!


False positive for PT005 and function returning Iterator[None]

Minimal snippet:
from collections.abc import Iterator

import pytest

@pytest.fixture()
def _my_fixture_none() -> None:
  return

@pytest.fixture()
def _my_fixture_itor() -> Iterator[None]:
  yield

def test_mytest(
  _my_fixture_none: None,
  _my_fixture_itor: None,
):
    ...

ruff returns error PT005 on _my_fixture_itor. It shouldn't.
According to https://docs.pytest.org/en/latest/reference/reference.html#pytest-fixture

Fixtures can provide their values to test functions using return or yield statements. When using yield the code block after the yield statement is executed as teardown code regardless of the test outcome, and must yield exactly once.

So a fixture that work only by side effect may return None or Iterator[None] - and in fact if you use a fixture that returns Iterator[None] have the variable set to None

Is the suggestion that both implicit return and implicit yield (without a value) should be allowed?

I don't get a PT005 error on this: https://play.ruff.rs/b404e34f-2c6e-4228-a300-cd783adb9980. Can you help me reproduce?

Sorry, it seems there was a fluke from my side.
I got the PT005 because in my actual code I have explicit yield None
In fact I see that I can see the PT005 if I write
@pytest.fixture
def _my_fixture_none() -> None:
    return None

@pytest.fixture
def _my_fixture_itor() -> Iterator[None]:
    try:
        yield None
    finally:
        ...

cfr: https://play.ruff.rs/cd4496f2-4176-4a30-8471-8dee0b8d090a
regarding this gh issue, I understand that the explicit None is not necessary, but should be "functionally equivalent" of the bare return and yield, and it seems a bit strange to me how this is related to the PT005 itself. In any case I can see that the error was in my code, not in ruff.
Maybe it could be possible to better rephrase the error message / add a note in the documentation page?

Thanks for the example!
We decided to deprecate PT005 because it has other flaws and isn't recommended by the community. I close the issue because we don't plan on making improvements to the rule further.


Consider building our requests on top of Tower

I don't actually have much of an opinion on this, but @davidbarsky was suggesting it on #234 and its mandate does seem right up our alley.
cc @softprops who also expressed some opinions on the Finagle style of doing things in that thread.
Mostly just trying to move discussion here because it's broader then (and somewhat tangential to) that issue.

@softprops said:

The kinds of opinions I meant where more flavored around adding framework dependencies. I see tower as the finagle for rust not actually being a good thing. Finagle is a ecosystem bubble. I've been though experiences of using stacks like finagle and the "netflix" stack which are good if you use everything in them and build applications mostly within those heterogenous bubbles. When you don't need what they bring you often pay a tax and its harder to evolve when other frameworks come around. What I have found to work well is to skirt the problem but picking least common denominators. For rust that typically means hyper + futures. For retries I see the most likely candidate to solve the specific problem of retries is the futures-backoff crate. It doesn't add anything other than retries to futures which anything async is likely already using ( as a least common denominator ).

I subsequently said:

Ah, just saw your replies. Daniel—yep, I’m advocating that. It’s a pretty big lift, granted. Doug—fair point. I’ll be able to respond in greater detail to the both of you shortly, but I’m not sure it’s the same situation as with the Netflix stack/Finagle stack on the JVM. Gotta run to a doctor’s appointment.

In regards to Doug's concerns and my assertion with regard to Tower not being like Finagle or Netflix's system on the JVM, Tower is just the following trait:
/// The above timeout implementation is decoupled from the underlying protocol
/// and is also decoupled from client or server concerns. In other words, the
/// same timeout middleware could be used in either a client or a server.
///
/// # Backpressure
///
/// Calling an at capacity `Service` (i.e., it temporarily unable to process a
/// request) should result in an error. The caller is responsible for ensuring
/// that the service is ready to receive the request before calling it.
///
/// `Service` provides a mechanism by which the caller is able to coordinate
/// readiness. `Service::poll_ready` returns `Ready` if the service expects that
/// it is able to process a request.
pub trait Service<Request> {

    /// Responses given by the service.
    type Response;

    /// Errors produced by the service.
    type Error;

    /// The future response value.
    type Future: Future<Item = Self::Response, Error = Self::Error>;

    /// Returns `Ready` when the service is able to process requests.
    ///
    /// If the service is at capacity, then `NotReady` is returned and the task
    /// is notified when the service becomes ready again. This function is
    /// expected to be called while on a task.
    ///
    /// This is a **best effort** implementation. False positives are permitted.
    /// It is permitted for the service to return `Ready` from a `poll_ready`
    /// call and the next invocation of `call` results in an error.
    fn poll_ready(&mut self) -> Poll<(), Self::Error>;

    /// Process the request and return the response asynchronously.
    ///
    /// This function is expected to be callable off task. As such,
    /// implementations should take care to not call `poll_ready`. If the
    /// service is at capacity and the request is unable to be handled, the
    /// returned `Future` should resolve to an error.
    ///
    /// Calling `call` without calling `poll_ready` is permitted. The
    /// implementation must be resilient to this fact.
    fn call(&mut self, req: Request) -> Self::Future;
}

The analogy to Finagle was drawn because it borrows a lot of ideas from Finagle and Marius Erikson's “Your Server as a Function” paper, but unlike Finagle, doesn't bring along its own futures or runtime—it's largely independent of those.
I'd also like to focus on the bit that Doug said here:

For rust that typically means hyper + futures. For retries I see the most likely candidate to solve the specific problem of retries is the futures-backoff crate.

I do appreciate minimal dependencies, even if some of the stuff I advocated for in the Rust Runtime went against that 😅. My concern is that doing retries correct is hard, especially once other layers like timeouts and backoffs are factored into play. I personally think that Futures, as is, are too low level of an abstraction for most programmers, and the use of Tower allows for a more declarative programming interface than Futures currently do.

I think the things that make retries hard in rusoto atm aren't intrinsic to a lack of a current library dependency or framework but to the way errors are represented as enums with values that tend to cross over common errors.  I have an example here showing how its possible out a large scale change to rusotos current core library. Solving this problem with a framework doesn't actually solve what currently makes this hard.
I believe addresses the error representation actually makes this easy to use any retry/backoff crate simple.
What makes it hard to do retries correctly hard is that what errors are retryable only exist in hand written documentation, not inside boto definitions.

What makes it hard to do retries correctly hard is that what identifying errors that are retryable only exist in hand written documentation, not inside boto definitions.

That said, most of the existing SDKs have some indication (if inconsistent) of what should get retried in code. I link to a bunch of the individual SDKs' implementations in this comment, and this is how botocore handles it. Not saying any of them are perfect but they'd be a hell of a lot better than what we have today 😄

I think the things that make retries hard in rusoto atm aren't intrinsic to a lack of a current library dependency or framework but to the way errors are represented as enums with values that tend to cross over common errors. I have an example here showing how its possible without a large scale change to rusotos current core library. Solving this problem with a framework doesn't actually solve what currently makes this hard.

Thanks for posting that. My primary concern with that approach—and why I've struggled with it in the past—is that the type bound F: FnMut() -> RusotoFuture<T, R> + Send + 'static, which requires cloning and moving Rusoto's client into that FnMut closure. An advantage that Tower provides are retries on the Request + Body, an object I think customers/users of Rusoto would be readily accepting of cloning.

What makes it hard to do retries correctly hard is that what identifying errors that are retryable only exist in hand written documentation, not inside boto definitions.

That's true, and that's an issue. I'll reproduce some Amazon documentation on retry conditions on the Go SDK here:
HTTP Status Codes

502, 503, 504 & 429 as Throttle
5xx as retryable

Retry codes

RequestError
ProvisionedThroughputExceededException
Throttling
ThrottlingException
RequestLimitExceeded
RequestThrottled
ResponseTimeout

Codes for expired credentials. The request is retried after refreshing credentials.

ExpiredToken
ExpiredTokenException
RequestExpired

I think that the patterns around fetching new tokens, throttling, and retrying would be handled very nicely by tower-discover, tower-rate-limit, and tower-retry, respectively.

As a litmus test for early detection lockin into a framework how well would it be to mixing one of the tower dependencies with another off the shelf crate. I'd like to better understand if it will make it awkward or if they compose well with the rest of the rust ecosystem. For example, would using tower-rate-limit work well with futures-backoff or does the tower-rate-limit limit you to to using tower-xxx?
For a little more clarity, I'm not entirely against the framework in general but I'm interested amount of work it would take to change/evolve afterwards should a more appropriate crate/framework that solves a more specific problem comes along. I'm mainly keeping an eye out for evolvability.

As a litmus test for early detection lock-in into a framework how well would it be to mixing one of the tower dependencies with another off the shelf crate. I'd like to better understand if it will make it awkward or if they compose well with the rest of the rust ecosystem.

I think that from the perspective of a programmer using Rusoto, Tower's usage shouldn't more invasive than Rusoto's current SignAndDispatch—it can start as just an internal composition mechanism, and in the future, a potential customization hook for end-users.

For example, would using tower-rate-limit work well with futures-backoff or does the tower-rate-limit limit you to to using tower-xxx?

It should, unless I'm not understanding you correctly. The way that'd work is that you'd remove an impl of tower-retry from your middleware chain, and then pass the Tower-ified client implementing F: FnMut() -> RusotoFuture<T, R> + Send + 'static into futures-backoff's closure.

For a little more clarity, I'm not entirely against the framework in general but I'm interested amount of work it would take to change/evolve afterwards should a more appropriate crate/framework that solves a more specific problem comes along. I'm mainly keeping an eye out for evolvability.

I think that's a really healthy viewpoint to have, so thanks for pointing that out.

I'm not in total disagreement. I'm just playing my own devils advocate so bear with me. I'm with you in spirit :)
I use Rusoto a lot as a user and customer of AWS. From the perspective of a programmer using Rusoto myself, it feels like rusoto is already one of my heavier dependencies. Anything that adds weight on top of that will make rusoto feel even heavier to me as a programmer ( and my CI servers and deploy times )
I also try to contribute back to Rusoto when I have a specific need. As a contributor rusoto is on the  heavier end of projects with an ease of making changes to. That's not intrinsically related its choice of  library dependencies but is an artifact of solving a really wide problem space. Adding anything that introduces weight on top of that makes it even harder to make on changes. If a project as big as rusoto should optimize for anything its ease of change, because change is inevitable and often a blocker for anyone building anything on top of it. At the moment rusoto's focus leveraging the golden crate trio of hyper + futures + serde  provides a great deal of flexibility in adapting to needs for change. This lends itself towards enabling higher level interfaces for opt in use cases for more opinionated applications. These three crates have a very good survivor rate in the rust ecosystem shifts. I can't say that for many frameworks that have came and gone but that's not to devalue what they can't provide for an opinionated and heterogeneous stacks ( stacks build mostly of framework-y framework-y framework-z crate dependencies )
From the problem first perspective I see the challenge of adding retries is not resolved adding a new underlying library but instead by reworking code generation. I think it's always worth evaluating alternative underlying stacks as they come and go but in the current problem spaces this topic popped up in, a change in underlying library stack doesn't actually solve what currently makes those problem spaces challenging.

I'm not in total disagreement. I'm just playing my own devils advocate so bear with me. I'm with you in spirit :)

No worries, and I never thought were doing anything otherwise!

I'm not in total disagreement. I'm just playing my own devils advocate so bear with me. I'm with you in spirit :)

I use Rusoto a lot as a user and customer of AWS. From the perspective of a programmer using Rusoto myself, it feels like rusoto is already one of my heavier dependencies. Anything that adds weight on top of that will make rusoto feel even heavier to me as a programmer ( and my CI servers and deploy times )
I might be spoilt by Amazon's internal build system 😄!

These three crates have a very good survivor rate in the rust ecosystem shifts. I can't say that for many frameworks that have came and gone but that's not to devalue what they can't provide for an opinionated and heterogeneous stacks ( stacks build mostly of framework-y framework-y framework-z crate dependencies )

I think that's a good point, especially with regard to conservatism with the use of underlying libraries. Decisions made in Rusoto have pretty far-reaching consequences.

From the problem first perspective I see the challenge of adding retries is not resolved adding a new underlying library but instead by reworking code generation. I think it's always worth evaluating alternative underlying stacks as they come and go but in the current problem spaces this topic popped up in, a change in underlying library stack doesn't actually solve what currently makes those problem spaces challenging.

Agreed. I apologize if my suggestion to explore Tower came of as a demand—I didn't mean for that to be the case. I think my observation is rooted in the fact I noticed several patterns that exist in Rusoto that could be addressed nicely with Tower. I don't think Rusoto should be rewritten using Tower any time soon.
To circle back to the retry subject, do you think that exposing http::Response along with an *Output would be a good first start? I think that sort of metadata would provide a useful hook for experimenting with different sorts of middleware atop of Rusoto in ways that don't have ecosystem-wide repercussions?

Agreed. I apologize if my suggestion to explore Tower came of as a demand—I didn't mean for that to be the case. I think my observation is rooted in the fact I noticed several patterns that exist in Rusoto that could be addressed nicely with Tower. I don't think Rusoto should be rewritten using Tower any time soon.

I should correct myself and state that I did advocate for moving Rusoto to Tower earlier today. I'm sorry about that inconsistency—I think @softprops's role as a conservative devil's advocate helped me be a bit more judicious in my approach.

One of the maintainers of Tower reached out to me: we're hoping to get an in-person meeting soon. Hopefully we can go over how Tower may fit into Rusoto and what tradeoffs are involved. I'll be sure to have a writeup somewhere public so we can continue the discussion. 👍


Direct input of coordinates gives strange results

Directly typing in X, Y, and Z coordinates does not work as expected for me. I hope it's just a lack of understanding on my part.
When my machine coordinates are at 0,0,0
Typing 1 into the X sends the command G10 L2 P1 X1 and results in X showing -1
Typing 3 into the X sends the command G10 L2 P1 X3 and results in X showing -3
Typing -1 into the X sends the command G10 L2 P1 X-1 and results in X showing 1
When my machine coordinates are at -1,-1,0
Typing 1 into the X sends the command G10 L2 P1 X1 and results in X showing -2
Typing 3 into the X sends the command G10 L2 P1 X3 and results in X showing -4
Typing -1 into the X sends the command G10 L2 P1 X-1 and results in X showing 0
If you plot the lines, you'll see that they are 90-deg off from expected and vary relative to machine coordinates.
If I use the manual command, but use G10 L20 P0 X[value], it works as expected regardless of what the machine coordinates are.
e.g., G10 L20 P0 X1 gives me 1
This is the same command format Grbl-Panel uses when zeroing the axes. Is there a reason you use a different command for direct input?
I'm doing everything in inches.
GRBL 1.1f.20170801 V,15,128
Windows 10 1709

More interesting behavior.
Typing '0' into the X, Y, or Z boxes simply sets them equal to whatever the machine coordinates are at the time. Any other number results in some offset - I suspect in mm.


Prepare test data

Test data stored here: /data/CCBR_Pipeliner/ccbr1214/test/fastq
README created to describe files and how they were subset


US1: User Account Creation

AS A user,
I WANT TO create an account using email/password authentication,
TO store and manage my playlist generator items on the Internet
SO THAT I can access and manage my playlists from the app across different devices.
SCENARIO: Successful Account Creation
GIVEN the user is on the sign-up screen of the AMPL.FY app,
WHEN the user enters a valid email address and a strong password,
AND clicks the "Create Account" button,
THEN an account should be created in the Firebase authentication system,
WITHIN 3 seconds,
AND the user should be redirected to the main playlist screen
WITHIN 2 seconds.
SCENARIO: Account Already Exists
GIVEN the user is on the sign-up screen of the AMPL.FY app,
WHEN the user enters an email address that is already associated with an existing account,
AND clicks the "Create Account" button,
THEN the system should display an error message stating "An account with this email already exists"
WITHIN 1 second,
AND prompt the user to either log in or recover their password.
SCENARIO: Invalid Email Address Format
GIVEN the user is on the sign-up screen of the AMPL.FY app,
WHEN the user enters an email address that does not follow a valid email format (e.g., "userexample.com" or "user@.com"),
AND clicks the "Create Account" button,
THEN the system should display an error message stating "Please enter a valid email address"
WITHIN 1 second,
AND prevent the account creation process from proceeding.
SCENARIO: Weak Password
GIVEN the user is on the sign-up screen of the AMPL.FY app,
WHEN the user enters a password that does not meet the strength requirements (e.g., less than 8 characters, no uppercase letters, or lacks numbers/special characters),
AND clicks the "Create Account" button,
THEN the system should display an error message stating "Your password is too weak. Please choose a stronger password."
WITHIN 1 second,
AND prevent the account creation process from proceeding.
SCENARIO: Network Error During Account Creation
GIVEN the user is on the sign-up screen of the AMPL.FY app,
WHEN the user enters a valid email address and password,
AND clicks the "Create Account" button,
THEN if a network error occurs, the system should display an error message stating "Network error. Please try again later."
WITHIN 2 seconds,
AND allow the user to retry the account creation process once the network is stable.
SCENARIO: Password Recovery Prompt
GIVEN the user attempts to create an account with an existing email,
WHEN the system displays the "Account already exists" error,
AND the user selects the "Forgot Password" option,
THEN the system should prompt the user to enter their email for password recovery
WITHIN 1 second,
AND send a password reset email
WITHIN 30 seconds.


[Question] WebP Support

I am trying to use this library on iOS with WebP images, and I keep getting the same error as in #17.
What I tried:
Adding the WebP binary to the project.  I was able to load a WebP image in the native <Image/> component from react-native with this, but It didn't help for <Image /> from react-native-scalable-image.
On Android it works fine.
Looking at the source code, it seems like the library is wrapping the native `' component from 'react-native', so I would have thought that it would work if it works with the native component.

Any update on this ?


Upgrade sinon from 11.1.2 to 15.0.1

Hi @aman19K,
Can you resolve the SCA scan issues and resubmit the PR for review?


[Input] Suffix wrapper not removed with ngIf

Bug, feature request, or proposal:
 [x] Bug
 [ ] Feature request
 [ ] Proposal

What is the expected behavior?
matSuffix wrapper element should be removed from dom when ngIf  is used on element
What is the current behavior?
matSuffix element is removed upon focusing the mat-form-field element
What are the steps to reproduce?
https://stackblitz.com/edit/angular-ddtyp7
In sample do the following

Click on eye icon. The .00 suffix disappears but the wrapper marked in red remains
Focus on the second input the wrappers is removed from dome.

What is the use-case or motivation for changing an existing behavior?
incorrect behavior
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular 5.x
Chrome
Is there anything else we should know?

I have a similar problem where I have to asynchronously check if I should show the suffix but it doesn't show until I focus the input.
https://stackblitz.com/edit/angular-material2-issue-ugnaqj

Same issue as @gatimus . MatSuffix not responding to well to be shown and hidden with an ngIf.


--unstable flag is required for BroadcastChannel

When using BroadcastChannel in Fresh 1.0.0.rc.3, the --unstable flag needs to be added to deno task start
{
  "tasks": {
    "start": "deno run -A --unstable --watch=static/,routes/ dev.ts"
  },
  "importMap": "./import_map.json"
}

No error is generated when the app is deployed/started in deno deploy, but an error is thrown when you run locally with deno task start

Just wanted to document this for others.

Closed


[hgemm] hgemm noTrans with kernel 1x8

Added 1x8 hgemm kernel, packing_A1, packing_B1 functions. Incorporated hgemm_noTrans_1x8.
Self evaluation:

Build test:	 [X]Passed [ ]Failed [ ]Skipped
Run test:	 [X]Passed [ ]Failed [ ]Skipped

Signed-off-by: Debadri Samaddar<EMAIL_ADDRESS>

:memo: TAOS-CI Version: 1.5.20200925. Thank you for submitting PR #2550. Please a submit 1commit/1PR (one commit per one PR) policy to get comments quickly from reviewers. Your PR must pass all verificiation processes of cibot before starting a review process from reviewers. If you are new member to join this project, please read manuals in documentation folder and wiki page. In order to monitor a progress status of your PR in more detail, visit http://ci.nnstreamer.ai/.


change kafka ec2 type

current version create ec2 instance with i3.x2large.
it is based ssd storage.
but, kafka throughput is better on disk storage than ssd.
참고:

https://techburst.io/aws-ebs-49d1912d45c0
https://aws.amazon.com/ko/blogs/big-data/best-practices-for-running-apache-kafka-on-aws/

so, it should be changed to use EBS with high IOPS performance.

Fixes #4

Fixed


What is the reasoning for no dropout?

https://github.com/lucidrains/recurrent-memory-transformer-pytorch/blob/d45ef72a40324c6224ffacb890d5593a69db73de/recurrent_memory_transformer_pytorch/recurrent_memory_transformer.py#L135

@luchris429 for a while, there was this new fad of not doing dropouts for LLMs, simply because OpenAI stopped doing them as they scaled up
now i see papers like this and realize nobody really knows what they are doing. yea, let's get the dropouts back in there.

ahh I did not know. thanks for the context!


ZSH bcd:2: = not found

When try to use bcd in zsh, it gives an error
> cd /some/dir
> bcd somedir
bcd:2: = not found

Verified that eval "$(bookmark-cd init)" is present in .zshrc.
However, directly using bookmark-cd works as expected :
> cd /some/dir
> bookmark-cd -s somedir
Bookmark saved
> cd ~
> $(bookmark-cd dcweb)
> pwd
/some/dir

This has now been fixed in release v0.2.11.
If you installed from homebrew you just need to run brew upgrade, if you installed via snapcraft, that release will be available within the hour


Allow mounting directories from other image

I would like to run a container and mount into the container a directory from another image. Instead of volume which would create an empty directory, I would like to mount the files are already in the other image.

@mitar is this still an issue with you? Exposing data that's in an image via volumes and sharing that with another container works for me;

# Build an image with "data" inside
cat << EOF > ./Dockerfile
FROM debian:latest
RUN mkdir /data && echo "HELLO WORLD!" > /data/hello-world.txt
CMD cat /data/hello-world.txt
EOF

docker build -t imagewithdata .

# Run/create the data-container and expose the
# data-directory as "volume"
docker run --name ihavedata -v /data imagewithdata

# Use the volume inside another container
docker run --rm --volumes-from=ihavedata --name iusedata debian cat /data/hello-world.txt

# Cleanup :)
docker rm -v ihavedata
docker rmi imagewithdata:latest
rm Dockerfile

Oh, this is because I am not mounting an outside directory into the container as a data, but just exposing a directory as a data? Interesting.

@mitar correct (if I understand your question correctly); when specifying a "volume", and the container has files on that location, docker will copy the files to the volume.
Here, docker will create a volume and copy everything that's in "/data" inside the container to the volume;
docker run -v /data something

However, when using a "bind-mount" (i.e., specify a directory on the host to use as a volume), docker will not do that, but use the files that are present in the "host" directory  as content for the volume.
In this example, al files that are present in /some/path/on/the/host are mounted in the /data directory in the container. Everything that is in the /data directory in the container is still there, but not visible, because it's "masked" by the mounted directory:
docker run -v /some/path/on/the/host:/data something

I hope this answers your question. If you have more questions, please check the #docker IRC channel, there are lots of people there to help you further.

That perfectly explained things. I was used to bind-mount volumes so I did not know about this second behavior. Thanks.


What is InstanceIsolationRequestHandler used for?

What do you want to ask?
I find that InstanceIsolationRequestHandler extends CircuitBreakerRequestHandler and use CircuitBreakerRequestHandler.onBefore to handle request, so CircuitBreakerRequestHandler will be executed twice, if CircuitBreakerRequestHandler throw CircuitBreakerException, which will be wrapped as InstanceIsolationException.I want to ask why is it designed this way and what is InstanceIsolationRequestHandler used for? Looking forward to the answer, thanks~

The InstanceIsolationRequestHandler is mainly used for instance isolation, which is more focused on client-side calls to the server and restricts calls from upstream. Inheriting CircuitBreakerRequestHandler is because the implementation principle of instance isolation is the same as fusing. When the CircuitBreakerRequestHandler throws a CircuitBreakerException, the InstanceIsolationRequestHandler only wraps the exception, distinguishing between exceptions generated by instance isolation processing rules and exceptions generated by fuse processing rules, and does not cause the CircuitBreakerRequestHandler to execute multiple times.

The question has been answered. No more questions will be raised. Therefore, this issue is closed.


When I connect kylin with JDBC, the query date has a problem.

hello,
When I connect kylin with JDBC, the query date has a problem.
The query condition is
WHERE td.calendar_date >= DATE  '2018-02-15'
AND td.calendar_date  < DATE  '2018-02-22'
but the result  is
2018-02-14~2018-02-20
Time deviation

Can one of the admins verify this patch?

Hi @starbow727, for questions, please ask it in kylin user mailer, not github PR. Cloud you close this PR and subscribe to kylin user mailer? http://kylin.apache.org/community/

Close it, as it's an invalid PR.


ImportError: No module named 'aiy'

I am trying to setup aiy projects on RPI3, as i follow the inrecutions on the hacking.md file, i am stuck at this step:
env/bin/python checkpoints/check_audio.py
First, i do not have env folder, so i adjusted the command to be:

How can i fix this issue?
I searched other old threads, but none of them helped me to resolve this issue. Please note that i use Raspbian Stretch on RPI3.
Thanks.

Please use python3 instead of python, or run the script directly: ./check_audio.py

Same thing:

When i debugged my file, i found this is the import that causes the exception:
import aiy._drivers._alsa

https://github.com/google/aiyprojects-raspbian/blob/2a78558cda2ac390638d2e1f062b77d491c13482/checkpoints/check_audio.py#L28
This is where I am getting stuck on.

Hi,
I managed to get this working by copying the aiy folder found in src to the checkpoint directory. I used the following commands from the root of the project:
cp -R src/aiy checkpoints/aiy
./checkpoints/check_audio.py

I am having the same issue on two boards. The mic does not play a recording but the speaker is working. I tried the check audio bash file but it did not work on both boards!

Yeah I have the same issue as you do
https://github.com/google/aiyprojects-raspbian/issues/309#comment-374707981

Same for me. I am following the HACKING,md guideline and have the same error.
I don't have the env folder as well.

Ok here is the solution:

follow the instructions in https://github.com/google/aiyprojects-raspbian/blob/aiyprojects/HACKING.md
just after cloning the git repository, rollback to a previous version by using >git checkout c5745ec
continue the instruction

The bug is due to a change in the install-deps.sh that has remove the creation of the /env folder.

Hi,
I'm raising again this issue since I can't find any good solution and even though the one provided by @Jack2905 helped for the installation, when you want to run assistant_library_demo.py you still need the venv.
Thank you for your help !

I noticed there are new kits and new image file available at https://dl.google.com/dl/aiyprojects/aiyprojects-latest.img.xz. The actual file downloaded is aiyprojects-2018-04-13.xz. Has anyone tried the new image out to see if it resolves this problem? I'm at work right now.

You can actually run it by modifying PYTHONPATH env variable (same for running the examples). Like so:
PYTHONPATH="src/" checkpoints/check_audio.py
But I'm stuck on installing the drivers for the voicehat. I'm getting Failed to find the voiceHAT soundcard even after installing the alsa configs.

I had the same problem with the missing aiy module, but all i had to do was "activate" the python environment "env" using source ./env/bin/activate :
pi@pi3plus:~/AIY-projects-python $ src/examples/voice/assistant_grpc_demo.py
Traceback (most recent call last):
  File "src/examples/voice/assistant_grpc_demo.py", line 20, in <module>
    import aiy.assistant.grpc
ImportError: No module named 'aiy'
pi@pi3plus:~/AIY-projects-python $ source ./env/bin/activate
(env) pi@pi3plus:~/AIY-projects-python $ env/bin/python checkpoints/check_audio.py^C
(env) pi@pi3plus:~/AIY-projects-python $ src/examples/voice/assistant_grpc_demo.py
Please visit this URL to authorize this application: https://accounts.google....

We got rid of virtualenv, please use the latest SD card image. Everything should just work:
pi@raspberrypi:~ $ python3
Python 3.5.3 (default, Jan 19 2017, 14:11:04)
[GCC 6.3.0 20170124] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import aiy
>>>

@dmitriykovalev it doesn't! 😉 Well, at least building from source doesn't...
Building from source and following HACKING.md doesn't work. There's a bunch of related issues including errors like the following which I receive on a fresh Stretch install.
$ checkpoints/check_audio.py
Traceback (most recent call last):
  File "checkpoints/check_audio.py", line 28, in <module>
    import aiy.audio  # noqa
ImportError: No module named 'aiy'

I've forked and am testing by reverting the removal of install-deps.sh and potentially reintroducing virtualenv, but I'm not a python guy and aren't sure about the impact. I'm happy to hack away and submit a PR for feedback but I think this warrants some proper attention and testing.
If you create a fresh Stretch Lite image and follow the instructions from HACKING.md, you'll quickly see the issues.
Is there competition between the image and building from source? Personally, I'd expect to be able to manually install things so would favour support of both.

Hello.
Has anyone been able to install by HACKING.md?
Any update forecast?
Thanks!

This is just plain broken and there seems to be no interest in even commenting here. I’ve started a fork but it’s not 100% working with a fresh raspbian :sad:

Wow. This is so frustrating!

this worked for me.. from above.
be in AIY_PROJECTs dir already
cp -R src/aiy checkpoints/aiy
python3 checkpoints/check_audio.py

Sadly having the same problem once I try to run assistant_grpc_demo.py.

This is indeed very broken and very frustrating.  The kit website (https://aiyprojects.withgoogle.com) needs an update or it will continue to waste everyone's time.  Is there any place to find instructions on the current image linked above?

I also get the same problem but I slove it using
import aiy.voice.audio
instead of import aiy.audio

I've been having this issue too but with
Traceback (most recent call last):   File "./led_demo.py", line 7, in <module>     import aiy.voicehat ImportError: No module named 'aiy.voicehat'
I can't find the voicehat module anywhere when searching through the /aiy/ directory
note: I'm also using the older version of the AIY MagPi guide, so when I was trying to do the led_demo.py I had this issue

hellow there, im having the same problem; (No module named aiy.audio)
when using the following code,  help me please im stuck
`
#!/usr/bin/env python3
Copyright 2017 Google Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""Check that the voiceHAT audio input and output are both working."""
import os
import sys
import tempfile
import textwrap
import traceback
sys.path.append(os.path.realpath(os.path.join(file, '..', '..')) + '/src/')
import aiy.audio
CARDS_PATH = '/proc/asound/cards'
VOICEHAT_ID = 'googlevoicehat'
STOP_DELAY = 1.0
TEST_SOUND_PATH = '/usr/share/sounds/alsa/Front_Center.wav'
RECORD_DURATION_SECONDS = 3
def get_sound_cards():
"""Read a dictionary of ALSA cards from /proc, indexed by number."""
cards = {}
with open(CARDS_PATH) as f:  # pylint: disable=invalid-name
    for line in f.read().splitlines():
        try:
            index = int(line.strip().split()[0])
        except (IndexError, ValueError):
            continue

        cards[index] = line

return cards

def ask(prompt):
"""Get a yes or no answer from the user."""
ans = input(prompt + ' (y/n) ')
while not ans or ans[0].lower() not in 'yn':
    ans = input('Please enter y or n: ')

return ans[0].lower() == 'y'

def check_voicehat_present():
"""Check that the voiceHAT is present."""
return any(VOICEHAT_ID in card for card in get_sound_cards().values())
def check_voicehat_is_first_card():
"""Check that the voiceHAT is the first card on the system."""
cards = get_sound_cards()
return 0 in cards and VOICEHAT_ID in cards[0]
def check_speaker_works():
"""Check the speaker makes a sound."""
print('Playing a test sound...')
aiy.audio.play_wave(TEST_SOUND_PATH)
return ask('Did you hear the test sound?')

def check_mic_works():
"""Check the microphone records correctly."""
temp_file, temp_path = tempfile.mkstemp(suffix='.wav')
os.close(temp_file)
try:
    input("When you're ready, press enter and say 'Testing, 1 2 3'...")
    print('Recording...')
    aiy.audio.record_to_wave(temp_path, RECORD_DURATION_SECONDS)
    print('Playing back recorded audio...')
    aiy.audio.play_wave(temp_path)
finally:
    try:
        os.unlink(temp_path)
    except FileNotFoundError:
        pass

return ask('Did you hear your own voice?')

def do_checks():
"""Run all audio checks and print status."""
if not check_voicehat_present():
print(textwrap.fill(
"""Failed to find the voiceHAT soundcard. Refer to HACKING.md for
how to setup the voiceHAT driver: https://git.io/v99yK"""))
return
if not check_voicehat_is_first_card():
    print(textwrap.fill(
        """The voiceHAT not the first sound device, so the voice recognizer

may be unable to find it. Please try removing other sound drivers."""))
return
if not check_speaker_works():
    print(textwrap.fill(
        """There may be a problem with your speaker. Check that it's

connected properly."""))
return
if not check_mic_works():
    print(textwrap.fill(
        """There may be a problem with your microphone. Check that it's

connected properly."""))
return
print('The audio seems to be working.')

def main():
do_checks()
if name == 'main':
try:
main()
input('Press Enter to close...')
except Exception:  # pylint: disable=W0703
traceback.print_exc()
input('Press Enter to close...')
`

Hey peeps,
I purchased my AIY voice kit on clearance from Target and had the same trouble.  I was able to get the demos to run via the following command.
cd ~/AIY-projects-python/src/examples
voice/assistant_grpc_demo.py
Hope that helps someone else out there that was having trouble.  Good luck!


Provide an id for the user menu

@yarikoptic, let me know if this is what you had in mind.
Closes #793.

yes, that is great!  while at it if you could also provide id for that input which is I guess in the ApiKeyItem - it would also be handy so we do not need to just search for a readonly input (of which may be eventually we get multiple)

yes, that is great! while at it if you could also provide id for that input which is I guess in the ApiKeyItem - it would also be handy so we do not need to just search for a readonly input (of which may be eventually we get multiple)

Done (via 6183e9c).
Let me know if you'd like anything else taken care of in this PR!

I think this should be enough for now. But I think it could be a generally good practice to tend to provide non-random ids to all "valuable" UI elements than "not to provide".
attn @djarecka

I can see the value in it, but I don't want to start an initiative to add them throughout the codebase without having a specific need. Perhaps in new components we can add some, but even there we should be careful, especially for components meant to be non-singleton within the app.
For now I'd prefer if when you run into a need for an id attribute, you just file an issue for the narrow use case.


[Event Request] codeunit 5988 "Serv-Documents Mgt." function: FinalizeDeleteLines

Could you please add a publisher in codeunit 5988 "Serv-Documents Mgt." function: FinalizeDeleteLines
    local procedure FinalizeDeleteLines()
    begin
        // delete Service Lines persistent and temporary
        PServLine.Reset;
        PServLine.SetRange("Document Type", ServHeader."Document Type");
        PServLine.SetRange("Document No.", ServHeader."No.");
        // New Event
        SetFilterOnFinalizeDeleteLinesBeforeDeletePServLine(PServLine);

        PServLine.DeleteAll;

        ServLine.Reset;
        ServLine.DeleteAll;
    end;

 [IntegrationEvent(false, false)]
 local procedure SetFilterOnFinalizeDeleteLinesBeforeDeletePServLine(var ServiceLine: record "Service Line");
 begin
 end;

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. We will update this issue with information about availability.

Hello,
I didn't get this event with the update to BC16/CU01, the other events in the same business call (set filter) were added... is it possible to get them with BC16 CU02?


Added Numeric type wrappers documentation fixes #4034

Description 📜
Added Numeric type wrappers documentation and also created the required folders.
Fixes #4034

Type of change 📝

[x] Documentation (Content Creation in the form of codes or tutorials)

Domain of Contribution 📊

[x] Java_Domain

Checklist ✅

[x] I follow Contributing Guidelines & Code of conduct of this project.
[x] I have performed a self-review of my own code or work.
[x] I have commented my code, particularly in hard-to-understand areas.
[x] My changes generates no new warnings.
[x] I'm GWOC'21 contributor

Screenshots / Gif (Optional) 📸

@sumitaccess007 pls have a look
lvl 1 is okay from my side


Add Assert to not try to divide by zero

Me and my colleagues made the migration to version 8.0 this week and experienced a crash in our application. We were wondering what the issue could be. It took us a while to figure it out and that's the reason why I add this PR.
I added an assert and updated the documentation a bit to hopefully help some others to not try to divide by zero.
We had the following code in our application:
calendarView.scrollingMode = .nonStopTo(customInterval: 0, withResistance: 0)
and it totally worked fine in JTAppleCalendar 7.1.7.
We changed it to
calendarView.scrollingMode = .nonStopTo(customInterval: 1, withResistance: 0)
in Version 8.0.2 and it now works like before.

thanks. I missed that one. Will take a look in some time

Time is a hard thing to come by these days.
My apologies.
Merged.

Time is a hard thing to come by these days.
My apologies.
Merged.

No problem :) Thanks 👍


make sure http host is passed to upstream

Fixes the bug introduced at https://github.com/kubernetes/ingress-nginx/pull/1926. This is almost the revert of that PR except at https://github.com/Shopify/ingress/pull/9/files#diff-980db9e4b88704f12338bd074839f94eR724 I left $host. That way the issue that PR originally tried to fix still stays fixed.
@Shopify/edgescale @n1koo

cool, this is the thing that broke burst?  Can we confirm that it will work with them before rolling out . everywhere?
Thanks for owning this @ElvinEfendi  + @Shopify/edgescale

@ibawt the image producing in the CI build for this PR is running in tier4 now. I tested with https://fr.shopify.com/carrieres and not seeing any 404.


Non-existing url does not return 404

And how I can return 404?

@kilinochi
in the code, it is indeed returning a response with a status of 404. however, the returned data object does not contain enough information to show that this is indeed the case.
router.use((req, res) => {
    if (!res.locals.data) {
      res.status(404)
      res.locals.data = {}

    router.render(req, res)
  })

I have opened a PR here for this issue: #1041
I have changed the returned object to:
router.use((req, res) => {
    if (!res.locals.data) {
      res.status(404)
      res.locals.data = {status_code: 404, error: 'Page not found'}
    }
...

solve my problem, tnks!


Standalone Dreamcast spiff, controller disconnects after about 10min

After playing for about 10 minutes the game pauses and says the controller was disconnected and I am unable to reconnect to Blueretro without a reboot.
Looks like it gets stuck in a reboot loop after the WDT error.
ESP32-WROOM-32D DEVKITC V4 (3rd party) mounted internally
Blueretro 1.5.1 DC spiff
Attached is log
brdclog.txt
brdclog2.txt

You got the unused port wired to 3V3 as instructions aay?
https://github.com/darthcloud/BlueRetro/wiki/BlueRetro-Cables-Build-Instructions#assembly-instructions-28

All 4 ports are wired.
I have since soldered it directly to the controller pcb. Tried pulling 5v
straight from PSU
Tested port pins to esp32 for connectivity with a multimeter and everything
looked great. Even verified the ground and 5v railes to all be connected.
Also tried with a different WROOM-ESP32D a WROOM-32E and a NodeMCU-ESP32.
On Sun, May 8, 2022, 4:57 AM Jacques Gagnon @.***>
wrote:

You got the unused port wired to 3V3 as instructions aay?
https://github.com/darthcloud/BlueRetro/wiki/BlueRetro-Cables-Build-Instructions#assembly-instructions-28
—
Reply to this email directly, view it on GitHub
https://github.com/darthcloud/BlueRetro/issues/273#issuecomment-1120378055,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ACH7L4VCLDTZM7WTMUN4VYDVI56XZANCNFSM5VLHTDRA
.
You are receiving this because you authored the thread.Message ID:
@.***>

Maybe try removing the extra player by wiring them to 3V3 to see if 1P is stable. If stable, rewire one at a time and recheck if stable, this way you can identify which plug is problem.
Which game you use?

I'll give it a try when I get home.
It has happened on every game I've tested so far. Donald Duck Going
Quackers, Dead or Alive 2 and 4x4 Evolution.
I have a GDEMU and USBGDROM... Not sure if they might be doing something
funky polling the controllers or something.
On Sun, May 8, 2022, 9:58 AM Jacques Gagnon @.***>
wrote:

Maybe try removing the extra player by wiring them to 3V3 to see if 1P is
stable. If stable, rewire one at a time and recheck if stable, this way you
can identify which plug is problem.
Which game you use?
—
Reply to this email directly, view it on GitHub
https://github.com/darthcloud/BlueRetro/issues/273#issuecomment-1120423880,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ACH7L4TWX424DNJ6NMNWVY3VI7CBTANCNFSM5VLHTDRA
.
You are receiving this because you authored the thread.Message ID:
@.***>

I wired up a different ESP32 with the D0/D1 wired to 3.3v and it was way worse. I couldn't even sync a controller once the Dreamcast booted. It started looping almost as soon as it was powered on. I could pair and hit the web config just fine as soon as I turned off the Dreamcast, or when it was just powered on before it gets past the intro.
So even though these are standalone versions, is still doing some sort of detection at boot? or is that the Dreamcast polling the controller?
br_dc2.txt

I dug out an official ESP32E that I'll try connecting later to see if it works better.

Same issue... disconnects after a few minutes when all soldered up and when the other players are connected to 3.3v it boot loops constantly

Well I don't know what is different about 1.6, but it is working with no drops on the standalone Dreamcast for me.
Played Gigawing and Donald Duck for over about 45min each with no issue.

v1.6 init the wired port a bit sooner, maybe somehow your esp32 was booting in the middle of a data frame and was crashing in loop.
Thanks for taking time to report back!

Well it started happening again when I enabled rumble in Demolition Racer - No Exit, but plays fine if I leave it off.
Could it be something with how I have it configured? I have accessory set to both.

Dreamcast rumble support is extremely poorly done, better leave it off until I revise it later.