A Tydi language

This is a tracking issue for the first steps towards implementing a hardware description language for Tydi types.
Currently the Tydi crate provides modules with the logical and physical stream type definitions and methods as described in the specification. There is also a design module that defines streamlets, a parser module for streamlet definition files and a generator module that can generate HDL templates based on streamlet definition files. The tydi command line application exposes these capabilities.
In order to provide an ergonomic solution for #51, this issue tracks the requires steps to move from an (embedded) library based approach to a high-level language approach. This issue attempts to provide tasks and steps for the initial phase of the language, compiler and tooling design.
Motivation
The benefits from adapting Tydi typed streams (🐬) in hardware designs may be snowed under the added effort and struggle (🐠) for hardware developers to make their designs compatible with Tydi streams.
Goals
The goals during this phase
for the Tydi language:

Define generic Tydi stream types and streamlets using these types
Provide a Tydi standard library with common (stream) type definitions
Support easy generation to enable mapping other high-level data types to Tydi stream types

for the tooling:

Re-usability of Tydi stream types and streamlet definitions across projects
Batteries-included tooling for Tydi project management and compilation
IDE support with syntax highlighting and compiler diagnostics

Non-goals
During this phase the Tydi language does not support:

Definition of streamlet behavior
Streamlet composition to build larger designs of connected streamlets

Design
Syntax
Tydi's syntax is heavily inspired by Rust's syntax.
Tokens

Input is interpreted as a sequence of UTF-8 code points
Tydi is a free-form language
Whitespace is any unicode code point with the white space character property set
Source file extension is .td.

Keywords
# constant generic
const

# streamlet interface mode
in
out

# streamlet definition
streamlet

# type definition
type

# use statement
use

# type constructs
group
union
stream

# stream synchronization modes
sync
desync
flatten
flatdesync

# stream direction
forward
reverse

# boolean literals
true
false

Punctuation
(	# open paren
)	# close paren
[	# open square
]	# close square
{	# open curly
}	# close curly
<	# open angle
>	# close angle
:	# colon
;	# semicolon
::	# path separator
,	# comma
=	# equals
!	# exclamation

Literals
# decimal number
[0-9]+

# hexadecimal number
0x[0-9a-fA-F]+

# identifier
[a-zA-Z][a-zA-Z_0-9]*

Grammar
module = { item } ;
item = use_statement | type_definition | streamlet_definition ;

use_statement = "use" , identifier , { "::" , identifier } , ";" ;
type_definition = "type" , identifier , [ generic_definition ] , "=" , type , ";" ;
streamlet_definition = "streamlet" , identifier , [ generic_definition ] , (
                            "(" , interface , { "," , interface } , ")"
                          | "{" , streamlet_interface , { "," , streamlet_interface } , "}"
                        ) ;
streamlet_interface = identifier , ":" , interface ;
interface = mode , type ;
mode = "in"
     | "out" ;

type = stream
     | union
     | group
     | path ;
stream = "stream!" , "(" , type , type , direction , synchronicity , number , ")" ;
direction = "forward"
          | "reverse" ;
synchronicity = "sync"
              | "desync"
              | "flatten"
              | "flatdesync" ;
union = "union" , ( "(" , variants , ")" | "{" , fields , "}" ) ;
group = "group" , ( "(" , variants , ")" | "{" , fields , "}" ) ;
path = identifier , [ generic_args ] ;

variants = type , { "," , type } ;
fields = identifier , ":", type , { "," , identifier , ":" , type } ;

generic_definition = "<" , generic_param , { "," , generic_param } , ">" ;
generic_args = "<" , generic_arg , { "," , generic_arg } , ">" ;
generic_arg = type
            | "(" , expr , ")" ;
generic_param = [ "const" ] , identifier ;

expr = expr , "+" , expr
     | expr , "*" , expr
     | "(", expr , ")"
     | identifier
     | number ;

identifier = letter, { letter | digit | "_" } ;

hex = "0x" , hex_symbol , { hex_symbol } ;
hex_symbol = digit | ? [a-fA-F] ? ;
number = digit , { digit } ;

letter = ? [a-zA-Z] ?;
digit = ? [0-9] ?;

Documented example of Tydi source file using the proposed grammar:
// A line comment.

// A use statement to bring Tydi types in scope for use in this module.
// This is like Rust's use statement, without support for combining multiple
// leafs with a single root in a tree-like syntax.
use axi::AXI4;
use axi::lite::AXI4_Lite;

// A type definition statement to define a new `Bit` type. The right hand side
// uses the built-in constructor for the primitive `Bits` type. When using the
// std, these constructors can be replaced with its corresponding type
// definition, i.e. `std::Bits`.
// Please note, this is not a type alias, or synonym. The compiler considers
// `Bit` and `bits!(1)` two different types. They are however compatible
// according to the Tydi specification. This allows for typesafe wrappers for
// example for signed/unsigned integer types.
type Bit = bits!(1);

// Type definitions can be generic. This example shows a constant generic for
// a `Bits` type. This allows the usage of a const expression in other type
// definitions, as shown for example in the `Bytes` type definition.
type Bits<const N> = bits!(N);
type Byte = Bits<(8)>;
type Bytes<const N> = Bits<( 8 * N )>;

// For product and sum types the `group` and `union` keywords are used. Tydi
// supports both unnamed variants (`Foo`) and named fields (`Bar`) for both
// groups and unions.
type Foo = group(Bit, Bit);
type Bar = group {
    foo: Bit,
    bar: Bit
};
type FooBar = union(Foo, Bar);
type BarFoo = union {
    bar: Bar,
    foo: Foo
};

// For streams the built-in `stream!` constructor can be used. The arguments of
// this constructor are (`element_type`, `user_type`, `direction`,
// `synchronicity`, `dimensionality`). The keywords as listed above are valid
// on corresponding locations here. Please note that, like the `bits`
// constructor, the `stream` constructor is used most often in the std. With
// additional generic argument type support these constructors can be exposed
// as generic type definitions (const generics already allow for the `Bits`
// definition). In the future there may be a type definition in the std for
// `Stream<..?>`.
// Below are the some type defintions from the Tydi paper, which also shows how
// type definitions can be generic over types.
type Dim<T> = stream!(T, Null, forward, sync, 1);
type New<T> = stream!(T, Null, forward, sync, 0);
type Des<T> = stream!(T, Null, forward, desync, 0);
type Flat<T> = stream!(T, Null, forward, flatten, 0);
type Rev<T> = stream!(T, Null, reverse, sync, 0);

// Now using these type definitions, more type definitions can be written.
// These examples are also from the Tydi paper.
type List<T> = Dim<T>;
type Vec<T, const N> = group(Bits<(N)>, New<T>);

// Streamlet definitions define a streamlet with its interface types. Streamlet
// definitions can be generic and the interface names can be unnamed or named.
type Sum<const N> = Bits<(N)>;
type Carry = Bit;

streamlet HalfAdder<const N>(
    in Bits<(N)>,
    in Bits<(N)>,
    out Sum<(N)>,
    out Carry
)

streamlet Adder<const N> {
    input: in group {
        a: Bits<(N)>,
        b: Bits<(N)>,
        carry: Carry,
    },
    output: out group {
        sum: Sum<(N)>,
        carry: Carry
    }
}

// Streamlets support stream types on their interfaces.
type Char = Byte;
type String = List<Char>;

streamlet WordCounter<const N, const M> {
    words: in String,
    counts: out List<
        group {
            words_counted: Bits<(N)>,
            bytes_read: Bits<(M)>,
        }
    >,
}

// And one more example e.g. `sha.td`:
use std::List;

streamlet SHA256(in List<Bits<(512)>>, out Bits<(256)>)

The grammar listed here is a proposal and open for discussion. There are already several issues to be discussed:

Const generic expressions require parentheses for LL(1) parsing
Const generics can't be typed, there must a way to add type information e.g. const N: i32
Built-in constructors are special, which may be unfavourable

Semantics

todo

Supported const generics types const N: ??

Compiler
The Tydi compiler takes Tydi source files, parses them into an abstract syntax tree, resolves names, checks types and generates an in-memory high-level intermediate representation (hir) that can be used by backends for compiler output. References to sources are tracked outside the hir to allow us to provide a library for construction of these structures for generation tools (similair to the current approach).
In the initial phase of the project (type and streamlet definitions only) the compiler output consists of purely structural HDL templates (and helper methods) or design visualizations.
Project
A Tydi project consists of a manifest (tydi.toml) with project meta information and source files with type and streamlet defintitions.
Manifest
tydi.toml is a project's manifest file that contains all metadata and configuration information about the project.
The Tydi manifest file is inspired by Rust's Cargo.toml.
Example
This example tydi.toml shows all valid fields of a project manifest.
[project]                                      # Project metadata
name = "std"                                   # The project name
authors = ["Delft University of Technology"]   # List of project authors
description = "The Tydi standard library"      # Optional description of the project

[dependencies]                                 # Dependencies configuration
axi = { path = "/axi" }                        # Example of a path dependency
wishbone = { git = "git@github.com:...", ... } # Example of a git dependency

Structure
The files in a Tydi project are organised with the project manifest in the root directory of the project, and all module files in a src directory. The target directory is used for compiler output. This setup is inspired by Rust's cargo behavior.
> project_name
  > tydi.toml     # project file
  > src           # source directory
    > lib.td      # root module file (project_name)
    > flow        # flow module directory
      > mod.td    # flow root module file (project_name::flow)
      > a.td      # a module file part of the flow module (project_name::flow::a)
    > b.td        # b module file (project_name::b)
  > target        # output directory
    > deps        # dependency cache
    > ...

Example std.td
// tydi std

// primitive (built-in)
type Bits<const N> = bits!(N);

// stream primitives
type Dim<T> = stream!(T, Null, forward, sync, 1);
type New<T> = stream!(T, Null, forward, sync, 0);
type Des<T> = stream!(T, Null, forward, desync, 0);
type Flat<T> = stream!(T, Null, forward, flatten, 0);
type Rev<T> = stream!(T, Null, reverse, sync, 0);

// extended primitives
type Null = Bits<(0)>;
type Bit = Bits<(1)>;
type Byte = Bits<(8)>;
type Bytes<const N> = Bits<( 8 * N )>;

// integers
type int<const N> = Bits<(N)>;
type uint<const N> = Bits<(N)>;

// containers
type List<T> = Dim<T>;
type Vec<T, const N> = group(Bits<(N)>, New<T>);
// todo: char encoding generic?
type String = List<Byte>;

Tasks

[ ] Design

[ ] Syntax and grammar
[ ] Generic parameter type system
[ ] Other built-in methods e.g. log2!

[ ] Compiler

[ ] Syntax

[ ] Lexer
[ ] Parser

[ ] Ast
[ ] Hir
[ ] Query system

[ ] Tooling

[ ] Update tydi cli
[ ] IDE support

[ ] Language server implementation
[ ] Syntax highlighting definition files

[ ] Project management tool

[ ] std

Future work

Streamlet behavior: impl Adder { ... }
Streamlet composition

Type casts for compatible types e.g. type Foo = Bit; type Bar = Bit; -> Foo as Bar

Interop with other languages
LLHD backend

Here is my brainstorm about this:
// This is a brainstorm, not just a grammar definition or just examples,
// It's going to be a weird mix of both and more.
// I wrote this mainly from a user perspective, not from a compiler
// designer/implementer perspective.

// --------
// Literals
// --------

// signed integers, defaults to type i32
10      // decimal
1_0     // decimal
-10     // decimal
0xA     // hex
0o12    // octal
0xb1010 // binary

// unsigned integers, defaults to type u32
10      // decimal
1_0     // decimal
-10     // ERROR
0xA     // hex
0o12    // octal
0xb1010 // binary

// character literals (ASCII or UTF8 ?)
'd'
'\n'

// string literals (ASCII or UTF8 ?)
"dolphins"

// half precision IEEE 754 floating point
1.0f16
// single precision IEEE 754 floating point
1.0f32
// double precision IEEE 754 floating point (the default)
1.
1.0
1.0f64
// quadruple precision IEEE 754 floating point
1.337f128
// octuple precision IEEE 754 floating point
42.0f256

// --------------------
// Builtin scalar types
// --------------------

// Null type - useful for e.g. user part of streams or generics (see e.g. Map
// below)
null

// Boolean types
bool // true or false

// Bit type
bit
// Should this hold VHDL-like std_logic values such as
// 0, 1, U, X, Z, W, L, H, - ?
// or probably better, like Verilog:
// 0, 1, X, Z

// -----------------------
// Builtin composite types
// -----------------------

// Integer types.

// Integer types consist of N bit parts that can be indexed or sliced (see
// below). Their numeric value is their two's complement value.

// Signed
int<N>
// Unsigned
uint<N>
// They have a size generic N, useful for type or generic propagation. N can be
// an expression, but it must resolve to a positive integer.
uint<0> // error

// These could maybe be aliased in a std lib as such?:
// Unsigned
u1, u2, u3, ... u(2^??)
// Signed
i1, i2, u3, ... i(2^??)

// Does a Rust-like u/isize make sense? Probably not, because there is no
// architecture. We *could* have isynth and usynth to refer to the compiler host
// architecture native integer size, but I currently lean towards not having
// something that could lead to portability issues.

// Floating-point numbers follow IEEE 754.

// While floats could be defined as structs (see below), we need them in generic
// arithmetic, so I think it's useful to define them as basic types.
// Operations on floats may not be synthesizable for now.
// Floating-point parts consist of their respective IEEE 754 fields, that can
// be indexed (but I don't think slicing makes sense here).

// IEEE 754 basic types:
f32, f64, f128  // binary floating point types
d64, d128       // decimal floating point types

// IEEE 754 non basic types:
f16, f256
d32

// Textual
char    // ascii or utf8? or have byte for ascii and char for utf8 like Rust?

// I suppose "char" could make people uncomfortable w.r.t. encoding, so we could
// also have:
byte   // obviously represented as 8 bits when used as net/port
ascii  // represented as 7 bits (or do we want extended ascii?)
utf8   // represented as 32 bits

string  // should we allow dynamic sizing? if so, it is not (easily)
        // synthesizable. This type is meant for non-synthesizable stuff such
        // as debug prints and generics.

// Maybe later:
// custom precision floating point ?
// fixed point ?
// posits ?

// Fixed-size array of size S elements of type T.
// S must be an expression of literals or constants
T[S]

// Tuples
// Should they carry the same semantics as struct (i.e. Tydi Group) ?
(T0, T1, ...)

// Product type

// Direction token for field (and port declarations, later).
>  // (forward or out)
<  // (reverse or in)
// Yes, these symbols are up for massive debates. And yes, I have already
// confused myself profoundly with it when typing port directions.

// Field declaration syntax:
// <attributes> <field identifier> <direction token> <type>

// Product type decl.
// Syntax:
// struct <identifier> {
//     <field decl> (, <field decl>)*
// }

// Product type example:
struct LegacyStream {
    valid > u1,
    ready < u1,
    data  > u8
}

// Sum type decl
// Syntax:
// union <identifier> {
//     <field decl> (, <field decl>)*
// }

// Sum type example:
// To define a net/port of type struct A outside of a stream,
// all values must be defined. Therefore, when A is used as a stream data type,
// for each handshake on X, there must be a handshake on Y. This is inherit to
// the Tydi spec representation of this stream as a stream of group<x, y>
union OptionalValue {
    None > null,
    Value > f64
}

// Variant decl:
// Syntax: <variant identifier> (= <custom value expression>)

// Enum type.
//
// Syntax:
// enum <identifier> (: <T>) {
//     <variant decl> (, <variant decl>)*
//     ...
// }

// Where T is the synthesized type. Perhaps analogous to "storage" type, this
// could be called "spatial" type. T will be log2ceil(num variants) number of
// bits when synthesized, unless explicitly defined to be otherwise.

// Enum type example:
enum ProtocolVersion {
    IPv4,
    IPv6
}

// Enum type with explicit spatial type and value
enum ProtocolVersion : u8 {
    IPv4 = 0,
    IPv6 = 0x1
}

// Tydi stream.

// A Tydi stream has three generics:
// T = the stream data type
// D = dimensionality, an expression or another generic from which a positive
//  integer can be derived, default = 0
// U = user data type, default = null

// It may appear some of the original Tydi attributes for streams are missing.
// They are described elsewhere:
// - Direction is not defined here; it is declared through the struct or union
//   field decl. This makes more sense, as direction is relative (to another
//   field).
// - Synchronicity, same story, as the struct/union decl is the context in
//   which child/parent relations are visible.
// - Complexity and throughput should be an attribute of a net or port,
//   since they talk about properties of an interface but not of a data
//   structure. Types should only capture unique properties of the data
//   structure they represent.

stream<T, D, U>

// Stream examples:

stream<u8>     // an infinite stream of u8s
stream<u8, 1>  // an infinite stream of variable length sequences of u8s

// A stream of a struct type:
struct A {
    x > u8,
    y < u8,
}

// a stream with A.x in forward direction, A.y in reverse  direction.
// To define a net of type struct A outside of a stream, all values must be
// defined. Therefore, when A is used as a stream data type, for each handshake
// on X, there must be a handshake on Y. This is inherit to the Tydi spec
// representation of this stream as a stream of group<x, y>
stream<A>

// A struct type with the synchronicity attribute set explicitly to flatten.
// This attribute is meaningless for non-stream nets or ports using this
// type (i think?)
struct B {
    x > u8,
    #[flatten]
    y > u8  // if B were to be used in a stream with dimensionality > 0,
            // only one y has to be transferred for each outermost
            // sequence of x's.
}

stream<B, 1>  // a stream with B.x with a last signal, and a stream with B.y
              // without a last signal.

// A struct type with the synchronicity attribute set explicitly to desync.
struct C {
    x > u8,
    #[desync]
    y > u8,
}

stream<C, 1>    // Two streams with their own last signal. The same amount of
                // sequences must be transfered, but each corresponding sequence
                // can be of different length.

// I'm following the Rust attribute macro style here, but perhaps a nicer syntax
// is possible.

// ---------------------------------
// Builtin type operations/functions
// ---------------------------------

// It would be nice to have builtin special operators/functions so we can get
// properties of (stream) types, e.g. to be used in generic arithmetic.
DimOf(stream<T, 1>) // yields 1

// -------------
// Special types
// -------------
// We need to think about clocks.
// When using streams types, they always must have some associated clock.
// I would propose there is always an implicit global default clock domain with
// an associated clock and reset that will be propagated to any component using
// a stream type in their port list and does not explicitly define some other
// clock/reset to be used. I think this is also done in Spatial.
// It should be possible to define more clock domains to automate e.g. CDC.

clk // explicit clock type?
rst // explicit reset type?

// Random thought: associating stuff that uses clock/reset with it could look
// syntactically similar to Rust's lifetime specifier

// ------------
// Type aliases
// ------------
type CharStream = stream<char>;  // This is a stream of char type without a
                                 // last bit.

type String = stream<char, 1>;   // A stream of char type with a last bit.

// -----------
// Expressions
// -----------
// We need expressions.
// At this stage, they will mainly be used to do arithmetic with generics and
// constants.
// Any decision here will have great impact on the language design, and needs
// some more thought. I personally like languages that are "expression
// languages" like Rust or Scala. (see:
// https://doc.rust-lang.org/reference/statements-and-expressions.html)
// At this point I don't feel qualified enough to come up with something good
// enough to discuss here so I will leave this completely open for suggestions.

// ---------
// Operators
// ---------
// Expressions require operators such as:
//
// +            arith addition
// -            arith subtraction
// *            arith multiplication
// /            arith division
// .            member access?
// etc... needs more thought at this point, as described above.

// ---------
// Constants
// ---------
// syntax: const <identifier> : <type> = <expression>

// boolean types
const a = true;
const a : bool = true;

// numeric types
const a : u3 = 7;               // u3
const a = 10;                   // i32
const a : u4 = -10;             // error
const a = 10u10;                // u10

// composite types
const a = [1, 3, 3, 7];                             // array<4, i32>
const a = (42.0, 1.337);                            // tuple<2, f64>
const a = LegacyStream { valid = 0, data = 0 };     // LegacyStream
const a = OptionalValue::Value { 0.1 };             // OptionalValue
const a = ProtocolVersion::IPv4;                    // ProtocolVersion

// expressions can be used to define values, as long as the expressions use
// other constants.
const a = 0;
const b = 1;
const c = a + b;

reg a = 0;
const b = 1;
const c = a + b; // error

// -----
// Ports
// -----
// Syntax: <identifier>
//           <direction token> <type>
//           ('=' <default value expression>)

// ----------
// Components
// ----------
// Components are entities that help to build hierarchy and reusable parts of
// the design.
// While it is an awesome term, I don't think streamlet should be a keyword,
// since a streamlist is just a special case of a component for which all ports
// have a stream type, but they carry no special semantics that cannot be
// expressed with the component keyword.
//
// Syntax:
// comp <identifier>
//      ('<' <generic list> '>')
//      (':' <interface list>)
//      ('(' <port decls> ')')
//      ('{' <implementation '}')
//
// When a component has no defined implementation and is not marked "extern",
// (see below), the compiler should issue a black-box error by default, and not
// a warning that is buried under thousands of other useless warnings like we
// are used to from traditional HDLs / toolchains.
//
// A component should probably be a type itself?

// An adder
comp Add (
    a < u8,
    b < u8,
    y > u8
) {
    // implementation goes here.
    // Referring to ports could be done through a keyword such as e.g. self:
    self.y = self.a + self.b;
    y // invalid reference

    // Or could we omit self and not allow local declarations of stuff with
    // the port name? This would result in smaller code, but it will have less
    // local reasoning. I would personally still go for the latter.
    y = a + b;
}

// An N-bit adder
comp Add<N: u64> (
    a < u<N>,
    b < u<N>,
    y > u<N>
) {
    // implementation goes here.
}

// -------------------
// Component instances
// -------------------
comp PlusOne<N: u64> (
    a < u<N>,
    y > u<N>

) {
    // An instantiation of Add<8> with the identifier adder:
    inst adder : Add<N>;

    // VHDL-like associativity lists suck.
    // We can refer to instance ports anywhere in implementation code as
    // follows:
    adder.a = a;
    adder.b = 1u<N>;
    y = adder.y;
}

// --------------------
// Component attributes
// --------------------
// It may be useful for later on if we could give components specific
// attributes, such as:
#[streamlet]
comp (
    // only ports with the stream type are allowed.
);

// Perhaps to even define latency useful for building larger designs with
// automated buffering, if it cannot be derived automatically of course.
#[streamlet, latency={{a,b,5},{a,c,6}}]
comp (
    a < stream<...>,
    b > stream<...>,
    c > stream<...>,
);

// -------------------
// External components
// -------------------
// (Imperfect analogies ahead:)
// Using the "extern" keyword and an "RTL" specifier, it is possible to declare
// a component is implemented outside this hardware description. We need to
// think about how far we could take this. There is no real "ABI" for hardware
// so we must think about how the build tool "links" such an external component
// into the target output. Hence I called it "RTL" here but perhaps there is a
// better name for this. It would be possible to "link" such components into the
// design when they use e.g. the Tydi canonical representation of it in VHDL,
// SystemVerilog, Verilog, or lower level stuff like FIRRTL. For the traditional
// HDLs mentioned here, the build tool must know how to deal with such external
// sources.

// Example:
extern "VHDL" comp foo (
    i < u8,
    o > u8
); // implementation is omitted.

// ----------------------------------------------
// Special attributes for ports with stream types
// ----------------------------------------------
comp X (
    #[throughput=10, complexity=5]
    a < stream(u8)
);

// ----
// Nets
// ----
// Nets are simply wires between things within a component implementation, like
// the Verilog "wire" keyword. They do not have the semantics of VHDL "signal"s
// as in that they could be used to create registers.
//
// Syntax:
// net <identifier> (: <type>) (= <expression>)

net q : u8 = 1;     // a net named q of type u8 tied to 0b00000001
net r = q;          // a net named r of type u8 driven by q.
net s = stream<u8>; // a net named s of type stream<u8>. If nothing drives this
                    // net, the default value of the streams "valid" is
                    // de-asserted with the other values don't care.
net t : stream<u4> = s;   // Error.

// ----------------
// Registers (TODO)
// ----------------
reg x = 0;

// -----------
// Connections
// -----------
// Connections declarations of source and sink connections.
// Syntax:
// <destination identifer> = <expression>;
// Source can be any expression. Perhaps the assignment symbol = should be an
// operator, and the assignment should be an expression itself that yields a
// reference to the net being driven, so you can chain like: a = b = c;.

// Example:
comp X (
    a < u8,
    b > u8
) {
    b = 0;  // drives b to zero (all bits are typically ground).
    a = 0;  // error, a is an input.
    b = a;  // drives b with a.
    a = b;  // error, a is an input.
}

// --------------------------------------
// Selecting and slicing into basic types
// --------------------------------------
// Single part/element selection and slicing is done through the [] operator.

// Range expression:
// Syntax: <inclusive start index> .. <exclusive end index>
// Syntax: <inclusive start index> ..= <include end index>
// etc.., see Rust.

// Slicing into arrays:
net a : array<u8, 3> = [1, 2, 3];
net b : array<u8, 2> = a[0..1];
net c : array<u8, 2> = a[1..];
net d : array<u8, 2> = a[..1];
net e : array<u8, 2> = a[0..3]; // error

// Slicing into numeric types is allowed for numbers that have "parts"
// (somewhat following Verilog terminology here), i.e. int<N>, uint<N> and f32,
// f64, f128, d64, d128.

// Slicing into integer parts
net a : u8 = 1;
net b : bit = a[0];
net c : a[0..3]; // becomes a u4
net d : a[4..8];

// Selecting float parts:
net e = 0.1;    // f64
net f = e.sign; // bit
net g = e.exp;  // i don't even want to go into this.

// Selecting stream parts:
net h = stream<u8>;
net i : bit = h.valid;

// --------------------------------------------
// Generative structural expressions/statements
// --------------------------------------------
// Conditional generate
// Syntax: gen if <bool expression> { <statements> } else { <statement> }

// Example:
gen if a = 0 {
    b = c;
} else {
    b = d;
}

// Pattern matching generate
// Syntax: gen match <expr> {
//    <expr> : { <statements>},
//    ...,
// }

// Example:
gen match a {
    0 : { b = c; }
    1 : { b = d; }
    _ : { b = 0; }
}

// Generative for
// Syntax: gen for <iterator> in <iterable> { <statements> }
gen for I in [1, 2, 3] {
    inst a;
}

// How could we refer to some instance of a?
// What if we could have arrays of instances?

// ----------
// Interfaces
// ----------
// Interfaces are pre-defined sets of port declarations with associated
// generics, that may be implemented by components. They are useful when
// when components have generics that take other components as an argument, to
// scope the allowed components according to some interface specification.

// Syntax:
// interface <identifier>
//   ('<'<generic list>'>')
//   '(' <port decls> ')'

// Example for a Map interface:
interface Map<type I, type O, type U=null> (
    input  < I,  // input port
    output > O,  // output port
    user   < U   // custom data port
);

// Example of a component implementing the Map<u8, u8, u8> interface.
// This component will increment elements of i by u.
comp Incrementer : Map<u8, u8, u8> {
    // impl goes here
}

// Could be equivalent to:
comp Incrementer : Map (
    // I and O could be inferred using this syntax:
    Map::input  < u8,
    Map::output > u8,
    Map::user   < u8
) {
    // impl goes here.
}

// Example continued:
// A component with a component generic requiring the above Map interface.
// This component would implement a one-to-one mapping of every element of the
// sequence of i to o. U is used for a custom net to the MapComp that can be
// used for e.g. run-time parameters, but is null by default.
comp MapSeq<type I, type O, comp C : Map<I, O, U>, type U=null> (
    input  < stream<I, 1>,  // Input sequence.
                            // I'm assuming here if I = stream<T, 1>,
                            // stream<I, 1> becomes stream<T, 2>.
    output > stream<O, 1>,  // Output sequence.
    user   < U              // Custom signals to the internal instance of C.
) {
    inst map : C;
    map.user = user;
    // More implementation would follow here, but requires non-structural stuff.
}

// Example continued:
comp Top (
    i < stream<u8, 1>,
    o > stream<u8, 1>
) {
    inst inc_seq : MapSeq<u8, u8, Incrementer, u8>;

    // Increment every element by 42.
    inc_seq.u : u8 = 42;
    inc_seq.i = i;
    o = inc_seq.o;
}

// Example of a reduce component.

// Reduces two values to one, given some initial value.
interface Reduce<type T, type U=null> (
    input_0 < T,
    input_1 < T,
    output  > T,
    user    < U
)

// Example continued:
comp Add<T> : Reduce<T> {
    // This would implement: output = input_0 + input_1;
}

// Example continued:
// Reduces a sequence
comp ReduceSeq<type T, comp C : Reduce<T, U>, type U=null> (
    initial < stream<T>,   // initial value
    input   < stream<T,1>, // input sequence
    output  > stream<T>,   // reduced result
    user    < U            // custom signals to the internal instance of C.
) {
    inst reduce_seq : C;
    reducer.user = user;
    // More implementation would follow here, but requires non-structural stuff.
}

// Example continued:
comp Top (
    numbers < stream<u8, 1>,
    sum > stream<u8>
) {
    inst reducer : ReduceSeq<u8, Add<u8>>;
    reducer.i = numbers;
    reducer.d = 0;
    sum = reducer.o;
}

// Components can implement multiple interfaces:
interface X ( a > u8 );
interface Y ( a < u8 );

comp Z : X, Y {
    // impl goes here
    X::a    // refers to port a of interface X
    Y::a    // refers to port a of interface Y
    a       // error, undefined.
}

// --------
// Packages
// --------
// Packages are namespaced collections of types, constants and components.
// The package name "work" is reserved for the root namespace.

// Example:
package X {
    type String = stream<char, 1>;

    const pi = 3.14;

    comp foo {
        a < u8,
        b > u8
    }
}

// Packages and their constituents can be used without their nasmespace
// through a use declaration.

// Example:
use X::*;               // use everything
use X::{String, pi};    // use only specific stuff

comp bar {
    inst moo : X::foo;
}

// The root namespace for a project is "work".
inst a : work::bar;
inst b : work::X::foo;

// ------------
// Doc comments
// ------------
// Doc comments start with three slashes: /// and are placed in front of the
// declaration to be documented.

// Example:

/// A dolphin
struct Dolphin {
    /// The name of the dolphin.
    name : String,
    /// The size of the dolphin in cm.
    size : u32
}

/// An interface for components producing Dolphins.
interface DolphinProducer (
    /// Dolphin output.
    o > Dolphin,
)

// ----------------------
// An example from TPCH-6
// ----------------------
// SELECT
//     sum(l_extendedprice * l_discount) as revenue
// FROM
//     lineitem
// WHERE
//     l_shipdate >= date '1994-01-01'
//     AND l_shipdate < date '1995-01-01'
//     AND l_discount between 0.06 - 0.01 AND 0.06 + 0.01
//     AND l_quantity < 24;

/// Package with components performing TPC-H queries.
package tpch {

/// A date.
struct Date {
    year > u12,
    month > u4,
    day > u5,
}

/// A range (dynamic).
struct Range<T> {
    /// Start value (inclusive)
    start > T,
    /// End value (exclusive)
    end > T,
}

/// A row from the LineItem table.
struct LineItem {
    extended_price > f64,
    discount > f64,
    ship_date > Date,
    quantity > f64,
}

/// Parameters for TPC-H query 6
struct Q6Params {
    /// The shipdate range for which the revenue must be calculated.
    shipdate_range < Range<Date>,
    /// The discount range for which the revenue must be calculated.
    discount_range < Range<f64>,
}

/// Interface for filter predicates
interface Predicate<T> {
    i < T,
    o > bool,
}

/// Component implementing the Predicate interface, outputting true for T's
/// that fall within the range, false otherwise.
comp WithinRange<T> : Predicate<T> (
    range < Range<T>,
) {
    // impl goes here.
}

/// TPC-H Query 6 with dynamic shipdate and discount ranges.
comp Q6 (
    /// Parameters for the query on each table.
    params < stream<Q6Params>,
    /// The stream of tables to operate on.
    tables < stream<LineItem, 1>,
    revenue > stream<f64>,
) {
    /// The ship date filter. See definition of MapSeq above.
    inst date_flt : MapSeq<Date, bool, WithinRange<Date>, Range<Date>>;

    /// The discount filter.
    inst discount_flt : MapSeq<f64, bool, WithinRange<f64>, Range<f64>>;

    // The params stream has members that go different ways. It's probably
    // good to make the sync explicit. Perhaps it could look like this:
    date_flt.range, discount_flt.range = params.split({shipdate_range},
                                                      {discount_range});
    // With .split(...) which should be a builtin member of a stream type,
    // you can split the streams out (at your own risk) to any combination.
    // Each argument of split is a list of members that should stay
    // together. This results in new (anonymous) types.

    // Implicit stream split could be a thing:
    date_flt.range = params.shipdate_range;
    discount_flt.range = params.discount_range;

    // Warning! Control flow ahead - non-goal for now so can be safely ignored.
    // Just a brainstorm.
    // For each table (this continues indefinitely unless reset is asserted).
    for table in tables {
        // For each row in the table.
        // This continues up to when the tables last bit is asserted.
        date_flt.input = row.shipdate;
        discount_flt.input = row.discount;
        // TODO
    }
    // end of control flow
}

// ---------------
// Random thoughts
// ---------------
// It would be nice if generics are Turing-complete.
// It would be nice if generics could interface with the file system.

// --------------------------------------------
// Random examples that got lost in the process
// --------------------------------------------

struct Dolphin {
    name : String,  // This is a stream
    size : u32,     // This is not a stream
}

/// This component feeds baby dolphins until they are the size of a grownup
/// model and then outputs them.
comp Feeder {
    // Since Dolphin.size is not a stream for model, there is no
    // synthesized synchronization between model.size and model.name.
    // Users are on their own in terms of how to synchronize between the fields
    // of the struct.
    model < Dolphin,

    // However, in the following case, a stream is wrapper around it.
    // We will interpret this as a Stream<Group< .... >> in the spec,
    // so for each name of the inner stream for name, also one size must be
    // handshaked on the outer stream for size.
    baby < stream<Dolphin>,
    grownup > stream<Dolphin>,
}


Jest tests failing due to possible Babel mis-config

Version
4.3.1
Environment info
Environment Info:

  System:
    OS: macOS 10.15.2
    CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
  Binaries:
    Node: 13.12.0 - /usr/local/bin/node
    Yarn: Not Found
    npm: 6.14.4 - /usr/local/bin/npm
  Browsers:
    Chrome: 81.0.4044.129
    Firefox: 74.0.1
    Safari: 13.0.4
  npmPackages:
    @vue/cli-overlay:  4.3.1
    @vue/cli-plugin-router: ^4.3.1 => 4.3.1
    @vue/cli-plugin-unit-jest: ^4.3.1 => 4.3.1
    @vue/cli-plugin-vuex:  4.3.1
    @vue/cli-service: ^4.3.1 => 4.3.1
    @vue/cli-shared-utils:  4.3.1
    @vue/component-compiler-utils:  3.1.2
    @vue/preload-webpack-plugin:  1.1.1
    @vue/test-utils: 1.0.0-beta.33 => 1.0.0-beta.33
    @vue/web-component-wrapper:  1.2.0
    jest-serializer-vue:  2.0.2
    vue: ^2.6.11 => 2.6.11
    vue-hot-reload-api:  2.3.4
    vue-jest:  3.0.5
    vue-loader:  15.9.1
    vue-router: ^3.1.6 => 3.1.6
    vue-style-loader:  4.1.2
    vue-template-compiler: ^2.6.11 => 2.6.11
    vue-template-es2015-compiler:  1.9.1
  npmGlobalPackages:
    @vue/cli: 4.3.1

Steps to reproduce
Sorry, code can't be made public.
I created a project with Vue CLI and selected Jest for tests and NO Babel.
What is expected?
Tests execute with pass or fail.
What is actually happening?
Tests are not executing, but the run fails with these errors that make me think there is something mis-configured with the Vue CLI stuff, perhaps inside test-utils (obfuscated the path):
Failed to collect coverage from /xxxxx/frontend/client/src/components/benchmarks-breakdown.vue
ERROR: .plugins[0] must be a string, object, function
STACK: Error: .plugins[0] must be a string, object, function
at assertPluginTarget (/xxxxx/frontend/client/node_modules/@babel/core/lib/config/validation/option-assertions.js:264:11)
at assertPluginItem (/xxxxx/frontend/client/node_modules/@babel/core/lib/config/validation/option-assertions.js:256:5)
at /xxxxx/frontend/client/node_modules/@babel/core/lib/config/validation/option-assertions.js:222:30
at Array.forEach ()
at assertPluginList (/xxxxx/frontend/client/node_modules/@babel/core/lib/config/validation/option-assertions.js:222:9)
at /xxxxx/frontend/client/node_modules/@babel/core/lib/config/validation/options.js:108:5
at Array.forEach ()
at validateNested (/xxxxx/frontend/client/node_modules/@babel/core/lib/config/validation/options.js:84:21)
at validate (/xxxxx/frontend/client/node_modules/@babel/core/lib/config/validation/options.js:75:10)
at loadPrivatePartialConfig (/xxxxx/frontend/client/node_modules/@babel/core/lib/config/partial.js:76:50)

My package.json:
{
"name": "xxxxxxx",
"version": "0.1.0",
"private": true,
"scripts": {
"build": "vue-cli-service build --dest ../server/public --no-clean",
"build:dev": "vue-cli-service build --mode development --dest ../server/public --no-clean --watch",
"test:unit": "vue-cli-service test:unit"
},
"dependencies": {
"flat": "^5.0.0",
"vega": "^5.10.1",
"vega-lite": "^4.11.0",
"vue": "^2.6.11",
"vue-router": "^3.1.6"
},
"devDependencies": {
"@vue/cli-plugin-router": "^4.3.1",
"@vue/cli-plugin-unit-jest": "^4.3.1",
"@vue/cli-service": "^4.3.1",
"@vue/test-utils": "1.0.0-beta.33",
"vue-template-compiler": "^2.6.11"
},
"browserslist": [
"> 10%",
"last 2 versions",
"not dead"
],
"jest": {
"preset": "@vue/cli-plugin-unit-jest/presets/no-babel",
"collectCoverage": true,
"collectCoverageFrom": [
"src/**/*.{js,vue}"
],
"coverageReporters": [
"html",
"text-summary"
]
}
}
My  vue.config.js:
module.exports = {
// Disable hashes in filenames (we'll create our own when uploading to CDN)
filenameHashing: false,
// Delete HTML related webpack plugins
chainWebpack: config => {
config.plugins.delete('html');
config.plugins.delete('preload');
config.plugins.delete('prefetch');
}
};

This is also happening here.
I think babel changed the plugins configuration key (See this notice].
If you now look at this line you'll see a require() where babel now accepts only "string, object, function".
I fixed that (I think) by changing my jest.config.js to
module.exports = {
  preset: "@vue/cli-plugin-unit-jest/presets/no-babel",
  ...
  globals: {
    "vue-jest": {
      babelConfig: {
        plugins: ["babel-plugin-transform-es2015-modules-commonjs"],
      },
    },
  },
};

But ... YMMV :)

thanks @thenoseman , that seemed to work.  Looks like Vue CLI's config or Babel itself needs to correct this internally so we don't have add junk to our configs.


Cygwin: Enable build of SITL jMAVsim under Windows using the Cygwin Unix-like environment

Most of the incompatitbilities are luckily similar to the darwin build.

New target OS __PX4_CYGWIN added because in other build environments on Windows defines will very likely be completely different
added all necessary exeptions to the defines
disabled priorities completely because on Windows they are defined as values 1-32 and with all the arbitrary +40 -40 priority settings for the modules there were a lot of problems
not only did some threads/"virtual tasks" not start because of out of bound priorities but also the resulting scheduling was totally random and inadequate
with default priorities it ran toally fine during my first tests, should be rethought when windows is used onboard in the future

What I'm really wondering is what the define __CUSTOM_FILE_IO__ is for... I couldn't find any documentation. Any explanation appreciated.
Here is an archive of the portable toolchain setup I tested with: https://drive.google.com/file/d/1y0SvGT6kPxJaB0T-qY2m0ONeR5ppzLGv/view?usp=sharing
If anyone wants to have a try just:

unzip
open the console (click script in the root folder)

cd Firmware
make posix jmavsim

connect QGC for testing (which is available for Windows even the daily build https://docs.qgroundcontrol.com/en/releases/daily_builds.html)

I will:

add more documentation in the dev guide as soon as it's merged (including how to build the entire toolchain manually)
appreciate any hosting platform/system for the one click toolchain
maybe create a small PX4 binary package without toolchain for demonstration purposes
try to enable ARM build as well
(look into what is possible for Windows CI)

Looking good. You effectively have 2 options for CI.
Appveyor - https://www.appveyor.com/docs/build-environment/
Jenkins + AWS EC2 - Custom windows build slave on Jenkins
For NuttX have you considered using the Windows version of the GCC ARM Embedded Toolchain natively? You could even use Visual Studio (project generated by cmake).

@MaEtUgR I tried this - pretty cool. A few notes (that you already probably know)

Trouble loading sky textures - sky shown in black
doing shutdown fails - pkill command not found
FPS up around 62/63 and rock solid. This is much better than in my VM, which varies between 25 and 42.

Getting an ARM build working would be excellent. Getting an arm build + Gazebo would be the dogs bollocks.

@hamishwillee Thanks for testing!

I know about the sky, I just did some test yesterday night and found out it's the same issue as https://github.com/PX4/Firmware/issues/8229 which means enabling the VMWare case uses the old textures and rendering settings but works fine.
Sry I don't understand. Are you closing the simulator window and expect it to also shut down px4? I always do Ctrl-C in the console which closes everything.
Same here, if the delay of the QGC forwarded joystick information wasn't there I could practise my flying skills on my laptop and the 4K screen with this. In the VM performance was very limited especially with higher resolution output.

Totally agree. I will keep working on it 😉
I think ARM build is feasible as I had it workin in MinGW before using official native "GCC ARM Embedded" compiler which I will use again. Gazebo seems to be not exactly impossible but will probably require a lot of development time.
@dagar

see last paragraph
Or a local CI to start out with?
Visual Studio will not be my first goto option which doesn't eliminate it for the future.

Sry I don't understand. Are you closing the simulator window and expect it to also shut down px4? I always do Ctrl-C in the console which closes everything.

In PX4 console I normally type shutdown. That "nicely" shuts down PX4 and returns me to the command prompt.  Ctrl+C probably works too, but I'm not sure it does as clean a kill.
Personally having jMAVSim working is fine for me - because mostly in docs I'm working in playing with parameters, and DroneCore. I know that ROS users and lots of our "future platform" work will find it essential.

PS. Sander / Deltaquad also have a VM based simulator that is rather nice. It just does their vehicle, just does jMAVSim. What I like about it is that it has a nice GUI for starting/stopping refreshing, and presumably you could abstract this to easily do different vehicles. As a pure simulator on Windows it is "user friendly".  Suffers from same stability problems as other VM based solutions and no UI of course.

@MaEtUgR , I tried steps mentioned above and I ended up with the below error. Could you please guide me if I have missed anything?
asheshad@BGL-ASHESHADX ~/Firmware
$ make posix jmavsim VERBOSE=1
Re-run cmake no build system arguments
-- Build Type: RelWithDebInfo
/usr/bin/python: /usr/bin/python: cannot execute binary file
-- PX4 VERSION: v1.7.0-rc3-38-gb7c6bb8b6
-- CONFIG: posix_sitl_default
-- Build Type: RelWithDebInfo
-- The CXX compiler identification is GNU 6.4.0
-- The C compiler identification is unknown
-- The ASM compiler identification is unknown
-- Found assembler: /usr/bin/cc
-- Check for working CXX compiler: /usr/bin/c++.exe
-- Check for working CXX compiler: /usr/bin/c++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- broken
CMake Error at /usr/share/cmake-3.6.2/Modules/CMakeTestCCompiler.cmake:61 (message):
The C compiler "/usr/bin/cc" is not able to compile a simple test program.
It fails with the following output:
Change Dir: /cygdrive/c/Work/Embedded_Targets/Work/Windows_PX4_cygwin_Matthias_grob/home/Firmware/build/posix_sitl_default/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/ninja.exe" "cmTC_457ec"
[1/2] Building C object CMakeFiles/cmTC_457ec.dir/testCCompiler.c.o
FAILED: CMakeFiles/cmTC_457ec.dir/testCCompiler.c.o
/usr/bin/cc -o CMakeFiles/cmTC_457ec.dir/testCCompiler.c.o -c
testCCompiler.c
/bin/sh: /usr/bin/cc: cannot execute binary file: Exec format error
ninja: build stopped: subcommand failed.
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:200 (project)
-- Configuring incomplete, errors occurred!
See also "/cygdrive/c/Work/Embedded_Targets/Work/Windows_PX4_cygwin_Matthias_grob/home/Firmware/build/posix_sitl_default/CMakeFiles/CMakeOutput.log".
See also "/cygdrive/c/Work/Embedded_Targets/Work/Windows_PX4_cygwin_Matthias_grob/home/Firmware/build/posix_sitl_default/CMakeFiles/CMakeError.log".
/bin/sh: line 0: cd: /cygdrive/c/Work/Embedded_Targets/Work/Windows_PX4_cygwin_Matthias_grob/home/Firmware/build/posix_sitl_default: No such file or directory
make: *** [Makefile:147: posix_sitl_default] Error 1

Did you change folder? I have it under C:\PX4\ . It should not make a difference but maybe it does or maybe your folder structure names just result in a path that's too long. (Just to rule that one out)

I ran this under a differently named subfolder and it ran fine. So that is not the problem. I just did make posix jmavsim

I rebased on master and added the ARM NuttX on Cygwin support.

First commit didn't change anything (not even rebase conflict)
Second commit is new and solves the two necessary cases where the cygwin path is converted the wrong way because there are custom commands that don't get handeled by the cmake ninja path magic or the cygwin handling already built into the NuttX Windows/Cygwin build.

@dagar In the latest commit I worked out a solution for all your comments except the first one.
I agree it would be nice to have relative paths in general but as you likely know most paths in the current build system are absolute and generated from camke variables like ${PX4_SOURCE_DIR} which then contain the OS specific drive identifier.
I'm pretty sure I break something if I do something like this: https://github.com/PX4/Firmware/compare/cygwin...cygwin-relative-paths-demo
especially when using a lot of ../.. it is prone to break when the structure changes right?
I didn't find a solution. But I'm also not completely sure why the conversion with the extra cygwin path is needed only in these places...

Relative path usage update. https://github.com/PX4/Firmware/compare/cygwin...cygwin-relative-paths-demo

@dagar It seems to me that someone killed the branch while I was offline. Can you push it again please? 😇

@julianoes Thanks, I never built snapdragon until now otherwise I would have tried. I'm pretty sure it is not be affected.
@dagar Your relative path solution is nice and works perfectly fine under cygwin. Thanks a lot for looking into it! I didn't know cmake has this feature. Now the paths in the build.ninja file are always correctly generated e.g. ../../..//nuttx_px4fmu-v4_default.elf px4fmu-v4.bin.
By the way, here's the newest version of the toolchain which builds all this:
https://drive.google.com/file/d/1fZk9tL2sq1whK47DyBGy63YOfnnFMYJ9/view?usp=sharing
Size basically only grew by the size of the arm gcc compiler (~400MB) which is obviously necessary. As soon as this pr is merged I will think of a way to create an official release for the toolchain.

OSX failure (circleci) is real. I'll look into it.

Sadly the cygwin build is broken with these changes. Let me have a look.

If I run it without the last commit I get the path NuttX/nuttx/configs/px4io-v2/scripts/ld.script for the linker script in the build.ninja file which is the correct one from the view of the build path.
With the last commit cmake writes the relative path ../../..//NuttX/nuttx/configs/px4io-v2/scripts/ld.script which is incorrect...

@dagar What do you think about the last commit?


Add gapless options for reciters

When we have the quranicaudio api working ,etc. Will be good

@sabeurthabti is there a way to link the two? Thoughts?


[Question] Can I refresh ID Token?

I've been using lib for verify IDToken in my api, but I'd like to refresh token sometimes. How can I do that?

You need to create ID tokens on the client side. See https://firebase.google.com/docs/auth/admin/verify-id-tokens
In the future, please use Stack Overflow for usage questions.

@lahirumaramba My client created an ID token I want to renew in my backend, but I saw this library and doesn't have logic to refresh the token like JS, maybe we can implement that. What do you think?


Underlined 100 emoji showing as underlined 42

Title says it all. I am using the magisk module on a OnePlus 5t. Is this a bug or is there a reason for it?

Well, this was an easter egg I made when I haven't published this font.
I'll fix it in the next few hours 😅
42 is actually the answer to the life, universe and everything :D

26ab470ddd7740bfb5c939800f9adec4d7517b0f changed this behavior. However, I'll re-add the 42 emoji as a new ZWJ sequence 😁


Enabling Shape Tracing on dashboard

To use Shape Tracing on the dasboard you have to comment out the 2 lines after the line "// activate on front-end only" in ShapeTracingFactory.cs and TemplatesFilter.cs.
How about making this controllable from SiteSettings?

Or maybe some temporary browser session-level config added to the Shape Tracing window itself.

I don't know. But it occurs for a standard orchard installation.

Clone repository (then use dev branch).
Enable Shape Tracing.
You get this error: "Object reference not set to an instance of an object.".


bug

Overview of the issue

Expected Outcome

Current Outcome

Steps to Reproduce(Only for bug reports)

Jeddict Version(s)

No bug?

Yes, I agree ;)

Using NetNeans IDE 8.1 instead of NetBeans IDE 8.2 solved the problem

So please close it. Thx.

It would be good to know the problem anyway, because no one can fix it, if no one is requesting it in NB 8.2. So your help is much needed to make reproducable steps to find the bug in NB 8.2. Thx :)


Playing sounds when screen is off?

I'm using this component to play mp3 files, I'm streaming the music from one of my servers, everything is great so far. I would like to know if is possible to continue playing the music after the phone gets lock, or if the user leaves the app I would also like to continue playing the music, is this possible?
Regards

Did you try to implement the proper background mode for your application? I didn't test it, but theoretically it should work when you add the correct background mode for playing audio to your plist.

@crysfel take a look at StreamingKit for playing audio. It can be installed as a CocoaPod and wired up to play audio over HTTP, backgrounded and locked, and manage audio session interruptions (e.g. incoming calls, Siri and headphone unplug). You should then be able to use the ReaCT bridge to dispatch events to control your video.
Functional example with detailed commits here (URL subject to change):
https://github.com/jhabdas/react-native-es6-reflux

Nice one :smile:

@crysfel I'm doing something similar, were you able to figure out how to play audio in the background using the react-native-video component or did you have to switch to the SteamingKit mentioned

Hope this helps. Should work either way.
http://slides.com/jhabdas/streaming-audio-react-native/

Hope this helps. Should work regardless of approach. http://slides.com/jhabdas/streaming-audio-react-native/#/15/1 @crysfel

Thanks for the follow up there @jhabdas :)

@jhabdas I added the code snippet you wrote above to my AppDelegate and followed these instructions on enabling Background playback. But I still can't get audio to play in the background.

@jamesfzhang Did you remember to set up your app for background playback in Info.plist?
<dict>
	<key>UIBackgroundModes</key>
	<array>
		<string>audio</string>
	</array>
</dict>

For a working example of background playback using the above code snippet please feel free to study the source of my Lumpen Radio app.

@jhabdas Yes I did update Info.plist. I was hoping to avoid having to learn Objective C as I wanted to get this app I'm working on out ASAP, but thanks for the help. I'll check it out.

@jhabdas Out of curiosity, what version of XCode & iOS are you using to develop Lumpen Radio?

Thanks for your help with this @jhabdas.
I'm afraid, like @jamesfzhang, I haven't been able to get this working.
I don't have an AudioClass, where should I put that snippet of code?
James, did you get it working in the end?

You can just throw the code into AppDelegate.m. Use #pragma marks to help
stay organized. But the secret sauce to the background play black is the
background audio playback setting the Info.plist file.
On Sun, Nov 1, 2015 at 6:02 PM jasecoop<EMAIL_ADDRESS>wrote:

Thanks for your help with this @jhabdas https://github.com/jhabdas.
I'm afraid, like @jamesfzhang https://github.com/jamesfzhang, I haven't
been able to get this working.
I don't have an AudioClass, where should I put that snippet of code?
James, did you get it working in the end?
—
Reply to this email directly or view it on GitHub
https://github.com/brentvatne/react-native-video/issues/41#issuecomment-152879308
.

@jamesfzhang Xcode 7, iOS 8+

I ended up writing my own AudioPlayer using StreamKit and got it working.

@jamesfzhang are you open source by any chance? :angel:  be great to see a few more audio implementations so we could look at creating a general purpose audio library on top of streaming kit (or similar) using something like rem.

@jhabdas Unfortunately it is not since it was written for a client. But I would be interested in contributing to a generic full-featured audio player (unlike https://github.com/andreaskeller/react-native-audioplayer)

@jamesfzhang did you ever find a full feature generic audio player? This video lib is the only one that works for me

@ericraio ended up writing my own audio player built. It uses https://github.com/tumtumtum/StreamingKit

@jamesfzhang any chance we could see an example of this in use? I have good experience with react-native but am at a loss when it gets to objective c. This issue a real blocker on my project atm

@jasecoop StreamingKit at work in OSS form. README contains links to
slides, posts and a Webcast I gave explaining how it all works. Hope it
helps. Good luck!
https://github.com/jhabdas/lumpen-radio
On Thu, Mar 31, 2016 at 1:12 AM jasecoop<EMAIL_ADDRESS>wrote:

@jamesfzhang https://github.com/jamesfzhang any chance we could see an
example of this in use? I have good experience with react-native but am at
a loss when it gets to objective c. This issue a real blocker on my project
atm
—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/brentvatne/react-native-video/issues/41#issuecomment-203771155

@jhabdas thanks for contributing all of this! I have a quick question about in lumpen radio. What did you do for AirPlay support?
I am also looking to add an airplay button and allow you to switch the audio to a device like AppleTV

@ericraio nothing specifically I can think of. please let us know if you figure it out!

@jhabdas hey good news! When background audio is turned on in xcode which also includes airplay,
after I installed this library, the airplay icon gets displayed.
https://github.com/IFours/react-native-volume-slider

@ericraio did the author bundle the AirPlay icon with the slider module so it shows in the UI and not simply the system menus? how does the experience compare to, say, Spotify, if you've used it?

@jhabdas The way I know get the airplay icon to display is you need to use iOS's MPVolumeView and if AirPlay is enabled for the app, the icon will appear next to the slider. Now I think you can disable the slider from displaying but I am not sure.
When Spotify displays the AirPlay icon, I think they render it out and create their own custom element that delegates the event to the airplay icon to trigger the menu.
(fun fact, I was working at Sony with PlayStation Music & Spotify)

Hi. I want to do this on android. How can i use it? I set "playInBackground:true" but not working properly

@arbabi2010  did you fixed the issue in android?

@arbabi2010 did you fixed the issue in android?

Yes. but with some other packages .
I use this tutorial . and i changed some codes on it
https://reactnativeexample.com/audio-player-to-offline-local-and-online-streaming-audio/

@arbabi2010 did you fixed the issue in android?

Yes. but with some other packages .
I use this tutorial . and i changed some codes on it
https://reactnativeexample.com/audio-player-to-offline-local-and-online-streaming-audio/

@arbabi2010  Thanks for replay,can you able to give the changed codes for play the sound when mobile in locked mode

@crysfel
Used it for audio and it works for me with the help of react-native-keep-awake module.
https://www.npmjs.com/package/react-native-keep-awake

I have found the way which allows you to play the track even when screen goes to sleep/locked. I have used @react-native-community/audio-toolkit to implement the same.
soundOne = new Player('sound_example.mp3', { continuesToPlayInBackground: true });
Here's the link!
https://www.npmjs.com/package/@react-native-community/audio-toolkit
Thanks!


"Coșna" is listed in the drop-down menu

Description:
"Coșna" is listed in the drop-down menu alongside its corresponding county according to the law
Precondition:
The website is up an running.

Step 1
Type "Coșna" in the search bar.

Expected results
The location is listed in the drop-down menu as "Comuna Coșna, SUCEAVA".


Could not connect from Turkey

Dear developers and users. I use Digital Ocean droplet and your open-vpn.sh script. In Russia I have not problem with connection, but in Turkey I can`t connect to vpn server. I tried any different configuration. I reinstall server UDP and TCP. Tried another ports like 585 and 25. But still not work.  Ping to server is ok, but openvpn client give different errors:
Control Channel Authentication: tls-auth using INLINE static key file
Outgoing Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication
Incoming Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication
Socket Buffers: R=[65536->65536] S=[65536->65536]
Attempting to establish TCP connection with [AF_INET]<IP_ADDRESS>:25 [nonblock]
MANAGEMENT: >STATE:1495114831,TCP_CONNECT,,,
TCP: connect to [AF_INET]<IP_ADDRESS>:25 failed, will try again in 5 seconds: Connection timed out (WSAETIMEDOUT)
MANAGEMENT: >STATE:1495114846,TCP_CONNECT,,,
TCP: connect to [AF_INET]<IP_ADDRESS>:25 failed, will try again in 5 seconds: Connection timed out (WSAETIMEDOUT)

It looks like you are aware of the fact that this is not an issue with the script or OpenVPN.
Take a look at Shadowsocks, a better tool to bypass internet censorship in oppressive regimes.


Unable to display inlay hints with Zig

It seems that no data was returned only in the first request.

zig 0.11.0-dev.3299+34865d693
0.11.0-dev.437+2ff2593
[DEBUG][2023-05-26 09:49:57] .../vim/lsp/rpc.lua:284	"rpc.send"	{
  id = 2,
  jsonrpc = "2.0",
  method = "textDocument/inlayHint",
  params = {
    capabilities = {
      textDocument = {
        uri = "file:///Users/jun/Documents/workspace/zls/build.zig"
      }
    },
    range = {
      ["end"] = {
        character = 1,
        line = 141
      },
      start = {
        character = 0,
        line = 0
      }
    },
    textDocument = {
      uri = "file:///Users/jun/Documents/workspace/zls/build.zig"
    }
  }
}

[DEBUG][2023-05-26 09:49:57] .../vim/lsp/rpc.lua:387	"rpc.receive"	{
  id = 2,
  jsonrpc = "2.0"
}

Possibly during the first request, zls was not ready yet.


Deprecate CreateObject calls without IServiceProvider

Summary
This PR adds overloads to Reflection.CreateObject which take IServiceProvider so that services can be injected.

@bdukes do the test failures on FIPS sound a a fluke to you or is that some sort of clue for a possible bug here ?

The tests needed a dependency provider setup now, they should be fixed

@mitchelsellers once this is merged, I have a handful of PRs that make use of these changes


Decrease margin as an inline tool.

https://github.com/hata6502/editor.js/commit/23b9a78f43acf0be54f9408af6ff0d289bd2a908


incorrectly parsed table type

    DATA:
      nodes TYPE HASHED TABLE OF t_search_index WITH UNIQUE KEY info-id
                                                WITH NON-UNIQUE SORTED KEY type COMPONENTS info-type READ-ONLY.

reports
Identifiers should be lower case: "READ" (keyword_case)

thanks

@FreHu try again, 2.85.10


Workaround the CI failures on master

Weird - running previously successful builds is now failing. I'd like to investigate the root cause a bit more - I guess the Linux environment the CI runs on has changed in some way such that something no longer works.

Yeah, makes sense to look into it more.
What are your thoughts on the Ninja comparison instead?  Do you think that something changed in Travis CI too there?  Or did Ninja get faster?

Not sure on Ninja. I've got a script to dump the time series of how long Shake and Ninja both take and will see what I can see. Does need investigating!

Closing in favour of https://github.com/ndmitchell/shake/issues/715 so we can track the FSATrace thing with an issue. I pinned our FSATrace version in 7ac71e2275be6c17889327f10a77267a8900dc26 which makes the CI start working again. I've raised https://github.com/ndmitchell/shake/issues/716 for the Ninja speed.
Sorry for the slow action on this and other patches. Unfortunately this CI issues meant I couldn't merge from a mobile as I lost the vital signal of whether it worked or not. I've also just started a new job, which has curtailed the time I can spend on a desktop (during the ramp up) and been on holiday 3 times in the last month. Hopefully I'll clear the queue tomorrow and then keep on top of things - thanks for all the patches.

Oh right, I didn't realise the CI build was tracking the HEAD of that repo.  Thank you for resolving that!
And don't worry about the PRs.  After my spree on Friday I looked back and felt guilty as it looked like I was DOSing you... :)
Also, Pepe mentioned (at a meetup) the new job, so I understand completely.  Good luck and perhaps I can buy you that beer one day? :)  (Actually, there's a GHC Core plugins talk tomorrow/Wednesday, if you're in London and free - https://www.meetup.com/London-Haskell/events/263644168/)

Definitely don't feel guilty about patch volume - the more the merrier.
I'm at home today so won't be at the talk, but I'm sure we'll cross paths in the near future.


Email Verification -> Mail is not showing User Name.

Terms

[X] Before you openning this issue, i have checked if the issue has already been reported.

Bagisto Version(s) affected
2.0.0
Issue Description
After enabling Email Verification and then checking the verification mail, there we can see that the customer mail is not appearing.
Preconditions
Mail Configurations should be done for checking the mails.
Steps to reproduce

Go to Admin -> Configure -> Settings -> Allow Email Verification -> Enable it.
Go to Sign up -> Create a customer -> Check the Email verifcation mail.
See the mail, there customer name is not appearing.

Expected Result
Customer Name should appear over there in mails.
Actual Result
Currently we are unable to see the customer name -> Check the screenshot here
Screenshots
No response
Additional context
No response

Now, this issue is fixed. so I am closing this issue.
And I have attached a screenshot Here, for future reference.


colours: use symbolic names and change yellow to purple

Purple looks ok on light and dark backgrounds.

I quite liked your green highlight to quickly see what is going on. I feel that it is okay to keep it as we are now checking for TERM color support anyways. Is it okay if we leave it in?

Ok I rebased it out.   Easy enough to do later.
Temporary output is annoying but fix is not likely to be forthcoming :(


Ensure All tests run all the time

Closes #2841
Fixes #2841  .

@juherr - I have fixed all the comments. Please check now.

@juherr - Now we have a chicken and egg problem
If I upgrade Groovy, then the spock test would fail. If I downgrade Groovy to match the Spock 1.x series, then I see that there are groovy compilation failures in JDK17
See here
What do you suggest we do ? We either rework on the spock support to ensure that it is compliant with the spock 2.x series (or) we disable the Spock Test and move on because its anyways a "deprecation eligible feature"
> Task :testng-core:compileTestGroovy
java.lang.NoClassDefFoundError: Could not initialize class org.codehaus.groovy.vmplugin.v7.Java7
	at org.codehaus.groovy.vmplugin.VMPluginFactory.<clinit>(VMPluginFactory.java:43)
	at org.codehaus.groovy.reflection.GroovyClassValueFactory.<clinit>(GroovyClassValueFactory.java:35)
	at org.codehaus.groovy.reflection.ClassInfo.<clinit>(ClassInfo.java:109)
	at org.codehaus.groovy.reflection.ReflectionCache.getCachedClass(ReflectionCache.java:95)
	at org.codehaus.groovy.reflection.ReflectionCache.<clinit>(ReflectionCache.java:39)
	at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.registerMethods(MetaClassRegistryImpl.java:209)
	at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.<init>(MetaClassRegistryImpl.java:107)
	at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.<init>(MetaClassRegistryImpl.java:85)
	at groovy.lang.GroovySystem.<clinit>(GroovySystem.java:36)
	at org.gradle.api.internal.tasks.compile.ApiGroovyCompiler.parseGroovyVersion(ApiGroovyCompiler.java:315)
	at org.gradle.api.internal.tasks.compile.ApiGroovyCompiler.execute(ApiGroovyCompiler.java:152)
	at org.gradle.api.internal.tasks.compile.ApiGroovyCompiler.execute(ApiGroovyCompiler.java:64)

upgrading Groovy throws this error on the build
> Task :testng-core:compileTestGroovy FAILED
startup failed:
Could not instantiate global transform class org.spockframework.compiler.SpockTransform specified at jar:file:/Users/krishnamahadevan/.gradle/caches/modules-2/files-2.1/org.spockframework/spock-core/1.3-groovy-2.5/6f0df2cf4549dcc4b914971675da7e224e893e82/spock-core-1.3-groovy-2.5.jar!/META-INF/services/org.codehaus.groovy.transform.ASTTransformation  because of exception org.spockframework.util.IncompatibleGroovyVersionException: The Spock compiler plugin cannot execute because Spock 1.3.0-groovy-2.5 is not compatible with Groovy 3.0.10. For more information, see http://versioninfo.spockframework.org
Spock artifact: file:/Users/krishnamahadevan/.gradle/caches/modules-2/files-2.1/org.spockframework/spock-core/1.3-groovy-2.5/6f0df2cf4549dcc4b914971675da7e224e893e82/spock-core-1.3-groovy-2.5.jar
Groovy artifact: file:/Users/krishnamahadevan/.gradle/caches/modules-2/files-2.1/org.codehaus.groovy/groovy/3.0.10/b92c72a758f468e64b55e38abe06afa873decdba/groovy-3.0.10.jar

I think we have to drop the spock support right now because it is broken since we use jdk17.
Could you remove the related classes in a dedicated pr?

I think we have to drop the spock support right now because it is broken since we use jdk17.
Could you remove the related classes in a dedicated pr?

Sure will do that. Can we go ahead with merging this PR if all is well ?


Replace sync api bridge with true aiohttp client library

Replace sync api bridge with true aiohttp client library

Codecov Report

Merging #19 (20bb7cc) into main (ab4f0b3) will decrease coverage by 15.24%.
The diff coverage is 65.04%.

@@             Coverage Diff             @@
##             main      #19       +/-   ##
===========================================
- Coverage   97.38%   82.14%   -15.25%
===========================================
  Files           4        5        +1
  Lines         153      224       +71
===========================================
+ Hits          149      184       +35
- Misses          4       40       +36

Impacted Files
Coverage Δ

gcal_sync/auth.py
60.43% <59.09%> (-39.57%)
:arrow_down:

gcal_sync/api.py
100.00% <100.00%> (ø)

gcal_sync/exceptions.py
100.00% <100.00%> (ø)

:mega: Codecov can now indicate which changes are the most critical in Pull Requests. Learn more


Not Working on Paper server

So this mod works fine in singleplayer and multiplayer vanilla servers, but when I join a Paper server it doesn't work. It switches the elytra and chestplate twice so the chestplate doesn't change

Sorry for the delay! I wasn't able to recreate this issue in my testing but the mod was broken with 1.20.4, so its likely this was partially caused by that. Try updating and let me know if you continue to encounter problems!
You should now be able to download the 1.20.4 version from GitHub Releases or Modrinth!

thanks! we swiched our server to spigot due to other issues we had with paper., but latest 1.20.4 autoelytra fabric build works fine now.


Migrate environment variable schema from Joi to zod

Currently Joi is being used for schema validation.
zod provides better typescript support and should be used instead. Especially since the quizlord-client will soon also be migrated to work with the new version of docker-react.
Change should be confined to src/config.ts and define the same contract.

I also have the outstanding question of whether the current approach of doing the validation inline in the module is the best option. This has the advantage that you can just import the environment variables and use them.On the other hand this means if schema validation fails it happens when that module happens to be imported, which feels a little bit less deterministic.
An alternative would be to export a getConfiguration() function (it would run validation the first time it's called and cache the results) and then either:

Have everything that requires configuration import and call that function - still not super deterministic because the first caller would be the one to fail.
Run the validation once on application start and then pass configuration to every service/module that needs it (more of a dependency injection pattern).


CLI Generation to handle  parameter of type 'string' but different format

fixes #4615
CLI Generator is unable to handle parameters such as DateTime, Date, etc.  More precisely, the parameters having type="string" and format="datetime", "date" etc.

Screenshots:
Tests:

Kiota Update:

Build of Sample project:

Change in the builder Class:

Hi @baywet, are there any further changes required for this PR?

@rohitkrsoni Any chance you could add a changelog entry to the Changelog file at the repository root?

Done, thanks :)

@rohitkrsoni @andrueastman there seems to be a regression with this one see this smoke build (only microsoft people will see that)
Has about 16k errors like this one : error CS0029: Cannot implicitly convert type 'string' to 'string[]'
This seems to be caused by the fact that the option now is Option<string[]> but the parameter for the method is string no array.
I'm guessing we should expand the fix to include array information for the parameter type. But I'd like more context from @calebkiage here before we make any changes.

Ah, I missed the fact that GetPrimitiveTypeName does not handle collection information. We would need to add the collection type information from the schema.
Something like:
    private static CodeType GetQueryParameterType(OpenApiSchema schema)
    {
        var paramType = GetPrimitiveType(schema) ?? new()
        {
            IsExternal = true,
            Name = schema.Items?.Type ?? schema.Type,
        };

        paramType.CollectionKind = schema.IsArray() ? CodeTypeBase.CodeTypeCollectionKind.Array : default,
        return paramType;
    }

Hi @baywet, can I get the sample description file so that I can reproduce the issue on my local.
I tried to reproduce the issue by adding a parameter mentioned below.
      - name: testStringArrayParameter
        in: query
        description: 'Usage: newParameter=@newParameter'
        schema:
          type: array
          items:
            type: string

I didn't get any error but got this in Query Parameter properties:

And the option created is:
var testStringArrayParameterOption = new Option<string>("--test-string-array-parameter", description: "Usage: newParameter=@newParameter") {
};
testStringArrayParameterOption.IsRequired = false;
command.AddOption(testStringArrayParameterOption);

Is this behavior expected?

Thanks for the additional context @calebkiage
@rohitkrsoni yes I believe this is the scenario I'm referring to. When the option value gets assigned to the query parameter, the types don't match anymore. Would you mind following up with an additional pull request please?

@baywet sure leave that on me!

To fix this:
Issue: #4707
PR: #4708


merge consecutive range requests

Adds config option HTTP_MERGE_CONSECUTIVE_RANGES to merge consecutive range requests into single requests to match the GDAL config option.
This PR won't address caching, since I'm still not sure the best way of doing it, so I've opened #30 to track that.

TODOs:

[ ] Merge range requests for internal mask.
[ ] More test cases.

Closes #23

Closing this in favor of #33


feat: update dashboard to v0.4.2

Update dashboard to v0.4.2

@ZonaHex how do we manage this version and how does it relate to crate's version? I wonder if this is derived from the crate version and we should do some simultaneous updates.

@ZonaHex how do we manage this version and how does it relate to crate's version? I wonder if this is derived from the crate version and we should do some simultaneous updates.

Dashboard's version is not coupled with database's. Thus the version number in that VERSION file is used as an anchor to map a specific commit in database to corresponding dashboard's version


API returns status 404 for guilds that exist

Nearly ever guild gets a 404 error, even though playblackdesert shows them as valid. Maybe they changed api?

It looks like Pearl Abyss have restricted my server's access to their site. For now, I turned off the API and will investigate the issue further.
In the meantime, you can try self-hosting, but considering current circumstances, it's risky.

Apparently, Pearl Abyss started using Imperva protection against bots — it was present on BDO website in the past but then they removed it and now added it back in.
I turned the API back on, so it may work for some time. Still looking for solutions.

Thank you for solving it!


Scroll end detection

Hi there!
How can I detect when the scrollbar reaches the end of the content? Also I need to detect when it leaves the end of the content.
Thank you

hei @sgromkov i use a new simplebar not work because i use setting simplebar with data-simplebar="init" and i user data-simplebar to detect scrolling after render element, are you solution with user your example?
my script:
note: function scroll is call before render my layout
const scroll = () => {
const simpleBar = new SimpleBar(document.querySelector("#my-element"));
simpleBar
    .getScrollElement()
    .addEventListener("scroll", scrollHandler, { passive: true });

};
function scrollHandler(event) {
console.log(event);
}

Hi @georgedaqu!
I use this solution in my project:
const simpleBar = new SimpleBar(document.getElementById('myElement'));

simpleBar.getScrollElement().addEventListener('scroll', scrollHandler, { passive: true });

function scrollHandler (event) {
    const { scrollHeight, scrollTop, clientHeight } = event.target;
    const isBottomReached = (scrollHeight - Math.round(scrollTop) === clientHeight);

    if (isBottomReached) {
        // You have reached the bottom of the container
    }
}

The exact calculation of reaching the bottom I got from MDN: https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollHeight#checking_that_the_user_has_read_a_text
I hope this helps 😉

thank you so much bro 👍

I encounter an issue when using react-infinite-scroller: it takes approximately 5 seconds to trigger the loadMore function of InfiniteScroll.
However, when I remove data-simplebar, it works normally. Therefore, I suspect the issue arises from detecting scroll to the bottom

if i'm using the data-simplebar directly in div
how should i use the this method
const simpleBar = new SimpleBar(document.getElementById('myElement'));
simpleBar.getScrollElement().addEventListener('scroll', scrollHandler, { passive: true });
function scrollHandler (event) {
const { scrollHeight, scrollTop, clientHeight } = event.target;
const isBottomReached = (scrollHeight - Math.round(scrollTop) === clientHeight);
if (isBottomReached) {
    // You have reached the bottom of the container
}

}


Audit defensive coding

Make sure to audit entire code base to make sure APIs used aren't overridable by attackers. This also means we need to make sure loading of LavaDome is done synchronously and safely, I'm not yet sore JavaScript modules fit for the task, as they load async and therefore attackers might be able to front run them?

audit was done ed442b37f99e2ba0e78cd388ed7cc48366001d14


Steam Overlay won't hook with DXVK in Windows

When using DXVK (and D9VK), Steam Overlay will not hook to any game using the wrapper.
System information

GPU: 1080 Ti
Driver: 441.12
DXVK version: 1.4.4
OS: Windows 10 1909 x64

Sounds more like a Steam Overlay issue than a DXVK issue to be honest. Even if it doesn't hook D3D11, it should at least enable its Vulkan layer.
In any case, there's nothing I can do here.


The volume OSD cannot hide

Before opening the issue, have you...?

[X] Searched for existing issues
[X] Read through the Monitor-Troubleshooting Wiki
[X] Updated MonitorControl to the latest version (if applicable)

Describe the issue
My monitor is LG UK850, I turn on the "hide macOS volume OSD" function but it doesn't wo

rk
Expected behavior
fix this issue so that I can hide the volume OSD
Anything else?
No response
Environment Information (please complete the following information)
- macOS version: 12.0.1 Monterey
- Mac model: MacBook Pro (15-inch, 2019)
- MonitorControl version: v4.0.2(6965)
- Monitor(s): LG 27UK850
- Monitor Cable(s)/Connection(s): USB-C to USB-C
- Apple Silicon/M1 (yes or no):no

Hi, some displays show their own OSD for volume change. There is no function currently in the app to remove the display's OSD. You can hide the macOS volume OSD only.


CMake: add OpenSSL as requirement

Expliclity require OpenSSL and add its include directory not only for special cases BUNDLED and BREW for S2_SOURCE.
Using S2_SOURCE=SYSTEM, there may be cases where openssl and s2geometry were installed in different prefix paths (e.g., system-installed openssl and custom s2geometry installation like in github.com/benbovy/spherely/pull/35). This PR addresses those cases too.

I didn't see #21, but 56eb319 and e462b66 should make s2geography headers discoverable in both "add_subdirectory" vs. "find_package" cases in a modern cmake way.


CC Release Notes May 2021

Release notes for May 3, 2021
Closes: https://cockroachlabs.atlassian.net/browse/CC-3656?atlOrigin=eyJpIjoiZGRmZjUwZTFlNDM5NDYzYmEzNTEwYjY4ODJiZjBlNmYiLCJwIjoiaiJ9

This change is

@lnhsingh I put GitHub Auth in Console changes, should it be General?

Correct, Alerts has only been enabled on our internal prod org and is not yet available to all end users yet. We're in the process of working with SREs to get this out to all users which may roll past the weekend.

I guess to clarify: if the Alerts page is still behind a feature flag, that means this release note should be removed from this month's release notes since it's not available to end-users yet-- right?

Yep that's correct

Also, are the statements, transactions and sessions pages still behind feature flags

Statements and Sessions are still behind a feature flag and not yet available to all users (note: the Transactions page was not an active feature so that won't be included).  It is in the same boat as Alerts regarding progress of rolling it out to all users in prod.
cc @kannanlakshmi  @lnhsingh


Project Explorer Not Available

Hi, I am using Ionide with vscode 1.25 and there i no project explorer available?
Am I missing something?do need to do anything to activate it?

Thanks..

It's under F# button on activity bar - lowest button on your left bar.


Deployment package should run stroom in the background

The package should run Stroom in the background and include a script to kill Stroom. c.f. the previous scripts.

fdf168496d59a34b5c780f536aae3838a37a01a3


How many containers and state should I have in a real world big application?

I am new to the redux, but I like it very much. The single store is really awesome for SPA. But I have a question for a real world big application.
For example, if there is a membership management application. We have login page, member management page and accounting page. Should I have 3 states for each page? If I still have one single state, my concern is the state is going to huge.
Should I have 3 containers for each page? If we need a new page, such as AddMember page. Should I add a new container?
I have checked the examples provided in the source code. Most of them are only for a small SPA. Is there a big application scaffold?

Please ask this on StackOverflow.
Recently we've been trying to keep the issue tracker for issues and discussions, not questions.


cinst visualstudio2017professional <IP_ADDRESS> fails if used in an offline environment (even though necessary parameters are supplied) bootstrapperPath gets lost on the way

Hi Jakub,
first of all, thanks a lot for having created this great framework. Its very promising and already helpful.
I would like to report a problem, that i ran into with an offline installation of visual studio based on a iso.
Steps to reproduce:

Have a Windows 7 x64 SP1 without any prior visual studio installation.
Have all the package dependencies manually resolved (e.g. KB3033929, KB3035131, KB2919355, KB2919442, KB2999226, dotnet4.6.2)
Have the iso mounted to drive letter F:\
Have all necessary certificates installed (F:\certificates using certmgr.exe)
run:
cinst visualstudio2017professional --params "--bootstrapperPath F:\vs_Professional.exe --noWeb --noCache --passive"

The logfiles shows:
User-provided bootstrapper path: f:\vs_Professional.exe
Visual Studio will be installed using f:\vs_Professional.exe

[...] then some lines later it shows:
Detecting if a layout path was provided via package parameters
A layout path was not provided via package parameters

[...]
VERBOSE: Downloading the manifest file (channel manifest)
Running Get-ChocolateyWebFile -url 'https://aka.ms/vs/15/release/channel' -packageName 'channel manifest' -fileFullPath 'D:\TEMP\chocolatey\chocolatey-visualstudio.extension\ChannelManifest_81725945.man'

...which fails because we are in an offline environment.
I know in your code (chocolatey-visualstudio.extension 1.7.0) Resolve-VSLayoutPath.ps1 computes the installLayoutPath from the bootstrapperPath if provided. So it seems that bootstrapperPath gets lost somewhere on the way. And because it is missing here the offline installation will fail.
Install-VisualStudio.ps1 L153 -> Assert-VSInstallerUpdated.ps1 L21 -> Get-VSRequiredInstallerVersion.ps1 L13 -> Get-VSChannelManifest.ps1 L114 -> Resolve-VSLayoutPath.ps1 L25
It seems it gets lost here: Install-VisualStudio.ps1 L123.
I was able to workaround it by saving the $packageParameters before Open-VSInstallSource gets executed and then restoring it, but i believe it is just a dirty workaround because i am pretty sure you have good reason to remove that parameter for possible other scenarios.
If you find time to change that, it would be very appreciated. If i made something wrong about the parameters, or have any misunderstanding i am looking forward to hearing from you and learn how to do it right.
Best regards,
Robin

Thank you very much for your detailed issue description and for taking the time to understand and debug the code.
I will certainly dig into this. I have a few ideas, but I need a couple of days to check them. I was certain I tested offline install before releasing 1.7.0, but apparently I did not 😞 I must have tested only offline upgrade from layout, not fresh install.
Back when I first implemented offline install support, bootstrapperPath needed to be removed from packageParameters because packageParameters were directly used to construct the native installer arguments. However, Generate-InstallArgumentsString has since learned how to do it (it calls Remove-VSPackageParametersNotPassedToNativeInstaller), so it seems Open-VSInstallSource should not remove bootstrapperPath anymore. But, I need to test a few scenarios.
Meanwhile, could you test a workaround?
cinst visualstudio2017professional --params "--bootstrapperPath F:\vs_Professional.exe --installLayoutPath F:\ --noWeb --noCache --passive"


Update to Sodium 0.5.11

Sodium 0.5.11 was recently released, did some quick running around in-game and seems to work fine :)

He already can do it by himself, he doesn't like unofficial builds in there specially for Sodium stuff that only changes the version in the code.

can you post artifacts?

There is actually important fixes in sodium 0.5.11 e.g. so that the hyper realistic sky resource pack doesn't crash. I would really like to see an indium update so that i can use that

There is actually important fixes in sodium 0.5.11 e.g. so that the hyper realistic sky resource pack doesn't crash. I would really like to see an indium update so that i can use that

not only that but iris was unusable on 0.5.9 causing crashes after map load, was fixed on .11


Is it possible to use Google Maps Geometry in Node JS?

I'm trying to get access to Google Maps Geometry to calculate points with a specific area in Node JS.
    ...
    const circle = new google.maps.Circle({
        center: area.center,
        radius: area.radius,
    });
    const doesContain = circle.getBounds().contains(location);

Circles, rectangles, polygons... does anyone know how?

It looks like I found a solution:
Spherical Geometry Library
https://www.npmjs.com/package/spherical-geometry-js

The library I mentioned doesn't solve the issue, it doesn't support circles or polygons -- only rectangles.


Fix ORSetValue prototype

Like RegSetValueExW, lpData must be a BYTE pointer, not just a single BYTE.

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

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


I get null for key "part1.part2.part3" - or how do you handle periods?

Hi Team,
Love your product by the way.
Just one little issue. I am trying to read in a section where I am have no control over the key names in it and the key names have periods e.g. "part1.part2" when I try to read the value I get null.
This section is a name value collection custom section
< mySection >
< add key="allofit" value="wholekey" />
< add key="part1.part2" value="dividedkey" />
< /mySection >
The following code attempts to read it
        dynamic mySection = new Configuration("mySection");
        var allofit = quartzSection.allofit;
        var dividedKey2 = quartzSection.part1_part2;  // returns null
        var dividedKey3 = quartzSection.part1part2; // returns null
        //var dividedKey1 = quartzSection.part1.part2; -- causes runtime error

Is this simply a no-go area and all keys must be alphanumeric or is this support for this and I just couldn't find it.
Any help appreciated
Stephen

Hi,
Have you tried using Get(string key) method ? I believe it should solve your problem

Hi @stephendmorrison, thanks!
Unfortunately the chaining is a no-go right now, and @onliner10 has the correct solution. Your example above would have to look like this:
dynamic quartzSection = new Configuration("quartzSection");
var key = quartzSection.Get("part1.part2");

That's great. I didn't see that feature in the docs. Just what I needed. Thanks guys!


Minor: enable gunicorn reload on stage

cause sometimes useful to reload (instead of redeploy) on live stage instance.

ok, I raised this as it seemed this behaviour had changed unexpectedly ... equally happy to close this PR


[GIE] 'ElementMap' operator support

Is your feature request related to a problem? Please describe.
From the issue: https://github.com/alibaba/GraphScope/issues/2742, The result of valueMap operator doesn't include the properties info, which is necessary for graph visualization. The elementMap operator will be helpful for this.
https://tinkerpop.apache.org/docs/current/reference/#elementmap-step

To test the functionality of elementMap, you can add gremlin standard cases in the test suite. i.e. you can add ElementMapTest.Traversals.class in https://github.com/alibaba/GraphScope/blob/main/interactive_engine/compiler/src/main/java/com/alibaba/graphscope/gremlin/integration/suite/standard/IrGremlinTestSuite.java#L74 and https://github.com/alibaba/GraphScope/blob/main/interactive_engine/compiler/src/main/java/com/alibaba/graphscope/gremlin/integration/suite/standard/IrGremlinTestSuite.java#L110