Using dhall with eta

Dhall is a programmable configuration language that is not Turing-complete
You can think of Dhall as: JSON + functions + types + imports

(from https://github.com/dhall-lang/dhall-lang)
Dhall is a relatively new configuration language written in haskell and its goals and features marry very well with langs like haskell/eta. Its main advantage over yaml f.e. is that dhall is typed and is guaranteed to terminate so you can make your config more discoverable and safe.

you can use it to configure programs written in other language: haskell, scala or rust

maybe the next can be java or groovy!

It can be compiled to other config formats like json, yaml, bash, nix or cabal

maybe the next could be gradle

Its main drawbacks are:

it has a lot of dependencies
maybe it is too much powerful (functions and imports) for simple configurations

The goal of this issue is track the progress and possible problems of the use of dhall ant its tools:

compilation of dhall-haskell
execution of all or some of the core programs (dhall, dhall-repl, dhal-format, dhall-hash)
execution of its tools: dhall-json, dhall-text, dhall-cabal, etc
test performance
study its possible use as configuration (optional and/or default) for eta programs!

Sounds good!!

Good stuff! Finally looked into Dhall this morning and it looks great. One cool thing to try out is to make a Dhall-to-Gradle compiler to make Gradle configuration type-safe, similar to the Gradle Kotlin DSL. It would be nice to have proper syntax highlighting for it.
Functions and imports are actually nice for configurations. It means you can provide a standard template configuration and have users modify it to their needs without having to copy/paste which can be error prone. YAML's syntax for key/value abstractions actually uses ad-hoc symbols and I'd take a let expression over that any day!
If we do shift to Dhall though, we should make sure we have lots of templates + examples because StackOverflow won't help people like it would with existing formats.

dhall-to-cabal has been released!
the dhall expression for the cabal of the project itself:
let GitHub-project =
          https://raw.githubusercontent.com/ocharles/dhall-to-cabal/1.0.0/dhall/GitHub-project.dhall

in  let prelude =
          https://raw.githubusercontent.com/ocharles/dhall-to-cabal/1.0.0/dhall/prelude.dhall

in    GitHub-project
      { owner = "ocharles", repo = "example" }
    ⫽ { version = prelude.v "1.0.0"
      , library = prelude.unconditional.library
          (   prelude.defaults.Library
            ⫽ { build-depends =
                  [ { package ="base"
                    , bounds =  prelude.majorBoundVersion (prelude.v "4")
                    }
                  ]
              , exposed-modules =  [ "Hello.World" ]
              }
          )
      }

Really cool :) Does Dhall have a feature to show a simplified version of the config with all the let's inlined and the URLs downloaded? That will be useful for debugging configs.

@rahulmutt yeah, it names it "reduce to the normal form":

The normal form is equivalent to the original program except stripped of all imports and indirection

Moreover

dhall-to-cabal is currently running a two-for-one deal! By installing dhall-to-cabal we'll throw in the cabal-to-dhall  executable absolutely free! cabal-to-dhall does the reverse of dhall-to-cabal - taking .cabal files and trasforming them into appropriate Dhall expressions. This can be a great way to get started with dhall-to-cabal.

(from https://github.com/dhall-lang/dhall-to-cabal/blob/master/README.md)

That's great to hear - looks like it is going to good for practical use.

> echo True | etlas run exe:dhall
Up to date
Bool

True

it lives!

The build has used a bunch of patches that are in this branch of eta-hackage and a fork of dhall-haskell with some minor changes to make it compatible with eta. It used the branch of eta with the switch from cpphs to hpp
Patches are incomplete: we have to implement the java ffi to double-conversion: https://github.com/jneira/eta-hackage/blob/dhall-patches/patches/double-conversion-<IP_ADDRESS>.patch
We have to test more complex expression involving functions and http calls
The upstream of dhall-haskell has one type application that we have to revise: https://github.com/dhall-lang/dhall-haskell/compare/master...jneira:master
We have to try compile and execute dhall-repl component (it is commented for now)

I've updated the fork of dhall to adapt last commits upstream (it replaces text-format package with formatting)

Also replaced the type application with a type annotation: Data.Scientific.fromFloatDigits @Double to Data.Scientific.fromFloatDigits :: Double -> Scientific

formatting patch added

As eta is built ghc-7.10.3/lts-6,27 and maybe we would need to build dhall with them,  i've created a branch of dhall-haskell with those constraints: https://github.com/dhall-lang/dhall-haskell/compare/master...jneira:ghc-7.10.3?expand=1
The branch to be used within eta only has (at least for now) the dhall-repl commented: https://github.com/jneira/dhall-haskell/compare/ghc-7.10.3...jneira:eta?expand=1

@jneira Awesome thanks! I think this means we can add support for something like [package-name].dhall and project.dhall for new-build directly inside of etlas by using dhall as a dependency with the lts-6.27-compatible configuration. I have no issues if you use a git dependency to your fork, but I would probably be better if the fork is under the eta-lang org.
Would you be interested in implementing the parser bit that will parse the .dhall into a proper GenericPackageDescription?

@rahulmutt Totally agree with moving the project to eta-lang. The version to use withint eta could be a patch in eta-hackage but obviously the fork to be included in eta it is not. If dhall maintainers think it is a good idea include the branch with ghc-7.10.3 compatibility in the upstream project we could use a git reference in stack.yaml. In any case i am going to move the project.

Would you be interested in implementing the parser bit that will parse the .dhall into a proper GenericPackageDescription?

Sure!

It turns out that dhall-to-cabal already does the conversion of a dhall file to a GenericPackageDescription: https://github.com/dhall-lang/dhall-to-cabal/blob/master/lib/DhallToCabal.hs#L550

In that case, this line:
https://github.com/dhall-lang/dhall-to-cabal/blob/master/dhall-to-cabal.cabal#L85
Needs to be patched to etlas-cabal. And then you can use it as a dependency for etlas.

mmm, it seems it would need some more changes. Maybe we would need a dhall-to-etlas...

@jneira Yes most likely that will be the case. You can create a fork and name is as dhall-to-etlas and add it to the eta-lang repo. Then, you can add it as a submodule for the etlas repo.

So there's two things that need to be changed in the internal logic for etlas:

When etlas looks for [package-name].cabal, it should also look for [package-name].dhall.
When etlas looks for cabal.project, cabal.project.freeze, etc. it should also look for etlas.dhall, etlas.dhall.freeze, etc.

How does that sound?

Otoh, the actual version of dhall is throwing StackOverflowExceptions for some simple inputs (like True or False, but no for 1, +1 or 1.1). It seems the cause is the switch of dhall-haskell to megaparsec instead trifecta as parser library.
As @rahulmutt has noted, that package seems to be continuation based and it would need a patch adding a trampoline function (like aeson or binary)

@rahulmutt sounds good to me, i'll give a try asap

@jneira Can you file the issue with megaparsec on eta-hackage?

Hi, i have a version of dhall-to-etlas that compiles!
The version has a git reference in stack.yaml to a commit of etlas, so it can be built outside of it. I suppose it will have to be changed to be included as a git submodule in etlas itself.
I dont fully analize the code but i dont sure if it can generate a full GenericPackageDescription usable in etlas.

Hi, before including dhall-to-etlas in etlas i've wanted to write a valid dhall-to-etlas.dhall.
The result is longer than cabal version and i have to say that syntax is more noisy than cabal or yaml format. However lets, lambdas and imports are a game changer and the possibilities are very promising.
And the type checking is invaluable.

The typechecking is certainly better than getting a parse error for Cabal that doesn't tell you much. The basic let abstraction is a lot more readable than yaml's alias which uses rather arbitrary symbols. I find the sequence of let ... in's distracting - is there a way to have multiple let definitions in a single let like we have in Haskell/Eta?
And yes, I agree that we should tune the definitions accordingly to the common use cases for Etlas.

@rahulmutt yeah, it could have the lisp let* to make let x = 1 ; y = x; ... equals to let x = 1 in let y = x... but it seems let only can be a single expression, not sure about the reason.
As a workaround you could define a record with the bindings, but then you have to reference the record:
let vars = { a = 1, b = 2, ...}
in vars.a + vars.b

let is the way it is partly out of design and partly out of necessity
The hard constraint is that Dhall is whitespace insensitive, so Dhall has to have some separator between successive definitions and cannot rely on significant whitespace to separate successive let definitions.
Currently the "separator" is: in let, as in:
    let x = 1
in  let y = True
in  let z = "ABC"
in  ...

... but could conceivably be another separator like ; (as in Nix, which is also whitespace-insensitive).  I'm not sure if let itself could be the separator (i.e. let x = 1 let y = True ...) because I don't know if that would lead to ambiguous parses or not.
However, the real reason that I keep it that way is by design: I try to minimize alternative syntax for doing that same thing unless the productivity gain is large.  The main reasons why in roughly decreasing order of importance are:

Users don't have to decide what is the right way to do something

Those sorts of minor decisions add up and drain people's willpower
This enthusiasm drain can outweigh the convenience if the syntactic gain is small

The language cultivates a brand of being focused on semantics and automation rather than syntax

The Dhall philosophy is that it's okay to be verbose as long as you are not repetitive
Dhall optimizes for large and repetitive configuration files
Small configuration files are already well-served by existing configuration file formats

Simplifying the language standard for ease of parallel implementations

In this specific case, the first reason is the deciding factor: removing the in  from in let only saves three characters, needlessly complicates the language and adds opportunities for confusion for people first learning the language ("Why are there two ways to do the same thing?  Are they semantically different?").  This simplification also doesn't make Dhall code easier to author or format because Dhall already has support for automatically formatting code.
I also want to add that I don't think this will be the biggest issue you will run into.  The bigger issue will be the time cost of downloading the dhall-to-cabal Prelude on each run of the program and being robust in the face of it being unavailable.  I'm working on adding support for using semantic integrity checks to cache these sorts of lookups but that needs to be standardized first.

@Gabriel439 thanks a lot for  your detailed explanation
i would agree with most of your exposition but specially with

The language cultivates a brand of being focused on semantics and automation rather than syntax

The bigger issue will be the time cost of downloading the dhall-to-cabal Prelude on each run of the program and being robust in the face of it being unavailable. I'm working on adding support for using semantic integrity checks to cache these sorts of lookups but that needs to be standardized first.

I was thinking that etlas could download locally dhall definitions like cached packages or other config files so that feature would be great. I suppose it is covered by https://github.com/dhall-lang/dhall-haskell/issues/162

@jneira: I just created an issue to describe and discuss the import caching idea I mentioned: https://github.com/dhall-lang/dhall-lang/issues/129

Hi, actually dhall-to-etlas (like dhall-to-cabal) does not support version ranges in the cabal-version field, so we cant set it to >= 1.10 without having warnings.
I've started to add support for the actual type of etlas:
 specVersionRaw :: Either Version VersionRange

with this dhall type:
 cabal-version :
   < Left : ./Version.dhall | Right : ./VersionRange.dhall >

The hard part will be change haskell code to take in account the new definition :thinking:

@jneira: If I remember correctly, @ocharles said it is because cabal doesn't support version ranges on cabal-version with an upper bound, so the version range is uniquely determined by its lower bound.  I believe in the example you gave you would specify version 1.10 and dhall-to-cabal would translate that to >= 1.10 (although I could be wrong because I haven't tested this recently).

hi @Gabriel439, dont sure if i fully understand it but i just test dhall-to-cabal and with cabal-version = v  ("1.10") it generates cabal-version: 1.10. should it generate >= 1.10?

@jneira: Then maybe I was wrong.  I'd open an issue against dhall-to-cabal about this if I were you

Btw i've opened a issue in dhall-to-cabal about cabal-version field values: https://github.com/dhall-lang/dhall-to-cabal/issues/37
In the meanwhile we could use cabal-version = 1.12 for eta and its packages cause ghc 7.2 shiped with that one.

Hi @jneira! Thanks for the effort in here :)
I'm trying to replicate it, and I think I'm hitting the same issue with the StackOverflowError when trying to evaluate some super simple input (like [ 1 , 2 ]) that you fixed here.
I noticed that in the meanwhile we have megaparsec-6.5 (which doesn't have the patch) up on eta-stackage, but even pinning the version to the patched one (6.4.1) doesn't fix the issue.
I'm wondering if I'm missing any relevant patches? I just cloned dhall-haskell, run etlas run exe:dhall -- --explain.

@f-f hi, thank you for join us and try it.
The version that i've used to build and test is a branch of the eta-lang fork of dhall-haskell, but the unique diff with upstream is the dhall-repl executable is commented and afaik it does not have to do with the error.
I've reinstalled dhall-haskell with etlas again and i am able to reproduce the error. I've downloaded megaparsec-6.4.1 and now i am analyzing the stacktrace to find out the cause of the error.

@jneira For etlas purposes, I don't think we need to worry too much about the cabal-version field, so using 1.12 is fine. We don't have to deal with backwards compatibility like Cabal guys do.
Yes, the extra-libraries "hack" was to avoid creating a new field for maven-depends, but I guess it doesn't hurt to add a separate mavenDepends field to BuildInfo and update dhall-to-etlas accordingly - thoughts?

Hi, as there is a bug with last version of eta related with redirecting output to eta executables i've setup a eta example using dhall as a lib . It requires a patch for dhall in eta-hackage.
The test pass:
C:\ws\eta\eta-test>etlas run
Up to date
1

Not sure if it is due to changes in dhall, eta or using dhall as a lib instead the executable...

With a bit of debugging, I was able to isolate it to the following program:
import qualified Data.Text.IO

main :: IO ()
main = Data.Text.IO.getContents >>= print

It turns out that using the normal getContents from System.IO works fine, but Data.Text.IO doesn't. This may be related to the fact that we recently patched text-<IP_ADDRESS> which may have changed the behavior of getContents for Text.

@jneira Fixed with https://github.com/typelead/eta/commit/964a98bd6ead37fab1fd10d091b83aa3d2775065. Turns out hFileSize returns -1 if the handle is not a file handle, which we weren't doing. Surprised we didn't hit this before.
After rebuilding from scratch, I get this:
$ echo 1 | etlas run exe:dhall
Up to date
Natural

1

Can you try to reproduce the stackoverflowerror you were getting before?

No StackOverflow now in my tests!
C:\Users\Javier\dev\lang\eta\dhall\dhall-haskell>echo { a = 1 + 1 } | etlas run exe:dhall
Up to date
{ a : Natural }

{ a = 2 }

I have been debugging this and it turns out there are yet-to-be implemented FFI calls in the cryptonite patch. I've fixed the error shown above with /dev/random locally and I'm tackling the next one involving the implementation of ChaCha.

Updates: I've implemented Curve25519 and AES-GCM as well and the new error seems to be about a mismatch in MAC codes.
Caused by: eta.runtime.exception.EtaException: HandshakeFailed (Error_Protocol ("bad record mac",True,BadRecordMac))
	at tls.network.tls.handshake.Common.handshakeFailed1(Common.hs)
	at tls.network.tls.Handshake.handshake1(Handshake.hs)
	at tls.network.tls.Handshake$sat_s8GVT.applyV(Handshake.hs)

See https://github.com/vincenthz/hs-tls/issues/276 for more details.

Thanks to @rahulmutt  patch oh haskelline etlas run exe:dhall -- repl works in *nix! In windows seems to hang but we are working on this
Otoh i've downloaded and built dhall-json and the json conversion works!

D:\ws\eta\dhall\dhall-json>echo {a=1,b=2} | etlas run
Up to date
{"a":1,"b":2}

(i had to comment for now the yaml part cause it depends on yaml package that depends itself heavily in a c library)

I've setup a project to wrap dhall-haskell and provide a friendly java api over dhall: https://github.com/eta-lang/dhall-eta
It is a WIP but i've managed to write a simple export to be used from java:

module Dhall.Eta where

import qualified Dhall
import qualified Data.Text as Text
import Java

foreign export java "@static org.dhall.eta.Input.bool" bool
  :: JString -> IO Bool
bool = ( Dhall.input Dhall.bool ) . Text.pack . fromJava

package org.dhall.eta.example;

import org.dhall.eta.Input;

public class Client {
    public static void main (String[] args) {
        System.out.println("Testing dhall");
        System.out.println(Input.bool("True"));
        System.out.println(Input.bool("True && False"));
        try {
            System.out.println(Input.bool("1"));
        } catch (Exception e) {
            System.out.println(e.getLocalizedMessage());
        }
        System.out.println("The end");
    }
}

Output:
Testing dhall
true
false

 [1;31mError [0m: Expression doesn't match annotation

- Bool
+ Natural

1 : Bool

(input):1:1

The end

We have started the integration between etlas and dhall: https://github.com/jneira/etlas/tree/dhall:

The default configuration format for etlas will be dhall so if both dhall and cabal files are present it will choose the dhall file
As suggested by @rahulmutt the dhall configuration file will be named package.dhall for all packages (like package.yaml of hpack)
We will integrate the caching mechanism of dhall imports as soon as it is available

One thing that would help on my end is getting this integrated into nixpkgs (cc: @puffnfresh):
https://github.com/eta-lang/eta-nix
That would allow me to add an Eta build of Dhall to my CI so that I can catch potential Eta-related issues earlier (like adding new dependencies that might require work to port to Eta)
I tried using that repository directly but I ran into issues due to mismatch between that repository and nixpkgs (like missing support for the executableHaskellDepends field that cabal2nix generates)

@Gabriel439 that would be awesome, thank you very much
Maybe it would be useful add the build of dhall with the actual stack-lts-6.yaml in CI if possible, cause is the lts used by etlas/eta and it will catch some of the posssible issues (like https://github.com/dhall-lang/dhall-haskell/pull/541) .

@Gabriel439 I've got cabal2nix cabal://dhall instantiated. I don't know if it will compile but I'll at least turn it into valid Nix code. I'll push in a few minutes.

Added a chunk of overrides to get Dhall close to compiling. Got stuck on Cryptonite - it has a jar dependency and I'll have to figure out a way to supply that.

Actually for build master version of dhall-haskell with etlas we would need patch the new dependecy cborg-<IP_ADDRESS>: https://github.com/typelead/eta-hackage/issues/111

Some updates on running dhall on Eta: I fixed the Bad Record MAC bug (was a bug in cryptonite patch) and the next step is to implement the zlib bits in streaming-commons.

Ok great, https requests with the latest patches on eta-hackage. @jneira Can you give dhall network imports a try?

We have patched cborg-<IP_ADDRESS> in https://github.com/typelead/eta-hackage/commit/e400525666594657ce1d500bd554a83e45039479 - just updating since that issue wasn't linked with @jneira's previous comment.

Hi, after patching the transitive dependency of cborg, serialise we can build again master version of dhall. Moreover, with the recent work of @rahulmutt, http imports finally works!:
> echo https://raw.githubusercontent.com/dhall-lang/Prelude/35deff0d41f2bf86c42089c6ca16665537f54d75/List/replicate | etlas run exe:
dhall
Up to date
  λ(n : Natural)

→ λ(a : Type)
)
→ λ(x : a)
)
→ Natural/fold n (List a) (λ(`as` : List a) → [ x ] # `as`) ([] : List a) a)

> echo let rep=https://raw.githubusercontent.com/dhall-lang/Prelude/35deff0d41f2bf86c42089c6ca16665537f54d75/List/replicate in rep 5 Natural 1 | etlas run exe:dhall
Up to date
[ 1, 1, 1, 1, 1 ]

@Gabriel439 I have nix-build '<nixpkgs>' -A 'etaPackages.dhall' building with my overlay.
When evaluating I get:
∀Peeked an empty style stack! Please report this as a bug.

I don't know where this problem is coming in. I'll try updating Eta and eta-hackage and see if it's still a problem.

@puffnfresh do you mean when evaluating a Dhall expression you get that? It looks possibly like a bug with prettyprinter. I guess that ∀ is because the thing you're trying to evaluate is a forall?

@jneira: Would a new dependency on unix-compat be problematic for Eta?  The reason I ask is that I'm looking for a cross-platform way to set group/other permissions on directories or files since System.Directory only supports setting user-permissions and unix-compat was the closest thing I could find that didn't involve a sub-process call to chmod

@Gabriel439 I am afraid that eta doesnt support unix-compat for now so we will have to patch dhall to replace those calls with java ones (or maybe patch unix-compat itself). Anyway, imo there is no better option (cc @rahulmut) and we already had to patch dhall.

@Gabriel439 You can go ahead and add the dependency. At worst, once the dhall integration is done, we can add an etlas.dhall file which doesn't contain the dependency and uses the Java standard library to perform the same function. We do eventually plan on patching unix and unix-compat once we get an idea of which functions are actually being used by the Hackage ecosystem. So far, we found that filesystem-related operations are the most common.

Although the wrapper of dhall for java is still a wip and full of bugs, i managed to implement almost all public api of Dhall.Parser, Dhall.Core and Dhall.TypeCheck(next will be Dhall.Import):
package org.dhall.eta.example;

import org.dhall.core.*;
import org.dhall.core.expr.ExprIntegerShow;
import org.dhall.parser.*;
import org.dhall.parser.error.*;
import org.dhall.typecheck.TypeError;

import org.dhall.eta.Parser;
import org.dhall.eta.TypeCheck;
import org.dhall.eta.Core;

import org.haskell.types.*;

public class Client {

    public static void main (String[] args) {
        Either<ParseError,Expr<Src,Import>> parsed = Parser.exprFromText("example","1");
        System.out.println("Parsing \"1\":");
        System.out.println(parsed);
        System.out.println("-----------------------------");

        Either<ParseError,Expr<Src,Import>> eParsedFun =
        		Parser.exprFromText("example","λ (t : Text) -> 1");
        System.out.println("Parsing \"λ (t : Text) -> 1\":");
        System.out.println(eParsedFun);
        System.out.println("-----------------------------");

        Either.Matcher<ParseError, Expr<Src,Import>, Expr<Src,Import>> matcher =
        		new Either.Matcher<>(any -> null);
        matcher.Right(r -> r.getValue());
        Expr<Src,Import> parsedFun =  matcher.match(eParsedFun);
        System.out.println("Pretty printing parsed fun");
        System.out.println(Core.pretty(parsedFun));
        System.out.println("-----------------------------");

        Expr<Unit,Import> norm = Core.normalize(parsedFun);
        System.out.println("Normalize fun");
        System.out.println(norm);
        System.out.println("-----------------------------");

        Expr<Unit,Import> alphaNorm = Core.alphaNormalize(norm);
        System.out.println("Alpha normalize fun");
        System.out.println(alphaNorm);
        System.out.println("-----------------------------");

        Expr<Src,Void> importedExpr = new ExprIntegerShow<>();
        Either<TypeError<Src, Void>,Expr<Src,Void>> checked = TypeCheck.typeOf(importedExpr);
        System.out.println("Type of ExprIntegerShow");
        System.out.println(checked);
        System.out.println("-----------------------------");

        System.out.println("The end");
    }

}

with this output:
Parsing "1":
Right [ExprNote [annotation=Src{begin=SourcePos{path=example,line=Pos[1],column=Pos[1]},end=SourcePos{path=example,line=Pos[1],column=Pos[2]},text="1"}, subexpr=ExprNatural [Natural [1]]]]
-----------------------------
Parsing "λ (t : Text) -> 1":
Right [ExprNote [annotation=Src{begin=SourcePos{path=example,line=Pos[1],column=Pos[1]},end=SourcePos{path=example,line=Pos[1],column=Pos[18]},text="λ (t : Text) -> 1"}, subexpr=ExprLam [name=t, type=ExprNote [annotation=Src{begin=SourcePos{path=example,line=Pos[1],column=Pos[8]},end=SourcePos{path=example,line=Pos[1],column=Pos[12]},text="Text"}, subexpr=ExprText], body=ExprNote [annotation=Src{begin=SourcePos{path=example,line=Pos[1],column=Pos[17]},end=SourcePos{path=example,line=Pos[1],column=Pos[18]},text="1"}, subexpr=ExprNatural [Natural [1]]]]]]
-----------------------------
Pretty printing parsed fun
λ(t : Text) → 1
-----------------------------
Normalize fun
ExprLam [name=t, type=ExprText, body=ExprNatural [Natural [1]]]
-----------------------------
Alpha normalize fun
ExprLam [name=_, type=ExprText, body=ExprNatural [Natural [1]]]
-----------------------------
Type of ExprIntegerShow
Right [ExprPi [name=_, kind=ExprInteger, body=ExprText]]
-----------------------------
The end

Hi, more advances in dhall-eta, it has more complete wrap over dhall main module, including a converter from dhall to classes. Suggestions about the api are welcome!
public class Client {

    public static void main (String[] args) {

        System.out.println("Testing dhall main module");

        Type<Boolean> tyBool = Types.bool();
        Boolean bool = Input.type(tyBool, "True");
        System.out.println(bool);

        Type<Optional<String>> optStrTy=Types.optional(Types.str());
        Optional<String> optStrIn = Input.type(optStrTy, "Some \"hello\"");
        System.out.println(optStrIn);

        Type<List<Natural>> nsTy = Types.list(Types.natural());
        List<Natural> ns = Input.type(nsTy, "[1, 2, 3]");
        System.out.println(ns);

        Project p = Input.type(Types.record(new ProjectType()),
        		"{ name = \"dhall\", description = \"desc\", stars = 123 }");
        System.out.println(p);
        System.out.println("The end");
    }

    public static class Project {
    	private String name;
    	private String description;
        private Natural stars;
	public Project(String name, String description, Natural stars) {
		super();
		this.name = name;
		this.description = description;
		this.stars = stars;
	}
	// getters and toString boilerplate
    }

    public static class ProjectType implements RecordType<Project> {

	public Map<String,Type<? extends Object>> getFieldsTypes() {
		LinkedHashMap<String,Type<? extends Object>> fields= new LinkedHashMap<>();
		fields.put("name", Types.str());
		fields.put("description", Types.str());
		fields.put("stars", Types.natural());
		return fields;
	}

	public Project fromFieldsValues(Map<String,Object> m) {
		return new Project((String)m.get("name") ,
				   (String)m.get("descripcion"),
				   (Natural)m.get("stars"));
	}
   }
}

Output:
Testing dhall main module
true
Optional[hello]
[Natural [1], Natural [2], Natural [3]]
Project [name=dhall, description=null, stars=Natural [123]]
The end


JSON Error - Invalid Type Integer

I'm getting this error whenever I try to buy items from the flea market
Error: Json(Error("invalid type: integer `6932509`, expected a string", line: 1, column: 91))

I'm thinking maybe an endpoint has changed? I'm not too sure, I've been messing with it for a few hours and haven't been able to figure out whats wrong.
This happens when following the flea market buying example.

Fixed it by changing int_id from a string to a u64 in the Offer struct in ragfair.rs.
/// ragfair.rs
pub struct Offer {
    ...
    /// Changed from String to u64
    pub int_id: u64,
    ...
}

Thanks, I'll fix this on master soon.


Support math rendering

Now that github supports math expressions, it might make sense to add support for them here. Note that they don't seem to have updated the gfm spec yet...

I would love to have this feature, but until then is there any module that I can use to render the math in markdown using ktex in deno?

Implemented in #37


Bad time from NTP servers causing email send fail?

Build tool used:
Using Arduino IDE

[x] Arudino
[ ] Platformio (Visual Studio Code plugin)
[ ] Platformio CLI
[ ] Other

Board used (ESP32/ESP8266/Arudino):

ESP8266  HiLetgo

[x] ESP8266-based
[ ] ESP32-based

Other Libraries That are used:

Sorry, this is a mess.  I hope you understand it.
I'm running your sample code Send_HTML.  I'm trying both the 3.1.1 and the 3.1.3 version. The only changes are for my email account and wifi info.
Description of problem:
The problem is very inconsistent, so it's hard to pin down.  Sometimes it sends an email, and sometimes it fails.  When it fails with 3.1.3, it does not give details why.  It just stops in the process, but I get the impression it's failing to contact the time server.
With 3.1.1, when it fails, the email server references this info.
554 Transaction failed, reject due to policy restrictions
Problem:
The email was rejected by the IONOS SMTP server because the standards defined in RFC 5321 and RFC 5322 were not adhered to.
Solution:
The email client must meet the following criteria:
The header lines of the email must contain exactly one valid "Date" line according to RFC 2822.
The following header lines may only exist once: From, Sender, To, CC, Subject
The header lines mentioned must be syntactically correct
Note: The To and CC lines can contain multiple recipients.
In accordance with the recommendations from RFC7103, incorrect messages are not automatically corrected by IONOS, otherwise DKIM signatures become invalid. For more information about DKIM signatures, see the IONOS article Configuring DMARC Records for a Domain.
When you look at the serial output (see below), you see that the date is not complete.  The last character of the year is missing.  When it works, it either has the default date of 1970, or you see a full 2023 date.  (The problem is not consistent.  It's not very repeatable.)  The only other thing I noticed is that it worked yesterday before midnight, but once it turned April 1 (no joke) it started failing sometimes.  However, I only started testing the example late in the evening.
....
21:19:47.047 -> #### Finishing the message sending...
21:19:47.047 -> > C: finishing the message sending
21:19:47.079 -> < S: 554-Transaction failed
21:19:47.079 -> < S: 554-Reject due to policy restrictions.
21:19:47.079 -> < S: 554 For explanation visit https://www.ionos.com/help/index.php?id=2425&ip=<IP_ADDRESS>&c=hd
21:19:47.111 -> #### Error, send body failed
21:19:47.111 -> ! E: send body failed
21:19:47.111 ->
21:19:47.111 -> #### -------------------------
21:19:47.111 -> #### Message sent success: 0
21:19:47.111 -> #### Message sent failed: 1
21:19:47.111 -> #### -------------------------
21:19:47.111 -> #### Status: failed
21:19:47.111 -> #### Date/Time: Sun Apr  2 03:19:46 202
21:19:47.111 -> #### Recipient<EMAIL_ADDRESS>21:19:47.111 -> #### Subject: Test sending html Email
21:19:47.111 -> Error sending Email, send body failed
21:19:47.157 -> Free Heap: 35944
Share code snippet to reproduce the issue:
PASTE .cpp / .ino code here

Additional information and things you've tried:
This one worked.  It has a proper date.
21:17:13.428 -> Connecting to Wi-Fi...........
21:17:17.485 -> Connected with IP: <IP_ADDRESS>
21:17:17.485 ->
21:17:17.485 -> #### Connecting to SMTP server...
21:17:17.485 -> > C: ESP Mail Client v3.1.3
21:17:17.485 -> > C: wait for NTP server time synching
21:17:17.641 -> > C: connecting to SMTP server
21:17:17.641 -> > C: Host > smtp.1and1.com
21:17:17.641 -> > C: Port > 587
21:17:17.732 ->
21:17:17.732 -> #### SMTP server connected
21:17:17.732 -> > C: SMTP server connected, wait for greeting...
21:17:17.810 -> < S: 220 perfora.net (mreueus003) Nemesis ESMTP Service ready
21:17:17.810 ->
21:17:17.810 -> #### Sending greeting response...
21:17:17.810 -> > C: send SMTP command, HELO
21:17:17.903 -> < S: 250-perfora.net Hello mydomain.net [<IP_ADDRESS>]
21:17:17.903 -> < S: 250-8BITMIME
21:17:17.903 -> < S: 250-SIZE 140000000
21:17:17.903 -> < S: 250 STARTTLS
21:17:17.903 ->
21:17:17.903 -> #### Sending STARTTLS command...
21:17:17.903 -> > C: send command, STARTTLS
21:17:18.043 -> < S: 220 OK
21:17:18.043 -> > C: perform SSL/TLS handshake
21:17:18.043 ->
21:17:18.043 -> > C: SSL/TLS negotiation
21:17:19.115 ->
21:17:19.115 -> #### Sending greeting response...
21:17:19.115 -> > C: send SMTP command, HELO
21:17:19.240 -> < S: 250-perfora.net Hello mydomain.net [<IP_ADDRESS>]
21:17:19.240 -> < S: 250-8BITMIME
21:17:19.240 -> < S: 250-AUTH LOGIN PLAIN
21:17:19.240 -> < S: 250 SIZE 140000000
21:17:19.240 ->
21:17:19.240 -> #### Logging in...
21:17:19.240 -> > C: send SMTP command, AUTH PLAIN
21:17:19.287 -> > C<EMAIL_ADDRESS>21:17:19.287 -> > C: *************
21:17:19.396 -> < S: 235 Authentication succeeded
21:17:19.441 ->
21:17:19.441 -> Successfully logged in.
21:17:19.441 ->
21:17:19.441 -> #### Sending Email...
21:17:19.441 -> > C: send Email
21:17:19.441 ->
21:17:19.441 -> #### Sending message header...
21:17:19.441 -> > C: send message header
21:17:19.598 -> < S: 250 Requested mail action okay, completed
21:17:19.738 -> < S: 250 OK
21:17:19.738 ->
21:17:19.738 -> #### Sending message body...
21:17:19.738 -> > C: send message body
21:17:19.862 -> < S: 354 Start mail input; end with .
21:17:20.051 ->
21:17:20.051 -> #### Finishing the message sending...
21:17:20.051 -> > C: finishing the message sending
21:17:20.082 -> < S: 250 Requested mail action okay, completed: id=0MEovc-1pciKT284o-00G2KY
21:17:20.082 ->
21:17:20.082 -> #### Closing the session...
21:17:20.082 -> > C: terminate the SMTP session
21:17:20.082 ->
21:17:20.082 -> #### Message sent successfully
21:17:20.082 -> > C: message sent successfully
21:17:20.082 ->
21:17:20.082 -> ----------------
21:17:20.127 -> Message sent success: 1
21:17:20.127 -> Message sent failed: 0
21:17:20.127 -> ----------------
21:17:20.127 ->
21:17:20.127 -> Message No: 1
21:17:20.127 -> Status: success
21:17:20.127 -> Date/Time: Sun Apr  2 03:17:19 2023
21:17:20.127 ->
21:17:20.127 -> Recipient<EMAIL_ADDRESS>21:17:20.127 -> Subject: Test sending html Email
21:17:20.127 -> ----------------
21:17:20.127 ->
21:17:20.127 -> Free Heap: 36584
edit:  edited email address

I think there are two things happening:

Failing to connect to the time server: 3.1.1 uses Jan 1 1970 and the email sends.  3.1.3 just stops (by design?)
Sometimes the returned time is getting truncated, and the date is not complete, and the email fails to send because the smtp server rejects it.

The library internal time for ESP32, ESP8266 and Pico obtained from system time or time(nullptr. if the system time does not set, it returns the seconds since device started.
I already known and aware of the RFC requirements, that's why NTP synching was involved in this library.
Library tries to connect to NTP server when you call smtp.connect and imap.connect or in case server certificate was set to the config.
In library version prior to 3.x.x, if the time server synching was timed out, the error will be reported in the debug port and the processes will be continued.
The library versions v3.0.0 to v3.1.5, the connection was rejected when NTP synching timed out, showing error on debug port and terminate connection.
As some reports from users, then in version 3.1.5 and later, library was just showing error message on debug port and the server connection processes can be continued.
You should take care of setting your device time first (in case ESP32. ESP8266 and Pico). In other Arduino devices, you should set the library time manually.
To set your device time and/or library time manually, please see
https://github.com/mobizt/ESP-Mail-Client/blob/master/examples/SMTP/Set_Time/Set_Time.ino

There is nothing different between v 3.1.1 and v3.1.3 for date/time related functions. The time synching timed out error will always report.
The valid date header for SMTP was set since v1.5.10 which the NTP synching process will be done first when using SMTP.
Prior to v1.5.10, the time synching is optional when using ESP8266 and server certificate was assigned in config object.

The time offset (second starts with zero) is Jan 1, 1970 midnight. Then when the timestamp was not set in library due to NTP synching failure, the time getting from library internal time will be the seconds since boot and the time string will be somethings like I wrote in the examples comments.
https://github.com/mobizt/ESP-Mail-Client/blob/f41509840a34edcba3671be2d1428484cab922ce/examples/SMTP/Send_Text/Send_Text.ino#L346-L355

You may don't notice the meaning of TAG that library used in debug message which everyone knows it.
< S:
> C:
! E:
! I:
! W:

The response code e.g., 220, 250, 235 returns directly from server, and it tells everything, and it's not related to library version but the server specific.

It is better to remove useless and irrelevant additional information of time string from Arduino debug when you want to post the debug message of the library.
21:17:20.127 ->

Thank you for the replies.
The thing that caught my attention the most was the incomplete Date/Time when it failed to send the email.
21:19:47.111 -> #### Date/Time: Sun Apr 2 03:19:46 202
Somehow the 3 (from 2023) was truncated.  I suspected that was why the smtp server gave the 554 error.
Other times, the Date/Time was complete, and the email was sent.
21:17:20.127 -> Date/Time: Sun Apr 2 03:17:19 2023

Which device you are using? ESP8266, ESP32 or Pico.
I guess it can be related to compiler and string manipulation.

This never happens for my intensive test in ESP8266, ESP32 and Pico with latest SDK.

Ok, that is only error in debug information printing time string buffer that convert from timestamp (seconds since Jan 1, 1970 midnight) using asctime function which the time string has additional CRLF appending then I have to replace them with null before printing.
This depends on GCC version of your current SDK version that the time string created by asctime function will contain CRLF or not.
But it is not related to the message to send as the date header treated differently which asctime was not used to make time string.
Anyway, because of time was not set or synch failure, you should connect your device to stable and reliable network or manually set the time before calling connect.

Ok now I understand your point. I can confirm that the library complied with the related RFC standards for SMTP and IMAP.
In general, SMTP error 554 indicates that the mail server did not accept the email. There are several reasons that cause this error which you also post above from server documentation and these typical reasons and solutions.
The invalid recipient email and invalid headers are just minor causes and can be fixed as easy but there are other possible reasons that you have to solve on your side.
You should make sure that your account, your server IP or your router public IP are not blacklisted from SMTP server.
If your router IP and server IP are blacklisted, please consider the Gmail SMTP relay.
For example, if you install mail server on your own server and the email was rejected with status 554 when trying to send email on your SMTP sever, the most possible cause is your server (router) public IP from internet ISP is blacklisted.

Thank you for the replies.   I'm using a HiLetgo ESP8266
Per your suggestion, I've been using the Set_Time example, with ESP Mail Client v3.1.6.  So far it's worked every time.  Whatever the problem was before, it does not happen with Set_Time.
Concerning the 554 error... The program would randomly fail or succeed, within minutes, with no changes to the code.  The only difference I saw was the truncated year character.  I don't know if that was the cause, but the character was consistently missing if it failed.  It's interesting anyhow.
So far my email server host seems fine with my emails. No blacklist.  I'm trying not to send too many emails this way.  I often email myself during the day as a reminder to do things, so it's not too unusual.

The incorrect date occurred only in debug message. The library has built in time library as the time provider, and it works normally.
You should update to v1.3.7 which fixed this incorrect debug info.
The status code 554 means your message was rejected by server. If you are not blacklisted by server, the server may limit the rate of messages sent per minute and consider your message as spam when you send email too often than its limit.


HIP-RA-X rock enthalpy calculation update; switch water entropy to IAPWS; surface plant sub-costs

Updates rock enthalpy calculation to equation as discussed in yesterday's sync; once reviewed by @kfbeckers or @malcolm-dsider and merged, they can continue technical review without potential conflict with any work I'm doing.
Also addresses:

https://github.com/NREL/GEOPHIRES-X/issues/94
https://github.com/NREL/GEOPHIRES-X/issues/104

Thanks for approving @malcolm-dsider.
I filed https://github.com/NREL/GEOPHIRES-X/issues/105 to address the derived vs. default value nuance - thanks for bringing that to my attention, I was not aware of that nuance and it's possible I failed to account for it in my changes. That issue is my reminder to go back and check, and fix if needed.


Pipeline crashes with large input files; Add sequencing center in BAM

update 'dynamic computing resources' in base.config

add params.seqCenter in main.nf to add @RG line in BAM (STAR, HISAT2)

@apeltzer Thank you! I was doing the same thing but you're so quick and then I saw "the page out of date"......

Changed target branch for PR to dev

@ewels syntax error fixed but  the test is still failed (build #131)


OpenTelemetry full tracing support for gRPC in generator

This issue tracks full tracing support for our generated gRPC API surface. (Whereas #10491 is more about introducing the decorators). This means tracing the client operation and any subcomponents of that operation (e.g. each network call).
Subtasks not covered by other GH issues are listed under the API flavor.
Calls:

[x] Sync Unary (non-paginated)
[x] Paginated
[x] Async Unary

[x] Update stubs to use std::shared_ptr<grpc::ClientContext>, instead of unique_ptr.

[x] LRO
[ ] #12361
[x] Streaming Read
[x] Streaming Write
[x] Async Streaming Read/Write
[x] Async Streaming Read
[x] Async Streaming Write

Closing, and we will track the one outstanding client call in a dedicated issue.


Add Killercoda.com to Adopters

What this PR does / why we need it:
Add Killercoda.com to Adopters
Release note:
NONE

/lgtm
Thanks! It's great to hear about another KubeVirt user. Would you add an explicit NONE to the release notes so this can be merged?

/ok-to-test
Any chance @killercoda-github  would like to contribute more by providing a KubeVirt playground in your platform?

@dankenigsberg sounds like a great idea! We'll do!

/approve


FOPTS-4039 Bug fix for unitofMeasure for ultra sized disk

Updated /corrected for Ultra pricing
Description
There is a bug in calculation of the Ultra Price as logic errors out at the unitOfMeasure calculation. This PR fixes the bug

Issues Resolved
Issue with unitOfMeasure calculation and errors indicator by the static checks

Link to Example Applied Policy
Tested in the customer landscape

Contribution Check List

[ ] New functionality includes testing.
[ ] New functionality has been documented in the README if applicable
[ ] New functionality has been documented in CHANGELOG.MD

@midir99 are you happy for this to be merged, or are there any outstanding changes requested?

@nia-vf1 I'm happy with it being merged :)


Support functionless function blocks

At the moment you have first select an exact function from the less practical function menu, and then connect it to where you want to use it, but often you would like to do that in other way around.
So starting with an functionless block with a certain number of arguments to connect, and then after connecting the inputs, use the avaible types to select a fitting function for this block (filtered to a convenient small set based on types).

This could be the apply-anything block I drew in #194. You'd attach your arguments, then maybe touch the spot where the function name is supposed to go to get a list of matching functions, as in #223. Picking a function would turn the block into a regular function block.

Having thought about this more, this is indeed as #194 with a little extra user interface.


feat: support unbinding bound text

fixes https://github.com/excalidraw/excalidraw/issues/4591

[ ] Add spec
[ ] should we have an action in sidebar ?

Maybe put the contextmenu item next to the group? I think putting it next to duplicate/delete items isn't ideal.

Also, I think we should re-measure the text after unbound so that it ends up with the bounding box you get once you edit the text in the future.
One last thing: what about also supporting it the other way round — when select a text element and a container, support bind text to container? Maybe for another PR.

should we have an action in sidebar ?

I would not, for now. Let's conserve UI buttons. We can decide on that later based on feedback.

Also, I think we should re-measure the text after unbound so that it ends up with the bounding box you get once you edit the text in the future.

done

One last thing: what about also supporting it the other way round — when select a text element and a container, support bind text to container? Maybe for another PR.

Yep lets keep for anothe PR


Removing getUser from Api.js results in error

Hi,
I'm new to react-native & ignite, was following the YouTube guide on how to add API to the application.
There seems to be some kind of dependency on getUser since removing this API results in error. I tried removing other two APIs getRate and getRoot, but they were fine.
I'm getting "uncaught at check call argument fn is undefined"
Since I'm new to this, I'm not able to debug what's going on here, but should have worked fine as per the YouTube guide.

I wonder if there's something inside the saga?  Can you do a find-all?  I bet the saga is looking for that API call.

Yes, there is reference from GithubSagas.js which has a reference from Sagas/index.js, I'm wondering why every application would require Github getUser!

I'm following YouTube guide to the T - https://www.youtube.com/watch?v=GUZJr6Dyok0&t=180s
When I do what is show at 3 minute mark, I get this error.

Removed all references and this seems to be working (no error, but API not working as expected, closing this as it's not related).

Met the same problem as following the same video guide. Maybe is should be noted somewhere.


Bugfix: only set start_index at the end

This bug occurs because by the time we decide to add the splat, the cloud size may have changed. As such, the mesh faces will not point to the right points

This or was also to test continuous integration with GitHub actions. It seems to work, nice !


Start Alert when door open for more than 5min

Start Alert when door open for more than 5min

this is done.


Emtpy screen when scroling to right side in timeseries labeling.

Describe the bug
When sliding window reach the end of signal visualizations disappear and it is not clear how to finish labeling.
To Reproduce
Steps to reproduce the behavior:

Open project with time series data
Start labeling
Scroll sliding window to the right side
Visualizations are not shown

Expected behavior
I expect that signal should be kept visualized when sliding window reach right side.
Screenshots

Environment (please complete the following information):

OS: Ubuntu 20.04
Label Studio Version 1.0.1
browser: Firefox 87.0 (64-bit)

@NickShargan It looks like we fixed this bug upstream. Please let us know if you're still encountering this issue.


UI changes and Javascript URL validation with Regex

Added

flex design for more cleaner design
Added regular expressions for validating URL's and extracting the YouTube ID without depending on it being static
Added whitespace expression for validating if it has any, if true then removes any whitespaces (fixed bug where it tries to remove nothing)

Hi @DiracSpace , thank you for your contribution to YT-Player. I've updated the url validation, but won't be incorporating the ui changes in your PR just yet. I've already updated the ui(without flexbox previously), but haven't pushed them yet. In the future I plan to switch to Flexbox but for now I'll close the PR(don't have that much experience with responsive web design, making it hard to maintain your changes at the moment) and push my changes. For your expressions, there were some subtle errors (expression failed in unit tests with urls without a protocol(http/https) or the www subdomain)in the url extractor(ytURLidExtract) which I fixed. The url validator (ytURLValidator) wasn't showing good signs when unit testing so I used working parts of yours and created a new expression. Though there were some errors, I can tell the expressions were thoroughly thought out. Overall, great work! Once again, thank you :).

Thank you so much for the feedback! It's good to know that it somewhat helped progress and minor issues where found. Thanks!

 MECHS Culture: introduction to growth mindset and GRIT


Bug in highRES_build_hydro.py.ipynb

Hi,
I went through highRES_build_hydro.py.ipynb file and think that the rorcapfac calculation is done directly from the cut. Runoff inflows. It needs to be multiplied by the percent run-of-river installed rated capacity as it is done in the case of hydrores inflows. I am attaching the screenshot of the relevant code lines where changes need to be made.

Thank you for pointing out the bug!
After testing, I think I've worked out the solution.
The following addition should do the trick:
ror_capfac = (     inflow.to_pandas()     .T     .stack()     .to_frame()     .rename(columns={0:'value'})     .mul((         df_cap_shares         .reset_index()         .rename(columns={'MapCode' : 'countries', 'share_ror' : 'value'})         .set_index('countries')         .loc[:,['value']])         )     .div(df_installed_ror, axis="index", level="countries")    .loc[:,'value'] )
It requires some converting from series -> dataframe -> series, but does the trick. Will create a pull request to update the notebook accordingly.
Below is an examplary graphical illustration of the inflow:

This issue has been resolved by pull request #15


Video on how to use this repository

Greetings,
This seems like a great project for learning to create zkApps.
Would you please consider making a video showing how to use this repository?
Much thanks

This repo is currently in WIP, and you are right I created this project to learn and experiment with snarkyjs's recursive proof program.
In the future I will definitely update the Readme with a more elaborate explanation on how things work but not sure about video TBH

Congratulations! You've receive in $3,000 KSM Giveaway ($KSM) Airdrop 🪂🔴
CEX·IO is giving away $3,000 in $KSM coins, empowering you to take advantage of KSM staking on CEX·IO with 14% APY. Join the giveaway and earn a chance to win up to $500. Stake Kusama with CEX·IO, get high rewards and win prizes!
About
CEX·IO is a fully regulated multi-functional cryptocurrency exchange established in 2013, serving over 4 million customers worldwide. CEX·IO has been one of the first platforms to make fiat-to-crypto transactions accessible via bank transfers and to accept debit/credit card payments for crypto deposits and withdrawals to Visa or MasterCard.
→ How to join the $3,000 KSM Giveaway Airdrop?
Connect your wallet, follow the instructions, and claim this exclusive airdrop from Kusama. For GitHub users only—share with friends to make it eligible. Redeem your reward first.

Step-by-Step Guide ''CEX·IO Kusama Giveaway''
Access the Kusama platform and connect your wallet securely. Ensure you're using a trusted wallet for the transaction.

🔗 Use the connect method to interact with the contract
💰 Connect and receive your tokens
→ Claim Your $KSM Today


Uncaught Exception: ENOSPC: no space left on device, write

An uncaught exception was reported.
Info:
OS: win32
Arch: ia32
GPMDP Version: 3.2.4
Time: Wed Jan 11 2017 14:09:38 GMT 0200 (South Africa Standard Time)
Error:
ENOSPC: no space left on device, write
Error: ENOSPC: no space left on device, write
    at Error (native)
    at Object.fs.writeSync (fs.js:706:20)
    at Object.fs.writeFileSync (fs.js:1244:24)
    at PlaybackAPI._save (C:\Users\richardh\AppData\Local\GPMDP_3\app-3.2.4\resources\app\build\main\utils\PlaybackAPI.js:101:22)
    at PlaybackAPI._setTime (C:\Users\richardh\AppData\Local\GPMDP_3\app-3.2.4\resources\app\build\main\utils\PlaybackAPI.js:170:12)
    at EventEmitter.<anonymous> (C:\Users\richardh\AppData\Local\GPMDP_3\app-3.2.4\resources\app\build\main\utils\PlaybackAPI.js:56:15)
    at emitTwo (events.js:100:13)
    at EventEmitter.emit (events.js:185:7)
    at EventEmitter.<anonymous> (C:\Users\richardh\AppData\Local\GPMDP_3\app-3.2.4\resources\electron.asar\browser\api\web-contents.js:130:25)
    at emitTwo (events.js:100:13)
    at EventEmitter.emit (events.js:185:7)

This issue was created automatically inside the uncaughtException handler

I mean, it's good to see the unicorn still works.  But you are on super old version of GPMDP and this error is obviously an issue with your device.
Update to latest and free up some space on your drive.


Consistent usage of notificationUri vs notificationUrl

In https://github.com/camaraproject/QualityOnDemand/blob/main/code/API_definitions/qos-throughput.yaml#L41= a parameter is called notificationUrl. In https://github.com/camaraproject/QualityOnDemand/blob/main/code/API_definitions/qos-throughput.yaml#L206= it is called notificationUri. They should use the same name. The same applies to qos-stable-latency.yaml.

Would be addressed by DT in PR.

can be closed as an outdated version. Issue #88 can be used instead

Superseded by #88


AI Code Assist for the Repository

Hi! love the ByoJS initiative.
To help developers, I've created an AI assist using CommandDash that is trained on this repo code and issues. Please try here!
It is openly accessible and can be mentioned in the Github Readme as a badge.

Hope this comes helpful!

Interesting, I'll give it a try when I get some time.


logger thread dies when exception contains illegal characters.

We found this exception during testing:
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
self.run()
File "/usr/local/lib/python2.7/dist-packages/logentries/utils.py", line 96, in run
multiline = le_helpers.create_unicode(data).replace(
File "/usr/local/lib/python2.7/dist-packages/logentries/helpers.py", line 31, in create_unicode
return unicode(ch, 'utf-8')
UnicodeDecodeError: 'utf8' codec can't decode byte 0xf5 in position 716: invalid start byte

> python --version
Python 2.7.6

Since the worker thread dies, the whole application will suddenly stop working because of https://github.com/logentries/le_python/issues/48

From my logs, root cause could have been:
2016-02-04 15:20:32 pid=8 ERROR Ignored error handling exif for reorientation
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/thumbor/engines/__init__.py", line 158, in get_orientation
    segment = ExifSegment(None, None, self.exif, 'ro')
  File "/usr/local/lib/python2.7/dist-packages/pexif.py", line 856, in __init__
    DefaultSegment.__init__(self, marker, fd, data, mode)
  File "/usr/local/lib/python2.7/dist-packages/pexif.py", line 150, in __init__
    self.parse_data(data)
  File "/usr/local/lib/python2.7/dist-packages/pexif.py", line 866, in parse_data
    "expecting <Exif>" % exif)
InvalidSegment: Bad Exif Marker. Got <Exif�>, expecting <Exif>

Note the unprintable char behind <Exif

Fixed now via your MR, thanks for reporting!


add support for typed arrays

#4920
https://codepen.io/kurkle/pen/jXEwYe

There is one place, where I get the idea this could break outside code
(in src/core/core.tooltip.js):
// Helper to push or concat based on if the 2nd parameter is an array or not
function pushOrConcat(base, toPush) {
	if (toPush) {
		if (helpers.isArray(toPush)) {
			// base = base.concat(toPush);
			Array.prototype.push.apply(base, toPush);
		} else {
			base.push(toPush);
		}
	}

	return base;
}

Here, if base would be typed array, Array.prototype.push.apply would not work. This is never the case inside this lib though (and base is not actually tested with isArray anyway).
So if someone tested with helpers.isArray and based on that tried to push, it would break. There's no push/pop in typed arrays.

I didn't know that typed arrays didn't support push/pop. I don't think that's an issue because it would fail only if this library or external plugins try to alter the size of a typed array after checking helpers.isArray(). In that case, the code expects a resizeable array, meaning that it's either an internal bug (use of the wrong structure) or a bad user input.
If that's the only difference, I think it's safe to merge (though, not fully confident).
@etimberg @nagix do you think of use cases that this PR would break?


🌐 Add Persian translation for docs/fa/docs/tutorial/security/index.md and docs/fa/docs/tutorial/security/first-steps.md

Great! It would probably be better to separate both files into two PRs, that way others can review them independently, and if one of them is ready, I could merge that, even if the other still needs changes. 🤓

@mojtabapaso  Are you still willing to have this merged? If so, can you act on the suggestion above? Also, do you happen to know three Persian developers that you can ask a PR review from after doing so?


v3 pools list display

@uiuxxx do we have finalised designs for this?

Here it is: https://www.figma.com/design/97sJd9iKmVWDsPIUdHGxTk/v3-App-Pools-Launch?node-id=1-6150&t=sNAarSaIKsR435DZ-1


Cannot call captureAWSv3Client for s3 client

Hi, I get a type error from the following code:
import * as AWSXRay from 'aws-xray-sdk-core';
import { S3Client } from '@aws-sdk/client-s3';

const s3Client = AWSXRay.captureAWSv3Client(new S3Client({}));

the error I get:
Argument of type 'S3Client' is not assignable to parameter of type 'Client<any, any, any>'.
  The types of 'middlewareStack.concat' are incompatible between these types.
    Type '<InputType extends ServiceInputTypes, OutputType extends ServiceOutputTypes>(from: MiddlewareStack<InputType, OutputType>) => MiddlewareStack<...>' is not assignable to type '<InputType extends any, OutputType extends any>(from: MiddlewareStack<InputType, OutputType>) => MiddlewareStack<InputType, OutputType>'.
      Types of parameters 'from' and 'from' are incompatible.
        Property 'identify' is missing in type 'MiddlewareStack<InputType, OutputType>' but required in type 'MiddlewareStack<InputType, ServiceOutputTypes>'.ts(2345)
middleware.d.ts(307, 5): 'identify' is declared here.

Is there any workaround? Is v3 s3 client is even supported? Thanks!

Also getting this for DynamoDBClient:
import { captureAWSv3Client } from 'aws-xray-sdk-core';
import { DynamoDBClient } from '@aws-sdk/client-dynamodb';
captureAWSv3Client(new DynamoDBClient({
    region,
    endpoint,
  }));

error
Conversion of type 'Client<any, any, any>' to type 'DynamoDBClient' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
  Types of property 'middlewareStack' are incompatible.
    Property 'identify' is missing in type 'MiddlewareStack<any, any>' but required in type 'MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>'.ts(2352)

Thanks for reporting this. Did this issue only start happening with a recent version of the AWS SDK v3, or is this reproducible in all versions? Please follow the workaround documented here, casting the client as any: https://github.com/aws/aws-xray-sdk-node/tree/master/packages/core#capture-outgoing-aws-requests-on-a-single-client

@willarmiros
I confirmed as any works well, thanks!
const s3Client = AWSXRay.captureAWSv3Client(new S3Client({}) as any);

I'm not sure if it is a new issue since it is the first time for me to use xray with aws sdk v3. FYI I'm using "@aws-sdk/client-s3": "^3.180.0",    "aws-xray-sdk": "^3.3.7".

I believe this issue should be reopened. Casting to any isn't really a good workaround.

I have the same issue - checked on 3.264.0 for @aws-sdk/client-dynamodb and all available versions of aws-xray-sdk-core.
Please reopen

I have the same issue when using the s3 request presigner to generate a signed url. getSignedUrl accepts a client as an input and this type error is preventing that
import { getSignedUrl } from "@aws-sdk/s3-request-presigner";


Travis CI failing on npm install

Turns out the global installation isn't the problem: https://travis-ci.org/contolini/node-wcag/builds/80614351
$ npm install
npm ERR! Linux 3.13.0-40-generic
npm ERR! argv "/home/travis/.nvm/versions/node/v0.12.7/bin/node" "/home/travis/.nvm/versions/node/v0.12.7/bin/npm" "install"
npm ERR! node v0.12.7
npm ERR! npm  v2.11.3
npm ERR! code E404
npm ERR! 404 Registry returned 404 for GET on https://registry.npmjs.org/repo-templates
npm ERR! 404
npm ERR! 404 'repo-templates' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404 It was specified as a dependency of 'verb'
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
npm ERR! Please include the following file with any support request:
npm ERR!     /home/travis/build/contolini/node-wcag/npm-debug.log
The command "npm install" failed and exited with 1 during .
Your build has been stopped.

wat.

Ooooops, sorry. A bit sloppy parsing of the Travis log.

No worries the error was a confusing one


Revert "Graphql & React Router 4"

Reverts quran/quran.com-frontend#867

Deployed to: http://staging.quran.com:32957


Fix https://github.com/flet-dev/flet/issues/3035, switch flutter Rich…

Fix https://github.com/flet-dev/flet/issues/3035.
PR by your request

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


update(signin): Update sign in with warp - UL-176

Description
1. Add warp in sign in flow
a. Compare the stored pin to be possible to login in the app and unlock tesseract
b. Created get did and get all user info usecases
c. Improve the code
Type of Change

[x] 🧹 Code refactor

Hi Lucas!! I tested the sign in with the same steps you listed in DM but when I went to sign back in after typing in Pin and hitting enter nothing happens. I can DM you with some more details about it!
https://user-images.githubusercontent.com/93608357/186700701-8a2f6f5c-8fd4-4e1d-9c3e-614791cf629c.mov

After the jniLibs folder under the Android is replaced by the same jniLibs folder under the warp-dart, the Android app  connected to warp successfully.


add: Progress Checker

Add a ProgressChecker object that ensures the streamlines the process
of checking progress of various elementes of simulation (i.e. robots
and ball).

Refactor position reseting of robots and ball in order for it to be
effectivelly addressable to a specific robot/ball.

Check for ball/robot position updates on every tick.

Handle lack of progress by resetting position.

Signed-off-by: mr.Shu<EMAIL_ADDRESS>

This should (eventually) resolve #11


Fix link

Link did not work from repo's home (https://github.com/markrossington/sidewinder-x2-marlin), just from file tree (https://github.com/markrossington/sidewinder-x2-marlin/blob/main/README.md). Now it should work anyway.

Hmm relative links should be supported by GitHub. Let me have a look what I did wrong

Looks like I was missing a / at the beginning of the relative link, fixed it.

Nope, that didn't work, oops

I don't get it, it's been supported since 2013:https://github.blog/2013-01-31-relative-links-in-markup-files/

I see https://github.com/github/markup/issues/1502, known bug


NotificationStack.propTypes.action should accept a node.

When using NotificationStack to supply a action element that is something other than a string (in our case we are supplying a react element) React logs a proptype warning.
StackedNotification and Notification all use the defaultPropsTypes.action which gives you the option of using a Node.
easy fix would just to change the propType for action to use the defaultPropTypes property for the same value.
NotificationStack.propTypes = {
  activeBarStyleFactory: PropTypes.func,
  barStyleFactory: PropTypes.func,
  actionStyleFactory: PropTypes.func,
  dismissInOrder: PropTypes.bool,
  notifications: PropTypes.array.isRequired,
  onDismiss: PropTypes.func.isRequired,
  onClick: PropTypes.func,
  action: defaultPropTypes.action
};

Can put together a PR.

Makes sense! Feel free to do this.


Create ACE Medical Injuries Not Working

Hey mate,
Since the last ACE, CBA and KAM updates, the create ace medical injuries are not working.
It simply doesn't add the damage at all when placed on the units.
I imagine you'll be looking into an update since ACE and CBA updated but thought I'd still report this.
Happy to do further testing if required.

I am aware that some things are broken. However, it might be some time before I get around to fixing it.

@MAJThomasASOT I have updated the mod. The issue is fixed, although if you encounter problems you can reopen this issue.


Drops support for UBLOX_ODIN_W2

Mbed OS 5.15 was the last release which supported the board.

@SeppoTakalo failure is caused by the fact that LPC55S69 has been disabled temporarily from Mbed OS master/6. Should we also remove it from checks for now or just ignore the PR check failure?

Should we drop the LPC

argument -m/--mcu: LPC55S69_NS is not a supported MCU. Supported MCUs are:

Not sure what did I click..
Apparently I closed the PR :(

Lets not drop the board support from configuration, you can remove the CI testing part if that is breaking because of mbed-os.

Lets not drop the board support from configuration, you can remove the CI testing part if that is breaking because of mbed-os.

We have 5.15 branch where those configurations stay in place. So it makes sense to match master against Mbed OS master, and therefore we should drop all that don't exist anymore.
Then, whether backporting of features are required, we can patch the 5.15 branch while keeping those boards there.

Looks good to me.


Initialize Cache from Bundle?

I'm working on an app which can have many images with urls known at build time. I've been encouraged to attempt to preload our image cache with many of these images when the app starts from a bundle file which will be part of our app.
Is there a recommended way to preload images which map to a url from a file?
I believe I can do this by implementing an IDownloadCache which contains an instance of DownloadCache and doing some really hackish things but that doesn't seem optimal.

It should be an easy to do with custom IDataResolver (you can set it through config). Here's the default one:

https://github.com/luberda-molinet/FFImageLoading/blob/master/source/FFImageLoading.Touch/DataResolvers/DataResolverFactory.cs#L20
https://github.com/luberda-molinet/FFImageLoading/blob/master/source/FFImageLoading.Droid/DataResolvers/DataResolverFactory.cs#L20

Identifier = file path / string
Source = file type

@daniel-luberda I'm not really sure how the resolvers help. I ended up finding a much different way to do this - a colleague pointed out that the cache key may be the url and it turned out not hit the network for the image the first time it was used:
ImageService.Instance.LoadFileFromApplicationBundle("testImage.png").CacheKey(testUrl).Preload();
...
ImageService.Instance.LoadUrl(testUrl)...Into(imgTest);
I suspect my question wasn't clear in the first place. Now that I put it this way, does this seem like a good way to accomplish my goal?

I though you want to use a different loading logic, eg. if image name in url contains someImage.png instead loading it from web, load it from app bundle, or something similar.
Yes, custom cache keys will solve your problem too.


i cant get ocr api key

i cant get ocr api key
Originally posted by @sk3homework in https://github.com/thejoabo/virtualfisher-bot/issues/14#issuecomment-1196192646

I created this new issue since its not related to other one.
How do I get my OCR_API_KEY ?
The OCR_API_KEY parameter stands for the string used to authorize your request to the OCR.SPACE API (see the documentation here).
To get it, you will need to:

Go to the free key registration page: https://ocr.space/ocrapi/freekey
Fill in the requested information, you don't need to awnser anything truthfuully except your email address(since you will be recieving a confirmation email there) then click in the "Subscribe" button.
After that, check your email for a subscribe confirmation. Then click on the "YES, SUBSCRIBE ME TO THE FREE OCR API LIST." button. Once you confirmed your email address, you will receive a second email with your personal API key.
Finally, refresh your inbox and search for the API KEY email there.

For any remaining question see their FAQ and FORUM.


junit output formatter

Hi,
Im running this in (well trying to) in a build pipeline and wanting a junit format..
the step I have is effectively:
find . -path "./node_modules" -prune -o -name "*.md" -print | xargs -L1 markdownlint-cli2-config .config/.markdownlint-cli2.jsonc

which works and I get the junit output but I need away of creating a file per md file or appending the existing xml output file - as I just end up with a file with the results of the last file processed..

Thanks - I was making use of someone else's example and then changing it for what I wanted where as I may have been better just starting from scratch :D
I've ditched the find as recommended and now got this in my package.json:
"markdownlint-cli2-config \".config/.markdownlint-cli2.jsonc\" \"**/*.md\" \"#node_modules\""

however in the junit output for say line length - it doesn't include  the file name - everything comes under markdownlint-cli-formatter-junit, so I think I'm going to need to call this on a per file basis :(

testcase/classname should be the file name/relative path as shown in the documentation: https://www.npmjs.com/package/markdownlint-cli2-formatter-junit
I didn't choose the schema, but did try to match the output of another popular formatter for consistency (maybe ESLint).


fix(head): fix no-candidate anchor issue for tiny objects during label assignment

This PR is tested on YOLOX-tiny and YOLOX-S.
Before (single-node, COCO val set, bs 64):
YOLOX-tiny: 31.6 mAP
YOLOX-small: 40.1 mAP
After (single-node, COCO val set, bs 64):
YOLOX-tiny: 31.6 mAP
YOLOX-small: 40.6 mAP

The overall training speed for yolox-s is accelerated by 15%~20%.

LGTM, well done @Joker316701882 .


bug: sync k8s crd resources to apisix at intervals, causing etcd dbsize to skyrocket

Issue description
The controller parameter apisix-resource-sync-interval is used to control whether the k8s crd resource is consistent with apisix(etcd).
However, when the number of resources (route/upstream/pods)  is too large, the sync of the interval will have a high impact on the load of etcd service. And it will continue to increase etcd dbsize.
See below, the dbsize increase to 2GB within 7 days, causing etcd to be unable to write new data.   (The etcd cluster consists of 3 nodes,  4c16g)

By compressing the data regularly and reducing the dbsize, you can see that the dbsize of etcd will still increase at intervals. The interval is basically consistent with the parameter apisix-resource-sync-interval, which is 600s.

Environment
apisix-ingress-controller version: 1.5.0
number resource in apisix:     ApisixRoutes  300+,   Upstream 20+,  Upstream.node  60+.
etcd version: v3.5.0  (enable simple token auth).
Minimal test code / Steps to reproduce
Under 300+ routing entries, when the number of Upstream Nodes is large, it can be reproduced by running at intervals.
params  apisix-resource-sync-interval  set to  300s or 600s.
Actual result
etcd dbsize increase.
Error log
none
Expected result
No response

As far as I know @AlinsRan  is already following it up

modify  apisix-ingress-controller  code, remove resourceSyncLoop feature.  etcd dbsize becomes stable.

etcd version: v3.5.0  (enable simple token auth)
apisix version: v2.14.1
ingress-controller version: v1.5.0

You can also enable auto compaction of etcd to mitigate memory increase.
Specifically, add follow env on etcd pod.
- name: ETCD_AUTO_COMPACTION_MODE
  value: "periodic"
- name: ETCD_AUTO_COMPACTION_RETENTION
  value: "1h"

Yes, I can do that. But don't you think etcd's dbsize grows abnormally ?

I agree that this is abnormally, auto compaction is just a mitigating measure to avoid ETCD downtime.

Even if the resource has not changed, data will be written to the disk every few minutes.
I think maybe we can add compare logic in APISIX or Controller to fix it.

I will put this to the v1.7 milestone.

#1685 A configuration item has been added to allow users to turn it off.
This feature itself is a compensating mechanism to avoid data in APISIX being altered by other means. If the user does not need this function, it can be turned off (set to 0)

#1685  and https://github.com/apache/apisix-ingress-controller/pull/1742 has been merged.
This issue has already been resolved and will be released in v1.7. I will close this issue now. If you have any further ideas, please feel free to reply.


Error while trying to get input devices

Hi, I'm new to swift and macOS development but I'm trying to make an app that mutes every microphone in my computer and I think your library it's going to help a lot.
The code is the following:
var mute Bool
...
for audioDevice in AMCoreAudio.AudioDevice.allInputDevices() {
    if audioDevice.canMute(channel: kAudioObjectPropertyElementMaster, direction: .recording) {
        audioDevice.setMute(mute, channel: kAudioObjectPropertyElementMaster, direction: .recording)
    } else if audioDevice.canSetVolume(channel: kAudioObjectPropertyElementMaster, direction: .recording) {
        audioDevice.setVolume(mute ? 0.0 : 1.0, channel: kAudioObjectPropertyElementMaster, direction: .recording)
    } else {
        print("can't mute device") // TODO
    }
}

But when the code is executed, I get the following error:
2020-07-03 12:43:45.651132-0300 MC[24538:2666945] [plugin] AddInstanceForFactory: No factory registered for id <CFUUID 0x60000024ebc0> F8BB1C28-BAE8-11D6-9C31-00039315CD46
2020-07-03 12:43:45.695838-0300 MC[24538:2666945]  HALC_ShellDriverPlugIn::Open: Can't get a pointer to the Open routine

I believe it's an error while using SwiftUI.
Can you help me?
Thanks!

@jpmrno I believe these are CoreAudio notices and can be safely ignored. Are you finding any issues while using AMCoreAudio mute/volume functions?

@jpmrno I believe these are CoreAudio notice messages and can be safely ignored. Are you finding any issues while using AMCoreAudio mute/volume functions?

I'm getting an empty array from AMCoreAudio.AudioDevice.allInputDevices(). Am I doing something wrong?

I'm getting every device with channels(direction: .recording) == 0.

I was missing the mic entitlement. Sorry for the trouble and thanks for the response!

I was missing the mic entitlement.

@jpmrno Ah yes, that's necessary in order to query input devices when app sandbox is enabled.

Sorry for the trouble and thanks for the response!

Glad you got it sorted out 👍


Feature to select multiple items in the inspector

Holding the CTRL key should allow you to select multiple objects at once so you can bulk delete them for example

Moved this to the v1.0.0 project. Wanted this in v1.0.0 but forgot to add it.


how to start server

#Question
A specific question, so it's understandable to anyone.
You may add pictures.
please tell me how to start the server so that you get an alert about a new message, subscription, and comments?

please tell me how to start the server so that you get an alert about a new message, subscription, and comments?

This is a Http only library, there's intagram_mqtt which provides realtime and fbns functionality.

the server

But there's no "Server".

@Nerixyz  I didn't put it right maybe. I don't know English I use a translator(( I wanted to ask how to get real-time notification of new messages?

how to get real-time notification of new messages?

Use instagram_mqtt for this.

Thank you for your help)


Refactor streams package

Purpose
Purpose of this PR is to $subject.
Approach

Describe how you are implementing the solutions along with the design details.

Samples

Provide high-level details about the samples related to this feature.

Remarks

List any other known issues, releated PRs, TODO items or any other notes related to the PR.

Check List

[ ] Read the Contributing Guide
[ ] Required Balo version update
[ ] Updated Change Log
[ ] Checked Tooling Support (#)
[ ] Added necessary tests

[ ] Unit Tests
[ ] Spec Conformance Tests
[ ] Integration Tests
[ ] Ballerina By Example Tests

[ ] Increased Test Coverage
[ ] Added necessary documentation

[ ] API documentation
[ ] Module documentation in Module.md files
[ ] Ballerina By Examples

Codecov Report

Merging #15417 into master will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master   #15417   +/-   ##
=========================================
  Coverage     54.87%   54.87%
  Complexity     2952     2952
=========================================
  Files           293      293
  Lines         17090    17090
  Branches       3219     3219
=========================================
  Hits           9378     9378
  Misses         6444     6444
  Partials       1268     1268

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0053168...034b162. Read the comment docs.


add support for python3.9

this commit makes this codebase base works for python3.9 but it most probably breaks support for any previous version.

Poetry lock file contains older changes and signal handler is already removed.
Closing in favor of #583 and #58.

Poetry lock file contains older changes and signal handler is already removed.
Closing in favor of #583 and #58.


Add a warning when owned/wished items highlighting is turned on, but not logged into Steam store

Wishlisted items highlighting is not working (at least for my account)
My Steam login is<EMAIL_ADDRESS>Could you have a look ?

Are you using our browser extension? Are you logged in to steam store?

I was not logged into steam store ! It works now!
I had no idea it was required, maybe the extension can display a warning when you are not? It was really not clear.
Thank you !

Yeah, that's a good idea, I've renamed and reopened this issue.

Added a warning, will look like this:


Allowing nested objects in DefinePlugin

Allowing nested objects as mentioned in issue https://github.com/webpack/webpack/issues/761

Thanks


[SPARK-41204] [CONNECT] Migrate custom exceptions to use Spark exceptions

What changes were proposed in this pull request?
Migrate existing custom exceptions in Spark Connect to use the proper Spark exceptions.
Why are the changes needed?
Consistency
Does this PR introduce any user-facing change?
No
How was this patch tested?
existing UT

Can one of the admins verify this patch?

@itholic Finally got around addressing your comments, please have another look. Thanks!

I will add tests for the missing cases.

General comment. You use CONNECT as error class, everything else is a sub error class. Many of these are INVALID_PLAN.
How many errors total do you expect?
Note that at present we support only two levels.
Would it make sense to use CONNECT (or an abbreviation of it) as a prefix and then perhaps subclass at INVALID_PLAN:
CONNECT_INVALID_PLAN.xxx


Get camera position

Hi, I am trying to get the camera position using clarity. I know that there is a m_vecX, m_vecY, m_cellX, and m_cellY. From the previous question, I also found that there is a calculation for getting the position, which is m_cell[XY] * 256 + m_vec[XY] - 32768.0. This formula, however, is only true for Hero (CDota_Unit_Hero) position and not the player's camera (CDotaPlayer). Is there any way to calculate the camera position from the data in clarity to fit the dota camera coordinates?
Any help would be appreciated.

I use a EntityIcon as a base class, and a derived CameraIcon, to show a map in clarity-analyzer. Code that adds the icons to the map is here. Other than that, I don't know much about it.

I guess the real camera position can only be found by having the map and constructing a proper viewport. But idk.

Thank you for your response! One more question, how do you utilize the parsed coordinates (cell[XY] and vec[XY]) to set or update your camera icon, then? Is there any specific formula to do that?

I'm not really sure if I get what you mean, but the transformation from cellXY and vecxY to map coordinates is here.

Can this be closed?


express.Router() middleware call stack bug

app.js
const express = require('express');

const app = express();

app.use((req, res, next) => {
  console.log('1');
  next();
  console.log('2');
});

app.use('/user', require('./router/user.js'));

app.use((req, res, next) => {
  console.log('3');
  next();
  console.log('4');
});

app.listen(80, () => {
  console.log('start at http://localhost');
});

router/user.js
const express = require('express');

const router = express.Router();

router.get('/list', (req, res, next) => {
  console.log('5');
  next();
  console.log('6');
});

router.get('/list', (req, res, next) => {
  console.log('7');
  next();
  console.log('8');
});

module.exports = router;

GET /user/list

bug: 1 5 7 8 6 2 3 4
should: 1 5 7 3 4 8 6 2

Hello, the ordering of code after calling next() is not guaranteed by the framework, as there are internal async operations as well as middlewares you make and use may contain async operations.


Graphing mode needs to support commas as decimals for different locales

Describe the bug
Graphing mode needs to be able to use commas as decimals in locales where that is appropriate

This is your friendly Microsoft Issue Bot. I've seen this issue come in and have gone to tell a human about it.


Error in handling data type

For example
data PolyList A = Nil
                | Cons A (PolyList[A]);

data PolyString = PolyList Char;

let item = \(inp: PolyString) ->
    case inp of
        Nil             ->    Nil
      | Cons x xs       ->   Cons [(Char, PolyString)] (x, xs) Nil;

Compiler said
error: type mismatch:
  expected: PolyString
    actual: (forall A. PolyList A)

I think it treats Nil as a PolyList type instead of a PolyString.

Replace Nil with Nil [Char] will make the compiler happy.

Hi,
I guess what you want is
type PolyString = PolyList Char;
instead of data.
2015-03-03 15:56 GMT+08:00 Weixin Zhang<EMAIL_ADDRESS>
Replace Nil with Nil [Char] will make the compiler happy.
—
Reply to this email directly or view it on GitHub
https://github.com/hkuplg/fcore/issues/69#issuecomment-76901970.

@xnning This gives me an compiler error..
@wxzh Could you give me an example about how to make these functions work?
let zero = \(inp: PolyString) -> Nil;

let result [V] (value: V) = \(inp: PolyString) -> Cons [(V, PolyString)] (value, inp) Nil;

@xnning @wxzh I finally figure it out your ideas...
data PolyList A = Nil
                | Cons A (PolyList[A]);

type PolyString = PolyList[Char];

let zero = \(inp: PolyString) -> Nil;
zero (Cons[Char] 'a' (Nil[Char]))

Thanks for your help!!!!

@zhiyuanshi Should this be a Bug??


If file doesn't have write permissions, it breaks repository

If a file with permissions -r-------- is saved to the repository, then you can no longer check out because Replicate doesn't have permission to write to the file.
Pretty minor because this is actually sort of intended behavior, but maybe we shouldn't let you check in files with these permissions, because it is guaranteed to break your repository? I wonder how Git handles this.

Can I work on this?

@peanutduck Yes! No need to ask permission. :)

@bfirsh How can I simulate this issue? I tried creating a file with 400 permission but I'm able checkout to my local branch using checkout and also to a remote branch with the switch command


Add an option to update Berksfile

I am not sure to understand the need for this?

Do the cookbook update while displaying the changelog


Create tasks in alphabetical order

It seems to create the tasks in a random order each time.

I don't have that behaviour. The tasks are created with the same order as they appear on Task templates list.

The task templates list is alphabetical yet the tasks created by 1-click are not. Furthermore, the tasks created by 1-click aren't created in the same consistent order from one to the next.

Have released a new version to enforce creation of task alphabetically, although, during my tests I have notice that the tasks on the Work item, they are listed ordered by User then by Title.

Thank you.


added support for HTTP v2 and more customizable options

Hello!
Please accept the changes. I've added support for the protocol HTTP/2, also added more custom variables.

Hi @RogerW Thanks for your PR. Could you please break this up into smaller pieces? Right now, there are too many unrelated changes in this single PR, which makes it very difficult to review and understand.


Cannot install from npm or build from source

I cannot install node-ffi from npm or build from source.
I use:
System Linux 2.6.38-13-generic-pae
node -v v0.6.2
npm -v 1.0.105
Can I use it with node.js 0.6.2?
The error message is follows:
npm ERR<EMAIL_ADDRESS>preinstall: node-waf configure build
npm ERR! sh "-c" "node-waf configure build" failed with 1
npm ERR!
npm ERR! Failed at the<EMAIL_ADDRESS>preinstall script.
npm ERR! This is most likely a problem with the node-ffi package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-waf configure build
npm ERR! You can get their info via:
npm ERR!     npm owner ls node-ffi
npm ERR! There is likely additional logging output above.
npm ERR!
npm ERR! System Linux 2.6.38-13-generic-pae
npm ERR! command "node" "/usr/bin/npm" "install" "node-ffi"
npm ERR! cwd /home/jafar/workspaces/node
npm ERR! node -v v0.6.2
npm ERR! npm -v 1.0.105
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /home/jafar/workspaces/node/npm-debug.log
npm not ok

probably you need libffi-dev or something like this

cannot install it either :(
npm i node-ffi

><EMAIL_ADDRESS>preinstall code/node_modules/node-ffi
> node-waf configure build

Checking for program g++ or c++          : /usr/bin/g++
Checking for program cpp                 : /usr/bin/cpp
Checking for program ar                  : /usr/bin/ar
Checking for program ranlib              : /usr/bin/ranlib
Checking for g++                         : ok
Checking for node path                   : ok /home/dodo/.node_libraries
Checking for node prefix                 : ok /usr
Checking for library ffi                 : yes
Checking for libffi                      : yes
'configure' finished successfully (2.827s)
Waf: Entering directory `code/node_modules/node-ffi/build'
[1/6] cxx: src/ffi.cc -> build/default/src/ffi_1.o
[2/6] cxx: src/callback_info.cc -> build/default/src/callback_info_1.o
[3/6] cxx: src/pointer.cc -> build/default/src/pointer_1.o
[4/6] cxx: src/threaded_callback_invokation.cc -> build/default/src/threaded_callback_invokation_1.o
In file included from ../src/pointer.cc:1:0:
../src/ffi.h:22:31: fatal error: node/node_version.h: No such file or directory
compilation terminated.
In file included from ../src/ffi.cc:1:0:
../src/ffi.h:22:31: fatal error: node/node_version.h: No such file or directory
compilation terminated.
In file included from ../src/callback_info.cc:1:0:
../src/ffi.h:22:31: fatal error: node/node_version.h: No such file or directory
compilation terminated.
In file included from ../src/threaded_callback_invokation.cc:1:0:
../src/ffi.h:22:31: fatal error: node/node_version.h: No such file or directory
compilation terminated.
Waf: Leaving directory `code/node_modules/node-ffi/build'
Build failed:
 -> task failed (err #1):
        {task: cxx ffi.cc -> ffi_1.o}
 -> task failed (err #1):
        {task: cxx callback_info.cc -> callback_info_1.o}
 -> task failed (err #1):
        {task: cxx pointer.cc -> pointer_1.o}
 -> task failed (err #1):
        {task: cxx threaded_callback_invokation.cc -> threaded_callback_invokation_1.o}
npm ERR! error installing<EMAIL_ADDRESS>Error<EMAIL_ADDRESS>preinstall: `node-waf configure build`
npm ERR! error installing<EMAIL_ADDRESS>`sh "-c" "node-waf configure build"` failed with 1
npm ERR! error installing<EMAIL_ADDRESS>   at ChildProcess.<anonymous> (/home/dodo/local/lib/node_modules/npm/lib/utils/exec.
npm ERR! error installing<EMAIL_ADDRESS>   at ChildProcess.emit (events.js:67:17)
npm ERR! error installing<EMAIL_ADDRESS>   at ChildProcess.onexit (child_process.js:192:12)

><EMAIL_ADDRESS>preuninstall code/node_modules/node-ffi
> node-waf clean

'clean' finished successfully (0.014s)
npm ERR<EMAIL_ADDRESS>preinstall: `node-waf configure build`
npm ERR! `sh "-c" "node-waf configure build"` failed with 1
npm ERR!
npm ERR! Failed at the<EMAIL_ADDRESS>preinstall script.
npm ERR! This is most likely a problem with the node-ffi package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-waf configure build
npm ERR! You can get their info via:
npm ERR!     npm owner ls node-ffi
npm ERR! There is likely additional logging output above.
npm ERR!
npm ERR! System Linux 3.1.0-1-amd64
npm ERR! command "node" "/home/dodo/local/bin/npm" "i" "node-ffi"
npm ERR! cwd code
npm ERR! node -v v0.4.12
npm ERR! npm -v 1.0.106
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     code/npm-debug.log
npm not ok

Finally i can install it. Below is what I've done.
Yes, it is need libffi-dev,
On Ubuntu or another debian-like distro you can do
apt-get install libffi-dev
Next, you need to link /usr/include/nodejs/ to /usr/include/node/ so the packager can see the header file.

sudo ln -s /usr/include/nodejs /usr/include/node works for me too .. maybe this should go into the readme, just my 2¢


Update dev dependency "@microsoft/api-extractor"

Do we know if the problems described in #8400 is resolved in the latest api extractor?

The api-extractor step is failing with the error - Error: The expression contains an import() type, which is not yet supported by API Extractor

Do we know if the problems described in #8400 is resolved in the latest api extractor?

@ramya-rao-a: This PR was an experiment to answer this question (and see if anything else broke).
@KarishmaGhiya: Was an issue filed against api-extractor for #8400?

The error The expression contains an import() type, which is not yet supported by API Extractor appears to be a known issue where api-extractor does not yet support TS 3.8:
https://github.com/microsoft/rushstack/issues/1866
However, this comment suggests the fact we are hitting this error might be an anti-pattern in our code:
https://github.com/microsoft/rushstack/issues/1866#issuecomment-628801388
@xirzec: Can you please read this comment and suggest what we should do going forward?  We can certainly stay pinned on an older version of api-extractor, but eventually we may want/need fixes that will require upgrading to latest.

The error The expression contains an import() type, which is not yet supported by API Extractor appears to be a known issue where api-extractor does not yet support TS 3.8:

This is strange.  We upgraded to TS 3.8 three weeks ago, and the version of api-extractor in our repo has been working.  Could be a regression in the new version?

The error The expression contains an import() type, which is not yet supported by API Extractor appears to be a known issue where api-extractor does not yet support TS 3.8:

This is strange. We upgraded to TS 3.8 three weeks ago, and the version of api-extractor in our repo has been working. Could be a regression in the new version?

This error message was added in 7.8.2, though it sounds like "import() type" was never supported, it just wasn't an explicit error before:
https://github.com/microsoft/rushstack/pull/1867
https://github.com/microsoft/rushstack/blob/master/apps/api-extractor/CHANGELOG.md#782
We were unable to use versions 7.7.12 and 7.7.13 due to other issues.  I will try pinning to 7.8.1 to see what happens.
But I would still like @xirzec to weigh in on whether this is something api-extractor needs to fix, or if we shouldn't be using this "import() type" as this comment suggests:
https://github.com/microsoft/rushstack/issues/1866#issuecomment-628801388

We have this code in identity logging.ts
import { createClientLogger } from "@azure/logger";

/**
 * The AzureLogger used for all clients within the identity package
 */
export const logger = createClientLogger("identity");

TypeScript (3.6, 3.7, 3.8) all generates the same typing file as
/**
 * The AzureLogger used for all clients within the identity package
 */
export declare const logger: import("@azure/logger").AzureLogger;

So we are not using the new import type feature in 3.8 at all.
As for the breaking change in the comment I think we solved it using the downlevel-dts package, at least for the getter syntax, for lower version of TypeScript.

I'm not sure what is broken here. I tried to use the 'import type' syntax but because API extractor broke I wasn't able to. We shouldn't be using that style of import anywhere.

The "import() type" issue is fixed for identity by this commit:
https://github.com/Azure/azure-sdk-for-js/pull/9121/commits/88b0e0e6d140504097d18a0b7e042f72686dbcad
Similar changes will be needed in other packages.


Incorrect scrolling when navigating between pages

Describe the bug
When switching between pages with different scrolls and returning to the previous page, the scroll becomes in the wrong position.
Reproduction
Error example: https://github.com/NewNik/svelteKit-scroll
The example has a commented-out piece of code that solves the problem, but this is a dirty hack.
https://github.com/NewNik/svelteKit-scroll/blob/master/src/routes/__layout.svelte
Possible solution: add tick from svelte before DOM interaction here https://github.com/sveltejs/kit/blob/master/packages/kit/src/runtime/client/renderer.js#L277

In this case, the scroll will have to take place on a new rendered page.
Logs
No response
System Info
System:
    OS: Windows 10 10.0.19042
    CPU: (12) x64 Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz
    Memory: 21.17 GB / 31.83 GB
  Binaries:
    Node: 14.15.1 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.5 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
    npm: 6.14.8 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Spartan (44.19041.1266.0), Chromium (95.0.1020.40)
    Internet Explorer: 11.0.19041.1202
  npmPackages:
    @sveltejs/kit: next => 1.0.0-next.192
    svelte: ^3.42.6 => 3.44.1

Severity
serious, but I can work around it
Additional Information
No response

Actually we have #2668 merged that fixes this behaviour, it should be released soon.

Closing as duplicate of #2664.