text:
readonly() breaks reactivity of Map

Version
3.0.0-rc.5
Reproduction link
https://codepen.io/liquid-solid/pen/ZEWzqpX?editors=0012
Steps to reproduce
Open CodePen and see console logs, or you can see an example below:
const {
  readonly,
  reactive,
  isReactive
} = Vue

const map = reactive(new Map())
const roMap = readonly(map)

map.set(4, { foo: 'bar' })

const mapItem = map.get(4)
const roMapItem = roMap.get(4)

console.log(`
Is map reactive?         - ${isReactive(map)}
Is map item reactive?    - ${isReactive(mapItem)}
Is RO map reactive?      - ${isReactive(roMap)}
Is RO map item reactive? - ${isReactive(roMapItem)}
`)

This code outputs:
Is map reactive?         - true
Is map item reactive?    - true
Is RO map reactive?      - true
Is RO map item reactive? - false

What is expected?
I expect that objects from a reactive Map will always be reactive, even if the Map is readonly.
What is actually happening?
When I get an item from readonly reactive Map it loses reactivity.

Is it a bug? If not, i don't understand how to work with maps, sets and other structs with new reactivity system. So far, plain objects still seem to be the best solution for storing data as an associative array due to the intricacies of the reactivity system.

Items from a readonly map will be wrapped with toReadonly:
https://github.com/vuejs/vue-next/blob/a0e34cee4a09a14548bf1e78f4a82702e9d40717/packages/reactivity/src/collectionHandlers.ts#L255-L268
and in https://composition-api.vuejs.org/api.html#readonly it says

A readonly proxy is deep: any nested property accessed will be readonly as well.

so it's not a bug

@unbyte I know that readonly works deeply. This is the desired behavior, I really need me to pass the map to other parts of the application as read-only. The problem is that nested objects in the map lose their reactivity.
I have prepared another example on CodePen, or you can see it right here:
const {
  readonly,
  reactive,
  watchEffect
} = Vue;

const map = reactive(new Map())
const roMap = readonly(map);

// Sync flush for debug purposes
const watchEffectSync = (callback) => watchEffect(callback, { flush: 'sync' })

// Try with default object
{
  console.log('--- Default object')
  map.set(0, { foo: 'bar' });
  const item = map.get(0);
  const roItem = roMap.get(0);

  watchEffectSync(() => {
    console.log('Watch effect item:', item);
  })
  watchEffectSync(() => {
    console.log('Watch effect ro item:', roItem);
  })

  console.log('Mutating item...');

  item.foo = 'Updated value';

  console.log('Ro item (not in watchEffect):', roItem);
}

// Try with reactive object
{
  console.log('--- Reactive object')
  map.set(1, reactive({ foo: 'bar' }));
  const item = map.get(1);
  const roItem = roMap.get(1);

  watchEffectSync(() => {
    console.log('Watch effect item:', item);
  })
  watchEffectSync(() => {
    console.log('Watch effect ro item:', roItem);
  })

  console.log('Mutating item...');

  item.foo = 'Updated value';

  console.log('Ro item (not in watchEffect):', roItem);
}

Console output:
"--- Default object"
"Watch effect item:" Object {
  foo: "bar"
}
"Watch effect ro item:" Object {
  foo: "bar"
}
"Mutating item..."
"Watch effect item:" Object {
  foo: "Updated value"
}
"Ro item (not in watchEffect):" Object {
  foo: "Updated value"
}
"--- Reactive object"
"Watch effect item:" Object {
  foo: "bar"
}
"Watch effect ro item:" Object {
  foo: "bar"
}
"Mutating item..."
"Watch effect item:" Object {
  foo: "Updated value"
}
"Ro item (not in watchEffect):" Object {
  foo: "Updated value"
}

As you can see, the watchEffect of an object from a read-only map never fires again when the object changes, but when the roItem itself is displayed, there is a change, therefore, reactivity does not work.
The point is not how isReactive works, but that roItem is really not reactive.

Do you mean that, there are one reactive map and one readonly map pointing to the same raw map, from which you get item and roItem pointing to the same object, and what you expect is that when you edit item, the watcher callback for roItem should be triggered (because you can't edit readonly roItem directly)?
If so, this result is as expected I think.
The ability to make objects reactive of Vue 3 comes from Proxy, which intercepts operations on objects so Vue 3 can play a role when objects change. And Vue 3 creates two different Proxy on objects for reactive mode and readonly mode. So if you edit on one of the proxies, the other one can't know the mutation, so the watcher wounldn't be triggered. It has nothing to do with whether it's in a readonly map, just because it is not the proxy which intercepted the change.
here is an example.
 const {
    readonly,
    reactive,
    watchEffect,
    isReactive
  } = Vue

  const test = {
    some: 'value'
  }

  const reactiveTest = reactive(test)
  const readonlyTest = readonly(test)

  watchEffect(() => {
    console.log('reactive changed:', reactiveTest.some)
  }, {
    flush: 'sync'
  })

  watchEffect(() => {
    console.log('readonly changed', readonlyTest.some)
  }, {
    flush: 'sync'
  })

  reactiveTest.some = 'new value'

I hope I haven't misunderstood what you mean.

@unbyte  I think you did not quite understand me. In your example, it goes like this:
// Create some raw object
const test = { some: 'value' };

// Create reactive wrapper of RAW test
const reactiveTest = reactive(test)

// Create readonly wrapper of RAW test
const readonlyTest = readonly(test)

// Mutating object via reactive wrapper
reactiveTest.some = 'new value'

And in my example, it works a little differently:
// Create some raw object
const test = { some: 'value' };

// Create reactive wrapper of RAW test
const reactiveTest = reactive(test)

// Create readonly wrapper of REACTIVE test
const readonlyTest = readonly(reactiveTest)
//                            ^^^^^^^^^^^^

// Mutating object via reactive wrapper
reactiveTest.some = 'new value'

I am making readonly wrapper under reactive wrapper of object, not plain object. And in this case, when test is a plain object, reactivity works:
watchEffect(() => console.log('Value of reactive:', reactiveTest.some));
watchEffect(() => console.log('Value of readonly(reactive):', readonlyTest.some));

// mutating...
reactiveTest.some = 'new value';

Output:
"Value of reactive:" "value"
"Value of readonly(reactive):" "value"
"Value of reactive:" "new value"
"Value of readonly(reactive):" "new value"

As you can see, the reactivity of a plain object is not lost when wrapping it in readonly.

Finally I understand what you mean. I'm so foolish.
But the items got from maps are not like this
const reactiveTest = reactive(test)
const readonlyTest = readonly(reactiveTest)

Instead, they are more like this
const reactiveTest = reactive(test)
const readonlyTest = readonly(test)

because readonly(reactive) works on not items but map itself.
and of course readonly(reactive) works well if it's used on items as below
  const {
    readonly,
    reactive,
    watchEffect
  } = Vue

  const map = reactive(new Map())
  const roMap = readonly(map)

  const watchEffectSync = (callback) => watchEffect(callback, { flush: 'sync' })

  map.set(0, { foo: 'bar' })
  const item = map.get(0)
  const roItem = readonly(item)
  //             ^^^^^^^^^^^^^

  watchEffectSync(() => {
    console.log('Watch effect item:', item.foo, item)
  })
  watchEffectSync(() => {
    console.log('Watch effect ro item:', roItem.foo, roItem)
  })

  console.log('Mutating item...')

  item.foo = 'Updated value'

  console.log('Ro item (not in watchEffect):', roItem)

// both watcher callbacks are triggered

Go back to the problem that you really want to solve (I'm so sorry, I seem to have taken the focus of the problem off center), how about use functions instead of pass a readonly map?
   function deepClone(obj = {}) {
    if (typeof obj !== 'object' || obj == null)
      return obj
    const result = obj instanceof Array ? [] : {}
    for (const key in obj)
      if (obj.hasOwnProperty(key))
        result[key] = obj[key]
    return result
  }

  const {
    readonly,
    reactive,
    watchEffect
  } = Vue

  const map = reactive(new Map())

  const watchEffectSync = (callback) => watchEffect(callback, { flush: 'sync' })

  map.set(0, { foo: 'bar' })

  function useMap() {
    return {
      getMapItem(key) {
        return deepClone(map.get(key))
      }
    }
  }

  some()

  function some() {
    const { getMapItem } = useMap()
    watchEffectSync(() => {
      const value = getMapItem(0)
      console.log(value)
      value.foo = 'another'
    })
  }

  map.get(0).foo = 'hello'

@unbyte Hmm. I will try to describe my case more precisely. Here's another example on CodePen.
In short, it has the following functions for creating a repository:
function useUnsafeStore() {
  const state = reactive({
    users: new Map([
      ['default', { name: 'initial value' }]
    ])
  });

  // `reactive` for computed refs unwrapping
  const getters = reactive({
    usersIds: computed(() => [...state.users.keys()])
  })

  const mutations = {
    updateUserName(id, value) {
      state.users.get(id).name = value;
    }
  }

  return {
    state,
    getters,
    mutations
  }
}

function useReadonlyStore() {
  return readonly(useUnsafeStore());
}

The useUnsafeStore function gives the state, getters and mutations as they are, and nothing prevents you from changing the state of the store (or even replacing mutations) from outside this store, which is not good. The useReadonlyStore function returns the same store wrapped from head to toe (deeply) in a readonly Proxy, which is intended to ensure that the store is not modified from the outside.
Next, I create two different applications: one with unsecured storage, the other with readonly, and, as you can see from the example, reactivity in the second case is lost, although the element itself inside the Map does change, as can be seen after applying $forceUpdate.

Oh I get it.
It's obviously not going to meet your expectations. You see, you call the useUnsafeStore twice and it returns two completely unrelated maps...

authors: LiquidSolid unbyte


text:
perf(compiler-core): add perf optimization to parseText

Description
Added a function to get min positive number, instead of use Math.min + filter inside parseText.
Chrome 78.0.3904.87 comparison
console.time('mathMin')
Math.min(...[ 1, 10, 2, -1 ].filter(n => n !== -1))
console.timeEnd('mathMin')

console.time('getMinPositive')
getMinPositive(1, 10, 2, -1)
console.timeEnd('getMinPositive')

// mathMin: 0.04296875ms
// getMinPositive: 0.002685546875ms

Thanks for the PR - however, my original comment actually was referring more about the fact that we are doing multiple indexOf calls to find the end for current text. I think the Math.min refactor, while beneficial, is not likely the bottleneck.

Thanks for the PR - however, my original comment actually was more about the fact that we are doing multiple indexOf calls to find the end for current text. I think the Math.min refactor, while beneficial, is likely not the bottleneck.

I've tried some ways to remove the multiple indexOf from the parser, and I found some ways to do this and get samples running 10.000 times, using performace.now inside Chrome 78.0.3904.87:

Creating an regex and using string search or match method: 0.022190999987651595 - Clearly not worthy
Making a for loop with the items of indexOf (<, open, and, maybe, ]]>): 0.0012569999817060307 - This removes multiple indexOf, but, I think, under the table, the problem continues
Getting the minimum index over all indexOf (the way I made at first time): 0.0012734999763779342

I think indexOf is the quickest way to archive this. Do you have any idea what I can do to solve this problem in a proper way?

source: gharchive/pull-request

repo: vuejs/vue-next

license: MIT

license_type: permissive

license_source: github-api


text:
beforeRouteUpdate not triggered but component is reused

Version
3.1.3
Reproduction link
https://codesandbox.io/s/vue-router-update-keep-alive-lgi16
Steps to reproduce
Click on dashboard
-> click item 1
created()/ mounted() hooks are fired and are setting some variable based on query param
-> click Go back or Dashboard
-> click Item 2
created() or mounted() are not fired again, because the router-view is wrapped within keep-alive.
Therefore, the component already exists and will not be re-created.
But, since the route changes, from dashboard to item, beforeRouteEnter is called instead of beforeRouteUpdate. But beforeRouteEnter can not modify existing state (or even access it).
What is expected?
Since the component is reused, I would expect beforeRouteUpdate to be fired.
In my situation, if my query param changes, I need to fetch new data from the backend and store them in local state. As of now, there is no easy way to detect that my param changes.
I would need to add a watcher on $route, but that watcher will run in every other child component since my component is not destroyed.
What is actually happening?
beforeRouteEnter is fired

With this situation, if I keep using keep-alive , it makes it pretty hard to detect when my page is openend again.
Since my watchers would still run even when I am visiting other child-pages, there is a lot of overhead of introducing a $route watcher that performs some action when my query params change. In addition, I would need to make sure that the action only triggers when I am actually seeing this sub-page (requiring my component to be aware of its route, which feels wrong).
I think that in cases with existing components, Vue Router should fire beforeRouteUpdate even when the route changes.
I do understand though that technically the route is changing so it makes sense to call beforeRouteEnter instead of Update.
But then, it would help if the second beforeRouteEnter, that is called when then component already exists, has access to this.

I do understand though that technically the route is changing so it makes sense to call beforeRouteEnter instead of Update.

I agree. Semantically, Enter is the corret hook.

But then, it would help if the second beforeRouteEnter, that is called when then component already exists, has access to this.

I tend to agree but am unsure wether this is easily doable in the current architecture. @posva might be able to judge this better.

Since my watchers would still run even when I am visiting other child-pages, there is a lot of overhead of introducing a $route watcher that performs some action when my query params change.

I don't agree that there's noteworthy overhead. For one, rout events are user-triggered events and don't fire in rapid succession.
Furthermore, each watcher can check wether the new route is thew one it's supposed to be triggered by, and if it's not, just do nothing. That's a one-liner and as cheap ans any op can be.
Alternative, you could use keep-alive's activated and deactivated lifecycle hooks to manage an internal flag which the watcher can use to know wether the component is active and therefore, wether it should run.

But then, it would help if the second beforeRouteEnter, that is called when then component already exists, has access to this.

I don't think making the hook behave differently based on whether the component is reused or not, is a good thing because it's inconsistent and would lead to confusing behavior.
In addition to the solution given by @LinusBorg by using a flag, you could also stop the watchers on deactivated and read them on activated
Router hooks depend on the route being reused, they are not dependent of the components being reused. This is intentional, as you could use component lifecycle hooks instead otherwise

Hey both of you, thanks for your answers.
I did not know about activated and deactivated.
I was missing exactly those hooks. Thanks for pointing that out.
I looked through the lifecycle hook graph but they were not there, should have checked the API docs as well.

Router hooks depend on the route being reused, they are not dependent of the components being reused. This is intentional, as you could use component lifecycle hooks instead otherwise
That makes sense. Especially now that I know there does indeed exist a hook that I can use to check that my component is reused (by being activated again).

source: gharchive/issue

authors: LinusBorg matthias-influry matzeso posva

repo: vuejs/vue-router

license: mit

license_source: bigquery


text:
jsfiddle linked from documentation loads wrong versions of vue and vue-router

Version
3.6.5
Reproduction link
jsfiddle.net
Steps to reproduce
Browse to https://v3.router.vuejs.org/guide/#javascript and the Getting Started page. Near the bottom of the page is the link:
You can also check out this example live (opens new window).
This is a link to: https://jsfiddle.net/yyx990803/xgrjzsup/
The jsfiddle appears to load current versions of vue and vue-router, rather than 2.x and 3.x respectively. As a result, the example doesn't work.
I edited the links to:
<script src="https://unpkg.com/vue@2.7.12/dist/vue.js"></script>
<script src="https://unpkg.com/vue-router@3.6.5/dist/vue-router.js"></script>

After which the example worked as I expected it to, however I am very new to vue so my expectations may not be valid.
What is expected?
The example in the linked jsfiddle should load and run without errors.
What is actually happening?
The console of the jsfiddle displays the error:
"69:14 ReferenceError: VueRouter is not defined"

It is a very minor issue but troublesome because I don't know vue or vue-router, thus I am reading the getting started docs, trying to understand an existing app, and finding it difficult to recognize a faulty jsfiddle Vs my invalid expectations / understanding of what should happen. Of course, I should have noticed the error in the console sooner, but my attention was focused on the code and results that I was trying to understand.
I wouldn't be looking at the old versions except that I am unfamiliar with vue and vue-router and trying to understand an existing app that uses these old versions. Maybe there are others like me, who would have a better experience and introduction to vue if the examples just worked.

BTW, you should really try the latest version https://router.vuejs.org/ 🙂


text:
jump to anchor tag

I have looked at the docs, but cannot find how to work jumping to a named anchor, classic HTML style. I do not wish to change my route view - just jump from one part of the body text to the other via an anchor tag.
About
Further down the body will be ..
business as usual
This is simple stuff, but obviously if this is not being mapped by my router it will cancel it from being appended and jumping to the relevant section.

This doesn't have anything to do with vue-router. The name attribute only works when jumping to a named anchor. If you wish to jump to a span, you'll have to use id, which is preferred anyway in HTML5. See this.

authors: chrisvfritz vonKristoff


text:
v-resource breaking tests

I'm using Karma and Jasmine to make unit testing in my Vue app. It works fine with almost all of my components, but when I try to test some components that use the v-resource plugin, the test breaks. What exactly breaks is the browser that launch the tests, I tried with PhantomJs and Chrome. I'm not pretty sure if this is a Vue bug, or if it is normal behaviour and I have to make some work around like using jasmine-ajax or something.
MY component
var Vue = require('vue');
module.exports = Vue.extend({
template: "#userstemplate",
data: function () {
    return {
        users: []
    };
},
ready: function(){
    this.$http.get('users.json').then(function(response){

        this.users = response.data;
    }, function(response){

        console.log(JSON.stringify(response));
    });
});

My test
var Vue = require('vue');
Vue.use(require('vue-resource'));
var UsersList = require('../../app/assets/javascripts/users/userslist');

var usersListInstance = new UsersList();

describe('addUserInstance', function() {
  it('should get users', function(){
    usersListInstance.$mount();
    var usersLength = usersListInstance.users.length;
    expect(usersListInstance.users.length).toBe(usersLength);
  })
});

My karma.config.js
// https://github.com/Nikku/karma-browserify
module.exports = function (config) {
  config.set({
    browsers: ['PhantomJS'],
    frameworks: ['browserify', 'jasmine'],
    files: ['test/unit/**/*.js'],
    reporters: ['spec'],
    preprocessors: {
      'test/unit/**/*.js': ['browserify']
    },
    browserify: {
      debug: true
    },
    // if you want to continuously re-run tests on file-save,
    // replace the following line with `autoWatch: true`
    singleRun: true
  })
};

Please post this to vue-resource's repo instead.

Understood. Copied here :+1:

repo: vuejs/vue


text:
vue 2.3.0版本directive的inserted钩子在 keep-alive 里面失效

Version
2.3.3
Reproduction link
https://jsfiddle.net/twbv0sov/10/
Steps to reproduce
inserted钩子应该是被插入到父节点后会被执行，但是在keep-alive的情况下，inserted只有在第一次插入时执行，被移除后再插入也不会再执行。
JSFiddle 选择2.2.0版本的 vue 也有此问题：
What is expected?
能够在插入的时候调用inserted hook
What is actually happening?
keep-alive 时 非首次插入不会执行inserted hook

This is expected behavior. inserted is called only once for the initial insert.


text:
Typescript problem: Lifecycle hooks with no this: V extends Vue

Version
2.5.2
Reproduction link
https://codesandbox.io/s/54rr1w0mzk
Steps to reproduce
In the link, AddItem component is using created hook just to show the issue.
Just user created hook and try use this inside it, when creating a ComponentOptions instance.
What is expected?
I expected be able to use my V interface inside hook using "this" variable.
What is actually happening?
"this" was referencing ComponentOptions instead V instance, although in runtime this is actually referencing the instance implemented from my V interface.

This issue happens just for advanced typescript users, does not affect the execution or Javascript users.

I`m having the same issue. "this" is only available for beforeCreated hook, although "this" is available for every hook in 2.4.4 version.
At the ComponentOptions interface, we have:
beforeCreate?(this: V): void;
created?(): void;
beforeDestroy?(): void;
destroyed?(): void;
beforeMount?(): void;
mounted?(): void;
beforeUpdate?(): void;
updated?(): void;
activated?(): void;
deactivated?(): void;
errorCaptured?(): boolean | void;

See: https://medium.com/the-vue-point/upcoming-typescript-changes-in-vue-2-5-e9bd7e2ecf08
Since v2.5, we recommend to use Vue.extend to enable better this type inference .
If you prefer the object literal style, you need to explicitly add this type for each hook.
export default {
  created(this: AddItem) {
    // ...
  }
}

One point that still does not make sense to me is: why only beforeCreate() has it?

Because you cannot use your data in beforeCreate as it does not create them at the moment.
We annotate this type of beforeCreate to prevent to infer it as wrong type (default contextual this type of ThisTypedComponentOptions).
It's same as data hook. https://github.com/vuejs/vue/blob/dev/types/options.d.ts#L50

if the the data isn't created in beforeCreate, a beforeCreate?(this: null): void; declaration says explicitly that there is no "this" in beforeCreate hook.

this type in beforeCreate is not null. It just does not have user defined data.

authors: ktsn rcranjos victorfrancax1


text:
[Bug Report] Bug with animation

Version
2.5.16
Reproduction link
https://codepen.io/cawa-93/pen/XEwzQa
Steps to reproduce
Create <transition-group> and unshift items  to it
What is expected?
The top element appears with the animation
What is actually happening?
The top element appears without animation. Instead, the bottom element reappears with the animation

This isn't a bug, you're using the index as a key.

@KaelWD Hahaha! A few hours of life was lost because of such a trifle. Thanks


text:
Update README.md

practice to changes

What kind of change does this PR introduce? (check at least one)

[ ] Bugfix
[ ] Feature
[ ] Code style update
[ ] Refactor
[ ] Build-related changes
[ ] Other, please describe:

Does this PR introduce a breaking change? (check one)

[ ] Yes
[ ] No

If yes, please describe the impact and migration path for existing applications:
The PR fulfills these requirements:

[ ] It's submitted to the main branch for v2.x (or to a previous version branch)
[ ] When resolving a specific issue, it's referenced in the PR's title (e.g. fix #xxx[,#xxx], where "xxx" is the issue number)
[ ] All tests are passing: https://github.com/vuejs/vue/blob/dev/.github/CONTRIBUTING.md#development-setup
[ ] New/updated tests are included

If adding a new feature, the PR's description includes:

[ ] A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it)

Other information:

practice


text:
Update .editorconfig

added

What kind of change does this PR introduce? (check at least one)

[ ] Bugfix
[ ] Feature
[ ] Code style update
[ ] Refactor
[ ] Build-related changes
[x] Other, please describe:

Does this PR introduce a breaking change? (check one)

[ ] Yes
[x] No

If yes, please describe the impact and migration path for existing applications:
The PR fulfills these requirements:

[ ] It's submitted to the main branch for v2.x (or to a previous version branch)
[ ] When resolving a specific issue, it's referenced in the PR's title (e.g. fix #xxx[,#xxx], where "xxx" is the issue number)
[ ] All tests are passing: https://github.com/vuejs/vue/blob/dev/.github/CONTRIBUTING.md#development-setup
[ ] New/updated tests are included

If adding a new feature, the PR's description includes:

[ ] A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it)

Other information:

added


text:
Vue3 Quill not loading: Missing ref owner context.

After installing and setting up everyting like in the docs i get
[Vue warn]: Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function. at <QuillEditor theme="snow" >
My Code
<template>
  <app-layout>
    <template #header>

        Posts

    </template>

          <QuillEditor theme="snow"/>

  </app-layout>
</template>

Try update to the latest alpha version:
npm install @vueup/vue-quill@alpha --save or npm install @vueup/vue-quill@1.0.0-alpha.38 --save

authors: JoelBeerDe luthfimasruri

repo: vueup/vue-quill


text:
Updating a field on a nested computed array

The following code works fine but I'm wondering if there could be an easier way to do the same without having to create a loop for updating.
Quick explanation:

Domain has many projects (domain_id in projects)
Project List shows the project from a specific domain
I'm using a computed property for projects with a getter and a setter
It is the set(value) method that I think could be improved (or maybe it already exists and I don't know it!). The goal being to update the position field (which is used to sort the projects on the getter)

<template>
  <draggable
    v-model="projects"
    @start="drag = true"
    @end="drag = false"
    item-key="id"
  >
    <template #item="{element, index}">
      <div>
       {{ element.name }}
      </div>
    </template>
  </draggable>
</template>

<script>
import Project from "@/models/Project";
import draggable from "vuedraggable";
export default {
  props: ["domainId"],
  components: {
    draggable
  },
  computed: {
    projects: {
      get() {
        return Project.query()
          .where("domain_id", this.domainId)
          .orderBy("position")
          .get();
      },
      set(value) {
        value.forEach((element, key) => {
          Project.update({
            where: project => project.id === element.id,
            data: { position: key+1}
          });
        });
      }
    }
  }
};
</script>

There is an example in the docs that illustrates updating with array values. For example, your setter may look like:
set(value) {
  Project.update({
    data: value.map((element, key) => ({ id: element.id, position: key + 1 }))
  })
}

There is an example in the docs that illustrates updating with array values. For example, your setter may look like:
set(value) {
  Project.update({
    data: value.map(({ id }, key) => ({ id, position: ++key }))
  })
}

I knew there was a better way!
Can you please share me the link? I went through the doc and couldn't find it (using search "map").

Sorry, forgot to share. In the Updates section, scroll down and it's the last example before the updating relationship section.
The above example is not in the docs. It's how I would often write it. 👍

No need to be sorry :)
Wonderful. Maybe this could be added in the docs, I'm sure this will help others!
Thanks again

I think in this instance the example provided is unique to your use case. The example in the docs illustrates the possibilities. But yea, I think a recipes section would be useful to demonstrate real world use cases.

authors: cuebit musixite

repo: vuex-orm/vuex-orm


text:
GpuFuture and Future

Hi,
I was wondering if you had any plans on making the GpuFuture trait compatible with the now standard Future trait? Being able to use async/await with vulkano would be great.

@timothee-haudebourg Hi!
I didn't hear if someone is planning to implement something like this, but I think it would be a good idea. You can start working on the featue.
There are a lot of open questions on how to make the interoperability between the CPU concurrent model and Vulkan GPU concurrent model transparent from the API design point of view. But probably this is doable. I have a wrapper in my personal project(still in a private repo) that makes such interoperability with Tokio, but for only a few cases specific to the project's domain. However, I think it could be extended to a general case.

Maybe as a first prototype solution you can make a Future trait wrapper around the existing GpuFuture API to persist the API back-compatibility.

authors: Eliah-Lakhin timothee-haudebourg

repo: vulkano-rs/vulkano


text:
Proposed refactor of vulkano-shaders

I'd like to add safe live shader reloading to vulkano. To support this, we would need to add some way to tell if the new shader can be substituted for the old shader. In particular, the shaders inputs, outputs, and other particulars should not have changed.
To add this functionality, I propose a refactor of vulkano-shaders: instead of directly generating the rust shader module code from the parsed SPIR-V instructions, we would instead create an intermediate Shader object, which contains all information needed to codegen the rust shader module code.
To live reload a shader, we would then create a Shader object representing the old shader, and one representing the new shader, and check them for compatibility. If they are compatible, the new shader bytecode can be substituted for the old shader bytecode without needing to recompile the program.
In addition to supporting shader reloading, this would have the additional benefit of making vulkano-shaders testable, since now tests can be written that assert properties of the Shader object.
I've started working on this and I'm hoping to get feedback on the approach. I've mostly finished entry points and specialization constants, descriptor sets and structs are still to go. It needs a lot of work, and I'm happy to make any changes to it, large or small.
You can find the branch here:
https://github.com/casey/vulkano/tree/refactor-vulkano-shaders
In particular, the Shader object is here:
https://github.com/casey/vulkano/blob/refactor-vulkano-shaders/vulkano-shaders/src/shader.rs
And I've started to split codegen into its own module:
https://github.com/casey/vulkano/tree/refactor-vulkano-shaders/vulkano-shaders/src/codegen
As part of the refactor, codegen could be made a separate module from vulkano-shaders.

I just pushed some diffs that refactored descriptor sets. The major piece of functionality that still needs to be refactored is struct handling. And of course it still needs lots of cleanup and tons of tests.
As a second step, it would be nice to refactor codegen to use a proper templating library, so that the template text is easier to read and modify.

I don't think we need a templating library that does text. Instead we could use the quote crate for example, and turn the Rust code into a string after generation.

That's an excellent idea!

I'm on OS X, and I found a bug in MoltenVK that reduced my confidence in using it, so I've stopped working on this for now :/

Just cc'ing myself as we're also currently interested in a solution for this for nannou-org/nannou#223.
@casey I'm curious if your MoltenVK bug has since been solved? We've been testing it with for nannou-org/nannou#240 and it seems to be relatively reliable.

@mitchmindtree Unfortunately I haven't tested it in a while, so I'm not sure if it's still broken.

+1
Having to rebuild and restart the whole application just to tweak a shader is a massive productivity sink.

Any update on this?

Unfortunately I stopped using Vulkan, so I'm unlikely to make further progress on this. I think it's a good approach, but my code is probably super out of date at this point, and was incomplete to begin with.

authors: calebwin casey mitchmindtree norru tomaka


text:
Switching from and returning to app with fade id reset screen to vault screen

Is your feature request related to a problem? Please describe.
After performing a swap, the confirmation screen which is shown closes automatically if you open a different app and return. Eg by opening the explorer link it’s impossible to come back and open the progress link
Edit: I guess this applies to all views at least with face id.
Describe the solution you'd like
Keep the last view in memory and return to it.

@enriquesouza @Rockindash
That feature is needed to be implemented before v1.0 as in every view when exiting the app, it resets to main page.
therefore also when doing a vault creation or swap etc. etc. it is not possible to come back to the point and need to be initated from the start.

I am currently updating the way FaceID authentication is handled (Issue #427). This should resolve this reset last seen view issue as well.

Just pushed the fix for the same:
https://github.com/vultisig/vultisig-ios/pull/470

I believe this one is fixed,closing

authors: Rockindash johnnyluo oxyc realpaaao

repo: vultisig/vultisig-ios


text:
🛑 Ecoindex.fr Back For Front is down

In 711ff3b, Ecoindex.fr Back For Front (https://bff.ecoindex.fr/health) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Ecoindex.fr Back For Front is back up in 5c1d4bc after 11 minutes.

repo: vvatelot/upptime


text:
Problems with stats API

I have an issue where when I hit the status page it doesn't load the client information and puts some errors in my logs.
Public Key, Number of clients etc does load.

Hey, I don't have a fix for the error, but I know the cause and how to get it to go away (if you havent already figured it out @kmz27 )
this happens when you don't have any peers that have connected to your wg server.  To get this fixed, start up your wg server... since the wg-gen-web project overrides your wg0.conf file, it helps to get your running wireguard in sync by starting your docker compose, ctrl+c'ing it, bringing your wg server down and back up (this guarentees that the wg config being used by wg is the one generated by wg-gen-wen), then starting your docker compose back up again.
create a host if you haven't already. This will create the deffinition in your wg0.conf file. There are instructions on how to auto reload the server on new clients, but for now, bring wg down and back up. you can now connect your client. at this point, you should be able to go to the api status page without getting the error.

Hi, at some point I got it working with your instructions but it broke again and I cant get it to work atm.
I think we can close this one.

license: WTFPL


text:
About the demo scenes used in the teasar of project page.

Hello, where can i download these two dataset?

Hi these two sequences are part of the DAVIS dataset which can be downloaded from https://davischallenge.org/davis2017/code.html#unsupervised. They are called swing and horsejump-high


text:
There is a maximum number of sieblings, namely 4

There is a maximum number of sieblings, namely 4. More than that and they'll be overwritten.
Try adding the following lines to to example given in the README to see the effect:

*TEST1
*TEST4
*TEST3
*TEST4

This should be fixed now.

repo: vzaccaria/pandoc-mm


text:
Added a Navbar

Added navbar

The navbar has a bunch of baggage in the way of changes to other files that are not needed for this pull request. I will work with Lissa to create a new pull request that loses all this excess.
Travis

See previous comment

authors: Lissabella deeppunster


text:
Colum Checkbox has a bug

Description:
when i clicked the button and release in 1 second, you can see it, it not work
<table:TableView
    x:Name="OrderDataGrid"
    Height="700"
    Margin="0,18,0,0"
    AutoGenerateColumns="False"
    IsReadOnly="True"
    ItemsSource="{x:Bind Path=ViewModel.Orders, Mode=OneWay}"
    SelectedItem="{x:Bind Path=ViewModel.SelectedOrder, Mode=TwoWay}"
    SelectionMode="Multiple"
    SelectionUnit="Row">

Screenshots:

Environment:

Package Version:
WinAppSDK Version:

Within 1 second, not in 1 second


text:
Afloat prevents Terminal from opening on first try

Steps to reproduce:
System: macOS Sierra 10.12.4
mySIMBL: 0.5.3 (29)
Afloat: 2.5.2 / Jan 18, 2017

Install and run mySIMBL
Select Afloat plugin from Discover tab and install
Try opening Terminal (click Dock icon)
Terminal app starts but no terminal window appears
Try opening Terminal again
A terminal window appears

Note, that if you've defined a default window group it does not open on step 3 or 4.  Only a single window appears on step 4.

I think simply being injecting into causes Terminal to have this issue, not Afloat specifically.

I think this is no longer an issue in 10.13 so I'm probably not gonna look into this.


text:
Vim scrolls up when I use my mouse

Information
VIM version
VIM - Vi IMproved 8.1 (2018 May 17, compiled May 28 2018 16:29:16)
Included patches: 1-26
Operating System: Debian 8.10
:ALEInfo
 Current Filetype: python
Available Linters: ['flake8', 'mypy', 'prospector', 'pycodestyle', 'pyflakes', 'pylint', 'pyls', 'pyre']
  Enabled Linters: ['flake8', 'mypy', 'pylint']
 Suggested Fixers:
  'add_blank_lines_for_python_control_statements' - Add blank lines before control statements.
  'autopep8' - Fix PEP8 issues with autopep8.
  'black' - Fix PEP8 issues with black.
  'isort' - Sort Python imports with isort.
  'remove_trailing_lines' - Remove all blank lines at the end of a file.
  'trim_whitespace' - Remove all trailing whitespace characters at the end of every line.
  'yapf' - Fix Python files with yapf.
 Linter Variables:

let g:ale_python_flake8_change_directory = 1
let g:ale_python_flake8_executable = 'flake8'
let g:ale_python_flake8_options = ''
let g:ale_python_flake8_use_global = 0
let g:ale_python_mypy_executable = 'mypy'
let g:ale_python_mypy_ignore_invalid_syntax = 0
let g:ale_python_mypy_options = ''
let g:ale_python_mypy_use_global = 0
let g:ale_python_pylint_change_directory = 1
let g:ale_python_pylint_executable = 'pylint'
let g:ale_python_pylint_options = ''
let g:ale_python_pylint_use_global = 0
 Global Variables:

let g:ale_cache_executable_check_failures = v:null
let g:ale_change_sign_column_color = 0
let g:ale_command_wrapper = ''
let g:ale_completion_delay = v:null
let g:ale_completion_enabled = 0
let g:ale_completion_max_suggestions = v:null
let g:ale_echo_cursor = 1
let g:ale_echo_msg_error_str = 'Error'
let g:ale_echo_msg_format = '%code: %%s'
let g:ale_echo_msg_info_str = 'Info'
let g:ale_echo_msg_warning_str = 'Warning'
let g:ale_enabled = 1
let g:ale_fix_on_save = 0
let g:ale_fixers = ['pylint']
let g:ale_history_enabled = 1
let g:ale_history_log_output = 1
let g:ale_keep_list_window_open = 0
let g:ale_lint_delay = 200
let g:ale_lint_on_enter = 1
let g:ale_lint_on_filetype_changed = 1
let g:ale_lint_on_save = 1
let g:ale_lint_on_text_changed = 'always'
let g:ale_lint_on_insert_leave = 0
let g:ale_linter_aliases = {}
let g:ale_linters = {}
let g:ale_linters_explicit = 0
let g:ale_list_window_size = 10
let g:ale_list_vertical = 0
let g:ale_loclist_msg_format = '%code: %%s'
let g:ale_max_buffer_history_size = 20
let g:ale_max_signs = -1
let g:ale_maximum_file_size = v:null
let g:ale_open_list = 0
let g:ale_pattern_options = v:null
let g:ale_pattern_options_enabled = v:null
let g:ale_set_balloons = 1
let g:ale_set_highlights = 1
let g:ale_set_loclist = 1
let g:ale_set_quickfix = 0
let g:ale_set_signs = 1
let g:ale_sign_column_always = 0
let g:ale_sign_error = '>>'
let g:ale_sign_info = '--'
let g:ale_sign_offset = 1000000
let g:ale_sign_style_error = '>>'
let g:ale_sign_style_warning = '--'
let g:ale_sign_warning = '--'
let g:ale_statusline_format = v:null
let g:ale_type_map = {}
let g:ale_use_global_executables = v:null
let g:ale_warn_about_trailing_blank_lines = 1
let g:ale_warn_about_trailing_whitespace = 1
  Command History:

(executable check - success) flake8
(finished - exit code 0) ['/usr/bin/zsh', '-c', '''flake8'' --version']
(executable check - failure) mypy
(executable check - success) pylint
(finished - exit code 1) ['/usr/bin/zsh', '-c', 'cd ''/home/jo'' && ''pylint''  --output-format text --msg-template="{path}:{line}:{column}: {msg_id} ({symbol}) {msg}" --reports n ''/home/jo/test.py''']

<<<NO OUTPUT RETURNED>>>

(finished - exit code 1) ['/usr/bin/zsh', '-c', 'cd ''/home/jo'' && ''flake8'' --format=default --stdin-display-name ''/home/jo/test.py'' - < ''/tmp/vwZ7SeA/5/test.py''']

<<<OUTPUT STARTS>>>
/home/jo/test.py:1:27: E999 SyntaxError: invalid syntax
/home/jo/test.py:39:1: E303 too many blank lines (4)
/home/jo/.local/lib/python3.7/site-packages/pycodestyle.py:113: FutureWarning: Possible nested set at position 1
  EXTRANEOUS_WHITESPACE_REGEX = re.compile(r'[[({] | []}),;:]')
<<<OUTPUT ENDS>>>

What went wrong
Since updating ALE this morning, Vim constantly scrolls up whenever I move my mouse over the Vim window (running in tmux). When I set mouse=, this stops, but I like mouse support.
Reproducing the bug

I updated ALE and all other plugins (using vim-plug; I've set it to autoload ALE only when I open a Python file)
I opened a Python file.
While my mouse moves, Vim scrolls up the file.

The problem stops when I disable ALE. The problem persists when I disable all other plugins.
Apart from the plugin itself, the only other line in my .vimrc referencing ale is let g:ale_fixers = ['pylint']. I notice from the ALEInfo output that ALE didn't seem to notice that (it also thinks flake8 and mypy are enabled).

I notice from the ALEInfo output that ALE didn't seem to notice that (it also thinks flake8 and mypy are enabled).

You're reading it wrong.

Enabled Linters: ['flake8', 'mypy', 'pylint']
let g:ale_fixers = ['pylint']

This is a duplicate of #1631, you can leave your comments there.


text:
goimports fixer doesn't work for vendored libraries

In Go you can "vendor" packages by putting them in the vendor/
directory for a project. goimports picks up these packages, in
addition to what you have in GOPATH.
The goimports fixer works by copying the Go file to a temporary
directory (in e.g. /tmp/) and then running goimports on it. This
means that it won't see the vendored packages, since that is outside of
the project's directory.
To be useful, goimports should be run on the real file, and not a
temporary file.

:ALEFix can't modify any of your files. It needs to pipeline the buffer data from one fixer to another. Is there any way to run goimports on a temporary file and also tell it where the libraries are?

Cheers! :beers:


text:
pylint: Move to the buffer's directory before running pylint command

Fixes #1472
I confirmed that this also covers #1465 because pylint detects pylintrc file in parent directories of the current working directory.
I fixed tests for ale_linters/python/pylint.vim also. I confirmed that I could run pylint via ALE from out of the repository.

Cheers! :beers:


text:
OKR

Find Solana dev to start January
v2 dApp Design
Finish LP Design
Testnet finished

Fix White Screen Bug

Fix Card EndDate

We deliver the mvp and landing page in https://staging.web3task.w3d.community/


text:
Grant Application: Verida Network's decentralized identities, SSO, messaging and private data storage for Polkadot

Project Abstract
The Polkadot ecosystem enables a variety of application specific blockchains to provide decentralized computation capabilities. While this is enormously beneficial for building the next generation of Web3 applications, there are additional technical capabilities required to build applications capable of replacing existing Web2 incumbents.
The Verida network provides this missing Web3 infrastructure for developers and end users. Verida will bring single-sign on, decentralized identities, messaging and private data storage to the Polkadot ecosystem.
This is Verida’s first proposal to the W3F Grants program.
For which grant level are you applying?

[ ] Level 1:  Up to $10,000, 2 approvals
[x] Level 2:  Up to $50,000, 3 approvals
[ ] Level 3:  Unlimited, 5 approvals (for > $100k Web3 Foundation Council approval)

Application Checklist

[x] The application template has been copied, renamed ( project_name.md) and updated.
[x] A BTC or Ethereum (DAI/USDT) address for the payment of the milestones is provided inside the application.
[x] I have read and acknowledged the terms and conditions.
[x] The software delivered for this grant will be released under an open-source license specified in the application.
[x] The initial PR contains only one commit (squash and force-push if needed).
[x] The grant will only be announced once the first milestone has been accepted.

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

Hi @Noc2 , thank you for providing feedback! We've taken all of your points into consideration and have addressed them in the latest revision. To summarise the changes, we have:

removed development on the Verida Vault (originally Milestone 1) from the grant application. Since Polkadot support in the Vault is necessary to proceed with the next milestone, Verida will complete this work separately as self-funded development.
removed Milestone 3 so that this initial grant application can stay within the Level 2 amount. We would be keen to revisit this as a follow-up grant.
added in the remaining 0.x deliverables.

Hopefully these changes address your comments, look forward to hearing back!

Hi @Noc2, does anyone from the team have any questions on the application or need clarifications from us? Happy to set up a call if needed!

Thanks for chasing us. I will share the application again with everyone. Sorry for the delay. The is currently trying to catch-up with everything.

Thanks for the question @semuelle. Yes absolutely, you'll be able to test using the Verida Vault wallet (which is freely available), developer documentation, and we'll have a number of demo apps to showcase all of the functionality listed in the deliverables.

Thank you @semuelle @Noc2 @gautamdhameja for approving our grant application!
We will first complete the self-funded contribution (consider it Milestone 0) which is a prerequisite for Milestone 1.
We look forward to having Verida part of the Polkadot ecosystem!

Hey @ysam21, are you still interested in this? When are you planning to submit?

@ysam21 unless you plan to deliver soon, could you please submit an amendment with an updated timeline? Note that if we don't hear from you within the next two weeks, we'll assume you're no longer interested and terminate the grant.

Hey @alxs thanks for checking in! I will discuss with engineering on what timeline we're looking at. Cheers

Hi @alxs, the development timeline still holds i.e. once the self-funded contribution is completed, the expected development time is 2 months. We have had a shift in priorities to focus on decentralization of the testnet and user growth, so that we can strengthen the value of what we bring to the Dotsama ecosystem. We intend to deliver this closer to Q2 2023.

Sounds good @ysam21. In that case, could you please submit an amendment as I mentioned before and include a delivery date? Otherwise, the date the application is accepted is considered the starting date of the first milestone.

Hi @ysam21 I believe the amendment specified that a delivery would be submitted in June, are you able to provide an update? Thanks!

pinging @ysam21

Hi @keeganquigley, thanks for the checking in! We'd like to align our proposal with the challenges faced by dapp developers, based on the insights we've gained from engaging with the community. Are you open for us to update the grant proposal?

Thanks @ysam21 yes absolutely, feel free to make changes to the original proposal and then submit a pull request. The amendment will simply require 3 approvals from the committee in order to be merged. If necessary, you can extend the timeline as well. Thanks!

pinging @ysam21 for an update.

One last ping before we cancel this grant: @ysam21, @nick-verida, @tahpot

authors: CLAassistant Noc2 alxs keeganquigley semuelle ysam21


text:
Polkadot Runtime Environment: Alternative Implementation Grant

The Web3 Foundation is looking to attract teams for the development of an alternative implementation of Polkadot Runtime Environment (PRE), which is a core component of Polkadot.
The first step in writing a fully-fledged Polkadot implementation is to start by writing an implementation of the PRE. The idea behind the PRE is that it can be used to create standalone blockchains, while also allowing connectivity to the Polkadot network.
The Web3 Foundation contracted Parity Technologies to write the first implementation of Polkadot. Their implementation of the PRE is called ‘Substrate’. This product is currently a PRE but will have additional functionality in the future. For this grant we are concerned only with the PRE. The current Substrate code is sitting in the Polkadot GitHub repo and is implemented in Rust.
For more information please see the following document for further details on how to apply:
Polkadot Runtime Environment: Alternative Implementation Grant
(FYI,  the following languages are preferred: Go (above all others), C++, and Java.)

Is there a preferred language for the implementation?
An alternate implementation in Rust or Go would be very useful early on, since a lot of the current blockchain stack is written in one or the other.
Down the road, it would be interesting to get an implementation in JavaScript (if it ever supports compilation to wasm) or Java/C#.

I'm due to release more information tomorrow (a little behind expected timeframe!).
The reference implementation is in Rust (i.e. Parity Tech), plus there is Jaco's JS implementation (a full Substrate client, but without block authoring).
The preferred implementations are: Java, Go, C++.
So, with some luck, I can release the full details tomorrow! :-)

@EdwardAThomson  Are there timelines for the grant applications?

@gcsfred2 The applications will be open for a while. At the moment there is a hope to have a couple more implementations, so the application process will remain open for quite a while.

Hello, our team was in Berlin during blockchain week and had an incredible time getting to know people from the Parity team. We showed interest in writing an implementation of the PRE in Go. I will be filling out the application over the next few days. Thank you!

Hey ChainSafe team, that's great to hear! I see you have an email address on your profile. I will drop an email to say hello. Go is one of our preferred languages, so your application is of interest. We are starting to get quite a bit of interest now in writing alternative implementations.

Keen to be involved in core development of Polkadot. Form submitted! :)

Adding a list of relevant videos and blogs.
Videos:

Gavin Wood presents on Polkadot at Ethereum London (June 2017)
Gavin Wood presents Parity Substrate at EventHorizon18 (Berlin)

The slides: https://slides.com/paritytech/paritysubstrate#/

Gavin Wood presents Substrate and Polkadot Governance at EdCon (Toronto)

Slides: https://slides.com/paritytech/polkadot-governance#/

Robert Habermeier also presented Parity Substrate at the Berlin Truebit Meetup

Blogs etc:

"What is Substrate?" Jack Fransham explains.
"Substrate in a nutshell" by Dmitriy Kashitsyn.
W3F wiki page for Polkadot Runtime Environment.

Technical Chat channel:

Substrate Technical on Riot.

We'd recommend jumping into the Substrate Technical channel and start asking questions. Some developers are on-hand and answering questions, plus there is also a handful of community members who are becoming experts too!

Thanks for all of the interest so far. We have received a number of application forms, but the application process is still open in case any teams are wondering and were thinking of submitting a proposal. We are hoping to select 2 or 3 teams to develop alternative implementations, but we haven't selected anyone yet!

A further update on this topic. Many of you have been asking about timescales and the amount of effort involved.
I had a quick chat with Jaco, a dev in Parity. He is the one who created the implementation in JavaScript. Hopefully this gives you a better idea. He worked pretty much solo too!
How long would you expect a dev / team of devs to create an implementation of Substrate?
"Difficult to say - the issue is that my implementation found a lot of bugs in the Rust libp2p code, so I was waiting for (what felt like forever), for fixes. Too early.
So first thing, what language - if not JS, Go or Rust, they need to write their own libp2p implementation. (Maybe there is a way to use the Go/Rust versions as libraries)"
"Then the tricky bits are:

implementation of Parity codec (2+ weeks to do properly) - needed for anything networking or RPC related
implementation of a Trie DB - they can learn from what is done in JS, Rust, Ethereum clients, however Substrate has their own version. (Once again, it may be possible to use the Rust version as a lib)
WASM environment, this stuff is not documented anywhere but in the code - took me around 1+ month here, but once again, implementations changed the whole time (too early)
Then there are the bits and bobs - blockchain DB (over-and-above state trie), RPC calls, potential light client."

As a bare minimum, as he see it:

Trie
libp2p
WASM environment

"If in the implementation is in Go, the Trie they can actually take the Ethereum version and "just" drop in blake2 and the parity-codec."
For this grant, we are looking for the consensus part to get done too.

Hello, just filled out the form for C++ implementation.

Hello, just filled out the form for C++ implementation.

Received! Thank you! @Yuvasee
The application process is still open. We will take a few more applications before making any decisions.
Did you know about our W3S conference? There are now reduced price and free tickets available:
https://medium.com/web3foundation/endowing-an-open-inclusive-community-at-web3-summit-3013456f4f84

Hi everyone, we've had some questions about the development process and we thought it would be good to share the answers with everyone.
1. Understanding the motivation for an alternative implementation

To what extend is the present implementation a reference?

There is a specification is in a draft state. Hope to share it soon.
The current implementation is like a reference spec, but it isn't really.
RFP was started early, so we could start talking with teams.
We suggested that they get a proposal in early.

An independent implementation is sought? In that case, is it OK if the new implementation is based on the Rust implementation of Substrate?

As independent as possible. Done in an idiomatic way that suite that language.
Not a direct translation.
Empower an additional community of developers. Don't lock to a particularly set of developers.
Also can help to identify ongoing discrepancies between implementations.
As it is a decentralised network, we need alternative implementations. Don't want to have one team control the development of the network.

Better performance is sought? If so, what are the requirements/symptoms that we want to improve/cure?

Not really. Rust is fast enough. We really want to reach new developer communities and to improve decentralisation (network resiliency and governance).

Better portability for multiple platforms?

Expect it to work on Linux and Mac. (Unix like platforms)
Would be great on Windows.

Is there a rationale behind the preference for Go?

Want to include the existing Go community.
There is a Wasm interpreter in Go already. So it might be easier: https://github.com/perlin-network/life
We will probably fund at least 2 implementations. E.g. C++ and Go.
There is more to write in C++. Probably less reusable code. Possibly no libp2p in C++. Less Wasm support.

2. Understanding the implementation around WASM

Can we re-use an existing WASM implementation?

Can re-use an existing interpreter in the language of the implementation.
It may be possible to use the Rust implementation with a C++ PRE, as there are bindings, but would be better to have a C++ interpreter. If the C++ implementation isn't great, then either make pull requests or fork and improve.

Are we required to also implement native execution, or just the WASM interpreter?

Not necessary for spec compliance.
Can do an additional step.
There will be pieces of Wasm logic run frequently. Having the ability to run the logic as native code is important.

3. Understanding the “rules of engagement”

Do formal specifications or acceptance tests exist, or could they be developed as a first phase of the project?

We need these, but don't have them.
Would be willing to consider the tests as a separate work package.

Is there any formal deadline?

No deadline.
Ideally, an implementation by end of Q1 2019. Allows the implementation to start working with Polkadot.

In what form should we apply for a grant and to whom should the request be addressed?

Application form (as in original post).
Best to get a rough proposal in earlier. Even if it is not very well fleshed out.

Who will give the OK / decide at the end for the grant application?

Web3 Foundation. Peter will be the lead, but others will be involved (e.g. relevant people from Parity).
We may ask for additional information in order to clarify some things.

We have an interest in supporting this effort by doing a minimal port of the implementation of Parity codec, and any other rust modules with the idea to support writing a runtime in Go. So not a full alternative implementation.
This task of course will be taken on by the team selected to do the full Go implementation. So I was looking to see if there is possibility of collaboration or if no work has started at all, to perhaps apply for a grant for a narrower scope of work?

authors: ChainSafe EdwardAThomson Yuvasee adrianbrink anjj123 gcsfred2 mnaamani


text:
Fix #237 List of items show incorrect word count for bbcode.

Here's the fix that I put together for #237 which is working for me.  I've re-organised slightly to allow for some comments.
I don't know if you've got a suite of test docs that you run against to validate the changes.  But if you do let me know and I'm happy to do those tests and post back the results.

I don't know if you've got a suite of test docs that you run against to validate the changes. But if you do let me know and I'm happy to do those tests and post back the results.

No i dont have any automated tests, all tests are done manually. So far its seems to be working


text:
Responsive cal-heatmap

Not quite 'responsive' in the sense of displaying the same data on all widths, however it changes values based on screen width, destroys the old calendar, and draws a new one.
Basically if your window width is less than 768px, it will only show 6 subdomains, and if it's bigger it will show 12 ( or whatever you tell it to )
Let me know if the destroying / unsetting is wrong and could be done better - e.g. with update?

var sixMonthsAgo = function(){
    now = new Date();
    now.setMonth(now.getMonth() - 5);
    return now;
}

var oneYearAgo = function(){
    now = new Date();
    now.setYear(now.getFullYear() - 1);
    now.setMonth(now.getMonth() + 1);
    return now;
}

var responsiveCal = function( options ) {

    if( $(window).width() < 768 ) {
        options.start = sixMonthsAgo();
        options.range = 6;
    } else {
        options.start = oneYearAgo();
        options.range = 12;
    }

    if( typeof cal === "object" ) {
        $('#cal-heatmap').html('');
        cal = cal.destroy();
    }
    cal = new CalHeatMap();
    cal.init( options );

}

caloptions = {
    domain: 'month',
    subdomain: 'day',
    itemName:["action","actions"],
    maxDate: new Date(),
    data: your_data
};

// run first time, put in load if your scripts are in footer
responsiveCal( caloptions );

$(window).on("resize", function() {

    // run on resize
    responsiveCal( cal.options );

});

Bump.
Requesting for some way to change options after init, without needing to replace existing heatmap.

+1

You can trigger your responsiveCal() function after the resizing is complete by creating an event:
resizeEnd:
$(window).resize(function() {
    if(this.resizeTO) clearTimeout(this.resizeTO);
    this.resizeTO = setTimeout(function() {
        $(this).trigger('resizeEnd');
    }, 500);
});

Use resizeEnd to run responsiveCal:
$(window).bind('resizeEnd', function() {
	 responsiveCal( cal.options );
});

See this blog post

See this blog post

The link is out of date, check this repo https://github.com/cagrimmett/jekyll-tools#posts-heatmap-calendar

You can trigger your responsiveCal() function after the resizing is complete by creating an event:
resizeEnd:
$(window).resize(function() {
    if(this.resizeTO) clearTimeout(this.resizeTO);
    this.resizeTO = setTimeout(function() {
        $(this).trigger('resizeEnd');
    }, 500);
});

Use resizeEnd to run responsiveCal:
$(window).bind('resizeEnd', function() {
     responsiveCal( cal.options );
});

Thanks for this! I wanted to note that the resizeEnd event is superfluous. The responsiveCal function can be called directly by setTimeout in the resize event handler.

A simple alternative that helped me was to override the main svg class "cal-heatmap-container". This will keep the structure initially defined!
.cal-heatmap-container{
    width: 100% !important;
}

v4 can now update calendar settings without destroying and redrawing the calendar.
For now, you may now add an event listener on your window, and update the calendar range on demand.
Will see later if this option should be included in the code directly

authors: cagrimmett fabjordan geospiza-fortis mastef pradyunsg seanfcarroll svagier tdotcspot wa0x6e


text:
When I jumpTo and highlight afterwards i sometime get some error

If i use jumpTo function to change the domain and the highlight function afterwards to highlight then new date
$MONTH_CALENDAR.jumpTo(newDate);
$MONTH_CALENDAR.highlight(newDate);

i sometime get an error:
Uncaught TypeError: Cannot read property 'length' of undefined;
Uncaught TypeError: Cannot read property 'length' of undefined d3.js:763
bind d3.js:763
d3_selectionPrototype.data d3.js:818
CalHeatMap.fill cal-heatmap.js:1354
CalHeatMap.highlight cal-heatmap.js:2825
setDayOnMonthCalendar hours_add.js:163
(anonymous function) hours_add.js:319
jQuery.event.dispatch jquery-1.10.0.js:5107
elemData.handle

The error shows in the d3 library because wrong data is passed, I presume, and group is undefined:
  function bind(group, groupData) {
       var i, n = group.length,

I also got such issue, and I think it may be reproduced by triggering something like
cal.update(data);
cal.options.data = data;

while previous domain change animation is still active. At least I was able to eliminate the issue by preventing the update during animation.

@Yurko-Fedoriv is right... this error occurs if an update is attempted while an animation is still in progress. I fixed it by wrapping the update in a timeout equal to the animationDuration if a jumpTo was necessary

Merged into v4

authors: Luiz-N Yurko-Fedoriv vladlep wa0x6e


text:
🛑 Prowlarr is down

In c565a8f, Prowlarr ($PROWLARR) was down:

HTTP code: 530
Response time: 941 ms

Resolved: Prowlarr is back up in 3e11413 after 33 minutes.

repo: waallaby/up-time


text:
🛑 Prowlarr is down

In dcaeff1, Prowlarr ($PROWLARR) was down:

HTTP code: 530
Response time: 83 ms

Resolved: Prowlarr is back up in edc42e9 after 11 hours, 13 minutes.


text:
missing XQLength ?

I'm trying to build the latest development snapshot for fltk-1.4 (on X11, not wayland).
The process goes ok until the linker complains it can't find XQLength.
Welcome to the Haiku shell.

~> cd svn/fltk-1.4.x-20230505-89a2b1a7/
~/svn/fltk-1.4.x-20230505-89a2b1a7> ls
ANNOUNCEMENT     config.guess      examples            fltk.xpm          Makefile                README.experimental.txt  test
autogen.sh       config.sub        FL                  fluid             makeinclude.in          README.IDE.txt           util
cairo            configh.cmake.in  fl_config.cmake.in  forms.h           misc                    README.macOS.md          zlib
CHANGES_1.0.txt  configh.in        fl_config.in        GL                nanosvg                 README.md
CHANGES_1.1.txt  configure         fltk_version.dat    install-sh        png                     README.txt
CHANGES_1.3.txt  configure.ac      fltk-config.in      jpeg              public                  README.Unix.txt
CHANGES.txt      COPYING           fltk-options        lib               README.abi-version.txt  README.Wayland.txt
CMake            CREDITS.txt       fltk.list.in        libdecor          README.Cairo.txt        README.Windows.txt
CMakeLists.txt   documentation     fltk.spec.in        mac_endianness.h  README.CMake.txt        src
~/svn/fltk-1.4.x-20230505-89a2b1a7> ./configure
checking build system type... x86_64-unknown-haiku
checking host system type... x86_64-unknown-haiku
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for pkg-config... /bin/pkg-config
checking for a BSD-compatible install... /bin/install -c
checking for nroff... no
checking for groff... no
checking for doxygen... no
checking for ranlib... ranlib
checking for ar... /bin/ar
checking for windres... no
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking size of short... 2
checking size of int... 4
checking size of long... 8
checking whether byte ordering is bigendian... no
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking sys/stdtypes.h usability... no
checking sys/stdtypes.h presence... no
checking for sys/stdtypes.h... no
checking whether we have the POSIX compatible scandir() prototype... yes
checking for vsnprintf... yes
checking for snprintf... yes
checking for strings.h... (cached) yes
checking for strcasecmp... yes
checking for strlcat... yes
checking for strlcpy... yes
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
checking for localeconv... yes
checking for library containing pow... none required
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for long long int... yes
checking for library containing dlsym... none required
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking alsa/asoundlib.h usability... no
checking alsa/asoundlib.h presence... no
checking for alsa/asoundlib.h... no
checking for jpeg_CreateCompress in -ljpeg... yes
checking jpeglib.h usability... yes
checking jpeglib.h presence... yes
checking for jpeglib.h... yes
checking for gzgets in -lz... yes
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking for png_read_info in -lpng... yes
checking png.h usability... yes
checking png.h presence... yes
checking for png.h... yes
checking libpng/png.h usability... no
checking libpng/png.h presence... no
checking for libpng/png.h... no
checking for png_get_valid in -lpng... yes
checking for png_set_tRNS_to_alpha in -lpng... yes
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking for pthread_create using -lpthreads... no
checking for pthread_create using -lpthread... yes
checking for pthread_create using -pthread... yes
checking whether we have PTHREAD_MUTEX_RECURSIVE... yes
checking for X... no
configure: WARNING: These packages 'wayland-client>=1.18 wayland-protocols>=1.15 wayland-cursor xkbcommon  pangocairo' are required to build FLTK for wayland.
configure: WARNING: At least one of them is missing.
configure: WARNING: Continuing with --disable-wayland
configure: error: Configure could not find required X11 libraries, aborting.
~/svn/fltk-1.4.x-20230505-89a2b1a7> ./configure
checking build system type... x86_64-unknown-haiku
checking host system type... x86_64-unknown-haiku
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for pkg-config... /bin/pkg-config
checking for a BSD-compatible install... /bin/install -c
checking for nroff... no
checking for groff... no
checking for doxygen... no
checking for ranlib... ranlib
checking for ar... /bin/ar
checking for windres... no
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking size of short... 2
checking size of int... 4
checking size of long... 8
checking whether byte ordering is bigendian... no
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking sys/stdtypes.h usability... no
checking sys/stdtypes.h presence... no
checking for sys/stdtypes.h... no
checking whether we have the POSIX compatible scandir() prototype... yes
checking for vsnprintf... yes
checking for snprintf... yes
checking for strings.h... (cached) yes
checking for strcasecmp... yes
checking for strlcat... yes
checking for strlcpy... yes
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
checking for localeconv... yes
checking for library containing pow... none required
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for long long int... yes
checking for library containing dlsym... none required
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking alsa/asoundlib.h usability... no
checking alsa/asoundlib.h presence... no
checking for alsa/asoundlib.h... no
checking for jpeg_CreateCompress in -ljpeg... yes
checking jpeglib.h usability... yes
checking jpeglib.h presence... yes
checking for jpeglib.h... yes
checking for gzgets in -lz... yes
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking for png_read_info in -lpng... yes
checking png.h usability... yes
checking png.h presence... yes
checking for png.h... yes
checking libpng/png.h usability... no
checking libpng/png.h presence... no
checking for libpng/png.h... no
checking for png_get_valid in -lpng... yes
checking for png_set_tRNS_to_alpha in -lpng... yes
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking for pthread_create using -lpthreads... no
checking for pthread_create using -lpthread... yes
checking for pthread_create using -pthread... yes
checking whether we have PTHREAD_MUTEX_RECURSIVE... yes
checking for X... libraries , headers
configure: WARNING: These packages 'wayland-client>=1.18 wayland-protocols>=1.15 wayland-cursor xkbcommon  pangocairo' are required to build FLTK for wayland.
configure: WARNING: At least one of them is missing.
configure: WARNING: Continuing with --disable-wayland
checking for gethostbyname... no
checking for gethostbyname in -lnsl... no
checking for gethostbyname in -lbsd... no
checking for connect... no
checking for connect in -lsocket... no
checking for remove... yes
checking for shmat... no
checking for shmat in -lipc... no
checking for IceConnectionNumber in -lICE... no
checking for library containing dlopen... none required
checking GL/gl.h usability... yes
checking GL/gl.h presence... yes
checking for GL/gl.h... yes
checking for glXMakeCurrent in -lGL... no
checking for glXMakeCurrent in -lMesaGL... no
./configure: line 8456: ,: command not found
checking for glXGetProcAddressARB in -lGL... no
checking GL/glu.h usability... yes
checking GL/glu.h presence... yes
checking for GL/glu.h... yes
checking for XineramaIsActive in -lXinerama... no
Package xft was not found in the pkg-config search path.
Perhaps you should add the directory containing `xft.pc'
to the PKG_CONFIG_PATH environment variable
No package 'xft' found
checking for FcPatternCreate in -lfontconfig... yes
checking X11/Xft/Xft.h usability... no
checking X11/Xft/Xft.h presence... no
checking for X11/Xft/Xft.h... no
configure: WARNING: could not find the required Xft headers and/or libraries.
configure: please install Xft headers and libraries or use 'configure --disable-xft'.
checking for X11/extensions/Xfixes.h... no
checking for X11/Xcursor/Xcursor.h... no
checking for X11/extensions/Xrender.h... no
checking for X11/Xregion.h... no
checking if GCC supports -fno-exceptions... yes
checking if GCC supports -fno-strict-aliasing... yes
checking if ld supports -no-undefined... yes
checking if ld supports -Bsymbolic-functions... yes
checking if toolchain supports sections... yes

Configuration Summary
-------------------------------------------------------------------------
    Directories: prefix=/usr/local
                 bindir=${exec_prefix}/bin
                 datadir=${datarootdir}
                 datarootdir=${prefix}/share
                 exec_prefix=${prefix}
                 includedir=${prefix}/include
                 libdir=${exec_prefix}/lib
                 mandir=${datarootdir}/man
Cross-compiling: no
       Graphics: X11
Image Libraries: JPEG=System
                 PNG=System
                 ZLIB=System
    Large Files: YES
         OpenGL: NO
        Threads: YES
configure: creating ./config.status
config.status: creating makeinclude
config.status: creating fltk.list
config.status: creating fltk-config
config.status: creating fltk.spec
config.status: creating FL/Makefile
config.status: creating config.h
config.status: creating FL/fl_config.h
~/svn/fltk-1.4.x-20230505-89a2b1a7> make
=== making src ===
Compiling Fl.cxx...
Compiling Fl_Adjuster.cxx...
Compiling Fl_Bitmap.cxx...
Compiling Fl_Browser.cxx...
Compiling Fl_Browser_.cxx...
Compiling Fl_Browser_load.cxx...
Compiling Fl_Box.cxx...
Compiling Fl_Button.cxx...
Compiling Fl_Cairo.cxx...
Compiling Fl_Chart.cxx...
Compiling Fl_Check_Browser.cxx...
Compiling Fl_Check_Button.cxx...
Compiling Fl_Choice.cxx...
Compiling Fl_Clock.cxx...
Compiling Fl_Color_Chooser.cxx...
Compiling Fl_Copy_Surface.cxx...
Compiling Fl_Counter.cxx...
Compiling Fl_Dial.cxx...
Compiling Fl_Device.cxx...
Compiling Fl_Double_Window.cxx...
Compiling Fl_File_Browser.cxx...
Compiling Fl_File_Chooser.cxx...
Compiling Fl_File_Chooser2.cxx...
Compiling Fl_File_Icon.cxx...
Compiling Fl_File_Input.cxx...
Compiling Fl_Flex.cxx...
Compiling Fl_Graphics_Driver.cxx...
Compiling Fl_Group.cxx...
Compiling Fl_Help_View.cxx...
Compiling Fl_Image.cxx...
Compiling Fl_Image_Surface.cxx...
Compiling Fl_Input.cxx...
Compiling Fl_Input_.cxx...
Compiling Fl_Input_Choice.cxx...
Compiling Fl_Int_Vector.cxx...
Compiling Fl_Light_Button.cxx...
Compiling Fl_Menu.cxx...
Compiling Fl_Menu_.cxx...
Compiling Fl_Menu_Bar.cxx...
Compiling Fl_Menu_Button.cxx...
Compiling Fl_Menu_Window.cxx...
Compiling Fl_Menu_add.cxx...
Compiling Fl_Menu_global.cxx...
Compiling Fl_Message.cxx...
Compiling Fl_Multi_Label.cxx...
Compiling Fl_Native_File_Chooser.cxx...
Compiling Fl_Overlay_Window.cxx...
Compiling Fl_Pack.cxx...
Compiling Fl_Paged_Device.cxx...
Compiling Fl_Pixmap.cxx...
Compiling Fl_Positioner.cxx...
Compiling Fl_Preferences.cxx...
Compiling Fl_Printer.cxx...
Compiling Fl_Progress.cxx...
Compiling Fl_Repeat_Button.cxx...
Compiling Fl_Return_Button.cxx...
Compiling Fl_Roller.cxx...
Compiling Fl_Round_Button.cxx...
Compiling Fl_Screen_Driver.cxx...
Compiling Fl_Scheme.cxx...
Compiling Fl_Scheme_Choice.cxx...
Compiling Fl_Scroll.cxx...
Compiling Fl_Scrollbar.cxx...
Compiling Fl_Shared_Image.cxx...
Compiling Fl_Shortcut_Button.cxx...
Compiling Fl_Simple_Terminal.cxx...
Compiling Fl_Single_Window.cxx...
Compiling Fl_Slider.cxx...
Compiling Fl_Spinner.cxx...
Compiling Fl_String.cxx...
Compiling Fl_Sys_Menu_Bar.cxx...
Compiling Fl_System_Driver.cxx...
Compiling Fl_Table.cxx...
Compiling Fl_Table_Row.cxx...
Compiling Fl_Tabs.cxx...
Compiling Fl_Text_Buffer.cxx...
Compiling Fl_Text_Display.cxx...
Compiling Fl_Text_Editor.cxx...
Compiling Fl_Tile.cxx...
Compiling Fl_Tiled_Image.cxx...
Compiling Fl_Timeout.cxx...
Compiling Fl_Tree.cxx...
Compiling Fl_Tree_Item.cxx...
Compiling Fl_Tree_Item_Array.cxx...
Compiling Fl_Tree_Prefs.cxx...
Compiling Fl_Tooltip.cxx...
Compiling Fl_Valuator.cxx...
Compiling Fl_Value_Input.cxx...
Compiling Fl_Value_Output.cxx...
Compiling Fl_Value_Slider.cxx...
Compiling Fl_Widget.cxx...
Compiling Fl_Widget_Surface.cxx...
Compiling Fl_Window.cxx...
Compiling Fl_Window_Driver.cxx...
Compiling Fl_Window_fullscreen.cxx...
Compiling Fl_Window_hotspot.cxx...
Compiling Fl_Window_iconize.cxx...
Compiling Fl_Wizard.cxx...
Compiling Fl_XBM_Image.cxx...
Compiling Fl_XPM_Image.cxx...
Compiling Fl_abort.cxx...
Compiling Fl_add_idle.cxx...
Compiling Fl_arg.cxx...
Compiling Fl_compose.cxx...
Compiling Fl_display.cxx...
Compiling Fl_get_system_colors.cxx...
Compiling Fl_grab.cxx...
Compiling Fl_lock.cxx...
Compiling Fl_own_colormap.cxx...
Compiling Fl_visual.cxx...
Compiling filename_absolute.cxx...
Compiling filename_expand.cxx...
Compiling filename_ext.cxx...
Compiling filename_isdir.cxx...
Compiling filename_list.cxx...
Compiling filename_match.cxx...
Compiling filename_setext.cxx...
Compiling fl_arc.cxx...
Compiling fl_ask.cxx...
Compiling fl_boxtype.cxx...
Compiling fl_color.cxx...
Compiling fl_contrast.cxx...
Compiling fl_cursor.cxx...
Compiling fl_curve.cxx...
Compiling fl_diamond_box.cxx...
Compiling fl_draw.cxx...
Compiling fl_draw_arrow.cxx...
Compiling fl_draw_pixmap.cxx...
Compiling fl_encoding_latin1.cxx...
Compiling fl_encoding_mac_roman.cxx...
Compiling fl_engraved_label.cxx...
Compiling fl_file_dir.cxx...
Compiling fl_font.cxx...
Compiling fl_gleam.cxx...
Compiling fl_gtk.cxx...
Compiling fl_labeltype.cxx...
Compiling fl_open_uri.cxx...
Compiling fl_oval_box.cxx...
Compiling fl_overlay.cxx...
Compiling fl_oxy.cxx...
Compiling fl_plastic.cxx...
Compiling fl_read_image.cxx...
Compiling fl_rect.cxx...
Compiling fl_round_box.cxx...
Compiling fl_rounded_box.cxx...
Compiling fl_set_font.cxx...
Compiling fl_scroll_area.cxx...
Compiling fl_shadow_box.cxx...
Compiling fl_shortcut.cxx...
Compiling fl_show_colormap.cxx...
Compiling fl_string_functions.cxx...
Compiling fl_symbols.cxx...
Compiling fl_utf8.cxx...
Compiling fl_vertex.cxx...
Compiling print_button.cxx...
Compiling screen_xywh.cxx...
Compiling drivers/PostScript/Fl_PostScript.cxx...
Compiling drivers/PostScript/Fl_PostScript_image.cxx...
Compiling drivers/Xlib/Fl_Xlib_Copy_Surface_Driver.cxx...
Compiling drivers/Xlib/Fl_Xlib_Image_Surface_Driver.cxx...
Compiling drivers/X11/Fl_X11_Window_Driver.cxx...
Compiling drivers/X11/Fl_X11_Screen_Driver.cxx...
Compiling drivers/Posix/Fl_Posix_System_Driver.cxx...
Compiling drivers/Unix/Fl_Unix_System_Driver.cxx...
Compiling drivers/Unix/Fl_Unix_Screen_Driver.cxx...
Compiling drivers/Posix/Fl_Posix_Printer_Driver.cxx...
Compiling drivers/X11/fl_X11_platform_init.cxx...
Compiling Fl_x.cxx...
Compiling fl_dnd_x.cxx...
Compiling Fl_Native_File_Chooser_FLTK.cxx...
Compiling Fl_Native_File_Chooser_GTK.cxx...
Compiling Fl_Native_File_Chooser_Kdialog.cxx...
Compiling Fl_Native_File_Chooser_Zenity.cxx...
Compiling Fl_get_key.cxx...
Compiling drivers/Xlib/Fl_Xlib_Graphics_Driver.cxx...
Compiling drivers/Xlib/Fl_Xlib_Graphics_Driver_arci.cxx...
Compiling drivers/Xlib/Fl_Xlib_Graphics_Driver_color.cxx...
Compiling drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx...
Compiling drivers/Xlib/Fl_Xlib_Graphics_Driver_line_style.cxx...
Compiling drivers/Xlib/Fl_Xlib_Graphics_Driver_rect.cxx...
Compiling drivers/Xlib/Fl_Xlib_Graphics_Driver_vertex.cxx...
Compiling drivers/Xlib/Fl_Xlib_Graphics_Driver_font_x.cxx...
In function 'const char* find_best_font(const char*, int)':
cc1plus: warning: function may return address of local variable [-Wreturn-local-addr]
drivers/Xlib/Fl_Xlib_Graphics_Driver_font_x.cxx:463:8: note: declared here
  463 |   char namebuffer[1024];        // holds scalable font name
      |        ^~~~~~~~~~
Compiling fl_call_main.c...
Compiling flstring.c...
Compiling numericsort.c...
Compiling vsnprintf.c...
Compiling xutf8/keysym2Ucs.c...
Compiling scandir_posix.c...
Compiling xutf8/utf8Utils.c...
Compiling xutf8/utf8Wrap.c...
Compiling xutf8/case.c...
Compiling xutf8/is_right2left.c...
Compiling xutf8/is_spacing.c...
/bin/ar cr ../lib/libfltk.a ...
Compiling forms_compatibility.cxx...
Compiling forms_bitmap.cxx...
Compiling forms_free.cxx...
Compiling forms_fselect.cxx...
Compiling forms_pixmap.cxx...
Compiling forms_timer.cxx...
/bin/ar cr ../lib/libfltk_forms.a ...
Compiling fl_images_core.cxx...
Compiling fl_write_png.cxx...
Compiling Fl_BMP_Image.cxx...
Compiling Fl_File_Icon2.cxx...
Compiling Fl_GIF_Image.cxx...
Compiling Fl_Anim_GIF_Image.cxx...
Compiling Fl_Help_Dialog.cxx...
Compiling Fl_ICO_Image.cxx...
Compiling Fl_JPEG_Image.cxx...
Compiling Fl_PNG_Image.cxx...
Compiling Fl_PNM_Image.cxx...
Compiling Fl_Image_Reader.cxx...
Compiling Fl_SVG_Image.cxx...
Compiling drivers/SVG/Fl_SVG_File_Surface.cxx...
/bin/ar cr ../lib/libfltk_images.a ...
=== making fluid ===
Compiling CodeEditor.cxx...
Compiling StyleParse.cxx...
Compiling Fd_Snap_Action.cxx...
Compiling Fl_Function_Type.cxx...
Compiling Fl_Group_Type.cxx...
Compiling Fl_Menu_Type.cxx...
Compiling Fl_Type.cxx...
Compiling Fl_Widget_Type.cxx...
Compiling Fl_Window_Type.cxx...
Compiling Fluid_Image.cxx...
Compiling about_panel.cxx...
Compiling align_widget.cxx...
Compiling alignment_panel.cxx...
Compiling code.cxx...
Compiling custom_widgets.cxx...
Compiling factory.cxx...
Compiling file.cxx...
Compiling fluid.cxx...
Compiling function_panel.cxx...
Compiling pixmaps.cxx...
Compiling shell_command.cxx...
Compiling template_panel.cxx...
Compiling undo.cxx...
Compiling widget_browser.cxx...
Compiling widget_panel.cxx...
Compiling ExternalCodeEditor_UNIX.cxx...
Linking fluid...
/boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/11.2.0/../../../../x86_64-unknown-haiku/bin/ld: ../lib/libfltk.a(Fl_x.o): in function `Fl_X11_Screen_Driver::poll_or_select_with_delay(double)':
Fl_x.cxx:(.text._ZN20Fl_X11_Screen_Driver25poll_or_select_with_delayEd+0x22): undefined reference to `XQLength'
/boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/11.2.0/../../../../x86_64-unknown-haiku/bin/ld: ../lib/libfltk.a(Fl_x.o): in function `Fl_X11_Screen_Driver::poll_or_select()':
Fl_x.cxx:(.text._ZN20Fl_X11_Screen_Driver14poll_or_selectEv+0x15): undefined reference to `XQLength'
collect2: error: ld returned 1 exit status
Makefile:66: recipe for target 'fluid' failed
make[1]: *** [fluid] Error 1
Makefile:22: recipe for target 'all' failed
make: *** [all] Error 1
~/svn/fltk-1.4.x-20230505-89a2b1a7>

(even though the issue comes when building fluid, which is not mandatory for the whole library, I can't see into configure any ways to disable it)
I can find XQLength definition inside Xlib.h , but unlike other functions listed there, nowhere in the code its implementation.

Appears to be a macro function. I can look into this next week.

Fixed. Also fixed a crash on FLTK startup. There are a number of redrawing glitches, however, which need to be fixed.

authors: eblanca waddlesplash

repo: waddlesplash/xlibe


text:
error in rendering/renderer.py

Hi:
When I excute run.py use python2, it says:
"rendering/renderer.py" line 201
proj-self.cam @ pose[0:3, 3]
syntaxError: invalid syntax

@wadimkehl

Fixed. We trained, evaluated and froze the graphs with TF 1.0 but we recentyl tested with TF 1.3 and TF 1.4

authors: margonotmango wadimkehl


text:
fix bug in daysleeper detection

Fixes #324
Small bug fix to ensure that correct start block time is used when performing daysleeper detection
Cleaned up some of the legacy code that was commented out as well.
@vincentvanhees - not sure if you want this fix into v2.1-0 or not, I put it here for now, but let me know if you'd rather hold off and save it for the next release. Is a relatively small fix, so hopefully ok for this release.

Thanks Matt, I aim to look at it later this week.

Codecov Report

Merging #325 into release2.1-0 will decrease coverage by 0.55%.
The diff coverage is 100.00%.

@@               Coverage Diff                @@
##           release2.1-0     #325      +/-   ##
================================================
- Coverage         74.45%   73.90%   -0.56%
================================================
  Files                76       76
  Lines              9146     9148       +2
================================================
- Hits               6810     6761      -49
- Misses             2336     2387      +51

Impacted Files
Coverage Δ

R/g.sib.det.R
63.70% <100.00%> (+0.28%)
:arrow_up:

R/g.plot5.R
75.44% <0.00%> (-10.30%)
:arrow_down:

R/g.part4.R
72.25% <0.00%> (+0.16%)
:arrow_up:

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 20ee583...4e7799a. Read the comment docs.

repo: wadpac/GGIR


text:
Many tests failing with TypeError: Unsupported type as file input: <class '_io.BytesIO'>

Appears to have been introduced in https://github.com/wagtail/Willow/commit/084a112aac21af97d0924c9447c739722cd4539e, which replaced imghdr with filetype. filetype does not handle BytesIO as input.
Opening this to track the issue, I've also opened https://github.com/h2non/filetype.py/issues/140 and will submit a patch if filetype maintainers are into it.

Fixed in #101

repo: wagtail/Willow


text:
Building a slug without hyphens (last Wagtail version)

Issue Summary
I used last Wagtail version.
The documentation says that we should use 'TitleFieldPanel' for field 'title' instead 'FieldPanel'
Here is link: https://docs.wagtail.org/en/stable/releases/5.0.2.html#use-of-titlefieldpanel-for-the-page-title-field
content_panels = [
        MultiFieldPanel(
            [
                TitleFieldPanel('title'),
                FieldPanel('description'),
                .....
             ]
]

This is create 'slug', but without hyphens (and it throws errors )

In Wagtail version 4.2.4 all works fine
Technical details

Python version: 3.8.10
Django version: 3.2.12
Wagtail version: 5.0.2
Browser version: Chrome 114

Hi @francuz08011990 - thanks for the report. Have you confirmed that this bug can be reproduced as described on a newly-created Wagtail project?

@francuz08011990 do you have anything overridden in the other panels where the slug is declared (content_panels)?

No, i don't have.
My structure is:
class PromotePageModel(Page, SEOModel, OGModel):
    class Meta:
        abstract = True

    promote_panels = [
        FieldPanel('show_in_menus'),
        FieldPanel('slug'),
        MultiFieldPanel(
            [
                FieldPanel('seo_title'),
                FieldPanel('search_description'),
                FieldPanel('seo_keywords'),
                FieldPanel('seo_noindex'),
            ],
            heading=_('SEO'),
        ),
        MultiFieldPanel(
            [
                FieldPanel('og_title'),
                FieldPanel('og_description'),
                FieldPanel('og_image'),
                FieldPanel('og_image_width'),
                FieldPanel('og_image_height'),
                FieldPanel('og_site_name'),
                FieldPanel('og_url'),
            ],
            heading=_('Open Graph'),
        ),
    ]

class PostModel(PromotePageModel):
        class Meta:
        abstract = True

    content_panels = [
        MultiFieldPanel(
            [
                TitleFieldPanel('title'),
                FieldPanel('headline'),
                FieldPanel('is_anchored'),
                FieldPanel('preview'),
                FieldPanel('preview_title'),
                FieldPanel('preview_alt'),
                FieldPanel('cover'),
                FieldPanel('cover_title'),
                FieldPanel('cover_alt'),
                FieldPanel('description'),
            ],
            heading=_('Common info'),
        ),
        MultiFieldPanel(
            [
                FieldPanel('content'),
            ],
            heading=_('Content'),
        ),
    ]

class ArticlePage(PostModel):
    content_panels = [
        MultiFieldPanel(
            [
                PageChooserPanel('category'),
                MultiFieldPanel(
                    [
                        LocalizedSelectPanel('tag', widget_class=forms.CheckboxSelectMultiple)
                    ],
                    heading=_('Tags')
                ),
            MultiFieldPanel(
                    [
                        LocalizedSelectPanel('author', widget_class=forms.CheckboxSelectMultiple)
                    ],
                    heading=_('Authors')
                ),
            ],
            heading=_('Related info'),
        ),
        MultiFieldPanel(
            [
                FieldPanel('is_nav_active'),
            ],
            heading=_('Nav bar')
        ),
    ] + PostModel.content_panels

Hi @francuz08011990 - thanks for the report. Have you confirmed that this bug can be reproduced as described on a newly-created Wagtail project?

No, this is a problem in an existing project

@francuz08011990 do you have anything overridden in the other panels where the slug is declared (content_panels)?

No, i don't have.
My structure is:
class PromotePageModel(Page, SEOModel, OGModel):
class Meta:
abstract = True
promote_panels = [
    FieldPanel('show_in_menus'),
    FieldPanel('slug'),
    MultiFieldPanel(
        [
            FieldPanel('seo_title'),
            FieldPanel('search_description'),
            FieldPanel('seo_keywords'),
            FieldPanel('seo_noindex'),
        ],
        heading=_('SEO'),
    ),
    MultiFieldPanel(
        [
            FieldPanel('og_title'),
            FieldPanel('og_description'),
            FieldPanel('og_image'),
            FieldPanel('og_image_width'),
            FieldPanel('og_image_height'),
            FieldPanel('og_site_name'),
            FieldPanel('og_url'),
        ],
        heading=_('Open Graph'),
    ),
]

class PostModel(PromotePageModel):
class Meta:
abstract = True
content_panels = [
    MultiFieldPanel(
        [
            TitleFieldPanel('title'),
            FieldPanel('headline'),
            FieldPanel('is_anchored'),
            FieldPanel('preview'),
            FieldPanel('preview_title'),
            FieldPanel('preview_alt'),
            FieldPanel('cover'),
            FieldPanel('cover_title'),
            FieldPanel('cover_alt'),
            FieldPanel('description'),
        ],
        heading=_('Common info'),
    ),
    MultiFieldPanel(
        [
            FieldPanel('content'),
        ],
        heading=_('Content'),
    ),
]

class ArticlePage(PostModel):
content_panels = [
MultiFieldPanel(
[
PageChooserPanel('category'),
MultiFieldPanel(
[
LocalizedSelectPanel('tag', widget_class=forms.CheckboxSelectMultiple)
],
heading=('Tags')
),
MultiFieldPanel(
[
LocalizedSelectPanel('author', widget_class=forms.CheckboxSelectMultiple)
],
heading=('Authors')
),
],
heading=('Related info'),
),
MultiFieldPanel(
[
FieldPanel('is_nav_active'),
],
heading=('Nav bar')
),
] + PostModel.content_panels

@francuz08011990 - sorry I meant promote panels.
You will need to set the slug widget on your slug field.
https://docs.wagtail.org/en/stable/releases/5.0.html#slug-field-auto-cleaning-now-relies-on-data-attributes
from wagtail.admin.widgets.slug import SlugInput
# ... other imports

class MyPage(Page):
    promote_panels = [
        FieldPanel("slug", widget=SlugInput),
        # ... other panels
    ]

@francuz08011990 - sorry I meant promote panels.
You will need to set the slug widget on your slug field.
https://docs.wagtail.org/en/stable/releases/5.0.html#slug-field-auto-cleaning-now-relies-on-data-attributes
from wagtail.admin.widgets.slug import SlugInput
# ... other imports

class MyPage(Page):
    promote_panels = [
        FieldPanel("slug", widget=SlugInput),
        # ... other panels
    ]

Thanks a lot !
Was inattentive and missed important information in release 5.0 :)

No problems, I know these changes are hard sometimes but this means that the previous 'magic' behaviour is now opt in. And can be used on other slug fields in the admin, even when the field is not named slug.

authors: francuz08011990 gasman lb-

repo: wagtail/wagtail