Pointers and heap assignment (concept discussion)

Since GRASShopper is now an integral part of the Starling story, I feel like it's time to consider first-class support for pointers and heap assignment.  This would allow us to:

more strongly check these operations in Starling to avoid errors propagating all the way to GRASShopper;
make it easier to re-use heap proofs with other backends in future;
make it easier to explain Starling's heap capabilities to other people, e.g. without having to talk about symbolics or GRASShopper in general.

I'll probably propose some syntax in a bit, but I thought I'd get the discussion open.

Quick syntax sketch for heap assignment:
<| *PVALUE = EXPR; |>
<| LVALUE = *PVALUE; |>

where PVALUE is an lvalue of pointer type.  (We'd have to add pointer types to Starling, but can probably get away with treating them as a scalar type rather than a compound type for now.)
In this case, * would be part of the assignment operator, which is perhaps surprising.  I'm not sure of a better way of marking this up though.  One possibility that works for the first type is a new assignment operator <- or :=, but I'm not sure how you'd mark up the second type.

Hm, I think this is a good idea given infinite time, but is it a priority?
Does it let us do something that we can't do now?
On Thursday, 23 February 2017, Matt Windsor<EMAIL_ADDRESS>wrote:

Quick syntax sketch for heap assignment:
<| *PVALUE = EXPR; |>
<| LVALUE = *PVALUE; |>
where PVALUE is an lvalue of pointer type. (We'd have to add pointer
types to Starling, but can probably get away with treating them as a scalar
type rather than a compound type for now.)
In this case, * would be part of the assignment operator, which is
perhaps surprising. I'm not sure of a better way of marking this up though.
One possibility that works for the first type is a new assignment operator
<- or :=, but I'm not sure how you'd mark up the second type.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/septract/starling-tool/issues/148#issuecomment-282060974,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AANd9nC8AI3OfU78KU5Q_Ln7IvIHm1ZHks5rfcFbgaJpZM4MI97T
.

--
http://www-users.cs.york.ac.uk/~miked/

It's not a priority, though it's something I might be tempted to knock together over a few weekends.
The main advantages I can see are:

Tidier and easier to read proofs (fits with the idea of Starling being a model for 'developer-friendly' tools);
Not having to explain or skirt around symbols when explaining Starling to other people;
Having a stronger amount of syntax and semantic checking before handing to GRASShopper (ideally, there should never be any GRASShopper syntax errors);
Eventually, allowing more optimisations (symbols are a complete black hole when it comes to optimisations; there might be some things we can do with heap writes, but they'd probably be limited to eg. simplifying atomic actions).

On the other hand, doing this through symbols is a good demonstration of how flexible Starling is.

All noble goals, but they don't add much to your thesis: I'd suggest
skipping it and working on better inference.
On 24 February 2017 at 09:04, Matt Windsor<EMAIL_ADDRESS>wrote:

It's not a priority, though it's something I might be tempted to knock
together over a few weekends.
The main advantages I can see are:

Tidier and easier to read proofs (fits with the idea of Starling
being a model for 'developer-friendly' tools);
Not having to explain or skirt around symbols when explaining
Starling to other people;
Having a stronger amount of syntax and semantic checking before
handing to GRASShopper (ideally, there should never be any GRASShopper
syntax errors);
Eventually, allowing more optimisations (symbols are a complete
black hole when it comes to optimisations; there might be some things we
can do with heap writes, but they'd probably be limited to eg. simplifying
atomic actions).

On the other hand, doing this through symbols is a good demonstration of
how flexible Starling is.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/septract/starling-tool/issues/148#issuecomment-282240619,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AANd9hr9NjkVwaL5xNNJgJMatRAkZ-k7ks5rfp0agaJpZM4MI97T
.

--
http://www-users.cs.york.ac.uk/~miked/

Adding noncritical as per Mike's assessment.


Add option to link to other pages from page text

Instead of providing only a static url field for links in page texts
this extends the textarea link functionality to select other pages
from the same story as link targets.
REDMINE-16712

Coverage remained the same at 99.297% when pulling 143c9e7d918a2c3d5d75f2efe9b74ddb9b6ba2a7 on tf:page-link-support into 08a812373823581f44aa59a95b83f0deb55f4ed9 on codevise:master.


Can we make the target a dynamic framework?

Describe the solution you'd like
Make the final output as a dynamic framework so it can be shared between different targets, specially between main app and Share Extension. This can make the final ipa size smaller.
Describe alternatives you've considered
Each target has its own copy of the static framework.
Below is the result. The sybmol is linked in multiple targets.

Duplicate of https://github.com/microsoft/appcenter-sdk-apple/issues/1227.
@huahuahu , unfortunately, we do not have plans to add support for this feature in the next year.


Update Widget Configuration Tables

The tables listing optional configuration parameters are malformed. This PR corrects them.

Deploy preview for hopeful-hamilton-4090b9 ready!
Built with commit d9d2203bd7a4eb0f5464daeaf7fb6118c4fdc921
https://deploy-preview-654--hopeful-hamilton-4090b9.netlify.com

^ my markdown tables implementation

Merged via https://github.com/ciscospark/react-ciscospark/commit/5c1d9de9df7fb05b097757dea6d8513af72fc987


Change static library targets to dynamic framework targets

Previously our assets weren't bundled with the static libs we were building, meaning in order to release anything we'd have to bundle them manually.
This PR doesn't solve everything--the dylibs need to be lipod to run on both simulator and device, and then they need to be unlipod (and codesigned) when embedding them in the product since the App Store rejects apps that link against fat dylibs.

Looks like we won't need to strip slices out because of CocoaPods magic. This PR now mostly works now: the build.swift script generates the correct folder structure with assets and everything. The only remaining thing is I broke CI somehow :(

Tests pass! Quick, merge while no one is looking

don't forget to update 2nd podspec (dev one) after merge
I'm not sure, but usually we are not removing dependent lib versions (FBSDKLoginKit', '~> 4.0')
I had issues, when 3rd party was updated before our release and already tested version got broken


jgi-denovo and jgi-preproc use a large, hard-coded amount of memory

Currently src/jgi-denovo.sh and src/jgi-preproc.sh are hard-coded to use 64 GB of memory. For someone testing this pipeline on a smaller machine, the parallel Java jobs will spit out an error message like this:
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (mmap) failed to map<PHONE_NUMBER>8 bytes for committing reserved memory.
# An error report file with more information is saved as:
# /home/octopus/hs_err_pid929156.log

On larger runs, requesting slightly more memory than you have available will not give you as immediate error but crash later during one of these stages.
For someone running this for the first time, it's not immediately clear where the error in the pipeline is coming from and that they need to edit the script. Obviously, one can just edit  the line `MEM="-Xmx6g", but we should be able to catch this in advance.
At minimum, I would propose changing the default to 6 or 8 GB. However, there should be a way to automatically use something like 75% of the available memory and we should also expose this as a command line option.

Note: variant-calling.sh and guided-assembly.sh also have hard-coded memory values, but don't seem to crash like the JGI scripts. It still would be nice to make these scripts more flexible as described above.


Efficiently serializing HashMaps and HashSets

Hi Johan,
I would like to have an efficient way of serializing (with cereal) HashMaps and HashSets. I think going through lists is inefficient because the hashes have to be recomputed (although I have not benchmarked this yet, so I could be wrong):
instance (Serialize a, Hashable a, Eq a) => Serialize (HS.HashSet a) where
    get = HS.fromList <$> get
    put = put . HS.toList

instance (Serialize k, Serialize v, Eq k, Hashable k) => Serialize (HMS.HashMap k v) where
    get = HMS.fromList <$> get
    put = put . HMS.toList

So ideally I would like the following instances:
instance (Serialize k, Serialize v) => Serialize (FullList k v) where
    put (FL k v fl) = put k >> put v >> put fl
    get = liftM3 FL get get get

instance (Serialize k, Serialize v) => Serialize (List k v) where
    put Nil          = putWord8 0
    put (Cons k v l) = putWord8 1 >> put k >> put v >> put l
    get = do tag <- getWord8
             case tag of
               0 -> return Nil
               1 -> liftM3 Cons get get get
               _ -> fail "Data.FullList.Lazy: Decoding error: unknown tag"

instance (Serialize k, Serialize v) => Serialize (HashMap k v) where
    put (Bin sm l r) = putWord8 0 >> put sm >> put l >> put r
    put (Tip h fl)   = putWord8 1 >> put h >> put fl
    put Nil          = putWord8 2

    get = do tag <- getWord8
             case tag of
               0 -> liftM3 Bin get get get
               1 -> liftM2 Tip get get
               2 -> return Nil
               _ -> fail "Data.HashMap.Common: Decoding error: unknown tag"

However this requires access to the constructors which is only possible if:

You add these instances to unordered-containers. Which unfortunately adds a dependency on cereal.

Export the constructors from a new Data.HashMap.Unsafe module. This module can be marked as {-# LANGUAGE Unsafe #-} so that users of Safe modules can't use this module. Then users like me can write the (orphan) instances in their own applications.

Do you have a preference?
Regards,
Bas

Sorry for not getting back to you earlier. I wasn't sure how to handle this request. I don't think (1) is an option. We can either expose the internals (through Data.HashMap.Strict.Internal say) or export two functions, fromListWithHash and toListWithHash. I don't think we can make the latter two fuse so I don't know if they're sufficient for your needs.

It seems like this was merged in, but then the constructors were hidden again in a later release. I will send a new pull request which exposes just the minimal set of constructors needed to write these instances.
Even then the instances look a little nasty, because we need to write one for GHC's array, but it causes a huge speedup which is definitely worth the nasty orphans.
{-# LANGUAGE DeriveGeneric      #-}
{-# LANGUAGE MagicHash          #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE UnboxedTuples      #-}

import           Control.Monad         (replicateM)
import           Data.Binary
import           Data.HashMap.Internal
import           GHC.Exts              (Int (..), indexArray#, newArray#,
                                        sizeofArray#, unsafeFreezeArray#,
                                        writeArray#, (+#), (<#))
import           GHC.Generics          (Generic)
import           GHC.ST                (ST (..), runST)

deriving instance Generic (Leaf k v)
deriving instance Generic (HashMap k v)

instance Binary a => Binary (Array a) where
    put (Array arr#) = do
        put (I# (sizeofArray# arr#))
        go 0#
      where
        go i# = case i# <# sizeofArray# arr# of
            0# -> return ()
            _  -> case indexArray# arr# i# of
                (# x #) -> put x >> go (i# +# 1#)

    get = do
        I# len# <- get
        list    <- replicateM (I# len#) get
        return $ runST $ ST $ \s# ->
            case newArray# len# undefined s# of
                (# s1#, marr# #) -> case go 0# marr# list s1# of
                    s2# -> case unsafeFreezeArray# marr# s2# of
                        (# s3#, arr# #) -> (# s3#, Array arr# #)
      where
        go _  _     []       s# = s#
        go i# marr# (x : xs) s# =
            case writeArray# marr# i# x s# of
                s'# -> go (i# +# 1#) marr# xs s'#

instance (Binary k, Binary v) => Binary (Leaf k v)
instance (Binary k, Binary v) => Binary (HashMap k v)

I'm completely changing the internal representation so if we expose the current one, everything will just break in the next release.
Do we have a good understanding why toList doesn't work well? It's writing in terms of build/foldr fusion so it should fuse with a consumer like mapM_.

I chatted a bit with @dcoutts about this. He thinks we could get the traversals to fuse, but we need the API to expose a way to not recomputing the hashes e.g. by exporting fromListWithHash and toListWithHash (perhaps with an unsafe prefix).

Seems to me that a toListWithHash should be able to fuse fine. It also seems plausible that we could write a fusable fromListWithHash.

Hi. I badly needed Binary instance for HashMap, so I incorporated all files from HashMap-<IP_ADDRESS> into my project and added the following modules, based on @jaspervdj post
module Data.HashMap.Internal
  (
    HashMap(..)
  , Array(..)
  , Leaf(..)
  )
  where

import Data.HashMap.Base
import Data.HashMap.Array

```Haskell

{-# LANGUAGE DeriveGeneric      #-}
{-# LANGUAGE MagicHash          #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE UnboxedTuples      #-}
module Data.HashMap.Binary where
import           Control.Monad         (replicateM)
import           Data.Binary
import           Data.HashMap.Internal
import           GHC.Exts              (Int (..), indexArray#, newArray#,
sizeofArray#, unsafeFreezeArray#,
writeArray#, (+#), (<#))
import           GHC.Generics          (Generic)
import           GHC.ST                (ST (..), runST)
deriving instance Generic (Leaf k v)
deriving instance Generic (HashMap k v)
instance Binary a => Binary (Array a) where
put (Array arr#) = do
put (I# (sizeofArray# arr#))
go 0#
where
go i# = case i# <# sizeofArray# arr# of
0# -> return ()
_  -> case indexArray# arr# i# of
(# x #) -> put x >> go (i# +# 1#)
get = do
    I# len# <- get
    list    <- replicateM (I# len#) get
    return $ runST $ ST $ \s# ->
        case newArray# len# undefined s# of
            (# s1#, marr# #) -> case go 0# marr# list s1# of
                s2# -> case unsafeFreezeArray# marr# s2# of
                    (# s3#, arr# #) -> (# s3#, Array arr# #)
  where
    go _  _     []       s# = s#
    go i# marr# (x : xs) s# =
        case writeArray# marr# i# x s# of
            s'# -> go (i# +# 1#) marr# xs s'#

instance (Binary k, Binary v) => Binary (Leaf k v)
instance (Binary k, Binary v) => Binary (HashMap k v)

Let it be there as a ready-to-go temporal solution.

My main concern with this concept is that an adversary could very easily give us a bogus serialization, with hashes that don't match, etc. Is cereal intended to be used only with trusted data? If this is for a function to be used in a trusted context only, that's fine.

We would also need this for a project. At least here, the binary data are trusted, so it would be fine and much faster than the current solution.

My PR https://github.com/haskell-unordered-containers/unordered-containers/pull/283 seems useful in the context of this issue since it exposes the internal modules. Reviews and feedback are very welcome! :)


Added notebook for Introduction of world inflation

Added notebook for Introduction of world inflation, no change to master code file

to be added after maria's update


Add optional queryType field in console

Describe the issue
with ... as query results in other queryType, without the option to return the response (queryType = select)

The backend already supports the queryType parameter, the frontend does not.
Reporter
Laurens

this should work without explicitly setting this value, shouldn't we fix the backend code instead

I think users should have the option available to overrule the framework trying to figure out if there is a result required, in case the framework makes a wrong decision.


Discontinue deprecated way of providing logs dir

Description
Discontinue the deprecated way of providing/overriding the data directory for kafka. Going forward, we should be using
kafka_broker_custom_properties for the same.
kafka_broker_custom_properties:
    log.dirs: dir1,dir2

Fixes # (issue)
Type of change

[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[x] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[x] This change requires a documentation update

How Has This Been Tested?
molecule --debug converge -s mtls-ubuntu
Test Configuration:
Docker based molecule scenario.
Checklist:

[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] Any dependent changes have been merged and published in downstream modules
[ ] Any variable changes have been validated to be backwards compatible

Also, can we point this to earlier branches? Code from 6.0.x onwards has this comment of deprecation.

Also, can we point this to earlier branches? Code from 6.0.x onwards has this comment of deprecation.

Typically we keep the deprecated functionality for a one major version so that users have sufficient time to migrate.


nodePackages.{git-standup, pnpm}: Remove from nodePackages

Description of changes
Both of these packages are already maintained in other places inside nixpkgs. There's no reason to keep them in here, so drop them. Note that the pnpm version that I replaced nodePackages.pnpm with is the same version, so there should be no breakage there.

Things done

Built on platform(s)

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

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

[ ] sandbox = relaxed
[ ] sandbox = true

[x] Tested, as applicable:

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

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

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

[x] Fits CONTRIBUTING.md.

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

Result of nixpkgs-review pr 322580 run on x86_64-linux 1

2 packages failed to build:

modrinth-app
modrinth-app-unwrapped

Yeah, apparently modrinth-app should use pnpm_8. Fixed in the last commits.

Result of nixpkgs-review pr 322580 run on x86_64-linux 1

2 packages built:

modrinth-app
modrinth-app-unwrapped


Override the x-component directive

Hello
Because our toolchain depends on more and more packages it could be nice to permits the overriding of the custom element name x-component. An example need is quoted in #21 ;-)
I found this change do the job:
 ...
  let tagName = Alpine.store('alpinejs-component.tagName');
  if( ! tagName )
    tagName = 'y-component';
  if (window.customElements.get(tagName)) {
    return
  }

  customElements.define(tagName, ComponentWrapper)
 ...

then before loading the plugin we can set another tag name like "z-component" with
Alpine.store('alpinejs-component.tagName', 'z-component');
Alpine.plugin(component)

I can purpose a PR if you agree with this proposal ;-)
Thanks & cheers

Perhaps this proposition is not compatible with CDN use, but I did not find another way :-(

I'm asking here what's the right way to pass settings to a plugin.

Hello @Cyrille37, thanks for taking the time to write this up.
I'm not a fan of the approach shown, relying on the store is not something I have interest in. I like how the project is built. In a way it's independent, it just uses Alpine JS to make using the underlying JavaScript easier.
If you can find a way that allows users to pass in an override within Alpine.plugin(component), then I'd be interested. As it stands, your best bet is to clone the project, modify it and then upload it to NPM. Ideally, making note of the existing, original package.

You could use the @component directive as an alternative.

Wanna give this #28 a spin? @Cyrille37

Yes, that's it :-)

You could use the @component directive as an alternative.

Unfortunately Laravel Blade has appropriated the symbol @ :(
 <div x-data @component template="person" x-data="{ item: person }"></y-component>

Throw a ErrorException: Undefined property: Illuminate\View\Factory::$startComponent
I really think a custom component name is mandatory to be compatible with different frameworks. The PR #28 will do the job, and I'll be able to use a namespaced name like "<alpinejs:component />" ;-)
Thanks for code & discussion <3

The PR #28 will do the job, and I'll be able to use a namespaced name like "<alpinejs:component /

Sadly, namespaced name is not compatible :
Uncaught DOMException: CustomElementRegistry.define: 'alpine:component'
is not a valid custom element name

No no, you can render components in Blade with @component. It was removed from the documentation a few years back but it should still be supported.


[model] what is the mesh vertex size

Please, before submitting a new issue verify and check:

[ x ] I tested it on latest raylib version from master branch
[ x ] I checked there is no similar issue already reported
[ x ] My code has no errors or misuse of raylib

Issue description
hi! i am building a game engine with c and raylib and i want to use this library for optimizing meshes : https://github.com/zeux/meshoptimizer
so i am using obj models and they are not indexed and this library need an indexed mesh, and also i need an indexed mesh to implement LOD
this library has some functions for indexing a mesh:
size_t index_count = face_count * 3; std::vector<unsigned int> remap(index_count); // allocate temporary memory for the remap table

size_t vertex_count = meshopt_generateVertexRemap(&remap[0], NULL, index_count, &unindexed_vertices[0], index_count, sizeof(Vertex));

meshopt_remapIndexBuffer(indices, NULL, index_count, &remap[0]);
 meshopt_remapVertexBuffer(vertices, &unindexed_vertices[0], index_count, sizeof(Vertex), &remap[0]);

so i put this code into my game engine and i set the vertex size to sizeof(float) and i got some weird effects with my mesh, so i submite an issue in this lib repo and the guy there said that the vertex size should not be 4bytes its 12 or even more;
so i have started expirementing with the vertex size i put 12 and a lot other values and i have started searching in the rlgl.h but it never give me the correct value;
can any one give me the correct size of a mesh vertex;
thanks
Environment
pc, fedora 34, opengl 2.1, an old inte integrated graphics ship
Issue Screenshot

Code Example
 for (int i = 0; i < g_model.model.meshCount; i++) {
    unsigned int vertex_size = sizeof(float)*3+1; //12+2*9-1 ;
    size_t index_count = g_model.model.meshes[i].triangleCount * 3;

    unsigned int *indices = malloc(sizeof(unsigned int) * index_count);
    g_model.model.meshes[i].indices = (unsigned short *)malloc(sizeof(unsigned short) * index_count);

    unsigned int *remap = malloc(sizeof(unsigned int) * index_count); // allocate temporary memory for the remap table
    size_t vertex_count = meshopt_generateVertexRemap(remap, NULL, index_count, g_model.model.meshes[i].vertices, index_count, vertex_size);

    float *vertices = malloc(vertex_size * vertex_count);

    meshopt_remapIndexBuffer(indices, NULL, index_count, remap);

    meshopt_remapVertexBuffer(vertices, g_model.model.meshes[i].vertices, index_count, vertex_size, remap);

    for (unsigned short j = 0; j < index_count; j++) {
      g_model.model.meshes[i].indices[j] = (unsigned short)indices[j];
      printf("indices_%d: %d\n", j, indices[j]);
    }

    g_model.model.meshes[i].vertices = vertices;
  }

okay thanks;

after hours of work trying to make this function from this library work i gave up;
and i made this tiny function in 5 minutes that does the job like charm;
  for (int i = 0; i < g_model.model.meshCount; i++) {

    unsigned int index_count = g_model.model.meshes[i].triangleCount * 3;
    g_model.model.meshes[i].indices = malloc(sizeof(unsigned short) * index_count);

    for (unsigned int j = 0; j < index_count; j++) {

      assert((int)index_count <= g_model.model.meshes[i].triangleCount * 3);

      Vector3 vertex = (Vector3){g_model.model.meshes[i].vertices[j * 3], g_model.model.meshes[i].vertices[j * 3 + 1],
                                 g_model.model.meshes[i].vertices[j * 3 + 2]};
      Vector3 vertex_compare;
      unsigned int vertex_index = j;

      for (unsigned int a = 0; a < j; a++) {
        vertex_compare = (Vector3){g_model.model.meshes[i].vertices[a * 3], g_model.model.meshes[i].vertices[a * 3 + 1],
                                   g_model.model.meshes[i].vertices[a * 3 + 2]};
        bool is_index_found = !Vector3Distance(vertex_compare, vertex);
        vertex_index = a * is_index_found + vertex_index * !is_index_found;
        if (is_index_found)
          break;
      }

      g_model.model.meshes[i].indices[j] = vertex_index;
      printf("indices_%d = %d\n", j, vertex_index);
    }

    for (short j = 0; j < 30; j++)
      printf("vertex_count_%d = %d\n", i, g_model.model.meshes[i].vertexCount);
  }

after all thank you for your time trying to debug my code
and thank you for this amazing library


APU Support and additional mappers

Any chance you could add APU support and/or the mappers needed for games such as Super Mario Bros 3?

I'm not actively working on this project. Feel free to add support for these if you're interested.

Thank you for the response. I was just asking because I actually got this emulator running on iOS. If I do end up adding support for those things I will contribute back to this project.

Cool that you got it ported to iOS! Is it on Github? Although i’m glad you chose MedNES, there are more mature NES emus out there with better mapper support and APU. Have you considered porting those?

I will most likely try and port another one as well. Here is the iOS port for MedNES:
https://github.com/0-Blu/MedNES-iOS

Nice work!
Closing the issue, as it's unlikely I'll work on apu or more nappers.


As an Issuer, I want my default Portal to make me the only one able to replace an Attestation

What does this PR do?
This PR allows default Portal to make me the only one able to replace an Attestation
Related ticket
Fixes #716
Type of change

[x] Chore
[ ] Bug fix
[ ] New feature
[ ] Documentation update

Check list

[x] Unit tests for any smart contract change
[ ] Contracts and functions are documented

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 94.69%. Comparing base (e99f776) to head (dfd09fb).
Report is 21 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #717      +/-   ##
==========================================
+ Coverage   92.07%   94.69%   +2.62%
==========================================
  Files          30       31       +1
  Lines         492      509      +17
  Branches      112      118       +6
==========================================
+ Hits          453      482      +29
+ Misses         39       27      -12

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


[Chatllama] Is the training correct?

llama_model.generate returns (llama_model.py, line 545):
generated_tokens.append(next_token)
and saved to sequences called by (actor.py, line 210).
Above generates max_length tokens which is set in (actor.py, line 208):
max_length = states.shape[1] + max_completion
Above code takes the length of the input tokens (states) and max_completion. But, line 216 we have:
actions = sequences[:, states.shape[1] :]  # noqa E203
which means actions is taken as the last max_collection tokens of sequences.
Shouldn't actions be the entire generated_tokens and sequences should be states + " " + generated_tokens?

following this thread - that might cause critical errors. Hopefully we get a response soon

Hi @menandro Yes you are right, the mistake was made because when porting to HF we also used the generate of HF and it also returns the input sequence while in llama_model.py the generate only returns the completion.
We will fix it as soon as possible and test for consistency.
Thanks for pointing this out.


[WIP] Profiler Encode / Decode

My biggest concern is this PR is likely to be massive since it is touching many things. Also, breaking this into components will allow us to parallelize this work.
I might suggest breaking this out into:

StructuredColProfiler Encode.
StructuredColProfiler decode.
BaseProfiler Encode.
4.StructuredProfiler Encode \ decode.
UnStructuredProfiler Encode \ decode.

raise NotImplementedError()


Playground/scenes/Alien doesn't play its morph targets

Bug repro on sandbox:
Using Alien
Expected result:
Morph target and skeletal animation channels play.
Current result:
Only skeletal animation channels play.

Hello this is expected as the sandbox follows GLTF spec and only start the first animation
You can do something like that to force gltf to start ALL animations:
https://github.com/BabylonJS/Website/blob/c9fa4efa45ab52719c2e10e6f80b5d22d059710d/Demos/ChibiRex/index.js#L12

Sorry I didn't make it clear but the Alien asset contains a single animation that has channels for both morph target and skeletal animations.

OK pinging @bhgary

Good find. This is a regression from fixing #3846. I have a local fix, but I want to add some tests to make sure it stays fixed.


Course website is down

It looks like the course website is down.

Hi @hieplpvip ,
Our university was recently the victim of a cyberattack and as a result a number of resources hosted on it are temporarily unavailable until service is restored. Ideally the website should be coming back up within the next couple of days but we don't have an exact timeframe.

An archive is available on the Wayback machine in the meantime https://web.archive.org/web/20210402001507/security.cs.rpi.edu/courses/binexp-spring2015/

Course website connectivity has been restored sometime in the past hour.


favorites server button not styled properly

Describe the bug
The favorites server button is not styled by this theme properly, and it looks bad.
Screenshots

Unless this is currently in A/B testing I'll be marking this as wontfix as it falls outside of scope


inventory items, donations and update

When "line items" in donations are updated, table "inventory item"  does not changed.
They are changing only when creating new donation.

can you include some instructions on the steps to reproduce this?

I think he is saying that when you edit/update a donation we don't run the intake! method on it to update the inventory items in the storage locations.

@seanmarcia, you are right.
But intake! method will not work properly for "edit" .

@IlinDmitry @seanmarcia Ah! OK I understand.
Given the new directions that this is going, it would probably make sense to refactor this slightly, maybe to make more flow-focused instead of specific action focused. (ie. intake! and dispense! methods that track the in-flow and out-flow of inventory, respectively.
If they aren't already, they should probably also be moved to the StorageLocation model, as well, since that's the one that is most directly responsible for this flow.

There are methods intake! and remove! The main problem is not about that.
For example:

Create donation X: line items: item A, quantity 10
Inventory items will be: item A, quantity 10
Create donation Y: line items: item A, quantity 5
Inventory items will be: item A, quantity 15
You edit donation X: line items: item A, quantity 20
Inventory items should be: item A, quantity 25

If you'll use intake! method, inventory items would be not 25, but 35.
I added new method edit! and tests


Incorrect type in cloudformation GetTemplateOutputTypeDef

Describe the bug
The TemplateBody parameter in mypy_boto3_cloudformation.type_defs.GetTemplateOutputTypeDef is currently typed as str. This is incorrect - the template is returned as an OrderedDict (that itself contains nested lists and OrderedDicts).
I see this API is explicitly referred to here: https://github.com/youtype/mypy_boto3_builder/blob/a02f73ec5dc433e65bba44c2a08db688ac3d4762/mypy_boto3_builder/botocore_stubs_static/handlers.pyi#L77
But I don't know if that's in any way relevant.
To Reproduce
Steps to reproduce the behavior:

Install boto3-stubs[...]
Run mypy/pyright on the following code sample

import boto3
from mypy_boto3_cloudformation.client import CloudFormationClient
from typing_extensions import reveal_type

cfn: CloudFormationClient = boto3.client("cloudformation")
response = cfn.get_template(StackName="copilot-vpc-service")
template = response["TemplateBody"]

reveal_type(template)

Actual output
❯ mypy test.py
test.py:9: note: Revealed type is "builtins.str"
Success: no issues found in 1 source file

Expected output
❯ mypy test.py
test.py:9: note: Revealed type is "collections.OrderedDict[str, Any]"
Success: no issues found in 1 source file

Additional context
Arch Linux, Python 3.10.8.
Record of installed dependencies inside a freshly created virtualenv:
❯ pip --version
pip 22.3.1 from /tmp/boto-stubs/venv/lib/python3.10/site-packages/pip (python 3.10)

❯ pip install mypy boto3 'boto3-stubs[cloudformation]' typing-extensions
Collecting mypy
  Using cached mypy-0.991-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (18.2 MB)
Collecting boto3
  Using cached boto3-1.26.34-py3-none-any.whl (132 kB)
Collecting boto3-stubs[cloudformation]
  Using cached boto3_stubs-1.26.34-py3-none-any.whl (50 kB)
Collecting typing-extensions
  Using cached typing_extensions-4.4.0-py3-none-any.whl (26 kB)
Collecting mypy-extensions>=0.4.3
  Using cached mypy_extensions-0.4.3-py2.py3-none-any.whl (4.5 kB)
Collecting tomli>=1.1.0
  Using cached tomli-2.0.1-py3-none-any.whl (12 kB)
Collecting botocore<1.30.0,>=1.29.34
  Using cached botocore-1.29.34-py3-none-any.whl (10.3 MB)
Collecting s3transfer<0.7.0,>=0.6.0
  Using cached s3transfer-0.6.0-py3-none-any.whl (79 kB)
Collecting jmespath<2.0.0,>=0.7.1
  Using cached jmespath-1.0.1-py3-none-any.whl (20 kB)
Collecting botocore-stubs
  Using cached botocore_stubs-1.29.34-py3-none-any.whl (46 kB)
Collecting types-s3transfer
  Using cached types_s3transfer-0.6.0.post5-py3-none-any.whl (17 kB)
Collecting mypy-boto3-cloudformation<1.27.0,>=1.26.0
  Using cached mypy_boto3_cloudformation-1.26.11.post1-py3-none-any.whl (64 kB)
Collecting python-dateutil<3.0.0,>=2.1
  Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
Collecting urllib3<1.27,>=1.25.4
  Using cached urllib3-1.26.13-py2.py3-none-any.whl (140 kB)
Collecting types-awscrt
  Using cached types_awscrt-0.16.1-py3-none-any.whl (15 kB)
Collecting six>=1.5
  Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Installing collected packages: mypy-extensions, urllib3, typing-extensions, types-awscrt, tomli, six, jmespath, types-s3transfer, python-dateutil, mypy-boto3-cloudformation, mypy, botocore-stubs, botocore, boto3-stubs, s3transfer, boto3
Successfully installed boto3-1.26.34 boto3-stubs-1.26.34 botocore-1.29.34 botocore-stubs-1.29.34 jmespath-1.0.1 mypy-0.991 mypy-boto3-cloudformation-1.26.11.post1 mypy-extensions-0.4.3 python-dateutil-2.8.2 s3transfer-0.6.0 six-1.16.0 tomli-2.0.1 types-awscrt-0.16.1 types-s3transfer-0.6.0.post5 typing-extensions-4.4.0 urllib3-1.26.13

Though of course instead of an OrderedDict, it should probably be Mapping.

It may be worth creating a more customised TypedDict that includes all of the known top-level keys for a template, such as Resources, Outputs, etc.

Thank you for the report!
As I see, auto-generated boto3 docs are correct: https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/cloudformation.html#CloudFormation.Client.get_template
So it might be an issue with my generator, or probably some kind of runtime injection from botocore. I will try to fix it today.

Yes, botocore returns TemplateBody processed with json_decode_template_body, even though botocore schemas reference the same TemplateBody StringShape. Fixed in mypy-boto3-cloudformation 1.26.35
Please update and let me know if the fix works as it should for you!

@vemel Wow, thanks for such a fast response! I'm on Christmas break now so it'll probably be a couple of weeks before I get a chance to test. Thank you though :)


pull request for e2e test at 12/26/2016 22:56:09

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


maybe some bugs?

In grid_encode.py, log2 in Python is not exactly same with std::log2 in C++. This can lead to a mismatch in scale in some cases.
The jt.nn.softplus is not the same as the softplus in PyTorch. I don't know if this will cause any problems.
In GridEncode, JNeRF implementation doesn't have the loss scale while tcnn has it (with loss_scale=128). This will cause gradient disappearance.
When computing alpha in sdf, JNeRF uses safe_clip(0.0, 1.0). I think clamp_(0.0, 1.0) should be used.
The cumprod function in jittor is unsafe! Have a look at PyTorch implementation or mine in Jeuralangelo.
JNeRF doesn't have the weight norm but I found it in Jittor's source. I don't know why.

I met No.3 error，loss increases sharply during training. do you have any solution to fix it?

I met No.3 error，loss increases sharply during training. do you have any solution to fix it?

refer to my code, it might help you.


Address issue Solutions Defense: #527

Address issue: Clearing Operations Area GRG not labeling where expected
(https://github.com/ArcGIS/solutions-defense/issues/527)
Changing the minimum bounding geometry to use RECTANGLE_BY_AREA instead
of RECTANGLE_BY_WIDTH seems to provide the required result

Change already merged as part of this PR https://github.com/Esri/solutions-geoprocessing-toolbox/pull/656


Allow to hide private message content from notifications

Most of users have totally disabled chrome notifications because they don't like that anyone who come can see them private message content. (I don't like either)
But now, most are unreachable because it was the only way to know we have a new message (except the little number displayed on one of lot of little buttons in the task bar)

Interesting; it'd be technically quite easy to add a setting to only show limited information about private messages in the desktop notifications (the sender, e.g. "New private message from Alice Example" or maybe recipients if it's a group PM, e.g. "New private message from Alice Example to you and Bob Example").  Do you think that's the right design to solve your problem?

That sounds like a good solution. I've had that issue too.

yep, that feature makes sense as well.
In terms of implementation, we can add an if statement in the appropriate part of static/js/notifications.js, and then the rest of the complexity is just adding a setting.  The guide in http://zulip.readthedocs.io/en/latest/new-feature-tutorial.html should be pretty complete for the data flow part of the implementation; as a result I think this would be a reasonable project for a new contributor.

Uhm, is this issue still being worked on?

I think so, in https://github.com/zulip/zulip/pull/2637

And in fact, I just merged that today.  Thanks @jeremyclement for articulating a great feature idea, and @prabod for implementing it.  I think a lot of folks will enjoy using this one :)


Any plans to publish npm package?

Are there currently any plans to publish this as an NPM package? I believe it would depend on #44 . Since, I want to use it in my Vue component, what would be the recommended way to use it?

right now we are refactoring this repo, and there are no plans to publish as NPM package, so i am closing this issue ~


Reorganize specs repo

Codecov Report

Merging #439 (18c69df) into master (b1b37f5) will increase coverage by 23.0%.
The diff coverage is 68.3%.

@@            Coverage Diff            @@
##           master    #439      +/-   ##
=========================================
+ Coverage    13.6%   36.7%   +23.0%
=========================================
  Files          69     154      +85
  Lines        3752   11088    +7336
  Branches     1374    4259    +2885
=========================================
+ Hits          513    4072    +3559
- Misses       2618    6403    +3785
+ Partials      621     613       -8

Impacted Files
Coverage Δ

modules/src/events.rs
0.0% <0.0%> (ø)

modules/src/ics02_client/events.rs
0.0% <ø> (ø)

modules/src/ics02_client/msgs.rs
0.0% <0.0%> (ø)

modules/src/ics02_client/raw.rs
0.0% <0.0%> (ø)

modules/src/ics03_connection/error.rs
13.6% <0.0%> (-19.7%)
:arrow_down:

modules/src/ics04_channel/error.rs
75.0% <ø> (+50.0%)
:arrow_up:

modules/src/ics04_channel/msgs/chan_close_init.rs
56.8% <ø> (ø)

modules/src/ics04_channel/msgs/chan_open_ack.rs
64.2% <ø> (ø)

...odules/src/ics04_channel/msgs/chan_open_confirm.rs
61.9% <ø> (ø)

modules/src/ics04_channel/msgs/chan_open_init.rs
67.0% <ø> (ø)

... and 285 more

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 be001eb...18c69df. Read the comment docs.


slide content wrap issue

content from a previous slide is visible on current slides (boxed in green here)
not why sure. trying to add margin or something to fix it, but still no luck

seems the whole slide is offset to the right

added styles to visualize the problem

http://recordit.co/Td4qok9u2B

Without code can't say much, but it seems like css and implement problems (not slider). Make sure you reset styles (margins), especially if slider markup is ul > li.

I had the same problem. Adding padding: 0; to the ul fixed it. <ul class="glide__track" style='padding:0;'>


Allow creating, saving as and loading json files

Can we have the ability to..

create new json files in the filesystem
save json files under a different name
load json files if one is already open
create new json objects if a json file is not open and save them later

For the first one, as far as I know there is no way to add intregration in the FileSystem panel. I haven't looked into whether there is a feature request in the engine itself yet.

@hnOsmium0001 you could do something like this.. https://godotengine.org/asset-library/asset/313


Home page

Create a simple homepage listing all courses.
Mockup

Added to look like this

Looks good. One small is that the navbar in fluid layout and the body is in the fixed layout.
Can you keep nav contents in a container instead of a container-fluid?

done

done.


CUDA OOM when using "ddp" mode in training

🐛 Bug
When i use ddp, i got this CUDA out of memory error.
But it works when using dp mode in same batch size.. I don't understand this situation.
And why is there a memory stack to GPU 0? Although i don't use GPU 0, There is a lot of memory consumption.
Please reproduce using the BoringModel
 trainer = Trainer(fast_dev_run=False, gpus=args.gpu, max_epochs=args.epoch, distributed_backend='ddp', logger=tb_logger)  # distributed_backend='dp')
 trainer.fit(model=model, train_dataloader=train_loader, val_dataloaders=val_loader)

To Reproduce
Use following BoringModel and post here

Environment
Note: Bugs with code are solved faster ! Colab Notebook should be made public !

IDE: Please, use our python bug_report_model.py template.

Colab Notebook: Please copy and paste the output from our environment collection script (or fill out the checklist below manually).

You can get the script and run it with:
wget https://raw.githubusercontent.com/PyTorchLightning/pytorch-lightning/master/tests/collect_env_details.py
# For security purposes, please check the contents of collect_env_details.py before running it.
python collect_env_details.py

PyTorch Version (e.g., 1.0): 1.6.0
Pytorch-lightning: 1.2.10
OS (e.g., Linux): Ubuntu 18.04
How you installed PyTorch (conda, pip, source): conda
Python version: 3.x
CUDA/cuDNN version:10.2

Additional context

Hey @choieq,
Would it be possible for you to reproduce this behaviour with the BoringModel ? Or share some code ?
We can't help you with more details.
Best,
T.C

Hey @choieq,
Would it be possible for you to reproduce this behaviour with the BoringModel ? Or share some code ?
We can't help you with more details.
Best,
T.C

Hi @tchaton
The code is much relative internal codes.. It is hart to translate to colab.
I can share only model definition code.
https://colab.research.google.com/drive/19w29h2MEGbmdX6kcSpaBSPP_IsD-bf9J?usp=sharing
Any some idea is would help me.
Thanks,

I am having an identical extremely annoying issue when using gptneo-1.3b from huggingface on 8 A100s with ddp turned on. This means that I can't turn on any of the advanced plugins as well (like FairScale or DeepSpeed) since they rely on ddp. (My models seem to train quite fine with just dp)

I can try to provide a reproducible example but it seems that with every model I try, "ddp_sharded" and "ddp" massively blow up memory as compared to "dp".

@sualehasif That would be great! Will look into it on priority!

Here is some code where you can choose to use your favorite dataset:
`import csv
import json
import sys
import shutil
import os
import subprocess
import time
import msgpack
import numpy as np
import torch
from torch import nn
import torch.nn.functional as F
from torch import optim
import transformers
from transformers import GPT2TokenizerFast, GPTNeoModel
from torch.utils.tensorboard import SummaryWriter
import pytorch_lightning as pl
from pytorch_lightning import Callback
from pytorch_lightning.plugins import DeepSpeedPlugin
from pytorch_lightning.plugins import DDPPlugin
from pytorch_lightning.plugins import DDPShardedPlugin
hyperparams = dict(
num_gpus = 7,
prompts_per_gpu = 1,
# batches_per_macro = 100,
batches_per_step = 8,
k = 1,  # should be >=1 since one of the k is always the right link
peak_lr = 2e-5,
warmup_period = 0.05
)
class Tokenizer:
def init(self):
self.tokenizer = GPT2TokenizerFast.from_pretrained('EleutherAI/gpt-neo-1.3B')
self.tokenizer.padding_side = "left"
self.tokenizer.pad_token = self.tokenizer.eos_token
def __call__(self, texts, pad=True):
    return_tensors = "pt"
    if pad == False:
        return_tensors = None
    tokens = self.tokenizer(
            list(texts),
            add_special_tokens=True,
            truncation=True,
            padding=pad,
            return_tensors=return_tensors,
    )['input_ids']
    return tokens

class Dataset(torch.utils.data.Dataset):
'Characterizes a dataset for PyTorch'
def init(self, data):
self.tokenizer = Tokenizer()
self.data = []
    # TODO: pick your favorite dataset and add it to data.

def __len__(self):
    'Denotes the total number of samples'
    return 128

def __getitem__(self, index):
    'Generates one sample of data'
    return self.tokenizer([self.data[index]], pad='max_length').squeeze(0), torch.tensor(index)

class EModel(nn.Module):
def init(self):
super().init()
self.model = GPTNeoModel.from_pretrained('EleutherAI/gpt-neo-1.3B')
def forward(self, tokens):
    hidden_states = self.model(tokens, return_dict=True).last_hidden_state
    embeddings = F.normalize(hidden_states, p=2, dim=1)
    return embeddings

from torch.optim.lr_scheduler import _LRScheduler, warnings
class LinearSchedulerWithWarmup(_LRScheduler):
def init(
self,
optimizer: torch.optim.Optimizer,
num_training_steps: int,
beg_step: int = 0,
num_warmup_steps: int = 0,
last_epoch: int = -1,
verbose: bool = False
):
if not isinstance(num_training_steps, int) or not num_training_steps >= 0:
raise ValueError("num_training_steps must be an integer greater than 0")
    if not isinstance(num_warmup_steps, int) or not num_warmup_steps >= 0:
        raise ValueError("`num_warmup_steps` must be an integer greater than 0")

    self._num_warmup_steps = num_warmup_steps
    self._num_training_steps = num_training_steps
    self._beg_step = beg_step

    super().__init__(optimizer, last_epoch=last_epoch, verbose=verbose)

def lr_lambda(self, current_step: int) -> int:

    #assert current_step >= self.beg_step
    assert current_step <= self._num_training_steps

    relative_curr_step = current_step - self._beg_step
    relative_num_training_steps = self._num_training_steps - self._beg_step

    if relative_curr_step < self._num_warmup_steps:
        return float(relative_curr_step) / float(max(1, self._num_warmup_steps))
    return max(
        0.0,
        float(relative_num_training_steps - relative_curr_step) /
        float(max(1, relative_num_training_steps - self._num_warmup_steps))
    )

def get_lr(self):
    if not self._get_lr_called_within_step:
        warnings.warn("To get the last learning rate computed by the scheduler, " "please use `get_last_lr()`.")

    return [base_lr * self.lr_lambda(self.last_epoch) for base_lr in self.base_lrs]

class TrainableModel(pl.LightningModule):
def init(self):
super().init()
self.completion_model = EModel()
# not used during training, only during inference
def forward(self, batch):
    return self.completion_model(batch)

def training_step(self, batch, batch_idx):
    prompts_tokens, link_idxs = batch
    query_vectors = self.completion_model(prompts_tokens)

    return query_vectors

def training_step_end(self, batch_parts):
    v = batch_parts
    logits = torch.matmul(v, v.T)

    labels = torch.arange(len(v)).to(self.device)
    loss = F.cross_entropy(logits, labels)

    return loss

def configure_optimizers(self):
    optimizer = transformers.AdamW(self.parameters(), lr=hyperparams['peak_lr'])
    scheduler = LinearSchedulerWithWarmup(
        optimizer,
        num_warmup_steps=int(hyperparams['warmup_period'] * hyperparams["num_gradient_updates"]),
        num_training_steps=hyperparams["num_gradient_updates"],
    )

    return {
        'optimizer': optimizer,
        'lr_scheduler': {
            'scheduler': scheduler,
            'interval': 'step',
            'frequency': 1,
        }
    }

class CUDACallback(Callback):
def on_train_epoch_start(self, trainer, pl_module):
# Reset the memory use counter
torch.cuda.reset_peak_memory_stats(trainer.root_gpu)
torch.cuda.synchronize(trainer.root_gpu)
self.start_time = time.time()
def on_train_epoch_end(self, trainer, pl_module, outputs):
    torch.cuda.synchronize(trainer.root_gpu)
    max_memory = torch.cuda.max_memory_allocated(trainer.root_gpu) / 2 ** 20
    epoch_time = time.time() - self.start_time

    max_memory = torch.tensor(max_memory, dtype=torch.int, device=trainer.root_gpu)
    epoch_time = torch.tensor(epoch_time, dtype=torch.int, device=trainer.root_gpu)

    torch.distributed.all_reduce(max_memory, op=torch.distributed.ReduceOp.SUM)
    torch.distributed.all_reduce(epoch_time, op=torch.distributed.ReduceOp.SUM)

    world_size = torch.distributed.get_world_size()

    print(f"Average Epoch time: {epoch_time.item() / float(world_size):.2f} seconds")
    print(f"Average Peak memory {max_memory.item() / float(world_size):.2f}MiB")

TODO: initialize the dataset with data
dataset=Dataset()
dataloader = torch.utils.data.DataLoader(dataset,
batch_size=hyperparams['num_gpus'],
shuffle=True,
num_workers=os.cpu_count())
sharded_plugin = DDPShardedPlugin()
model = TrainableModel()
trainer = pl.Trainer(
gpus=hyperparams['num_gpus'],
num_nodes=1,
accelerator='ddp',
accumulate_grad_batches=hyperparams['batches_per_step'],
log_every_n_steps=1,
callbacks=[CUDACallback()],
progress_bar_refresh_rate=1,
max_epochs=1,
profiler="simple",
precision=16,
plugins=DDPShardedPlugin,
# plugins='deepspeed_stage_2'
)`

@sualehasif @choieq Something to be noted that the effective batch size for ddp and ddp based plugins is batch_size x num_gpus. That could be the issue for OOM.

Yep. I know that but there seems to be no way to avoid that?

Sure, you could run the minGPT model on several plugins and benchmark

I can't run minGPT with GPT-Neo-1.3B. It gives the same OOM errors even on 8A100s.

You are also logging log_every_n_steps=1 every step

Hi
Not what OP reported, but in case you land here because you had OOM with PL 1.3.x, it may be because you were running a script on gpu index > 0 (not the first gpu) and PL would still allocate some memory on GPU 0. If you had another experiment running on GPU 0 it could throw OOM. The issue was fixed in #8165. Afaik it did not exist prior to 1.3.x.

Hi @sualehasif, are you still facing the issue? As @awaelchli mentioned there was a fix merged recently regarding memory allocation to the first index GPU.
Do give it a try again and would like to know the CUDACallback numbers as well.

@sualehasif @choieq Something to be noted that the effective batch size for ddp and ddp based plugins is batch_size x num_gpus. That could be the issue for OOM.

What is meaning of this sentence??
The effective batch size is batch size * num_gpus ?
Could you explain that?


Seems like it should work similar to the dep|glide|godep tools, just without the grep -v /vendor/ stuff.
https://github.com/heroku/heroku-buildpack-go/blob/3254d7ba568b8142ca22f0891f9e7a68cec1c31b/bin/test#L48-L57

currently without a vendor folder my Procfile is ignored resulting in "Procfile declares types -> (none)" and no Dyno attached. Running go build --mod=vendor locally and committing my vendor folder, then web process in Procfile gets started. Should it also work without vendoring dependencies before pushing to heroku?

Now part of v100.


tabIndex prop results in double tabs required for editor focus

Ticket due diligence

[x] I have verified that the issue persists under ReactQuill v2.0.0-beta.2
[ ] I can't use the beta version for other reasons

ReactQuill version

[ ] master
[x] v2.0.0-beta.2
[ ] v2.0.0-beta.1
[x] 1.3.5
[ ] 1.3.4 or older
[ ] Other (fork)

I'm having an issue setting the tabIndex prop on the editor. It seems that the tabIndex is being set on both the container and the editor.  What ends up happening is a tab from the previous element will in fact focus the container, but it takes another tab to focus the editor and to actually be able to type into the editor. I have verified that manually removing the tabIndex from the container so that it only exists on the editor results in the correct focus functionality.
Double tabIndex

Container with focus

Manually removed container tabIndex (works)

Are you sure this happens with beta.2? I am trying to reproduce here, but unsuccessfully:
https://codesandbox.io/s/react-quill-623-double-tabindex-9geus
Can you fork this and tweak it until it reproduces the issue? Thanks!


Add support for multiple target frameworks incl. new Oracle ArrrayBinding feature

This PR is adding:

support for net452, net461, and netstandard2.0
optional support for Oracle array binding
optional support for flush on process exit

Most targets are tested against Oracle 18c XE.

Seems to build now but still need to test against live Oracle connection.
Added support for multiple frameworks: .NET4.5.2, .NET4.6.1, .NETStandard2.0(Original), and .NETCore2.1
For all Runtimes x86 and x64 versions.

Should now be oke.

Hey, that's an awesome work!
I'll comment some things on this PR but looks amazing, thank you!

Some general comments:

Still had no time to test against Oracle: Maybe tomorrow I will test it on Oracle 18c XE.
No Linux support (yet): All Runtime targets are win-x(86|64).
Please review the build.cake carefully: I'm new to Cake and changed a lot in this file.

Nice, I will have time to review all the stuff tomorrow, probably.
But will sending some PINGs here updating you with the progress.
Again, thanks for your time on it.

@lucascebertin Have done some code changes to get logging working in .NET 4.5.2 against Oracle 18c XE.
Also added new feature: Using oracle's array binding: Should be faster...
Do you want this in the same feature branch or a different one?
Kind regards,
Henry

I'm busy testing on my laptop with net452 against Oracle XE 18c.
With bindArrays = true: (New option)
Storing 10000 log events in: 22 (ms) to Oracle. ==> Only 534 are stored in Oracle!
With bindArray= false: (Current)
Storing 10000 log events in: 51 (ms) to Oracle. ==> Only 477 are stored in Oracle!
When I looked through the code of PeriodicBatchingSink it is dropping a lot of log messages!
If I want to use Serilog with Oracle logging for (kind of) Auditlog its useless if messages are being dropped!
Is there a way to tweak PeriodicBatchingSink that it logs all messages and does not drop anything?
Maybe I should ask this question on there Issuetracker...

When raising the queulimit to the amount of logmessages(10000):
With default batchPostingLimit on 50:
With bindArrays = true: (New option)
1fst run: Storing 10000 log events in: 354 (ms) to Oracle. ==> 10000 are stored in Oracle
2nd run: Storing 10000 log events in: 278 (ms) to Oracle. ==> 10000 are stored in Oracle
3rd run: Storing 10000 log events in: 250 (ms) to Oracle. ==> 10000 are stored in Oracle
With bindArray= false: (Current)
1fst run: Storing 10000 log events in: 267 (ms) to Oracle. ==> 10000 are stored in Oracle
2nd run: Storing 10000 log events in: 315 (ms) to Oracle. ==> 10000 are stored in Oracle
3rd run: Storing 10000 log events in: 336 (ms) to Oracle. ==> 10000 are stored in Oracle
With batchPostingLimit on 500:
With bindArrays = true: (New option)
1fst run: Storing 10000 log events in: 188 (ms) to Oracle. ==> 10000 are stored in Oracle
2nd run: Storing 10000 log events in: 245 (ms) to Oracle. ==> 10000 are stored in Oracle
3rd run: Storing 10000 log events in: 181 (ms) to Oracle. ==> 10000 are stored in Oracle
With bindArray= false: (Current)
1fst run: Storing 10000 log events in: 2677 (ms) to Oracle. ==> 10000 are stored in Oracle
2nd run: Storing 10000 log events in: 2309 (ms) to Oracle. ==> 10000 are stored in Oracle
3rd run: Storing 10000 log events in: 1003 (ms) to Oracle. ==> 10000 are stored in Oracle
With batchPostingLimit on 1000:
With bindArrays = true: (New option)
1fst run: Storing 10000 log events in: 198 (ms) to Oracle. ==> 10000 are stored in Oracle
2nd run: Storing 10000 log events in: 190 (ms) to Oracle. ==> 10000 are stored in Oracle
3rd run: Storing 10000 log events in: 213 (ms) to Oracle. ==> 10000 are stored in Oracle
With bindArray= false: (Current)
1fst run: Storing 10000 log events in: 6179 (ms) to Oracle. ==> 10000 are stored in Oracle
2nd run: Storing 10000 log events in: 6117 (ms) to Oracle. ==> 10000 are stored in Oracle
3rd run: Storing 10000 log events in: 7704 (ms) to Oracle. ==> 10000 are stored in Oracle
Note: I'm timing the "Log.CloseAndFlush();"!
So bind by Array is faster when using higher batchPostingLimit!
Point is that you don't know the amount of log messages you are going to write in front. So a bounded queue like PeriodicBatchingSink is using does not seem right.

Sorry for taking so long... I have another repo named Serilog.Sinks.Burst to try to solve your relates problem, could you try to use it if do not take a lot of your time on it?

@lucascebertin

Sorry for taking so long... I have another repo named Serilog.Sinks.Burst to try to solve your related problem, could you try to use it if do not take a lot of your time on it?

I will test Serilog.Sinks.Burst, but do you want the ArrayBinding code changes in this PR as well?

Sorry, yes, please. Add the ArrayBinding code!
I do not know Oracle a lot, there is retrocompatibility with lower versions?

I will test it some more and than Push it.
This article https://www.oracle.com/technetwork/topics/dotnet/o59odpnet-085168.html states that all supported versions of ODP.net support array binding. At least from version 11.1+.
I made this feature an option which is default off (false).
Thanks!

That's great!
If you need any help using burst sink, let me know!

Just pushed the Arraybinding feature. Tested it for .net452, net461, and netcoreapp2.1. There is a netstandard2.0 dll but I don't know how to (unit)test this.

First testing results with Serilog.Sinks.Burst used by Oracle (with Array binding):
Storing 1000000 log events in: 91571 (ms) to Oracle. With Batchsize: 1000
Storing 1000000 log events in: 89544 (ms) to Oracle. With Batchsize: 10000
Both store in Oracle is ok.
Testing the PeriodBatch (again) used by Oracle (with Array binding):
Storing 1000000 log events in: 103747 (ms) to Oracle. With Batchsize: 1000
Storing 1000000 log events in: 96357 (ms) to Oracle. With Batchsize: 10000
Notes:

PeriodBatch is using much more memory than Burst: +/- 470 MB against 70 MB!
The Log.CloseAndFlush() is not doing much anymore: Burst is to fast :-)!

Serilog.Sinks.Burst: Nicework!
Do you want to use Burst in this Serilog.Sinks.Oracle lib? And if so as an add on or a replacement?
Kind regards,
Henry

Was thinking about changing PeriodBatch for Burst... For now PeriodBatch is missing a lot of log records, right?
IMO, if we do not change it, we will let more people to suffer with this behaviour.
Would be nice to enable to inject the dependency, so the Sink just use it without knowing what is inside.
What you think about it?
Makes any sense?
BTW, thanks for the kind words about Burst!

Hi @lucascebertin,
Injecting sounds good. But which Sink as injectable: DatabaseSink to BatchSink or BatchSink to DatabaseSink? When using Action<...> just like you do in Burst it can be both.
Maybe use an ILogEventBatch(er?) interface?
Or when, in the future you want to support more kinds of transformations: ILogEventTransform(er?) interface.
With an ILogEventPersistence interface for the Database sinks?
You can think of splitting the Funneling, that is one LogEvent to multiple LogEvents, as one Transformer.
So you can create your own logging pipeline :-). Maybe too much?
Other topics:

Is it an idea that I do the same adding of Framework support for Burst in a PR for that Repository?
Then define the "blackbox' interface and decide which to inject?
Then make the OracleSink and/or BurstSink integrate through injection?

PS: How is this PR C# code looking? Any (global) review comments?
Kind regards,
Henry

Hey, all stuff talked here looks awesome!!
But I think that's a lot of work is already there, so, what you think to close the PR only using the Burst?
After that we can open other related issues and work on later.
Is this a good way?
If so, just push what you have and I will review it as soon as I can and get back to you with the considerations :).

Good points!
But at the pratical side: As you are also the owner/creator of Burst do you want to integrate it in this repo or as an extra nuget reference? If the later then the Burst repo also needs support for the same frameworks as in this PR too be compatible...?
I can add net452, net461, netstandard2.0 and netcoreapp2.1 support to Burst if you are open for it?

Burst was published... do you want to use it here when available?

Yes but in this PR or in a second one?

Makes more sense in another pull request, right?

Yes please a different PR.
Dome food for thoughts, what has your preference:
            // LogEvent ==> To List/Batch of Events ==> Batching (Period, Burst, ...) ==> Store in Database
            //      ILogEventSink      ==>     ILogEventBatchSink        ==>       ILogEventBatchStorageSink
            //                         ==> PeriodSinkWrapper, BurstSinkWrapper  ==>       OracleSink
            //
            // 1. Using BatchWrappers configured by enum
            Log.Logger = new LoggerConfiguration()
                            .WriteTo.Oracle(logConnectionString, batcher: Batcher.PERIOD, "LOG", null)
                            .CreateLogger();

            // 2. Using BatchWrappers configured by LoggerBatchConfiguration through extension(s)
            Log.Logger = new LoggerConfiguration()
                            .WriteTo.PeriodBatch(batchPostingLimit: 1000, queueLimit: 10000)
                                    .StoreTo.Oracle(logConnectionString, "LOG", bindArrays: true)
                            .CreateLogger();

            // 3. Using BatchWrappers configured by LoggerBatchConfiguration through Func<..> injection
            Log.Logger = new LoggerConfiguration()
                            .WriteTo.Sink((cfg) => cfg.UsePeriodBatch(...)
                                                         .UseOracle(...)
                                                         .CreateSink())
                            .CreateLogger();

            // 4. Other idea's? Combination(s)...

I have a first draft read with Serilog.Sinks.Oracle optinaly using Serilog.Sinks.Burst.
Default / Old way of using:
            Log.Logger = new LoggerConfiguration()
                            .MinimumLevel.Verbose()
                            .WriteTo.Oracle(logConnectionString, "LOG", null, batchPostingLimit: 1000, queueLimit: (int)AmountOfLogs)
                            .CreateLogger();

Test results:
1st run: Storing 100000 log events in: 51207 (ms) to Oracle.
2nd run: Storing 100000 log events in: 55008 (ms) to Oracle.
3rd run: Storing 100000 log events in: 49009 (ms) to Oracle.
Proposed / New way of using:
            Log.Logger = new LoggerConfiguration()
                                .MinimumLevel.Verbose()
                                .WriteTo.Batch((cfg) => cfg.UseBurstBatch()
                                                            .UseOracle(logConnectionString)
                                                            .CreateSink())
                                .CreateLogger();

Test results:
1st run: Storing 100000 log events in: 13495 (ms) to Oracle.
2nd run: Storing 100000 log events in: 13636 (ms) to Oracle.
3rd run: Storing 100000 log events in: 12948 (ms) to Oracle.
@lucascebertin
I've based my code on This PR which is not approved yet:
Should I add it to this or a new PR?
Kind regards,
Henry

Sorry for taking so long to give you an answer here.
I'm working a lot.
The new way proposed looks great IMHO, very elegant and flexible!
Please, add it here and we go on with this.
Thanks again!

No problem!
I'm also working a lot at the moment :-)
I've put the optional Burst usage under this PR.
Note that Linux will probably fail because Burst, with sort of the same build file fixes, also did.
But I don't know what/how to fix this.
Kind regards,
Henry

Hey, I fixed tests execution on Linux like on Burst...
Can I push that on your fork/branch?
If yes, I will need some permissions to push there...
Thanks

I could push my changes right now...
Sorry for doing that without asking you first.

I would like to suggest another approach for CreateSink, what you think about this?
public ILogEventSink CreateSink()
{
	switch (_batchConfig)
	{
		case PeriodicBatchConfig _:
		{
			var cfg = (PeriodicBatchConfig)_batchConfig;

			return new PeriodicBatchingSinkWrapper(lst =>
					_storageSinks.ToList().ForEach(async storage =>
						await storage.EmitBatchAsync(lst)),
				cfg.PostingLimit,
				cfg.Period ?? PeriodicBatchingSinkWrapper.DefaultPeriod,
				cfg.QueueLimit);
		}
		case BurstBatchConfig _:
		{
			var cfg = (BurstBatchConfig)_batchConfig;

			return new BurstSink((lst) => _storageSinks.ToList()
					.ForEach((storage) => storage.EmitBatch(lst)),
				cfg.EnableTimer, cfg.Interval, cfg.EnableBatchLimit, cfg.BatchLimit);
		}
	}

	throw new NotSupportedException("You must select a Batch configuration (Periodic, Burst, ...)!");
}

Sorry for late response. Busy with work.

I could push my changes right now...
Sorry for doing that without asking you first.
No problem. I've already pulled youre work.

I would like to suggest another approach for CreateSink, what you think about this?
Nice! Didn't know that one. I've changed it in the code.

Gone test now...

Test Results when running the ConsoleTester:
UseBurst with ArrayBinding:
1st: Storing 100000 log events in: 13253 (ms) to Oracle.
2nd: Storing 100000 log events in: 12092 (ms) to Oracle.
3td: Storing 100000 log events in: 11928 (ms) to Oracle.
Memory with all 3 runs arround 50 Mb.
UsePeriodicBatch without ArrayBinding:
1st: Storing 100000 log events in: 48233 (ms) to Oracle.
2nd: Storing 100000 log events in: 44539 (ms) to Oracle.
3td: Storing 100000 log events in: 41271 (ms) to Oracle.
Memory with all 3 runs arround 100 Mb with a max at 140 Mb.
Note:
I have one build warning in the code that I don't know how to fix. Your code suggestion didn't work because the action object throwed an nullreferenceexception.
Rest is fine.
I will check if build on AppVeyor succeeds...

Hey thanks to let me know!
I will check this today.

Hi together, I'm very interested in this library. I tried the Nuget package with ASP .NET core and Oracle 12c but unfortunately, it doesn't write anything to the database.
@lucascebertin , are there any plans when this PR is integrated and available on Nuget?

Hey @sandimschuh, as soon as we finish this review I'll integrate it and publish on nuget!

Hey @driekus77 , I just noticed that we have a _storageSinks on BatchLoggerConfiguration.cs...
Reading the code, I found a single line adding the OracleDatabaseBatchSink on it.
Could you explain to me why this list of storage sinks is needed, please?
Also, on BatchLoggerConfiguration, there is a method called UseOracle...
Would this be there considerating the purpose of the class?
I mean, looks like that we should add only batch stuff there.
There is any chance to rename the .WriteTo.Batch to Oracle and, inside the configuration level, we pass the arguments to something like:
Log.Logger = new LoggerConfiguration()
	.MinimumLevel.Verbose()
	.WriteTo.Oracle(cfg => cfg.UseBurstBatch()
            .WithSetup(logConnectionString)
            .CreateSink())
	.CreateLogger();

This should be easier to use, considering the sink name of this package.
I got a building warning about the lack of await inside an async method...
Just removed it and the warn is gone:
public ILogEventSink CreateSink()
{
	switch (_batchConfig)
	{
		case PeriodicBatchConfig _:
			{
				var cfg = (PeriodicBatchConfig)_batchConfig;

				return new PeriodicBatchingSinkWrapper(async /*<-- here the extra async*/ lst =>
						_storageSinks.ToList().ForEach(async storage =>
							await storage.EmitBatchAsync(lst)),
					cfg.PostingLimit,
					cfg.Period ?? PeriodicBatchingSinkWrapper.DefaultPeriod,
					cfg.QueueLimit);
			}
		case BurstBatchConfig _:
			{
				var cfg = (BurstBatchConfig)_batchConfig;

				return new BurstSink((lst) => _storageSinks.ToList()
						.ForEach((storage) => storage.EmitBatch(lst)),
					cfg.EnableTimer, cfg.Interval, cfg.EnableBatchLimit, cfg.BatchLimit);
			}
	}

	throw new NotSupportedException("You must select a Batch configuration (Periodic, Burst, ...)!");
}

And, at least, I would like to say sorry about this PR taking so long time to be completed.
I will put my hands on it, change some stuff and integrate it.

Added a few unit tests, changed the storage sink list to be a single objetct, renamed the UseOracle to WithSettings and some style and general refactors.
What you think about this way to use?
Log.Logger = new LoggerConfiguration()
	.MinimumLevel.Verbose()
	.WriteTo.Oracle(cfg =>
		cfg.WithSettings(logConnectionString)
		.UseBurstBatch()
		.CreateSink())
	.CreateLogger();

If you allow me, I can push my changes onto your repo/branch.

Hi @lucascebertin,
Your suggestions and fixes looks great. Only thing maybe is backwards compatiblity with older versions?
Just put youre changes to the repository. I've no problems with that.
Kind regards,
Henry

@driekus77, just pushed my code there... could you look there and tell me what you think about?
About backwards compatibility, I think thr tradeoff worth it.
We are turning the lib even more flexible, looking to the docs would be enough for old or new users. What you think?

Your refactoring looks great! Nice quality improvements.
I've tested again after pulling your changes: This time in Release without debugging!
UseBurstBatch:
Storing 100000 log events in: 12977 (ms) to Oracle.
Storing 100000 log events in: 12923 (ms) to Oracle.
Storing 100000 log events in: 14902 (ms) to Oracle.
Verified 300000 log records in Oracle XE.
UsePeriodicBatch (With default settings)
Storing 100000 log events in: 1673 (ms) to Oracle.
Storing 100000 log events in: 1613 (ms) to Oracle.
Storing 100000 log events in: 1906 (ms) to Oracle.
Verified 450 log records in Oracle XE: So most messages / events are dropped.
UsePeriodicBatch(batchPostingLimit: 1000, period: TimeSpan.Zero, queueLimit: (int)AmountOfLogs):
Storing 100000 log events in: 11566 (ms) to Oracle.
Storing 100000 log events in: 11589 (ms) to Oracle.
Storing 100000 log events in: 11641 (ms) to Oracle.
Verified 300000 log records in Oracle XE:
Without debugging PeriodicBatching is littlebit faster than BurstBatch but uses more memory: +/- 70 Mb vs. 23 Mb. And PeriodicBatching must be predefined with the amount of log events else To much of them will be dropped.
Kind regards,
Henry

Thanks for looking the changes and perf testing.
So, probably now we can integrate all the work and release it!
Do you agree?

I agree. The only possible blocker I can think of is that I did not test AdditionalDataColumns / CustomOptions?

No problem, I can test the additional data columns, custom options and add some unit tests for it. So, after that, lets integrate all the stuff!

CreateInsertArrayBindData  is not considering events with no StandardColumn defined (there is thing when add custom columns to the schema).
We need to consider that, otherwise that custom columns will receive null all the time.
I will try to fix that.

Ok, first draft about this fix:
public (string, Dictionary<string, object>) CreateInsertArrayBindData(IEnumerable<LogEvent> events)
{
	// Fill parameter values
	var parameterDictionary = new Dictionary<string, object>();

	foreach ( var ci in _columnsInfo)
	{
		object arrColData = null;
		if (ci.StandardColumn == StandardColumn.Level)
			if (ci.Type == typeof(string))
				arrColData = events.Select(s => s.Level.ToString()).ToArray();
			else
				arrColData = events.Select(s => (byte)s.Level).ToArray();
		else if (ci.StandardColumn == StandardColumn.TimeStamp)
			arrColData = events.Select(s => _columnOptions.TimeStamp.ConvertToUtc
				? s.Timestamp.DateTime.ToUniversalTime()
				: s.Timestamp.DateTime).ToArray();
		else if (ci.StandardColumn == StandardColumn.LogEvent)
			arrColData = events.Select(s => _properties.LogEventToJson(s)).ToArray();
		else if (ci.StandardColumn == StandardColumn.Exception)
			arrColData = events.Select(s => s.Exception?.ToString()).ToArray();
		else if (ci.StandardColumn == StandardColumn.Message)
			arrColData = events.Select(s => s.RenderMessage(_formatProvider)).ToArray();
		else if (ci.StandardColumn == StandardColumn.MessageTemplate)
			arrColData = events.Select(s => s.MessageTemplate.ToString()).ToArray();
		else if (ci.StandardColumn == StandardColumn.Properties)
			arrColData = events.Select(s => _properties.ConvertPropertiesToXmlStructure(s.Properties))
				.ToArray();
		else
		{
			var untypedArray = events
				.Select(x => x.Properties[ci.ColumnName])
				.Select(x => new {Data = x, Type = x.GetType()})
				.Select(x =>
					x.Type == typeof(ScalarValue)
						? ((ScalarValue) x.Data).Value.ToString()
						: Types.TryChangeType(x.Data, ci.Type, out var conversion)
							? conversion
							: DBNull.Value)
				.ToArray();

			var typedArray = Array.CreateInstance(ci.Type, untypedArray.Length);
			Array.Copy(untypedArray, typedArray, untypedArray.Length);

			arrColData = typedArray;
		}

		parameterDictionary.Add($"v_{ci.ColumnName}", arrColData);
	}

	return (_insertStatementForArrayBinding, parameterDictionary);
}

This should be enough to receive custom fields... I will refactor but if you have any thoughts, feel free to say!

That's it, just waiting for comments before integrate the work and publish!

Looks greath.
Currently I don't have time to (re)Test this. Maybe next week...

I'm going to integrate this work next week.
If you have some time to double check it, would be great but otherwise, no problem!

Sorry for delay.
Tested it with extra HOSTNAME column (Environment.MachineName in C#) and works OK!
Test results in Release without debugging:
1st:  Storing 100000 log events in: 11366 (ms) to Oracle.
2nd: Storing 100000 log events in: 10917 (ms) to Oracle.
3trd: Storing 100000 log events in: 11033 (ms) to Oracle.
So seems OK now.
Thanks for the refactor help and maybe till next time: Keep up the good work!
Kind regards,
Henry

That's great!
Until next weekend we'll have a release with this work!
Thanks!!


ScriptRuntimeException.ToString() should return InnerException information

The Core CLR's implementation of Exception.ToString() includes details about the InnerException. It would be nice if the ScriptRuntimeException.ToString() method did so as well. The alternative is to search out that specific exception type and write code specifically to examine the InnerException property and log it.

The problem is that Scriban is not a scripting engine that should give access to internal stack trace in normal mode (scriban scripts are usually used in end-user contexts, not by "developers").
But It's possible to do what you want, though it would require maybe to put a public static bool EnableDisplayInnerException {get; set;} on ScriptRuntimeException and change the ToString() method accordingly. PR welcome.


undelegatebw will fail if receiver RAM is full

When undelegating bandwidth from another account, if the account you are undelegating from does not have enough RAM the transaction will fail.
I do not understand why the receiver account not having enough RAM should prevent me from unstaking resources I have staked to it. As a result I have to buy RAM for the account I am unstaking from, which I can not get back.

Sorry for the delayed response. This issue appears to be related to a wax specific issue. Please re-open if that is not the case.


Faliure to find targets after upgrading to 0.3.0

After upgrading 0.2.2 to 0.3.0, it no longer works and I am not sure why.
CMake Error at /usr/share/cmake/CorrosionGenerator.cmake:203 (message):
  found no targets in 11 packages
Call Stack (most recent call first):
  /usr/share/cmake/Corrosion.cmake:1111 (_generator_add_cargo_targets)
  dependencies.cmake:25 (corrosion_import_crate)
  CMakeLists.txt:23 (include)

Even more strangely it fails when downgrading back to 0.2.2, even though the same code worked before????

It seems you are using an installed version of Corrosion with CMake >= 3.19. Could you check if you face the same issues when using corrosion as a submodule instead of as an installed package? Also it may be informative to run the configure stage with --log-level=Debug

I'm using CMake 3.24.3. --log-level=Debug was helpful, thanks for mentioning that.
-- Rust Toolchain: stable-x86_64-unknown-linux-gnu
-- Rust toolchain stable-x86_64-unknown-linux-gnu
-- Rust toolchain path /home/sam/.rustup/toolchains/stable-x86_64-unknown-linux-gnu
-- Rust Target: x86_64-unknown-linux-gnu
-- Cargo target x86_64-unknown-linux-gnu is an official target-triple
-- Installed targets: x86_64-pc-windows-gnu;x86_64-unknown-linux-gnu
-- Using Corrosion as a subdirectory
-- Parsed Target triple: arch: x86_64, vendor: unknown, OS: linux, env: gnu
-- Found 1 targets in package rat-in-a-tube
-- No relevant targets found in package rat-in-a-tube - Ignoring

I get the same result if using FetchContent
So, it seems Cargo.toml has to have a [lib] section with the crate type, or else nothing will be found.

For reference I am using this crate here.
Previously you could use corrosion_import_crate(MANIFEST_PATH riat/Cargo.toml) and then link riatc directly, but that no longer works.

Previously you could use corrosion_import_crate(MANIFEST_PATH riat/Cargo.toml) and then link riatc directly, but that no longer works.

That would surprise me. riat is just a rust library (produces only a .rlib artifact) with no staticlib or cdylib targets. Corrosion previously should have also just done nothing at all. The only thing that was added was exiting with a fatal error in case corrosion_import_crate was called and no suitable targets where found. The previous behaviour would have just been "silently do nothing".
Is it possible that there where other changes, e.g. converting the Cargo.toml from a workspace to a package toml? In that case corrosion may have just been picking up riatc directly if it was a workspace member.

Ohhh, I see.
I see the commits that did indeed chance it from a workspace to a package, so that is why it worked before.
Thanks for explaining things.


Authenticate Delete API method

The most significant changes in the code are related to the implementation of authentication and authorization mechanisms. The code now includes additional using directives for System, System.Text, and System.Text.Json namespaces, indicating that the updated code will be using classes or methods from these namespaces. A new block of code has been added to extract and deserialize the ClientPrincipal from the request headers, likely for authentication purposes. If the ClientPrincipal is not found in the headers, the function will return an "Unauthorized" response. Another block of code has been added to hash the username from the ClientPrincipal and compare it with the UserId and Provider from the first result of the query. If they do not match, the function will return an "Unauthorized" response. The response message for when no results are found from the query has been removed, suggesting that the function will no longer return a "Link not found" message when no results are found from the query.
List of changes:

Addition of using directives for System, System.Text, and System.Text.Json namespaces.
Addition of code to extract and deserialize the ClientPrincipal from the request headers.
Addition of code to hash the username from the ClientPrincipal and compare it with the UserId and Provider from the first result of the query.
Removal of the response message for when no results are found from the query.

Replaced by #44


Picovoice Console Issue:

pvporcupine._porcupine.PorcupineActivationError: Initialization failed:
[0] Picovoice Error (code 00000136)
[1] Picovoice Error (code 00000136)
[2] Picovoice Error (code 00000136)

is this error from the console? provide more details.

Closing issue as no action is to be done.


Call contract functions for asset attributes for spawnable meetup contract

@James-Sangalli: This PR includes the commit in PR #882 in order to support namespaces, so #882
should be merged first and this PR rebased (or updated) before merging.
@colourful-land you might be interested in: (A), (C) and (D).
This PR adds support for the standard spawnable meetup contract:

Calls smart contract functions to retrieve asset attribute values
Display most fields in the spawnable meetup contract

To add these quickly, there are a few limitations that should be fixed or improved in the near future:

The function-call-based asset attributes are only refreshed when the app is launched or becomes active
The token bundles displayed on the current screen don't automatically refresh when the function-call-based asset attributes changes. It does reflect the updated values if you go back and display the screen again. (doesn't affect the spawnable meetup contract because bundling is disabled)
Function calls aren't throttled
It doesn't reload values immediately when the asset definition changes
Bundling is disabled for the meetup contract

I noticed a few things:
A. The signature includes this: <ds:KeyName>Shankai</ds:KeyName> so the token card displays Shankai as the issuer
B. The static attributes stored in the token IDs in the contract are all 0-values except section
C. I've changed category and section to syntax="<IP_ADDRESS>.4.1.14<IP_ADDRESS>.27" to get them to be parsed correctly based on the value extracted from the token IDs. @James-Sangalli This might not be correct because we might have intended for the token IDs to have encode the category and section as ascii instead. Especially because the bitmask looks quite long for both category and section
D. The asset definition in the old repo (I couldn't access the new repo) is outdated. I've tested by modifying the function-based attributes to (note that the function name of the deployed code is getBuilding, not getBuildingName):
    <attribute-type id="expired" syntax="<IP_ADDRESS>.4.1.14<IP_ADDRESS>.7">
      <origin contract="holding-contract">
        <function>isExpired(<value ref="tokenID">uint256</value>)</function>
      </origin>
    </attribute-type>
    <attribute-type id="street" syntax="<IP_ADDRESS>.4.1.14<IP_ADDRESS>.15">
      <origin contract="holding-contract">
        <function>getStreet(<value ref="tokenID">uint256</value>)</function>
      </origin>
    </attribute-type>
    <attribute-type id="building" syntax="<IP_ADDRESS>.4.1.14<IP_ADDRESS>.15">
      <origin contract="holding-contract">
        <function>getBuilding(<value ref="tokenID">uint256</value>)</function>
      </origin>
    </attribute-type>
    <attribute-type id="state" syntax="<IP_ADDRESS>.4.1.14<IP_ADDRESS>.15">
      <origin contract="holding-contract">
        <function>getState(<value ref="tokenID">uint256</value>)</function>
      </origin>
    </attribute-type>

Output like this:

Also note that the buildingName thing has been fixed in the latest contract code

@James-Sangalli So we'll have to be careful with the contract + xml combination.

@James-Sangalli will you be doing the rebase/merge or do you want me to do it? There were no changes to #882 , so both rebase or merge should be clean.

Thanks. Noted. This can't merge until I get the new repo server working and tested against it (I'm getting the repo server to be namespace-𝑎𝑤𝑎𝑟𝑒).
The syntax for ABI was experimental and will change as I have a grasp of the full possible dataset in ABI.
I'm behind the schedule for both items. Self-blaming...

@hboon it has been merged

Thanks. Noted. This can't merge until I get the new repo server working and tested against it (I'm getting the repo server to be namespace-𝑎𝑤𝑎𝑟𝑒).

The syntax for ABI was experimental and will change as I have a grasp of the full possible dataset in ABI.

Ok. But just writing this in case the PR needs to be merged earlier for some reason:
We can still adjust the code to accept a different format for the ABI in XML after the merge. It should be a minor change.
The PR works with both default namespace and explicit namespace.
Then we can do a follow up with another PR to switch to the new repo server.

Gonna merge this, can make a seperate PR to account for any changes.

For posterity. This was for #869


Button to install the app

App needs to have a button which triggers popup "would you like to save this website to desktop as PWA" (I think it's browser-dependent).
Investigate if and when can we trigger that. It may be that browser will do it on their own. In such case, please add an entry in the footer "Installation" with description on how to do it from Chrome interface (aka. click menu, click on icon blah the press... - step by step instruction).

I believe this is not required with our current PWA strategy. We are targeting an online available website, where web-worker will install automatically.


v1.3.0 class-signature error for android_studio config

Expected Behavior
According to https://pinterest.github.io/ktlint/latest/rules/standard/#class-signature, both
class Foo3(
    a: Any,
    b: Any,
)

class Foo4(a: Any, b: Any)

should be accepted when ktlint_code_style is set to android_studio
Observed Behavior
My code style is set to android_studio. After updating to v1.3.0, all cases where we use formatting like the Foo3 example (parameters not on one line even though they would fit) are considered errors.
Steps to Reproduce
Copy
class Foo3(
    a: Any,
    b: Any,
)

to a project with code style android_studio and run ktlint.

No, our current ktlint version is 1.2.1. We do have a bit of a mix of class signatures in our 5 year old code base, but until now ktlint never complained.

Please provide concrete  examples and their respective .editorconfig configuration so that I can check what the problem is.  Please double check to run your example both with ktlint 1.2.1 and 1.3.0 with same .editorconfig.
I have no recollection of changing anything in the class-signature rule in the 1.3 release that could be related to this. Without stable reproduction I cannot help.

open class SecureStringPreference(
    private val sharedPreferences: SharedPreferences,
    private val key: String
) : BasicPreference<String>(sharedPreferences, key, ""), KoinComponent {

    override fun set(value: String) =
        sharedPreferences.edit {
            putString(key, value)
        }

    override fun get(): String {
        with(sharedPreferences) {
            return getString(key, "") as String
        }
    }
}

For this class, I get no errors with 1.2.1. With 1.3.0 I get the following:
SecureStringPreference.kt:19:5: No whitespace expected between opening parenthesis and first parameter name (standard:class-signature)
SecureStringPreference.kt:20:5: Single whitespace expected before parameter (standard:class-signature)
SecureStringPreference.kt:20:28: No whitespace expected between last parameter and closing parenthesis (standard:class-signature)
SecureStringPreference.kt:21:58: Super type should start on a newline (standard:class-signature)
.editorconfig is the same in both cases:
# https://editorconfig.org

[*.{kt,kts}]
ktlint_code_style = android_studio
max_line_length = 120
indent_size = 4

ktlint_standard_import-ordering = disabled
ktlint_standard_trailing-comma-on-declaration-site = disabled
ktlint_standard_trailing-comma-on-call-site = disabled
ktlint_standard_indent = disabled
ktlint_standard_function-signature = disabled
ktlint_standard_statement-wrapping = disabled

# Remove after updating to ktlint 1.2. Same line comments in lists will be allowed again then
ktlint_standard_value-argument-comment = disabled

ktlint_function_naming_ignore_when_annotated_with=Composable

# Don't allow any wildcard imports
ij_kotlin_packages_to_use_import_on_demand = unset

# Prevent wildcard imports
ij_kotlin_name_count_to_use_star_import = 99
ij_kotlin_name_count_to_use_star_import_for_members = 99

[*{Test,Robot,Mock}*.{kt,kts}]
ktlint_standard_max-line-length = disabled
ktlint_standard_binary-expression-wrapping = disabled
ktlint_standard_property-wrapping = disabled
ktlint_standard_wrapping = disabled
ktlint_standard_argument-list-wrapping = disabled
ktlint_standard_parameter-list-wrapping = disabled
ktlint_standard_function-literal = disabled

ktlint_function_naming_ignore_when_annotated_with=Test

As documented in https://github.com/pinterest/ktlint/releases/tag/1.3.0 the class-signature rule has been promoted from experimental to non-experimental. Your .editorconfig has not enabled the experimental rules. As of that the rule was not run with 1.2.1 version. Now with the 1.3.0 version the rule is run by default.
You can force the multiline code style of class Foo3 by setting following in .editorconfig:
ktlint_class_signature_rule_force_multiline_when_parameter_count_greater_or_equal_than = 1

I noted that your .editorconfig does not contain root = true as first line. This can impact performance as well as it might lead to pick up .editorconfig files which is stored in a parent directory of your project. That might not be what you want.
Also, I see ktlint_function_naming_ignore_when_annotated_with=Test for [*{Test,Robot,Mock}*.{kt,kts}]. May I enquire what your use case is for this?

Alright, that makes sense, thank you. I'll add the root = true.
We have a naming convention to start our instrumentation tests with an uppercase letter + number code (e.g. E0123) to make it easier to identify them across platforms and tester documentation. It didn't really seem worth renaming them all when the ktlint rule was added.

We have a naming convention to start our instrumentation tests with an uppercase letter + number code (e.g. E0123) to make it easier to identify them across platforms and tester documentation. It didn't really seem worth renaming them all when the ktlint rule was added.

I see. It is an inventive usage for ktlint_function_naming_ignore_when_annotated_with=Test.


New update: 1.4.1, update please.

Will they update to version 1.4.1?
yes, please.
Thank you!

I don't know. I hope to god that they do. but with all the updates coming out, they are likely working as hard as they can. Each update code changes and it will crash upon connection. yada, yada, basically, it takes a couple of weeks for just one update, and with how many came out, plus the dlc's, its gonna take a while. I only got to use it for three hours before my wii u updated and I haven't been able to use it since the 30th, which sucks, because this is the greatest thing since sliced bread.

I haven't bothered updating anything due to constant version updates. When we finally hit a stable patch with no more DLC i will try to update.

@ashieo1130
You can use this for editing you're savegame:
http://www.marcrobledo.com/savegame-editors/zelda-botw/

@joffnerd It's been 2 weeks without any updates to the game, do you think they have it at a stable release yet or are you going to wait a little longer? Just curious is all :)

@micha1987 where do i get my savegame on the sd card? Thanks!

I use Savemii Mod.

I think I've heard of it, could You send me a working like with a working
version?  I appreciate it!
On Mon, Jan 1, 2018 at 12:19 AM, micha1987<EMAIL_ADDRESS>wrote:

I use Savemii Mod.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/joffnerd/botw-trainer/issues/184#issuecomment-354637151,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AhFwfsBnU2P0smX8atUfolsdSCsF0e01ks5tGGrxgaJpZM4RHwYS
.


Harden emote parsing

Pull request checklist:

[x] CHANGELOG.md was updated, if applicable

Description
Messages I tested with
START OUT OF RANGE
/fakemsg @emotes=84608:9-10<EMAIL_ADDRESS>PRIVMSG #pajlada :foo bar
SINGLE CHARACTER EMOTE
/fakemsg @emotes=84608:0-0<EMAIL_ADDRESS>PRIVMSG #pajlada :foo bar
TWO CHARACTER EMOTE
/fakemsg @emotes=84608:0-1<EMAIL_ADDRESS>PRIVMSG #pajlada :foo bar
END OUT OF RANGE
/fakemsg @emotes=84608:0-15<EMAIL_ADDRESS>PRIVMSG #pajlada :foo bar
RANGE BAD
/fakemsg @emotes=84608:15-2<EMAIL_ADDRESS>PRIVMSG #pajlada :foo bar
MESSAGE FROM KARL-POLICE
/fakemsg @badge-info=;badges=glhf-pledge/1;client-nonce=5d2627b0cbe56fa05faf5420def4807d;color=#1E90FF;display-name=oldcoeur;emote-only=1;emotes=84608:0-7;first-msg=1;flags=;id=7412fea4-8683-4cc9-a506-4228127a5c2d;mod=0;room-id=62300805;subscriber=0;tmi-sent-ts=1623429859222;turbo=0;user-id=139147886;user-type=<EMAIL_ADDRESS>PRIVMSG #test :test
To test with these messages, join #test and #pajlada
Fixes #3487
Not adding a changelog entry as it doesn't fix an actual user-discoverable bug

I haven't added a test for the             // Emote coords are out of range from the modified character positions error case because I can't figure out a fake message for it

Issue with tests failing has to do with the MockApplication class symbols being merged/broken somehow - the fix is to put it in an anonymous namespace, making sure no other build object has access to it.
Will push a fix when another PR has been merged into the main branch

Tests should work now :-)


SDL2 + Fullscreen + Resolution Change = Mangle

Would do a screenshot, but ctrl+print saves off the the last pre-resized frame, and alt+tab 'fixes' it.
Simplest repro steps: options->fullscreen->change res low to high->note cut out areas of the screen.

This looks to have been corrected.


[Feature Request]: Define title heading depth

Right now Title generates an <h1> tag. This would make the TOC break the correct semantic flow of the document unless the TOC title was the title of the document and the only <h1> on the page. I think I can adjust this by using a custom transformer (maybe? I've only been looking at this module since earlier this afternoon).
It might be good to provide a way to define the Title's heading level output so it's easier to integrate the TOC into the document.

Hello!
Yes, a custom transformer would allow this (here's the default one).
But I'm supportive of a TitleDepth option on Extender and Transformer that would control this, with the default being 1.
If you're willing to taking a stab at a PR for that, I'll be happy to help push it over the line.
(If you don't want any "table of contents" title at all, you can also use Inspect and RenderList directly, and then add it to the doc directly. See README and Transformer code for examples.)

Sweet! I'll get started.


LastErrorCode enum is missing 'invalid_file' variant

Here is an error that results in failed deserialization error:
{
  "id": "...",
  "object": "vector_store.file",
  "usage_bytes": 0,
  "created_at":<PHONE_NUMBER>,
  "vector_store_id": "...",
  "status": "failed",
  "last_error": {
    "code": "invalid_file",
    "message": "The file could not be parsed because it is too large."
  },
  "chunking_strategy": {
    "type": "static",
    "static": {
      "max_chunk_size_tokens": 800,
      "chunk_overlap_tokens": 400
    }
  }
}

Thanks for the issue, it seems like API has new changes which are not yet documented.
Do you mind reporting this on https://github.com/openai/openai-openapi/pull/300 too?

I've done as you suggested. Meanwhile, an interesting fact. I did a tests run to check the fix in #252 and it came up with the following:
failures:

---- vector_store_files::tests::vector_store_file_creation_and_deletion stdout ----
Error: JSONDeserialize(Error("unknown variant `invalid_file`, expected one of `internal_error`, `file_not_found`, `parsing_error`, `unhandled_mime_type`", line: 9, column: 26))

failures:
    vector_store_files::tests::vector_store_file_creation_and_deletion

Though it happened on the first run only.

Fix is released in v0.24.0