[question]Is there a global filter ？

Our company wants to customize and develop a filter.
For business reasons, it is found that all pipelines must use this filter.
So I want to ask if there are plans to support this global filter or how to implement this global filter is the best way.

Many gateway products support the global filters [1], so I think this is a REAL requirement. We should consider how to design it carefully
[1]https://cloud.spring.io/spring-cloud-gateway/multi/multi__global_filters.html

Hi, @brzyangg ,
I am wondering about the user cases and what this feature should support here.

What will u do with this global filter?
Do u have multiple global filters requirements? If yes, which sequence should these global filters run?

Hi, @benja-wu
I will answer your questions in turn. We are now investigating and developing easegress to replace the old gateway.

I want to add authentication to all pipeline and add header by request. These are what we actually use.
I have multiple filter needs. Our old gateway global filter is in order.
I will develop the logic of this global filter myself.

@brzyangg I got it
Here is a quick, draft design
Background

For saving operation costs, Easegress can support some kind of global filter, which will be executed for every HTTP routing before the actual pipeline.

Requirements

Supporting multiple global filters, and allow to adjust their order on the fly.
These global filters can be executed before or after the actual routing pipeline.
These global filters can be enabled together, once enabled, the Easegress cluster will apply them before or after to all HTTP traffic routing.

Design

Adding two embedded global pipelines into the Easegress system, better to wrapper them with a System Controller. Let's call it GlobalHTTPFilters right now, one Easegress cluster can only have one or zero GlobalHTTPFilters.

These two global pipelines can be enabled separately.

Users can develop their customized logic into a filter, can when one self-develop filter's instance is configurated into GlobalHTTPFilters, it becomes global automatically.

HTTPServer should call this GlobalHTTPFilters before and after the real pipeline's handling.

Spec

name: globalFilters
kind: GlobalHTTPFilters
beforePipeline:
     // a pipeline's spec, can ignore the name, kind fields...
afterPipeline:
    // a pipeline's spec, can ignore the name, kind fields...

To-Do

Should compare with spring-cloud-gateway and other supporting global filters products.

Any suggestions for this feature design are welcomed. :-)

I found that SystemController is only initialized internally.
If you define a SystemController, how to update and dynamically yaml to manage the configuration of beforePipeline and afterPipeline

@brzyangg , I think we support updating a SystemController with its YAML, u can check it out with ServiceRegistry

@benja-wu , I think ServiceRegistry is a SystemController.
I look the TODO and the Note
I understand its Spec does not support updating.
But I am initializing a GlobalHTTPFilters, i need to create in and update the Spec at the same time.
The following is my understanding during the implementation GlobalHTTPFilters.
I don’t know if I have a problem with the implementation of GlobalHTTPFilters.
I defined Spec like this.
Spec struct {
	BeforePipeline httppipeline.Spec `yaml:"beforePipeline" jsonschema:"omitempty"`
	AfterPipeline  httppipeline.Spec `yaml:"afterPipeline" jsonschema:"omitempty"`
}

Then after I started easegress, I found that my object update would not apply my configuration

@benja-wu , I think ServiceRegistry is a SystemController. I look the TODO and the Note I understand its Spec does not support updating. But I am initializing a GlobalHTTPFilters, i need to create in and update the Spec at the same time.
The following is my understanding during the implementation GlobalHTTPFilters. I don’t know if I have a problem with the implementation of GlobalHTTPFilters. I defined Spec like this.
Spec struct {
	BeforePipeline httppipeline.Spec `yaml:"beforePipeline" jsonschema:"omitempty"`
	AfterPipeline  httppipeline.Spec `yaml:"afterPipeline" jsonschema:"omitempty"`
}

Then after I started easegress, I found that my object update would not apply my configuration

Yes, u are right, I forgot this limitation here. I think u can simply change this SystemController to BusinessController for working around. And we will fix it in the future.

@brzyangg , if possible, could you please create a draft PR for your work to share related code changes? this could make the discussion more smooth.

@brzyangg , if possible, could you please create a draft PR for your work to share related code changes? this could make the discussion more smooth.

Okay, I will submit a PR to discuss this issue after finishing the code

@benja-wu , I think ServiceRegistry is a SystemController. I look the TODO and the Note I understand its Spec does not support updating. But I am initializing a GlobalHTTPFilters, i need to create in and update the Spec at the same time.
The following is my understanding during the implementation GlobalHTTPFilters. I don’t know if I have a problem with the implementation of GlobalHTTPFilters. I defined Spec like this.
Spec struct {
	BeforePipeline httppipeline.Spec `yaml:"beforePipeline" jsonschema:"omitempty"`
	AfterPipeline  httppipeline.Spec `yaml:"afterPipeline" jsonschema:"omitempty"`
}

Then after I started easegress, I found that my object update would not apply my configuration

Yes, u are right, I forgot this limitation here. I think u can simply change this SystemController to BusinessController for working around. And we will fix it in the future.

@benja-wu Thank you for your answer, I will try to use BusinessController to complete this function

Hi, I am really interested in this issue and here is my design. Is this design ok?
Design
Object GlobalFilters can create several filters that can be used globally.
Spec:
name: globalFilters
kind: GlobalFilters
filters:
  - name: globalValidator
    kind: Validator
    headers:
      Content-Type:
        values:
        - application/json
  - name: globalRequestAdaptor
    kind: RequestAdaptor
    header:
      set:
        X-Adapt-Key: goodplan
  - name: globalProxy
    kind: Proxy
    mainPool:
      servers:
      - url: http://<IP_ADDRESS>:9095
      - url: http://<IP_ADDRESS>:9096
      - url: http://<IP_ADDRESS>:9097
      loadBalance:
        policy: roundRobin

Then, we create three global filters, named: globalValidator, globalRequestAdaptor, globalProxy. Then we can use them in pipelines.
In pipeline:
Spec:
name: pipeline-demo
kind: HTTPPipeline
flow:
  - filter: validator
  - filter: requestAdaptor
  - filter: proxy
filters:
  - name: validator
    kind: GlobalFilterWrapper
    globalFilter: globalValidator
  - name: requestAdaptor
    kind: GlobalFilterWrapper
    globalFilter: globalRequestAdaptor
  - name: proxy
    kind: GlobalFilterWrapper
    globalFilter: globalProxy

GlobalFilterWrapper behaves just like normal filters, so it can be put in front, end or middle of a pipeline.

@suchen-sci , I noticed in your example, there's a Validator in the GlobalFilters, because the validation result could be success or fail, the design needs to include the JumpIf feature, but it seems not easy to do, because the GlobalFilters don't have the information of the whole pipeline.
The 2nd question is: for a GlobalFilters definition, will each pipeline have its own GlobalFilter instance, or will all pipelines share a single GlobalFilter instance? The former will be easy to implement, but the latter is useful in some cases, for example, I want to count the requests of all pipelines. However, if we choose to share a single instance, we will need to track information about which pipeline the request is for, and it will also make the JumpIf more difficult.
And another question is: the TrafficGate support namespaces, will a GlobalFilters definition be applied to all namespaces?

@localvar Thanks a lot for your question.

Great question! JumpIf issue, all filter handlers return empty string when success, return non-empty string when failed. So in GlobalFilterWrapper we can support two kind of result, success (empty) and failed (non-empty), which can be used for JumpIf in pipeline. Or we can support result mapping.

name: pipeline-demo
kind: HTTPPipeline
flow:
  - filter: validator
    jumpIf: {fail: END}
  - filter: requestAdaptor
  - filter: proxy
filters:
  - name: validator
    kind: GlobalFilterWrapper
    globalFilter: globalValidator
    resultMap:
      invalid: fail

I think we should implement a global filter for all pipelines, create one GlobalFilters and works for all pipeline. Emmmm, for the pipeline filter JumpIf problem, result map in GlobalFilterWrapper may help.
Emmmm, for this problem, I plan GlobalFilters to be defined in all namespaces. I plan to make this GlobalFilters to be a BusinessController. Make it a TrafficController may make this problem unnecessarily complicated.
@localvar Thanks a lot for your questions! They are really valuable questions!

@suchen-sci Thank you for your attention to this issue.
I noticed that in your example, the definition of HTTPPipeline uses GlobalFilters, so since all my HTTPPipeline needs this filter, I still need to reference this filter for each
So I have a suggestion, put the reference of GlobalFilters into HTTPServer, as follows.

kind: HTTPServer
name: server-demo
port: 10081
globalFilters: globalFilters
keepAlive: true
https: false
rules:
    - hostRegexp: hello.com
      paths:
      -
        pathRegexp: /demo/(.*)
        backend: demo-pipeline

BeforePipeline and AfterPipeline are added to the definition of GlobalFilters to process requests and responses.
name: globalFilters
kind: GlobalFilters
beforePipeline:
  // a pipeline's spec, can ignore the name, kind fields...
  flow:
    - filter: validator
      jumpIf: { invalid: END }
  filters:
    - name: validator
    kind: Validator
    headers:
    Content-Type:
      values:
      - application/json
      regexp: ""
    User-Agent:
      values: []
      regexp: .+
      X-Filter:
        values:
        - ""
        - mirror
        - candidate
        - hacking
        regexp: ""
afterPipeline:
    // a pipeline's spec, can ignore the name, kind fields...

Hi, @brzyangg Thanks a lot for your comments.
I think maybe our design solve two kinds of different tasks.
In your design, it more like a global pipeline that execute before or/and after a normal pipeline, your GlobalFilters  contains flow, maybe several filters work in certain order, control logic like JumpIf and used in HTTPServer .
In my design, it more like shareable filters that can be used in all pipelines. My GlobalFilters creates several filters that are independent, no flow, no execute order and no control logic. Then, in each pipeline, you can use some or all of these filters and decide your own flow, execute order and control logic.
In same cases, your design is more efficiency. For example, several HTTPServers want share same filters, flow and control logic.
In same other cases, my design is more efficiency. For example, several HTTPServers want share part of filters. Maybe server A and server B want to share filter 1 and 2, server A and server C want to share filter 2 and 3... My design maybe more flexible.

@suchen-sci Yes i think so too.
My design is more efficient in some cases and yours is more flexible.
It would be better if our design can be combined.

close as pr #376 has been merged into main branch.


Add @shopify/slate-snippets-plugin.

What are you trying to accomplish with this PR?
I will preface this by saying this is super super bare bones at the moment. No tests, no README.md just the working source code. I'm just wanting to get a feel to see if this would be wanted, if so i'll add all the relevant pieces (as well as i can) otherwise i'll just using it locally extending my slate.config.js.
This is a plugin heavily influenced by the Sections Plugin.
It's a pretty simple plugin that adds the ability to have folders within the snippets folder like:
./snippets
├── collection/
   ├── filters.liquid
   ├── list.liquid
   ├── ...
├── product/
   ├── images.liquid
   ├── variants.liquid
   ├── ...

They get turned in to [folder-name]-[file-name].liquid on build.
./snippets
├── product/
   ├── images.liquid => product-images.liquid
   ├── variants.liquid => product-variants.liquid
   ├── ...

You can still use snippets as per normal not in folders.
Oustanding issues

[ ] Tests
[ ] Readme
[ ] Disable the CopyWebpackPlugin for the snippets folder as it currently brings across everything twice

I appreciate Slate is on Low Maintenance but any feedback on this would be highly appreciated. Even if it's just a +1 from anyone's Shopify's end to let me know to carry on and flesh this out 🤙
Please provide a link to the associated GitHub issue.
https://github.com/Shopify/slate/pull/781
Checklist
For contributors:

[ ] I have updated the docs to reflect these changes, if applicable.

For maintainers:

[ ] I have :tophat:'d these changes.

Thanks a lot Dan.
This is very useful since Shopify can't come with official solution.
Have you somehow manage to delete/ignore original snippets subfolders ending in the dist?
I am trying to enhance your plugin with fs-extra.remove() but with no luck. If you have any solution please share :)
Thanks again <3

Hey @cJayyy,
I didn't find a solution for that, unfortunately.
Ultimately, we ended up dropping this internally as it was actually a bit of a pain to use (besides the duplicated files and errors).
For example when doing {% include 'product-carousel' %} with:
./snippets
├── product/
   ├── carousel.liquid
   ├── ...

It's actually slightly counter-intuitive when trying to find the file. When searching for product-carousel nothing is returned. There are also cases where you end up with quite a few duplicate file names which also makes it quite hard to navigate files properly.
./snippets
├── article/
   ├── carousel.liquid
   ├── ...
├── collection/
   ├── carousel.liquid
   ├── ...
├── product/
   ├── carousel.liquid
   ├── ...

Happy for someone else to pick this up, and I can help contribute to that, but it's not something I will actively be continuing with, unfortunately.

Thanks for the response @dan-gamble!
So you adapted to the original Slate structure and you have all the snippets on one level or you found out another way?


[BUG ]haystackv2 integration : Importing LMFormatEnforcerLocalGenerator raise Error

from lmformatenforcer.integrations.haystackv2 import LMFormatEnforcerLocalGenerator
raise error ModuleNotFoundError: No module named 'haystack.preview'
haystack-ai == 2.4
lm-format-enforcer == 0.10.6
does not work on older versions too of
haystack-ai  and  lm-format-enforcer

Thanks for raising this! This looks like a version compatibility issue. I hope to get to it in a few days, but if you can fix the imports to be up to date, I would be happy for a PR :)

Fixed in version 0.10.7


"nbval" should be automatically installed as a prereq for testing

This is a pytest addon.

By default, nbval is installed as part of the test suite:
https://github.com/BuildACell/BioCRNPyler/blob/c3ca0ae3138bec2b3addde7ac44581285c1b4b5a/setup.py#L39
Did you face an issue running the test suite?  (pytest . or python setup.py test)

python setup.py test works just fine.
The issue is that when installing the software from PIP (or github) nbval does not seem to install automatically (on my local machine) except in the context of the test suite. For example, if I pip install biocrnpyler[all] it does not get all the dependencies so I can run individual tests. For context, my hacky way of getting biocrnpyler set up on a new computer (my old one got decapitated) was to pip install it to get the dependencies, then uninstall it and work from a clone of the github repository.

I see!
pip install biocrnpyler[all] meant for the end-users, they hardly ever want to run tests.
If you call python setup.py test for the first time, then it will install all the necessary packages that are needed for testing. Alternatively, we could create a requirements_dev.txt that contains all the necessary packages for a developers.

I like therequirements_dev.txtidea! We should be able to set up a pip install biocrnpyler[dev] somehow as well, right? Or is [all] special and hardcoded into pip?
Relatedly - we would want to put all the examples and tests into the dev distribution, right?
@ayush9pandey any thoughts on this?

I like the pip install biocrnpyler[dev] idea because all of the installation-related info would be in one place (i.e. in setup.py)
Based on this:
https://github.com/BuildACell/BioCRNPyler/blob/c3ca0ae3138bec2b3addde7ac44581285c1b4b5a/setup.py#L27
Something like this would work:
    extras_require = {
        "all": [
            "numpy",
            "matplotlib",
            "networkx",
            "bokeh>=1.4.0",
            "fa2"
            ],
       "dev": [
           "pytest",
           "pytest-cov",
           "nbval"
        ],
        },

Great - I will do that in a PR soon. A couple follow up questions:

I guess we should now include all the examples in the manifest.ini (unless there is a way to make a seperate manifest included as an extra?]?
Do we want to make Bioscrape included in dev as well now that it is Pip installable? What I am getting at is it would be great if the pip install could easily have all the example notebooks work.... maybe we want a third option [examples]?

I also like the [dev] install idea. Although in Zoltan's code above for dev "numpy", "matplotlib" etc.. will not be installed.
For the simulators - I think we can include bioscrape and roadrunner in the "all" keyword. So, if someone does pip install biocrnpyler[all] they literally get all dependencies. Creating another keyword like "simulator" might get too complicated for installation process. For end-user keeping it to two options seems good - you either install the basics or you install "all".

nbval has now been removed, because it broke. closing this issue.


Request to add CSP info.

Kindly add Azure Databricks costs with a pre-purchase are offered to CSP subscriptions too. FYI: We have verified both Azure portal and CSP price list shows the products to be purchased with our test CSP account and subscription. (Kindly let us know if you need the screenshot and pricing info. as a proof.) https://learn.microsoft.com/en-us/partner-center/azure-ri-server-subscriptions
You can buy Azure reservations on behalf of a customer, or you can allow the customer to buy their own reservations from a prior Azure subscription the partner has purchased for them.
See Purchase Reservations on the Azure portal.
See the Azure RI CSP Commercial Price

Learn Build status updates of commit f69f52c:
:warning: Validation status: warnings

File
Status
Preview URL
Details

articles/cost-management-billing/reservations/prepay-databricks-reserved-capacity.md
:warning:Warning

Details

articles/cost-management-billing/reservations/prepay-databricks-reserved-capacity.md

Line 41, Column 46: [Warning: hard-coded-locale - See documentation] Link 'https://learn.microsoft.com/en-us/partner-center/azure-ri-server-subscriptions' contains locale code 'en-us'. For localizability, remove 'en-us' from links to most Microsoft sites.
Line 41, Column 46: [Suggestion: docs-link-absolute - See documentation] Absolute link 'https://learn.microsoft.com/en-us/partner-center/azure-ri-server-subscriptions' will be broken in isolated environments. Replace with a relative link.

For more details, please refer to the build report.
If you see build warnings/errors with permission issues, it might be due to single sign-on (SSO) enabled on Microsoft's GitHub organizations. Please follow instructions here to re-authorize your GitHub account to Learn Build.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.
For any questions, please:Try searching the learn.microsoft.com contributor guidesPost your question in the Learn support channel

Learn Build status updates of commit e68b92d:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

articles/cost-management-billing/reservations/prepay-databricks-reserved-capacity.md
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the learn.microsoft.com contributor guidesPost your question in the Learn support channel

Learn Build status updates of commit 36a5628:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

articles/cost-management-billing/reservations/prepay-databricks-reserved-capacity.md
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the learn.microsoft.com contributor guidesPost your question in the Learn support channel

@hiromingithub Thanks for making this update.
#sign-off


feat: Revert with immediate data optimization

Small optimization for revert with immediate data

Benchmark results
Metrics with a significant change:

app_circuit_witness_generation_time_in_ms (SchnorrAccount:verify_private_authwit): 27.7 (-30%)
protocol_circuit_simulation_time_in_ms (private-kernel-inner): 202 (+24%)
avm_simulation_bytecode_size_in_bytes (FeeJuice:_increase_public_balance): 11,004 (+35%)
avm_simulation_bytecode_size_in_bytes (FeeJuice:mint_public): 8,088 (+32%)
avm_simulation_bytecode_size_in_bytes (Token:mint_public): 15,051 (+28%)
avm_simulation_bytecode_size_in_bytes (Token:assert_minter_and_mint): 10,134 (+26%)
avm_simulation_bytecode_size_in_bytes (AuthRegistry:set_authorized): 6,205 (+37%)
avm_simulation_bytecode_size_in_bytes (Benchmarking:increment_balance): 9,153 (+23%)
avm_simulation_bytecode_size_in_bytes (Token:_increase_public_balance): 11,864 (+32%)

Detailed results
All benchmarks are run on txs on the Benchmarking contract on the repository. Each tx consists of a batch call  to create_note and increment_balance, which guarantees that each tx has a private call, a nested private call, a public call, and a nested public call, as well as an emitted private note, an unencrypted log, and public storage read and write.
This benchmark source data is available in JSON format on S3 here.
Proof generation
Each column represents the number of threads used in proof generation.

Metric
1 threads
4 threads
16 threads
32 threads
64 threads

proof_construction_time_sha256_ms
5,776
1,564
706 (-4%)
755 (-6%)
783 (-2%)

proof_construction_time_sha256_30_ms
11,854 (-1%)
3,179 (-1%)
1,415 (-2%)
1,443 (-2%)
1,493 (-5%)

proof_construction_time_sha256_100_ms
45,516
12,202 (+1%)
5,462 (-3%)
5,414 (-3%)
5,377 (-4%)

proof_construction_time_poseidon_hash_ms
79.0
34.0 (-3%)
34.0 (-3%)
58.0 (-5%)
87.0 (-3%)

proof_construction_time_poseidon_hash_30_ms
1,537 (-1%)
424
203 (-2%)
219 (-6%)
268 (-4%)

proof_construction_time_poseidon_hash_100_ms
5,660
1,516 (-1%)
677 (-3%)
725 (-4%)
750 (-3%)

L2 block published to L1
Each column represents the number of txs on an L2 block published to L1.

Metric
4 txs
8 txs
16 txs

l1_rollup_calldata_size_in_bytes
4,324
7,844
14,852

l1_rollup_calldata_gas
49,684
92,468
177,812

l1_rollup_execution_gas
1,383,178
2,130,930
3,958,313

l2_block_processing_time_in_ms
256 (-1%)
441
808 (+2%)

l2_block_building_time_in_ms
9,465 (+3%)
18,522 (+3%)
36,950 (+3%)

l2_block_rollup_simulation_time_in_ms
9,465 (+3%)
18,522 (+3%)
36,950 (+3%)

l2_block_public_tx_process_time_in_ms
7,986 (+2%)
16,946 (+3%)
35,334 (+3%)

L2 chain processing
Each column represents the number of blocks on the L2 chain where each block has 8 txs.

Metric
3 blocks
5 blocks

node_history_sync_time_in_ms
2,972 (+4%)
3,776 (-1%)

node_database_size_in_bytes
12,652,624
16,732,240

pxe_database_size_in_bytes
16,254
26,813

Circuits stats
Stats on running time and I/O sizes collected for every kernel circuit run across all benchmarks.

Circuit
simulation_time_in_ms
witness_generation_time_in_ms
input_size_in_bytes
output_size_in_bytes
proving_time_in_ms

private-kernel-init
122 (+28%)
407 (+1%)
21,654
44,858
N/A

private-kernel-inner
:warning: 202 (+24%)
727 (-4%)
72,300
45,005
N/A

private-kernel-reset-tiny
510 (+2%)
906
65,964
44,844
N/A

private-kernel-tail
222 (+7%)
167 (-1%)
50,728
52,256
N/A

base-parity
5.61
N/A
160
96.0
N/A

root-parity
33.4
N/A
69,084
96.0
N/A

base-rollup
2,908 (+2%)
N/A
187,817
664
N/A

root-rollup
38.9 (-2%)
N/A
54,525
716
N/A

public-kernel-setup
105 (+6%)
N/A
103,760
71,222
N/A

public-kernel-app-logic
114 (+11%)
N/A
103,599
71,222
N/A

public-kernel-tail
582 (+1%)
N/A
409,190
16,414
N/A

private-kernel-reset-small
501 (+1%)
N/A
66,085
45,629
N/A

private-kernel-tail-to-public
1,018 (-4%)
666
492,107
1,697
N/A

public-kernel-teardown
103 (+11%)
N/A
104,005
71,222
N/A

merge-rollup
19.5 (+3%)
N/A
35,742
664
N/A

undefined
N/A
N/A
N/A
N/A
65,085 (+1%)

Stats on running time collected for app circuits

Function
input_size_in_bytes
output_size_in_bytes
witness_generation_time_in_ms

ContractClassRegisterer:register
1,344
11,731
341

ContractInstanceDeployer:deploy
1,408
11,731
18.6 (+2%)

MultiCallEntrypoint:entrypoint
1,920
11,731
426 (+1%)

FeeJuice:deploy
1,376
11,731
390

SchnorrAccount:constructor
1,312
11,731
106 (+1%)

SchnorrAccount:entrypoint
2,304
11,731
436 (+1%)

Token:privately_mint_private_note
1,280
11,731
145 (+1%)

FPC:fee_entrypoint_public
1,344
11,731
27.4 (+3%)

Token:transfer
1,312
11,731
284 (+4%)

Benchmarking:create_note
1,344
11,731
105 (+5%)

SchnorrAccount:verify_private_authwit
1,280
11,731
:warning: 27.7 (-30%)

Token:unshield
1,376
11,731
563 (-1%)

FPC:fee_entrypoint_private
1,376
11,731
765

AVM Simulation
Time to simulate various public functions in the AVM.

Function
time_ms
bytecode_size_in_bytes

FeeJuice:_increase_public_balance
51.0 (-6%)
:warning: 11,004 (+35%)

FeeJuice:set_portal
11.7 (+5%)
2,661 (+13%)

Token:constructor
82.7 (-1%)
33,949 (+9%)

FPC:constructor
55.3 (+3%)
23,745 (+6%)

FeeJuice:mint_public
37.1 (-4%)
:warning: 8,088 (+32%)

Token:mint_public
41.6 (-6%)
:warning: 15,051 (+28%)

Token:assert_minter_and_mint
69.4 (-2%)
:warning: 10,134 (+26%)

AuthRegistry:set_authorized
34.9 (-7%)
:warning: 6,205 (+37%)

FPC:prepare_fee
230 (-5%)
9,462 (+7%)

Token:transfer_public
18.7 (-9%)
51,772 (+9%)

FPC:pay_refund
52.4 (-24%)
13,501 (+12%)

Benchmarking:increment_balance
990 (+2%)
:warning: 9,153 (+23%)

Token:_increase_public_balance
38.4 (-3%)
:warning: 11,864 (+32%)

FPC:pay_refund_with_shielded_rebate
63.0 (-7%)
14,425 (+14%)

Public DB Access
Time to access various public DBs.

Function
time_ms

get-nullifier-index
0.159

Tree insertion stats
The duration to insert a fixed batch of leaves into each tree type.

Metric
1 leaves
16 leaves
64 leaves
128 leaves
256 leaves
512 leaves
1024 leaves

batch_insert_into_append_only_tree_16_depth_ms
2.19
3.87 (-1%)
N/A
N/A
N/A
N/A
N/A

batch_insert_into_append_only_tree_16_depth_hash_count
16.8
31.7
N/A
N/A
N/A
N/A
N/A

batch_insert_into_append_only_tree_16_depth_hash_ms
0.114
0.110 (-1%)
N/A
N/A
N/A
N/A
N/A

batch_insert_into_append_only_tree_32_depth_ms
N/A
N/A
11.5 (-1%)
17.9 (-1%)
31.3 (-1%)
59.5 (+1%)
112

batch_insert_into_append_only_tree_32_depth_hash_count
N/A
N/A
95.9
159
287
543
1,055

batch_insert_into_append_only_tree_32_depth_hash_ms
N/A
N/A
0.111
0.104 (-1%)
0.101 (-1%)
0.102 (+1%)
0.100 (+1%)

batch_insert_into_indexed_tree_20_depth_ms
N/A
N/A
14.3 (-1%)
25.5 (-1%)
44.5 (+1%)
82.0 (-1%)
162 (+3%)

batch_insert_into_indexed_tree_20_depth_hash_count
N/A
N/A
109
207
355
691
1,363

batch_insert_into_indexed_tree_20_depth_hash_ms
N/A
N/A
0.109 (-1%)
0.103
0.107 (+4%)
0.102
0.103 (+3%)

batch_insert_into_indexed_tree_40_depth_ms
N/A
N/A
16.5
N/A
N/A
N/A
N/A

batch_insert_into_indexed_tree_40_depth_hash_count
N/A
N/A
132
N/A
N/A
N/A
N/A

batch_insert_into_indexed_tree_40_depth_hash_ms
N/A
N/A
0.106
N/A
N/A
N/A
N/A

Miscellaneous
Transaction sizes based on how many contract classes are registered in the tx.

Metric
0 registered classes
1 registered classes

tx_size_in_bytes
64,779
668,997

Transaction size based on fee payment method
| Metric |  |
| - |  |

Not more efficient due to constant caching, closing!


chore: clean up useless code

Signed-off-by: Jintao Zhang<EMAIL_ADDRESS>
Type of change:

[x] Clean up

What this PR does / why we need it:

These codes were introduced in #746.
Pre-submission checklist:

[ ] Did you explain what problem does this PR solve? Or what new features have been added?
[ ] Have you added corresponding test cases?
[ ] Have you modified the corresponding document?
[ ] Is this PR backward compatible? If it is not backward compatible, please discuss on the mailing list first

Codecov Report

Merging #902 (0a297f3) into master (8348d01) will increase coverage by 0.00%.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #902   +/-   ##
=======================================
  Coverage   32.05%   32.06%
=======================================
  Files          71       72    +1
  Lines        7775     7776    +1
=======================================
+ Hits         2492     2493    +1
  Misses       5009     5009
  Partials      274      274

Impacted Files
Coverage Δ

pkg/kube/translation/apisix_route.go
22.43% <ø> (ø)

pkg/kube/translation/util.go
32.71% <ø> (ø)

test/e2e/e2e.go
100.00% <0.00%> (ø)

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 8348d01...0a297f3. Read the comment docs.


identity/cache: don't panic in CachingIdentityAllocator.Close()

Closing a CachingIdentityAllocator currently panics if InitIdentityAllocator() has not been called. With the ongoing hiveification this causes a problem:
level=panic msg="Close() called without calling InitIdentityAllocator() first" subsys=identity-cache
panic: (*logrus.Entry) 0xc000666b60

The reason this happens is that we now create a CachingIdentityAllocator using hive, before newDaemon is invoked. Essentially:

Create a new CachingIdentityAllocator using hive
Call newDaemon(allocator)

Do a bunch of unrelated initialisation
Call allocator.InitIdentityAllocator

If any of the unrelated initialization fails, hive executes the stop hooks of all objects it has created. In the case of the allocator this invokes CachingIdentityAllocator.Close(). That function panics since we haven't reached InitIdentityAllocator in the initialization order yet.
Fix this by allowing to close an uninitialized allocator.
Fixes: d6503fa75b ("daemon: move circular initialization of policy.Repository to hive")

/test

/test

ci-l4lb failure is a flake as far as I can tell: https://github.com/cilium/cilium/issues/24728

Or alternatively this packages should be properly converted into a Cell so that both the initialization and cleanup are properly ordered and guaranteed (probably the right long-term approach, but I expect this is a significant additional effort over this proposal so I don't think it's reasonable to require that proposal to solve the current issue).

I started down this path a little bit, but it's very tricky to do I think. The problem is that there is a circular dependency in the "policy trifecta" as I called it. Getting rid of that is hard.
That said, I checked where the allocator is fully initialized: https://github.com/cilium/cilium/blob/22161112e06f215a5af9485c05489eba5aa21504/daemon/cmd/daemon.go#L1184-L1194
clientset is already provided via hive, so maybe moving the initialization call into hive is not as hard as it seems? Do you know where "node addressing" is configured?

Spoke with Jussi, fixing this correctly is going to be hard (TM). His suggestion was to change the Panic to an Error, which will also make our tests fail and avoids turning this into a silent error.

/test


Use slots in pure Python mode?

This is just an idea that I had while thinking about pure Python mode: in Python, using __slots__ makes a class quite close to an extension type: attributes are stored as PyObject * in the object structure.
So I would propose: in pure Python mode, translate a class with __slots__ to a cdef class and translate the attributes to cdef public object attributes.
Maybe this should not be enabled by default. At a minimum, we should use __slots__ when the class is declared as cdef class in the .pxd file or by @cython.cclass.

You can already use
@cython.cclass
class ExtType:
    x: cython.int
    y: str

I think that's better than caring about __slots__.

Sure, but you lose compatibility with older Python versions that way. Anyway, it was just an idea, feel free to shoot it down :-)

I agree that it would make a sense to do it for at least for classes
declared to be cdef classes, though if there's a pxd file we would need the
members listed explicitly there for cimporting.
On Tue, Jul 31, 2018 at 12:17 PM, jdemeyer<EMAIL_ADDRESS>wrote:

Sure, but you lose compatibility with older Python versions that way.
Anyway, it was just an idea, feel free to shoot it down :-)
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/cython/cython/issues/2526#issuecomment-409336405, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAdqgV3ISsm9yndgsgQkNSGvECAxavpKks5uMK1mgaJpZM4VoJfP
.

I'm closing this as a duplicate of #995.


Dependent Dynamic Fields

Description of issue
I didn't find anything in the documentation reporting about it, so I decided to create the issue. The use case would be as follows:
I have a question form and I would like new questions to appear if the user marks a specific answer.

Usage example
I have the following question:
Do you have a car?
a) Yes
b) No
If the user checks the option a (Yes), a new question would appear:
What color is it?
Answer: Blue
If the user selects option b (No), a new question would appear:
Do you want to buy one this year?
a) Yes
b) No
And so on ...
It would be fields that depend on answers to appear.

Hey @mateusc42,
Are you requesting a new feature or want to know how to get what you describe?

@carlosallexandre In fact I would like to know if there is a possibility to do this action today and if it exists, I would like an example.

@mateusc42,
You can do this with state. Maybe in the future we can have a custom hook useWatch (see the roadmap) that makes this easier. Later I will put a snippet of how you can do it.

@carlosallexandre,
UseWatch would be of great help in these features.
Thanks for the answer.


Fix add submodule for region_data

The submodule that was submited previously was empty. Never trust the n00b.

live!


Emoji Searchbar to long

How can i make the searchbar in the Emoji selection smaller?
( i am using FavoriteMedia so there a more Buttons)

You can stretch the size of it
https://github.com/user-attachments/assets/64e893eb-2612-4e64-9433-ebbeeb22ca3b

I made a css edit what can fix that :)
It aligns the bar to the right and makes it smaller
.searchBar_c6ee36.container_c18ec9.medium_c18ec9 {max-width: 200pt;margin-left: auto ;margin-right: 5;}
If the bar is to small or too big change the max-width: 200pt to be a a larger or smaller number
what it looks like


Markdown - incremental generation

One major improvement would be to incrementally generate Markdown files instead of regenerating from scratch every time gooseberry make is called.
This would involve keeping track of each annotation as a Section and only modifying it if its Updated time has changed + appending newly created annotations to the end.
This would theoretically allow a user to modify their markdown files in an editor of choice and store other kinds of (non-annotation) notes in it.
This would also help integrate Gooseberry into existing Markdown-based PKB tools.

This is probably not possible anymore because of the hierarchy configuration.

This is probably not possible anymore because of the hierarchy configuration.


Update cran repo for compatibility with debian 11

Updates as per https://cran.r-project.org/bin/linux/debian/

/gcbrun


Update french translation

Fix previous string translations and add the buttons text translation

This was incorporated into #118.


Add more logs to help debug event missing issue

In this change we

specify the event id range of dropped events,
Add a log line when logEvent failed and returned 0.

Codecov Report

Merging #637 (dca1970) into master (2468803) will increase coverage by 15.87%.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           master     #637       +/-   ##
===========================================
+ Coverage   54.16%   70.04%   +15.87%
===========================================
  Files         329      483      +154
  Lines       57161    87098    +29937
===========================================
+ Hits        30962    61008    +30046
+ Misses      26199    26090      -109

Impacted Files
Coverage Δ

...iles/data-management/Current/LoggingManagement.cpp
78.02% <100.00%> (-14.07%)
:arrow_down:

src/test-apps/schema/nest/test/trait/TestETrait.h
55.55% <0.00%> (-44.45%)
:arrow_down:

src/lib/profiles/time/WeaveTime.h
60.00% <0.00%> (-40.00%)
:arrow_down:

src/lib/core/WeaveCircularTLVBuffer.h
62.50% <0.00%> (-37.50%)
:arrow_down:

src/lib/support/logging/WeaveLogging.cpp
56.86% <0.00%> (-19.33%)
:arrow_down:

...i/security-support/native/WeaveSecuritySupport.cpp
57.89% <0.00%> (-15.44%)
:arrow_down:

src/lib/support/PersistedCounter.cpp
79.24% <0.00%> (-10.12%)
:arrow_down:

src/lib/core/WeaveTLVWriter.cpp
85.53% <0.00%> (-7.42%)
:arrow_down:

src/lib/profiles/security/WeaveSig.cpp
87.25% <0.00%> (-5.55%)
:arrow_down:

... and 278 more

Continue to review full report at Codecov.

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


added support for EP0099

EP0099 is a stackable 4-channel relay hat that communicates with
platforms via i2c interface.
Manufacturer: 52pi
Wiki page: https://wiki.52pi.com/index.php/DockerPi_4_Channel_Relay_SKU:_EP-0099

Codecov Report

Merging #5 (a1d03c4) into main (296894b) will decrease coverage by 0.1%.
The diff coverage is 78.6%.

@@           Coverage Diff           @@
##            main      #5     +/-   ##
=======================================
- Coverage   63.2%   63.1%   -0.1%
=======================================
  Files         46      47      +1
  Lines       4034    4076     +42
=======================================
+ Hits        2549    2573     +24
- Misses      1357    1371     +14
- Partials     128     132      +4

Impacted Files
Coverage Δ

ep0099/ep0099.go
78.6% <78.6%> (ø)

hx711/hx711.go
67.6% <0.0%> (-6.8%)
:arrow_down:

lepton/lepton.go
85.7% <0.0%> (-1.4%)
:arrow_down:

as7262/as7262.go
98.0% <0.0%> (-1.0%)
:arrow_down:

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 296894b...a1d03c4. Read the comment docs.

I like this approach, I just don't see how to figure out which channel we're referring to in method Out since we're passing the index to the array, not to dev.
type (r *Relay) Out(l gpio.Level) error {
	_, err := d.i2c.Write([]byte{channel, byte(StateOn)})
	r.state = StateOn
	return err
}```

I've been learning a lot with this PR, maybe there's a way to figure out what channel would be without looping through Relays and comparing d to items in the array.

Maybe this solution needs some more thinking.
I am happy with the results so far and am ok with merging it like this.

One last point: do you mind following the instruction at https://github.com/periph/devices/pull/5#issuecomment-775185342?

gohci

Thanks!


Tweak for v0.14 compat layer

require 'fluent/input' needs to work with v0.14 Compatible layer.

travis fails with ruby 2.2, but let me merge anyway. I will fix.


Two-factor authentication

@nylen one organization on GitHub that I know of just got maliciously deleted, because they gave owner access to too many people. I know that's not the case here, but probably it's a good idea for all contributors to have their Two-factor authentication enabled. You should be able to see this info as an owner.

It turned out that the organized was removed by mistake through the GitHub's official application for Windows by some non experienced engineer :smile: Anyway they problem was they gave him owner rights of course. Still just a reminder for everyone to enable its Two-factor authentication at least. Closing.

Btw the guys at GitHub were able to restore the entire organization, not only the repositories but all of the meta data as well - issues, pr's and so on (good to know)


failing region_k_means test with bleeding edge libpysal

This seems to have started failing with https://github.com/pysal/libpysal/pull/511. However, adding either sort_joins={True, False} to this line results in the same failure.
E            x: array([1, 0, 0, 0, 1, 2, 1, 0, 2])
E            y: array([1, 1, 1, 0, 1, 2, 0, 0, 2])

../miniconda3/envs/py311_spopt/lib/python3.11/contextlib.py:81: AssertionError

cc @knaaptime

xref https://github.com/pysal/libpysal/pull/510, https://github.com/pysal/libpysal/pull/514, https://github.com/pysal/esda/issues/239
Gentle ping to @knaaptime and @sjsrey on these failures. I am wondering if we need to either (1) update the tests here in spopt; (2) make a change to the code base here; or (3) revert something in back up in libpysal? Any idea?

Resolved w/ https://github.com/pysal/libpysal/pull/528 – thanks @ljwolf!


it seem HikariPool don't suport presto jdbc

HikariCP version: 3.2.0
JDK version     : 1.8.0_111
Database        : presto
Driver version  : 0.223

com.zaxxer.hikari.pool.HikariPool$PoolInitializationException: Failed to initialize pool: Unrecognized connection property ''

i use streamsets UI tool(https://streamsets.com) .This tool USES HikariCP as a connection pool，it look like HikariCP Unrecognized 'presto'

What was the resolution?


How to get more contributors?

I have been thinking about this topic since a long time ago but didn't got yet a clear solution. It seems NodeOS has got some interest to be used on production or it's already being used for it, but for being this possible in the long term it would need to be dedicated some more time and not being only a "hobby" done in our spare time both for maintenance and development of new features (NodeOS has became a really big project with a lot of dependencies that need to be maintained, although I'm trying to automate these tasks the most I can), and since we are several here that would be interested on getting some revenues, I think it's time to ask the big question: how to monetize NodeOS, so I've open this issue to discuss for alternatives and try to find solutions for this.
The main problem I think we have are:

How to measure contributions
There are collaborators from around the world in different timezones
There are collaborators that don't participate anymore

This makes it difficult to define a model fair for everybody beyond to use BountySource where anybody gets payed for the issues that he solve, but that doesn't give promotion of NodeOS at big scale. It would be possible to create a company/association (I think Germany laws are easy for this, maybe @michielbdejong can give us some advice here, could you? :-) ) that give support, consultancy and expertise about NodeOS, but here the problem is how don't give the feel that NodeOS is owned by that company.
A NodeOS Foundation would be the coolest option by putting the project in the first place and maybe would make it easier to get some sponsors and assists to events representing to NodeOS and not only just as individuals (as I have done on the keynotes and championships, but try to give on them the attributions to @groundwater for starting the project and the other collaborators as much as I can), but here we come again the the first problem: how to distribute the money in a fair way.
Another option, maybe the better, is to forget by the moment about the beneficts and create a non-proffit organization just to have some identity and to promote NodeOS itself, try to get some sponsors for travelling to conferences and little more (at this moment we don't have any cost on servers or similar, only the website domain), and if things go well, maybe promote the organization to a foundation and dedicate those sponsor funds to pay a developer for one or two months working full or part-time or by objectives. I admit from start that I would candidate for that if we get to that situation (just to be clear and honest), but although I'm the most active one here and has a somewhat mind-map of how I want NodeOS to be, I'm not propossing this to "get all the money" but instead I'm very concerned and worried about how to make others to benefict for their work on NodeOS.
Also, there's the big problem of promote NodeOS and nock some doors to get sponsors of the project and financiation... I think Node.js Foundation and NPM org would be the obvious candidate to ask for, but we would need to show we are not just some kids playing here, so adding native git support for npm with a pure javascript library instead of relaying on an external git cli command would be a really good presentation letter. Later we would consider other big players like Mozilla Foundation if we get a good integration with B2G OS (I know it's community driven, but sure they are not unaware what's happening on their community ;-) ) and if we got luck we could also ask to the Linux Foundation as an example of how powerful and easy to use Linux has became in the last years.
Opinions? Suggestions? There are some list here on GitHub about finatial mechanism for Open Source projects, it would be a good idea to reference them here too.
/cc @luii, @5paceManSpiff, @SpaceboyRoss01, @kskarthik, @Coretool, @lapineige, @lissyx, @Ryuno-Ki, @khanshakeeb

Don't give up, you project is amazing! It is a great idea. I think that you can start from donation button on the blog pages. P.S. I'am sorry for my poor english.

[...] so adding native git support for npm with a pure javascript library instead of relaying on an
external git cli command would be a really good presentation letter.

Like i mentioned on #67 im writing nogit (nodeos-git) using nodegit which is a wrapper for libgit2 and currently im implementing the features for the 1.0.0 Milestone.
Unlikely i dont have much time but currently im ill and can do some progress on nogit.

I think that you can start from donation button on the blog pages

Yeah, but where does this money (if any) goes? It would not be fair to go just to my pocket, and NodeOS don't have a legal figure to send it there. Each one can have a "pay me and I'll work on NodeOS" button, but what developer should I pay then? We are several here, and it would make people loose the focus on the project...

Like i mentioned on #67 im writing nogit (nodeos-git) using nodegit which is a wrapper for libgit2 and currently im implementing the features for the 1.0.0 Milestone.

I know, this was just an example of how we can get their attention :-) Or maybe we could ask them for money in advance to do it, too... Why don't you try to ask them?

@piranna We could monetize support for commercial projects (and maybe solve it like Qt ?).
A clever way would be solving distribution via shares so who owns most shares gets most (in this case probably you because you're kind of the lead dev). We could distribute shares on the devs and set of a part of the shares to be bought (so we get a kind of starting capital). Later we would gain via the licence and profit would be distributed via shares. That's the way silicon valley solved it ...

@piranna You say that you wish to monetize NodeOS but I seem to have miss the important part: why do you need money?
Personally, I think the best approach at this stage would be to promote the project like crazy. Recruit contributors, build a healthy project. The contributor's graph shows that this is pretty much a one-person project.
That leads me to my next point, paying developers to support an OSS project. One risk is that when the money dries up, the project dies. Additionally, it can be difficult to maintain project autonomy since there is now a financial incentive to keep your sponsors happy. Allowing the project to bend to the will of sponsors is risky because it may harm your ability to secure funding from other sources.
If, for example, you get a check from Mozilla, would you suddenly make B2G a higher priority? If so, how would other potential sponsors feel about that?
Many foundations serve to help projects stay "pure" by keeping the funding separate from the development effort. I believe that benefit alone is worth consideration.
Anyways, this topic is pretty huge and I'm certainly curious about where things go from here.

Recruit contributors, build a healthy project.

A really good point! For instance, I'd like to participate, but I really don't understand where to start. Are there any talks, docs, blog posts about the main idea, architecture overview, use cases on so on and so forth?

@vitkarpov the readme on the main page links to our current two "todo lists". We probably should link to where progress on these is being done but for now if anything peaks your interest just let me know. A new wiki is under works but there is plenty of information available to help understand how things work in the issue threads and in the current github wiki.
Should you have any questions, just tag me and I'll try to help. Welcome to NodeOS!

@piranna You say that you wish to monetize NodeOS but I seem to have miss the important part: why do you need money?

Are you asking on a personal point of view, or about NodeOS? In the last case, the main reason is to be able to "work" on NodeOS and be able to give it the attention that's requiring now that it's getting so big, where other jobs and personal life don't allow me or others to give it time, delegating NodeOS to being it just a hobbie and maybe losing the opportunity to make it something bigger to what it's now...

Personally, I think the best approach at this stage would be to promote the project like crazy. Recruit contributors, build a healthy project.

This is a good idea too. How could this be done in an effective way? Do you have some ideas? So far I have only managed to do some keynotes... Some companies got interest on NodeOS but only about to use it as a final product.

The contributor's graph shows that this is pretty much a one-person project.

 One of the things that need to be done is improve documentation to make it easier to newcomers to add new contributions, specially graph diagrams, how-tos, how components are related ones to others...

That leads me to my next point, paying developers to support an OSS project. One risk is that when the money dries up, the project dies. Additionally, it can be difficult to maintain project autonomy since there is now a financial incentive to keep your sponsors happy. Allowing the project to bend to the will of sponsors is risky because it may harm your ability to secure funding from other sources.
If, for example, you get a check from Mozilla, would you suddenly make B2G a higher priority? If so, how would other potential sponsors feel about that?

I don't find it so bad as far as the sponsors only give suggestions or require addons and don't interfere with the long term project design moving it at their will, but this is just my personal opinion...

Many foundations serve to help projects stay "pure" by keeping the funding separate from the development effort. I believe that benefit alone is worth consideration.

To have unrelated to get the funds and to code the project? Yes, that would be ideal, specially because I'm not a public relationship kind of person. Seems Node.js itself works this way, having the Node.js Foundation to replace the funds management of StrongLoop, and without its influence on the code... This is somewhat related what I told before about creating an organization or foundation.

Anyways, this topic is pretty huge and I'm certainly curious about where things go from here.

Me too, I opened it also to start the discussion, thank you for your comments :-)

Recruit contributors, build a healthy project.
A really good point! For instance, I'd like to participate, but I really don't understand where to start. Are there any talks, docs, blog posts about the main idea, architecture overview, use cases on so on and so forth?

In this way, probably the most complete documentation is my degree thesis. It's released as CreativeCommons and in GitBook format but it's on spanish, I'm open for contributions if someone want to update or translate it, but please first tell me it so I can be able to add support for several languajes (or add support for it first yourself :-) ).

@vitkarpov the readme on the main page links to our current two "todo lists". We probably should link to where progress on these is being done but for now if anything peaks your interest just let me know. A new wiki is under works but there is plenty of information available to help understand how things work in the issue threads and in the current github wiki.

A page on the wiki showing the dependencies tree and links to all the NodeOS related projects would be good too... :-)

@piranna wrote:

I think Node.js Foundation and NPM org would be the obvious candidate to ask for

What about the jQuery Foundation?
@Coretool wrote:

@piranna We could monetize support for commercial projects (licences, one time fee) and maybe solve it like Awesomium ?

Aurelia solved it by offering customization for money. Themes and that like.
@piranna wrote:

In this way, probably the most complete documentation is my degree thesis. It's released as CreativeCommons and in GitBook format but it's on spanish, I'm open for contributions if someone want to update or translate it, but please first tell me it so I can be able to add support for several languajes (or add support for it first yourself :-) ).

English would be a good starter (lingua franca to most people). Spanish is widely used also.
@piranna wrote:

A page on the wiki showing the dependencies tree and links to all the NodeOS related projects would be good too... :-)

Reminds me to get grunt-graphviz running again … if time permits …

@piranna Great response, thanks for getting this Issue going, I'm enjoying the discussion.
Okay, so really what you're after at this stage is development resources. Making it easy for someone to contribute is the first step, and often that means writing documentation and crafting a solid development experience. Following that, the Issues should be accessible as well, using labels to identify estimated effort and difficulty can help new contributors ease their way into the project.
Once it's easy to add collaborators then you can recruit for help without getting overwhelmed, and without the new collaborating getting frustrated and wandering off.
Question: outside of github issues, where can we chat? I'd love to just catch up one-on-one on IRC or Slack or what-have-you.. how can this be done?

In terms of documentation I think most pf it structurel vs api. Something like JSDoc will be useless considering most of the important are things like filestructure, user organization, startup and shell operations. I know groundwater explained asguard (though hes no longer with us) but ultimately that was high level with minimal to no hooks or events in between.
Whats the events that can / should be plugged into? How do you plug into this events via "installation"? How can I help @piranna? :)

@aulvi wrote:

Question: outside of github issues, where can we chat? I'd love to just catch up one-on-one on IRC or Slack or what-have-you.. how can this be done?

What about Gitter? It should be fairly easy to create a gitter.im channel for this repository. You can log in via GitHub their.

@Ryuno-Ki We have gitter.

@Coretool I see.
@aulvi Have a look at https://gitter.im/NodeOS/NodeOS

@Ryuno-Ki:

What about the jQuery Foundation?

Any help would be welcome :-)

Aurelia solved it by offering customization for money. Themes and that like.

Not bad idea, that's mostly what flavours are intended for... Maybe should I put a list of this ideas in the first post for reference and don't need to dig all the messages?

English would be a good starter (lingua franca to most people). Spanish is widely used also.

I did it in spanish because they told me doing it in english don't give any extra value, and also since it's not my mother language, it would be more difficult to be reviewed by others and if I have had some grammar failures it would be against my final score... :-/ Anyway, I graduated with distinction, so what the f*ck :-P
I have upgraded it to add support for multilanguage so we could start to translate it (english first, of course), but the book generation is failing due to the mermaid plugin and the usage of PhantomJS, so I think I'll need to change it for another one that don't make use of PhantomJS and also it's more updated, but would need to add him the support of load mermaid files from the filesystem too... :-/ Any volunteer? :-D
@aulvi:

@piranna Great response, thanks for getting this Issue going, I'm enjoying the discussion.

You are welcome, that was my intention :-)

Okay, so really what you're after at this stage is development resources.

Mostly yes, we need more horse power here, being that more contributions and just only need to accept pull-requests and responding emails, or be able to have one or several developers working part or full-time on the project, specially for the "big things" like refactoring the build mechanism to use the QEmu nomenclature. Add to this the fact that I have been having a really strange and bad year both personal professional and economically (is that the 30 years old crisis?) needing to pick some frustrating jobs to pay the bills and removing hours of sleep to dedicate them to NodeOS up to the point of thinking about to f*ck off everything just after finishing my degree and just code by hobbie on my spare time, and you have the perfect storm to spontaneouly think about how you would make a life from the project where you really want to invest time, and that in fact needs someone to invest time in it too. Point is, having so much people involved here, it's not easy to don't make people think you are an *sshole... :-/

Making it easy for someone to contribute is the first step, and often that means writing documentation and crafting a solid development experience. Following that, the Issues should be accessible as well, using labels to identify estimated effort and difficulty can help new contributors ease their way into the project.

I agree on that, and hope we can move towards this. The docs repo is the correct place to put this, question is, what should a newcomer expect from NodeOS, and how we can guide him to add contributions? I think in that way to document the dependencies tree go in the correct path, and a CONTRIBUTE.md file would help too. The issues labels is a good thing too, we are underusing them but they are not easy to create on the fly...

Question: outside of github issues, where can we chat? I'd love to just catch up one-on-one on IRC or Slack or what-have-you.. how can this be done?

I'm not too much into chats due to interactivity and too much noise (I use WhatsApp, and thank you), I like more email and/or GitHub issues and answer when I have some spare time, but since Slack is getting some traction, maybe we could create one if there's not one already... I think there was a Gitter and some people were using it, but as I've said, I'm not sure because I'm not into chats :-P Anyone can confirm that?
@formula1

In terms of documentation I think most pf it structurel vs api. Something like JSDoc will be useless considering most of the important are things like filestructure, user organization, startup and shell operations. I know groundwater explained asguard (though hes no longer with us) but ultimately that was high level with minimal to no hooks or events in between.
Whats the events that can / should be plugged into? How do you plug into this events via "installation"? How can I help @piranna? :)

I think a good start would be to add some text explaining what the modules do and how in plain english on the README.md files of the different modules repos. That could be done by reviewing the source code of them, that can be used to add JsDoc to them and also upgrade to ES6 or fix some bugs if someone is into the mood :-) Adding tests can help too, not only by finding failures on corner cases but also to think about how the APIs would be made easier and cleaner... everybody wins :-)

What about Gitter? It should be fairly easy to create a gitter.im channel for this repository. You can log in via GitHub their.

If it's not already done and you want to create and maintain it, go for it :-)

@piranna wrote:

I have upgraded it to add support for multilanguage so we could start to translate it (english first, of course), but the book generation is failing due to the mermaid plugin and the usage of PhantomJS, so I think I'll need to change it for another one that don't make use of PhantomJS and also it's more updated, but would need to add him the support of load mermaid files from the filesystem too... :-/ Any volunteer? :-D

Hey, @kurai021 - you've worked with Mermaid back then. Can you have a look into this?
@piranna wrote:

The issues labels is a good thing too, we are underusing them but they are not easy to create on the fly...

I wonder how Greenkeeper does it …
Concerning Gitter look at https://github.com/NodeOS/NodeOS/issues/279#issuecomment-238076120

I have just added some level tags to the issues and filled the issues with them. They are

easy: simple tasks that a newcomer would do it without too much problems or that can be done in short time
medium: easy tasks, but needs to know a bit how NodeOS works or it's structured
hard: really need to know what you are doing, mostly add new features. Probably several hours working on several projects simultaneously
**gurú: needs to have a global view of how NodeOS works and where it moves fordward, and/or usually they are needed knowledges on systems programming. Usually they would need several hours or days to fully achieve them

I've also added a tag for the task that would be long to achieve and probably would be better to collaborate with others to achieve it.

They have just told me about Precipita initiative, a crowdfunding platform for scientific projects that we would be able to opt-in. There are two requeriments that needs to be fullfilled by someone of the group, work in a public organism, and have some scientific publications in the last two years. I'm working in the university, but don't have any article yet, is there someone that could fullfill the requeriments?
On the other hand, I have been thinking some time ago that I could be able to write some papers about NodeOS technology and infraestructure, and in fact this would not only help to promote the project and the ones that help to write the paper, but also would help as documentation of the project :-) Anyone is interested to join me on this? :-D

I maybe know somebody who would could opt as the guy with the publication ... He's very interested in your / our work on NodeOS ;)
Maybe I could also help writing ...

Any help is welcome :-)

Any help is welcome :-)

Mozilla awards are open until end of month :-D
https://blog.mozilla.org/blog/2016/08/04/mozilla-awards-585000-to-nine-open-source-projects-in-q2-2016/

Shoul we participate? :-)

@Ryuno-Ki I have worked with Mermaid.js and Markdown-pdf to generate documents, but Markdown-pdf depends of Phantom.js. What's the problem here?

@piranna If we can't lose something, why not ?

We cant lose anything, why not.

@Ryuno-Ki I have worked with Mermaid.js and Markdown-pdf to generate documents, but Markdown-pdf depends of PhantomJS. What's the problem here?

The problem seems to be related to gitbook-plugin-mermaid using an old version of PhantomJS. I think the best option would be to use one of the alternative modules that don't require it, but they would need some improvements to add support to load Mermaid diagrams from the filesystem instead of being hardcoded...

https://wiki.mozilla.org/MOSS/Mission_Partners

The project’s home can be anywhere in the world where we can make payment without undue burden. We have a reasonably strong preference for funding legal organizations rather than individuals representing projects, although exceptional circumstances could lead to some flexibility.

I supposed it... We would need to think what we do with that... :-/
Here you have the inscription form if you want to provide comments, but questions like "where to send the money" and "how much do you need" are complicated to answer... :-/ Probably it's better to try to organize ourselves and work on generate a good documentation and create a healthy community first. On the other hand, is there someone with experience creating associations or organizations? I only had it as vocal, no more...

Community is a necessity even if we were well-funded, so I believe that's a good place to start.
We need contributors. Let's reach out on Twitter, friendly blogs, tech sites, etc and make it known that we're looking for folks to help at all levels. I'd be more than happy to help with this part.

It would be possible to create a company/association (I think Germany laws are easy for this, maybe @michielbdejong can give us some advice here, could you? :-) ) that give support, consultancy and expertise about NodeOS, but here the problem is how don't give the feel that NodeOS is owned by that company.

IMHO, governments and the legal entities they offer are old-fashioned. Sure, everybody who receives money from a donations pot in exchange for (or as an enabler for) software development or other work should write that money onto their tax statement in the country where that person happens to pay taxes. But you can write it down as 'income from other activities', and your government will tax you appropriately.
Other than that, you don't need the involvement of any nation state government, you can just keep track of donations and project finance using a text file, spreadsheet or database. It's not necessary to have a bank account in the project's name to do things like crowd-funding, flattr, bountysource, etc. You can just link a contributor's personal paypal or bank account. I would say avoid paperwork, it will just distract and cost money. :)

Community is a necessity even if we were well-funded, so I believe that's a good place to start.

We need contributors. Let's reach out on Twitter, friendly blogs, tech sites, etc and make it known that we're looking for folks to help at all levels. I'd be more than happy to help with this part.

Agreed, focus on the community (Your already doing this and it's doing very well.) when you put community first the money / funding will follow, one way or another. Just keep your heads up and keep making this project awesome.
Just wanted to chime in :)

@aulvi

Community is a necessity even if we were well-funded, so I believe that's a good place to start.

It's clearly that at this stage the first move is to create a healthy community and try get NodeOS to live by itself without depending of living-assistance funds, so let's focus on it. I have already change the issue topic to How to get more contributors? to show this, sorry if someone would be offended for the previous title or the initial intention of the issue to raise money for the project and/or its developers/contributors.
@michielbdejong

Other than that, you don't need the involvement of any nation state government, you can just keep track of donations and project finance using a text file, spreadsheet or database. It's not necessary to have a bank account in the project's name to do things like crowd-funding, flattr, bountysource, etc. You can just link a contributor's personal paypal or bank account. I would say avoid paperwork, it will just distract and cost money. :)

Hi dude! Please to read you again! :-) So, are you saying that's enough by having a public doc where people can see what money goes in and out so everybody can see that things are transparent and fair?

do some freelance work to save up some money, then take a few months "sabbatical" to work on your open source project. When people see on the project website that you're a main contributor, you could add a link saying 'Available for hire' and get paid gigs like that

Willing to live by coding free software, both that advices are really interesting from a personal point of view :-) Thanks dude! :-D
@junland

Agreed, focus on the community (Your already doing this and it's doing very well.)

Thank you! ^^ I think I can do it better, but thank you anyway :-)

@piranna Awesome stuff, thanks again for getting this Issue moving forward. Please let me know how I can help spread the word.

@piranna Awesome stuff, thanks again for getting this Issue moving forward. Please let me know how I can help spread the word.

Main thing, start moving it on social networks like Twitter and Facebook.
Local Meetups and conferences you would already assists or know (specially the Node.js related ones) are a good place to meet people that would be interested on the project, and having people talking about NodeOS on Node.js Interactive Europe this September would be really cool... :-D That's why I talked about having some minimal funds for travelling expenses to conferences and so :-)
Universities and computer clubs, and systems department teachers would be interested too.
Maybe at OsDev and other similar forums would be interested to take a look...

But maybe the most important thing would be to take a look at the project as a newcomer and each one ask himself: "I don't know nothing about the project but want to contribute, what info I would like to find to start poking around?"

I have created yesterday the NodeOS project dependencies tree page on the wiki, so we now can have a high-fly view of how NodeOS is organized... and it's huge :-P
I have included all the dependencies expanding them up to the point where it's found an external project (should we remove them and left only "useful" links?), and put links and badges (where available) to projects of NodeOS organization or done by NodeOS contributors for them, being in cursive the ones that are unmerged forks of third-party projects. It lacks the projects that are not directly involved with NodeOS itself, like the web page or coverdeeps.
So from this first iteration, things that I can see can be done:

[ ] we have a lot of projects without (complete) tests and also without a README.md, mostly due to my fault to try to get them working fast to have NodeOS ready for the championships, so adding them and configuring a CI server to check tests coverture (and add the badges :-D ) would be a good task for a newcomer that want to get into NodeOS source code :-) Let's collect as much (useful) badges as we can and make that wiki page seem like a Christmas tree! :-D
[ ] get to be send merged upstream so we can use upstream serve-static on Davius. I have open two pull-requests that need to be reviewed, hope to have done soon, but if someone wants to give it a try please tell me.
[ ] replace custom forever and forever-monitor by PalmTree (I was sure this was already done... :-/)
[ ] automate check and update of newer versions of external dependencies like libfuse or the Linux kernel using buho.
[ ] update pstree to use upstream scanf
[ ] update download-manager to use upstream new download 4.x. This is specially important since they have added streamed downloads, making it to require a lot less memory by doing the decompression on the fly

Since NodeOS is managed per npm, I wonder, whether the process can be automated using npm ls … It has a --json and a --parseable flag.

Since NodeOS is managed per npm, I wonder, whether the process can be automated using npm ls … It has a --json and a --parseable flag.

Yes it can, in fact `coverdeeps uses it, but now that we have done the dependencies tree is just a matter of maintain it updated.

Replaced download module from download-manager for got.

@piranna I organize my local Node.js meetup and will see about making a short presentation about NodeOS in hopes of piquing interest in my local dev community. Next meetup is a couple of weeks away, I'll let you know how it goes.

That's cool! :-D Will it be recorded? We could put all the keynotes and
slides on the website for others to see :-)
El 19/8/2016 23:20, "Adam Ulvi"<EMAIL_ADDRESS>escribió:

@piranna https://github.com/piranna I organize my local Node.js meetup
and will see about making a short presentation about NodeOS in hopes of
piquing interest in my local dev community. Next meetup is a couple of
weeks away, I'll let you know how it goes.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/NodeOS/NodeOS/issues/279#issuecomment-241138231, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAgfviMaspM1rgpUPqAKy_l5atK7_299ks5qhh4NgaJpZM4Jcgye
.

Hm... we've got a CCC (Chaos Computer Club) in Zurich, maybe one of them is interested, I'll check that ^^.

Hm... we've got a CCC (Chaos Computer Club) in Zurich, maybe one of them
is interested, I'll check that ^^.

Wow, that would be an honor if you would do a talk about NodeOS on the
CCC... :-)
Here at Spain there used to be here some similar hacker conventions, but
they were mostly related with the okupy movement and now they have
dissapeared since there are no more okupied social centers here at Madrid
(or I'm not aware of them anymore...) :-/ Curious fact, Pablo Iglesias
(leader of Podemos political party) and me used to go 13 years ago to
"Laboratorio 3", the most important center of Madrid at that time :-P

I have subscribed NodeOS to be candidate for a bachelor to help develop the project and also get more visibility on TV and the media. According to rules the likes are not taken in account, but they help to improve visibility and at least we are on the first page :-) What I have doubts is about try to opt for one of the bachelor of up to 8000€ each month (so there are more posibilities) that would help to have someone working during some months or go to conferences like current one NodeInteractive, or go for the big one of 20000€ that would allow to have someone working for a year, but there's only one of them and will be given next year :-/ What do you think?
And on other things, I will have an introductory meeting with some investors next monday afternoon to talk about possible case of use and commercial posibilities for NodeOS, so any idea will be welcome :-)

@piranna Commercial licensing is an interesting idea, I'm very curious to hear how your conversation with the investors go.
If you can provide to the investors a very clear picture of what the money will help you accomplish, all the better. At this stage in the project, the investors would be investing in YOU, so being confident and positive in your meeting should go a long way.

@piranna Commercial licensing is an interesting idea

Could be, but probably this would be a re-license of the project, since it was discussed about use MIT license, so everybody is free to do comercial usage for the code. Using a more restrictive license like GPL would have open the door to a dual-license scheme for commercial usage, though. This could be a dificult thing to explain to them, but my intention is to left NodeOS and related project as Free Software, and if so, left as closed source only new ad-hoc modules, but definitely nothing in the core and if possible anything derived from it.

I'm very curious to hear how your conversation with the investors go.

I'll post here the results. If it not get cancel or delayed, will be next monday at 15:00 Spain timezone, so hope to put the updates that night or next day in the morning.

If you can provide to the investors a very clear picture of what the money will help you accomplish, all the better

At this moment the main problem would be my lack of time, while some months ago I had a lot of it... :-P But in this case I think this first conversation will be mostly about what commercial viability and use cases would NodeOS offer, not so much about money itself, just money-making ideas. So the question is, what would you use NodeOS for? :-)

At this stage in the project, the investors would be investing in YOU, so being confident and positive in your meeting should go a long way

Thank you for the encouragment! :-D

Monday afternoon was yesterday. What was the outcome, @piranna?

Monday afternoon was yesterday. What was the outcome, @piranna?

Lol :-P Not so bad. They are excited and impresed about the project and where taking a lof of notes about what I was telling them trying to figure out how it could be monetized, but the problem seems to be that NodeOS don't have a clearly defined target. Yes, it can be used on cloud servers, but the key question was, "why I would be interested on using NodeOS instead of <raw linux/Heroku/whatever>?". I explained them that people is trying to use it on mobile phones and the interest on use it as a desktop system (they think it could be a step backwards, by the way) and how much performance it has or how much difficult it could be to port it to ARM or other architectures. They could be somewhat interested on using it for IoT in "fog computing" (the space between the real hardware and online cloud) to provide low latency operation results for microcontroller-based IoT devices and sensors instead of doing the long trip to the cloud servers, so in this aspect they are mostly interested about CPU and battery usage benchmarks. We have agreed to keep in touch to see if in the new days we get some specific target where NodeOS could fit and there's no actual alternative in terms of performance or CPU and battery consumption. And of course, we should start trying to work hard to make NodeOS to run on ARM...

@piranna NodeOS is a solution looking for a problem :)
Once you step into the IoT space, things makes a lot more sense. Buy some NodeOS-supported boards, use javascript to develop the entire solution, and quickly bring a product to market.
I believe the strength of the platform is developer accessibility, not necessarily performance or battery life. Marketing the project from that perspective could be a lot easier than attempting to compete with purpose-built low-power IoT devices.

@piranna NodeOS is a solution looking for a problem :)

Like all my projects...

Once you step into the IoT space, things makes a lot more sense. Buy some NodeOS-supported boards, use javascript to develop the entire solution, and quickly bring a product to market.

At this moment we only support x86, that leaves us with Intel Galileo and similar ones. We need to move to ARM and Raspberry Pi ASAP.

I believe the strength of the platform is developer accessibility, not necessarily performance or battery life. Marketing the project from that perspective could be a lot easier than attempting to compete with purpose-built low-power IoT devices.

Obviously, but the feeling they gave me is that developer accessibility is not so much important as other economical factors, so that would left us in fast-paced environments or homebrew projects. Anyway I think it would be a good thing to focus on being developer friendly so later they could be interested on using it on production, and eating our own dog food would be a good thing too, maybe that last one point is the one that mostly motivates me at this moment to get some finantial backend, not so much about the money itself (we have lived until now without it with no problems) but instead to not being a solution looking for a problem anymore :-)
Disclaimer: yesterday my old company Kurento was adquired by Twilio and I was not on the boat since a year ago (in part derived by personal disputes with my boss due to NodeOS), and I'm a bit depresive and pesimistic due to that, so don't take it too much in account on this or other messages.

If you could port this to ARM, that would be astounding IMO. I always saw this project as an eventual means to run a server/js OS on IoT devices, was hoping to allow applications it's own little micro-web bubble in-between lots of tiny devices. So if say 3 devices running NodeOS all shared work to form a bigger picture, I'd be gamifying the devices into cool aspects of a web-based app game.
Simplest example: Pretend I'm making a sims game where YOU/I are the sim, I'm collecting gold on my phone from completing simple tasks such as: SmartWatch notices hunger ( by insert medical watch implementation), Alerts you via SIMS that fridge needs checked, gain a point for stocking fridge with key foods.
All devices are programmed in JS to handle tasks and manipulate data, but could use your phones power to generate the respective images and other GPU type things, and simply in-house pass them to the device that needs it to be there, but cannot handle it on it's own. OR doesn't HAVE to do it on it's own. That can all be packed within the game app, or game app server to app to other devices.
Respects to however this project turns out :) I'm just excited, and figured an outside look on what someone else thought it might have been, could be helpful.

Well, ARM port is WIP, the cross-compiler is able to generate ARM code and in fact the Linux kernel can be compiled, but it doesn't work. When I tried it almost one year ago I was able to make it boot on QEmu but got a kernel panic when giving control to the init process, but now I only get a black screen. I'm not sure if it's a problem of NodeOS or about QEmu, needs to do more checks on that area and I'm not an ARM expert (in fact, didn't used it before), so any help on that topic is welcome. Maybe it's a matter of include u-boot, don't know. The target at this moment is Raspberry Pi / raspi2, in case you are interested in give it a try.

@piranna I'd like to add that maybe NodeOS might be suited for Hypervisors such as KVM, Xen, and VMware. NodeOS, kinda fits in the paradigm of "unikernel" seems like a there's a couple of projects like "MirageOS" (OCamel) and "IncludeOS" (C/C++) that have / working on achieving this with there respective programming languages. With that, NodeOS would be stepping into the Enterprise space, which might be a good outlet for funding / support from other companies / contributors.

ARM uses Big.little technology, there are sets of little cores which you can utilize for general data manipulation and procedures, files etc., then generally a smaller set of Big cores that help function as busrty powerhouses used in visuals and other power consuming operations. If you keep a mindset that you can add balance in the change of things instead of each thing, that way utilizing all cores is easier and more async.

@piranna I'd like to add that maybe NodeOS might be suited for Hypervisors such as KVM, Xen, and VMware. NodeOS, kinda fits in the paradigm of "unikernel" seems like a there's a couple of projects like "MirageOS" (OCamel) and "IncludeOS" (C/C++) that have / working on achieving this with there respective programming languages. With that, NodeOS would be stepping into the Enterprise space, which might be a good outlet for funding / support from other companies / contributors.

Not a bad idea, this is mostly a matter of how to configure the kernel, do you know how to do and test this? In this point, now that we have Docker support probably would be of more interest for the enterprise environment, isn't it?

For the purposse of this issue, I have found this list of points about how to promote an open source project. Probably it would be a good idea to think what of them we would implement and how, what do you think?


When used in a browser, I think the library is a bit too big!

When used in a browser, I think the library is a bit too big.
The code is mainly caused by the Colors list and the reference to the humanize package.

For the colors list, it would be better if I use a function to generate it. According to the rules of the colors list, I simplified it to the following function to generate 186 colors.

/**
 * 用于显示时的文字颜色列表
 */
export const colors = (() => {
  const list = [];
  for(let a = 0; a <= 0xf; a += 3) {
    const a16 = a.toString(16);
    for(let b = 0; b <= 0xf; b += 3) {
      const b16 = b.toString(16);
      for(let c = 0; c <= 0xf; c += 3) {
        const c16 = c.toString(16);
        if(
          !(a === 0 && b <= 9 && c < 0xc)
          && !(a > 9 && b > 9 && c > 9)
          )
          list.push(`#${a16}${a16}${b16}${b16}${c16}${c16}`);
      }
    }
  }
  return list;
})();

The humanize package only uses its internal fmtShort method, which is only used to add a time unit to the diff variable. I think this simple method is enough. such as:

var oneSecond = 1000;
var oneMinute = oneSecond * 60;
var oneHour = oneMinute * 60;

function humanize(ms) {
  ms = parseInt(ms, 10);
  if (ms >= oneHour) {
    return Math.round(ms / oneHour) + 'h';
  }
  if (ms >= oneMinute) {
    return Math.round(ms / oneMinute) + 'm';
  }
  if (ms >= oneSecond) {
    return Math.round(ms / oneSecond) + 's';
  }
  return ms + 'ms';
}

This will be completely configurable in v5. As for now, there's not going to be any effort to minimize the package beyond what it already is. You're asking for mere bytes to be removed. That's overoptimizing.

@Qix- Isn’t it meaningful to reduce the byte size of the code running in the browser?

Not when it's just a few bytes, no.


Fix parse_url

We're already splitting the URL while sanitizing. No need to reassemble and then disassemble it again, which also prevents https://github.com/getsentry/sentry-python/issues/2160
Tested locally on 3.11.4
Fixes https://github.com/getsentry/sentry-python/issues/2160

Fix released: https://github.com/getsentry/sentry-python/releases/tag/1.25.1


Adjust Chinese translation

Adjust Simplified Chinese translation.
Add Traditional Chinese translation.

Awesome, this was a needed translation.  Thanks @kuoruan !! :D


put this on pypi pls

i need i t./,

I'll put it on pypi once I make sure it's all working correctly because at the moment the difficulty calculation is off. I still have the necessary files in repository for you to install it from the github using pip. Refer to this StackOverflow thread for help with that.

I also would like to note that I haven't updated the code for the recent difficulty changes, but I'll be working on it soon.


script build.sh  continues to execute even if the docker is not available

It happens that I start the build.sh at the moment when docker is not running yet.
The script shows the trace of the error from the "docker-compose up" but does not quit, but continues executing commands
This is not critical at the moment, but in the future it may have destructive actions.

Resolve in #161


Bring data from fk table

Hey guys, I'm trying to bring the complete data from 2 tables using fk.
For example:
My table "user" has a fk role_id, so I would like to bring role data into the same query.
I could do it using:
select
	"user".*,
	"role"."name" as "role_name"
from
	"user" join "role" on "user"."role_id" = "role"."id";

But the result:
fields:
   [ { name: 'id'},
     { name: 'username'},
     { name: 'email'},
     { name: 'password'},
     { name: 'role_id'},
     { name: 'createdAt'},
     { name: 'updatedAt'},
     { name: 'role_name'} ]
rows:
   [ [ 3250001,
       'marlon',
<EMAIL_ADDRESS>       '************',
       1,
       Thu Jun 18 2015 16:24:22 GMT-0700 (PDT),
       Thu Jun 18 2015 16:24:22 GMT-0700 (PDT),
       'HP Admin'] ]

And I would like to see something like:
fields:
   [ { name: 'id'},
     { name: 'username'},
     { name: 'email'},
     { name: 'password'},
     { name: 'role_id'},
     { name: 'createdAt'},
     { name: 'updatedAt'},
     { name: 'role} ]
rows:
   [ [ 3250001,
       'marlon',
<EMAIL_ADDRESS>       '************',
       1,
       Thu Jun 18 2015 16:24:22 GMT-0700 (PDT),
       Thu Jun 18 2015 16:24:22 GMT-0700 (PDT),
       'role' : {id:1, name:'marlon'}] ]

I could do an extra query to bring the roles' data, but is there an better way of doing it?
Thanks.

That's not possible in SQL; you always get a flat table as a result of a query.


Update to .NET 6.0

Update to .NET 6.0

Pending mzLib update to net6.0, https://github.com/smith-chem-wisc/mzLib/pull/615
Includes changes to installer with new native libraries in net6.0 for linux and osx

Issue arising with spectral library generation
There is one error arising in library generation. @Yuling1996, could this be due to how mzMLs are printed in dynamic loading with mzLib? I had to change how mzMLs are printed, and the whitespace at the beginning of lines may have changed.

rachel and i worked on getting this to build in appveyor. complicated. wix on our local machines is bugged. looks like it needs vs update. i think we'll work more onit tomorrow.

I merged in your changes to the tests and such here (nice work on that!). Upon closer inspection this afternoon, I realized you were missing my changes to the installer, which is building in this PR.

cool. hope it builds. really want to get this done

I merged @trishorts's PR, https://github.com/smith-chem-wisc/MetaMorpheus/pull/2136 into here, and it's building!
The installer changes and dockerfile changes were needed for AppVeyor to work.

appveyor builds but the installed version crashes

When it builds, is the folder "native" or "nativeWin"?

nativeWin

Strange, so it's expecting a different name than it's building? Here's the line that names the folder in the installed directory. https://github.com/smith-chem-wisc/MetaMorpheus/blob/master/MetaMorpheusSetup/Product.wxs#L67

I'd recommend changing that line to have native, rather than nativeWin, building the installer, and trying it out and seeing if it fixes your crash. (I ran a small test of the installed app back in March but didn't run into a crash.)


CORS does not deal with Forwarded or X-Forwarded-xxx headers

Environment Details

Helidon Version: 2.x, 3.x
Helidon SE or Helidon MP
JDK version:
OS:
Docker version (if applicable):

Problem Description
Helidon's CORS support relies on the Host header (among other things) to make its decisions.
If intermediaries--load balancers, etc.--lie between the real client and the service, then when the request reaches the Helidon service the Host value no longer reflects the actual host.
HTTP specifies the Forwarded header which conveys by, for, host (which might include the port), and protocol as specified by the originating client.
Non-standard but widespread headers X-Forwarded-Host, X-Forwarded-For, X-Forwarded-Proto, and X-Forwarded-Port express the same information.
Helidon's CORS processing can be enhanced to prefer Forwarded if present, then X-Forwarded-xxx if present, and then Host for deriving the "effective host" to use in CORS decision-making.

My recommended design (for discussion):

add a configuration option to use non-Host headers (defaults to false)
add a configuration option to provide a list of headers that can be used to determine "frontend host", will be used in order of definition; if any of them is Forwarded, other headers would be ignored if Forwarded is present (as it should cover all cases); e.g. the options should be "forwarded, x-forwarded-host, x-forwarded-port, x-forwarded-proto" etc., so we always have a complete list of headers we should support (security measure)
add a method ServerRequest.usedAuthority() (or originalAuthority or similar) to obtain the authority as constructed from configured HTTP headers (may be same as HOST header in the simple case of no proxying or default config)
add a method ServerRequest.usedProtocol() to obtain the original protocol (such as http or https)
We may add additional methods, or we may add a single method that just returns URI - this would be a bit more expensive, and would have to be done lazily (as should any access to request headers anyway)

Adding usedXXX methods which take the headers into account implies that most parts of Helidon should use the raw values, ignoring the headers, and those parts would continue to invoke authority() and protocol as they do now.
Is that true? Could the argument be made that most parts of Helidon should consider the headers, and any that do not should invoke rawAuthority and rawProtocol explicitly?

As described, would this config approach allow the user to configure the list of headers to be x-forwarded-host only, without x-forwarded-port or x-forwarded-proto? There are, of course, other combinations. Is this a use case we should support? An alternative would be for the config value to contain zero or more of Forwarded, X-Forwarded with the second being a short-hand for the combination of all the X-Forwarded-* headers.

Both X-Forwarded-For https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For and Forwarded https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Forwarded can either appear multiple times or can contain multiple values. Especially the discussion for X-Forwarded-For goes into some detail about security concerns and "how far back" in the chain is safe to use. We will need to keep this in mind as we implement a solution.

The following information is needed:

protocol (scheme), such as http or https
host
port
path (some proxies can remove a path prefix which must be honored when redirecting)

The reason I do not like to combine X-Forwarded and Forwarded is that each supports a different set of options, and combining them may create mayhem when in the same request (e.g. we could take protocol from X-Forwarded-Proto and host from Forwarded). It seems to me that when a header is defined and we want to use it, we should honor all of the options from that header.
In addition we should follow the proxy whitelist approach for X-Forwarded-For to make sure all proxies on the list are trusted (with an option to trust all). The main reason is that the original IP address may be used for security purposes (such as whitelisted client IP addresses), and if we have non-trusted proxy on the path, user could inject anything they want.
I agree we may want to use existing methods to obtain the computed information, and add methods for "raw". This requires a bit of an analysis of usages of methods that provide such information (for example isSecure on webserver in such a case may change semantics, which would be a backward incompatible change).

I was not suggesting combining X-Forwarded-* with Forwarded. My comment about "other combinations" was different combinations of the X-Forwarded-* headers with each other.
I agree that, if both types of headers are present, we should use only one of them as directed by user settings and config, not combine some values from one and some from the other.
You mentioned using a whitelist for X-Forwarded-For. Would we want whitelisting for Forwarded: for also? Because both are just headers, is seems that both would be equally susceptible to corruption by bad actors.

yes, we should do the same to trust the intermediaries regardless of header types


add support for csky arch

add support for csky-unknown-linux-gnuabiv2

FWIW, when a new builtin target is added, our CI handles it automatically: https://github.com/crossbeam-rs/crossbeam/pull/1017

Thanks!


merge from konsum-frontend-svelte

README.md

docs(README): update from template

:tada: This PR is included in version 1.31.17 :tada:
The release is available on:

npm package (@latest dist-tag)
v1.31.17
GitHub release

Your semantic-release bot :package::rocket:


Where to change the polling

Hi
I've installed the integration but the instructions state:

Add it from the Integrations menu, set the desired new update interval

But where do I set the new interval? Do I have to add code to a .yaml or is there some other way.
Sorry but it's not clear where to set the interval.

I wonder if you are having the same issue I have. Basically, I'm not seeing the configuration UI nor service/sensor that supposed to be there. This also means I can't change the interval.

I wonder if you are having the same issue I have. Basically, I'm not seeing the configuration UI nor service/sensor that supposed to be there. This also means I can't change the interval.

I found it. After installing fasthue via Hacs then restarted go to HA integrations and add Hue fast polling integration.


Repo's size is too high

It is around 200 MB.

I have moved android release files to github.com/functioland/fula-android.
I think we can now prune the repo.


Add an if to check the 'meta' variable in the post

To Fix issue #32, i added an if to check the 'meta' variable in the post

Sorry, I'm not a git expert (I'm trying to learn ...)
After the pull request was performed, I received an "Not verified" note.
The popup said "Upload your public GPG key to verify your signature".
I followed the procedure and, in the "SSH and GPG Keys" page, I loaded the "PGP PUBLIC KEYS BLOCK"
Despite everything, the pull request is still "Not Verified" ...

No worries. We've all been there :) This guide from the CodeIgniter user guide should help with the signing.

No worries. We've all been there :) This guide from the CodeIgniter user guide should help with the signing.

Thank you very much!! Finally my commits are verified :)


Tip: Showing time in the keyword previews

Just like you’re using {var:} for the keywords themselves, you can use similar methods to show richer results. For example: instead of having ka say the computer will be kept awake for set hours, you can have them show directly:

And in kh and km, you can use {query} instead of x:

Thanks for the suggestion! I'm uploading a new version with {var:} and {query} for richer output :)