The charm cannot recover from a quorum loss event of 3-node cluster

Steps to reproduce

Prepare a MAAS provider
deploy a 3-node cluster
juju deploy postgresql --base<EMAIL_ADDRESS>--channel 14/stable -n 3
Take down the primary and one more unit to simulate a quorum loss event by losing 2 out of 3 nodes

Expected behavior
The cluster should stop accepting a write request to the PostgreSQL since it's a quorum loss event. However, the replica is valid in the living node out of 3 so the charm should be able to recover the cluster from the replica.
Actual behavior

The charm gets stuck at waiting for primary to be reachable from this unit and awaiting for member to start. Also Patroni configuration hasn't been recovered to be functional.
initial status
$ juju status
Model     Controller            Cloud/Region       Version  SLA          Timestamp
postgres  mysunbeam-controller  mysunbeam/default  3.5.3    unsupported  13:25:53Z

App         Version  Status  Scale  Charm       Channel    Rev  Exposed  Message
postgresql  14.11    active      3  postgresql  14/stable  429  no

Unit           Workload  Agent  Machine  Public address   Ports     Message
postgresql/0*  active    idle   0        <IP_ADDRESS>  5432/tcp
postgresql/1   active    idle   1        <IP_ADDRESS>  5432/tcp  Primary
postgresql/2   active    idle   2        <IP_ADDRESS>  5432/tcp

Machine  State    Address          Inst id    Base          AZ       Message
0        started  <IP_ADDRESS>  machine-7<EMAIL_ADDRESS>default  Deployed
1        started  <IP_ADDRESS>  machine-8<EMAIL_ADDRESS>default  Deployed
2        started  <IP_ADDRESS>  machine-1<EMAIL_ADDRESS>default  Deployed

$ sudo -u snap_daemon patronictl -c /var/snap/charmed-postgresql/current/etc/patroni/patroni.yaml topology
+ Cluster: postgresql<PHONE_NUMBER>178039038) ------+-----------+----+-----------+
| Member         | Host            | Role         | State     | TL | Lag in MB |
+----------------+-----------------+--------------+-----------+----+-----------+
| postgresql-1   | <IP_ADDRESS> | Leader       | running   |  1 |           |
| + postgresql-0 | <IP_ADDRESS> | Sync Standby | streaming |  1 |         0 |
| + postgresql-2 | <IP_ADDRESS> | Replica      | streaming |  1 |         0 |
+----------------+-----------------+--------------+-----------+----+-----------+

after taking down the Leader and Sync Standby
$ juju status
Model     Controller            Cloud/Region       Version  SLA          Timestamp
postgres  mysunbeam-controller  mysunbeam/default  3.5.3    unsupported  13:39:18Z

App         Version  Status  Scale  Charm       Channel    Rev  Exposed  Message
postgresql  14.11    active    1/3  postgresql  14/stable  429  no

Unit           Workload  Agent  Machine  Public address   Ports     Message
postgresql/0*  active    idle   0        <IP_ADDRESS>  5432/tcp
postgresql/1   unknown   lost   1        <IP_ADDRESS>  5432/tcp  agent lost, see 'juju show-status-log postgresql/1'
postgresql/2   unknown   lost   2        <IP_ADDRESS>  5432/tcp  agent lost, see 'juju show-status-log postgresql/2'

Machine  State    Address          Inst id    Base          AZ       Message
0        started  <IP_ADDRESS>  machine-7<EMAIL_ADDRESS>default  Deployed
1        down     <IP_ADDRESS>  machine-8<EMAIL_ADDRESS>default  Deployed
2        down     <IP_ADDRESS>  machine-1<EMAIL_ADDRESS>default  Deployed

$ sudo -u snap_daemon env PATRONI_LOG_LEVEL=DEBUG patronictl -c /var/snap/charmed-postgresql/current/etc/patroni/patroni.yaml list
2024-08-05 13:38:25,462 - DEBUG - Loading configuration from file /var/snap/charmed-postgresql/current/etc/patroni/patroni.yaml
2024-08-05 13:38:30,529 - INFO - waiting on raft
2024-08-05 13:38:35,530 - INFO - waiting on raft
2024-08-05 13:38:40,530 - INFO - waiting on raft
2024-08-05 13:38:45,531 - INFO - waiting on raft
2024-08-05 13:38:50,532 - INFO - waiting on raft
2024-08-05 13:38:55,532 - INFO - waiting on raft
2024-08-05 13:39:00,533 - INFO - waiting on raft
^C
Aborted!

-> the quorum loss is expected here.
cleanup of dead nodes
$ juju remove-machine --force 1
WARNING This command will perform the following actions:
will remove machine 1
- will remove unit postgresql/1
- will remove storage pgdata/1

Continue [y/N]? y

$ juju remove-machine --force 2
WARNING This command will perform the following actions:
will remove machine 2
- will remove unit postgresql/2
- will remove storage pgdata/2

Continue [y/N]? y

-> remove-machine --force was used on purpose since remove-unit is no-op when the agent is not reachable.
after cleanup
$ juju status
Model     Controller            Cloud/Region       Version  SLA          Timestamp
postgres  mysunbeam-controller  mysunbeam/default  3.5.3    unsupported  13:42:14Z

App         Version  Status  Scale  Charm       Channel    Rev  Exposed  Message
postgresql  14.11    active      1  postgresql  14/stable  429  no

Unit           Workload  Agent  Machine  Public address   Ports     Message
postgresql/0*  active    idle   0        <IP_ADDRESS>  5432/tcp

Machine  State    Address          Inst id    Base          AZ       Message
0        started  <IP_ADDRESS>  machine-7<EMAIL_ADDRESS>default  Deployed

-> status looks okay except for the fact that there is no "Primary" line
machine-7:~$ sudo -u snap_daemon env PATRONI_LOG_LEVEL=DEBUG patronictl -c /var/snap/charmed-postgresql/current/etc/patroni/patroni.yaml list
2024-08-05 13:43:18,378 - DEBUG - Loading configuration from file /var/snap/charmed-postgresql/current/etc/patroni/patroni.yaml
2024-08-05 13:43:23,445 - INFO - waiting on raft
2024-08-05 13:43:28,446 - INFO - waiting on raft
2024-08-05 13:43:33,446 - INFO - waiting on raft
^C
Aborted!

-> Patroni is still not working
$ sudo cat /var/snap/charmed-postgresql/current/etc/patroni/patroni.yaml

...

raft:
  data_dir: /var/snap/charmed-postgresql/current/etc/patroni/raft
  self_addr: '<IP_ADDRESS>:2222'
  partner_addrs:
  - <IP_ADDRESS>:2222
  - <IP_ADDRESS>:2222

...

  pg_hba:
    - local all backup peer map=operator
    - local all operator scram-sha-256
    - local all monitoring password
    - host replication replication <IP_ADDRESS>/32 md5
    - host all all <IP_ADDRESS>/0 md5
    # Allow replications connections from other cluster members.
    - host     replication    replication    <IP_ADDRESS>/0    md5

    - host     replication    replication    <IP_ADDRESS>/0    md5

...

-> there are left overs of dead unit configurations.
adding two nodes to form the 3-node cluster again
$ juju add-unit postgresql -n 2

after adding two nodes
$ juju status
Model     Controller            Cloud/Region       Version  SLA          Timestamp
postgres  mysunbeam-controller  mysunbeam/default  3.5.3    unsupported  13:57:16Z

App         Version  Status  Scale  Charm       Channel    Rev  Exposed  Message
postgresql  14.11    active      3  postgresql  14/stable  429  no

Unit           Workload  Agent  Machine  Public address   Ports     Message
postgresql/0*  waiting   idle   0        <IP_ADDRESS>  5432/tcp  waiting for primary to be reachable from this unit
postgresql/3   waiting   idle   3        <IP_ADDRESS>  5432/tcp  awaiting for member to start
postgresql/4   waiting   idle   4        <IP_ADDRESS>  5432/tcp  awaiting for member to start

Machine  State    Address          Inst id    Base          AZ       Message
0        started  <IP_ADDRESS>  machine-7<EMAIL_ADDRESS>default  Deployed
3        started  <IP_ADDRESS>  machine-8<EMAIL_ADDRESS>default  Deployed
4        started  <IP_ADDRESS>  machine-1<EMAIL_ADDRESS>default  Deployed

-> juju status doesn't settle.
$ sudo -u snap_daemon env PATRONI_LOG_LEVEL=DEBUG patronictl -c /var/snap/charmed-postgresql/current/etc/patroni/patroni.yaml list
2024-08-05 13:55:31,623 - DEBUG - Loading configuration from file /var/snap/charmed-postgresql/current/etc/patroni/patroni.yaml
2024-08-05 13:55:38,696 - INFO - waiting on raft
2024-08-05 13:55:43,696 - INFO - waiting on raft
2024-08-05 13:55:48,697 - INFO - waiting on raft
2024-08-05 13:55:53,697 - INFO - waiting on raft
2024-08-05 13:55:58,698 - INFO - waiting on raft
^C
Aborted!

-> Patroni hasn't been recovered
$ sudo cat /var/snap/charmed-postgresql/current/etc/patroni/patroni.yaml

...

raft:
  data_dir: /var/snap/charmed-postgresql/current/etc/patroni/raft
  self_addr: '<IP_ADDRESS>:2222'
  partner_addrs:
  - <IP_ADDRESS>:2222
  - <IP_ADDRESS>:2222
  - <IP_ADDRESS>:2222
  - <IP_ADDRESS>:2222

...

  pg_hba:
    - local all backup peer map=operator
    - local all operator scram-sha-256
    - local all monitoring password
    - host replication replication <IP_ADDRESS>/32 md5
    - host all all <IP_ADDRESS>/0 md5
    # Allow replications connections from other cluster members.
    - host     replication    replication    <IP_ADDRESS>/0    md5

    - host     replication    replication    <IP_ADDRESS>/0    md5

    - host     replication    replication    <IP_ADDRESS>/0    md5

    - host     replication    replication    <IP_ADDRESS>/0    md5

-> Patroni config still has leftovers. It has a 5-node cluster config instead of 3-node cluster.
Versions

Operating system: jammy

Juju CLI: 3.5.3-genericlinux-amd64

Juju agent: 3.5.3

Charm revision: 14/stable  429

LXD: N/A
Log output

Juju debug log:
3-node-recovery_debug.log

Additional context

Hi @nobuto-m , thank you for the well prepared bug report!
After the detailed investigation:

charm stuck is a known issue (duplicate of https://github.com/canonical/postgresql-operator/issues/418 => https://warthogs.atlassian.net/browse/DPE-3684 ), we should continue discussion there. TL;DR: The pySyncObj raft implementation is not-fixable. We tried to workaround this here no luck so far, exploring other options right now. In general Raft quorum works for 3+ nodes only.

Expected behavior: The cluster should stop accepting a write request to the PostgreSQL since it's a quorum loss event. However, the replica is valid in the living node out of 3 so the charm should be able to recover the cluster from the replica.
The initial idea was to elect new primary, continue writing there and all nodes rejoin the cluster.
It failed due to 1) above. New primary is not elected. Will be addressed in DPE-3684.
The stop accepting a write request should be performed by Patroni once quorum loss event noticed => didn't happen due to stuck in pySyncObj. Once we fix/replace the lib the behavior we have should match your expectation.

For the history: as discussed on the last sync with @nobuto-m , Data team has prepared PoC/fix and shared for testing privately to ensure implementation full-fits requirements.
P.S. we are not sharing the links here, because the last time we have found such experimental build in pre-production. ;-)

+1

@taurus-forever The deployment failed straightaway.
$ juju status
Model     Controller  Cloud/Region         Version  SLA          Timestamp
postgres  localhost   localhost/localhost  3.5.4    unsupported  19:59:43Z

App         Version  Status  Scale  Charm       Channel        Rev  Exposed  Message
postgresql           error       1  postgresql  14/edge/pr611  483  no       hook failed: "leader-elected"

Unit           Workload  Agent  Machine  Public address  Ports  Message
postgresql/0*  error     idle   0        <IP_ADDRESS>             hook failed: "leader-elected"

Machine  State    Address     Inst id        Base          AZ  Message
0        started  <IP_ADDRESS>  juju-5aece3-0<EMAIL_ADDRESS>    Running

$ juju debug-log -i postgresql/0 --replay --color --date --utc | head -n80
unit-postgresql-0: 2024-10-22 08:55:45 INFO juju Starting unit workers for "postgresql/0"
unit-postgresql-0: 2024-10-22 08:55:45 INFO juju.worker.apicaller [9ed86c] "unit-postgresql-0" successfully connected to "<IP_ADDRESS>:17070"
unit-postgresql-0: 2024-10-22 08:55:45 INFO juju.worker.apicaller [9ed86c] password changed for "unit-postgresql-0"
unit-postgresql-0: 2024-10-22 08:55:45 INFO juju.worker.apicaller [9ed86c] "unit-postgresql-0" successfully connected to "<IP_ADDRESS>:17070"
unit-postgresql-0: 2024-10-22 08:55:45 INFO juju.worker.upgrader no waiter, upgrader is done
unit-postgresql-0: 2024-10-22 08:55:45 INFO juju.worker.migrationminion migration migration phase is now: NONE
unit-postgresql-0: 2024-10-22 08:55:45 INFO juju.worker.logger logger worker started
unit-postgresql-0: 2024-10-22 08:55:45 ERROR juju.worker.meterstatus error running "meter-status-changed": charm missing from disk
unit-postgresql-0: 2024-10-22 08:55:45 INFO juju.worker.uniter unit "postgresql/0" started
unit-postgresql-0: 2024-10-22 08:55:45 INFO juju.worker.uniter resuming charm install
unit-postgresql-0: 2024-10-22 08:55:45 INFO juju.worker.uniter.charm downloading ch:amd64/jammy/postgresql-483 from API server
unit-postgresql-0: 2024-10-22 08:55:52 INFO juju.worker.uniter hooks are retried true
unit-postgresql-0: 2024-10-22 08:55:54 WARNING unit.postgresql/0.pgdata-storage-attached /var/lib/juju/agents/unit-postgresql-0/charm/./src/charm.py:2050: DeprecationWarning: Calling `ops.main.main()` is deprecated, call `ops.main()` instead
unit-postgresql-0: 2024-10-22 08:55:54 WARNING unit.postgresql/0.pgdata-storage-attached   main(PostgresqlOperatorCharm)
unit-postgresql-0: 2024-10-22 08:55:54 INFO juju.worker.uniter.operation ran "pgdata-storage-attached" hook (via hook dispatching script: dispatch)
unit-postgresql-0: 2024-10-22 08:55:54 INFO juju.worker.uniter.storage initial storage attachments ready
unit-postgresql-0: 2024-10-22 08:55:55 WARNING unit.postgresql/0.install /var/lib/juju/agents/unit-postgresql-0/charm/./src/charm.py:2050: DeprecationWarning: Calling `ops.main.main()` is deprecated, call `ops.main()` instead
unit-postgresql-0: 2024-10-22 08:55:55 WARNING unit.postgresql/0.install   main(PostgresqlOperatorCharm)
unit-postgresql-0: 2024-10-22 08:55:55 INFO unit.postgresql/0.juju-log Running legacy hooks/install.
unit-postgresql-0: 2024-10-22 08:55:55 WARNING unit.postgresql/0.install /var/lib/juju/agents/unit-postgresql-0/charm/./src/charm.py:2050: DeprecationWarning: Calling `ops.main.main()` is deprecated, call `ops.main()` instead
unit-postgresql-0: 2024-10-22 08:55:55 WARNING unit.postgresql/0.install   main(PostgresqlOperatorCharm)
unit-postgresql-0: 2024-10-22 08:55:56 INFO unit.postgresql/0.juju-log Installing snap charmed-postgresql, revision 124, tracking 14/stable
unit-postgresql-0: 2024-10-22 08:55:57 WARNING unit.postgresql/0.install error: snap "charmed-postgresql" is not available on 14/stable but is available
unit-postgresql-0: 2024-10-22 08:55:57 WARNING unit.postgresql/0.install        to install on the following channels:
unit-postgresql-0: 2024-10-22 08:55:57 WARNING unit.postgresql/0.install
unit-postgresql-0: 2024-10-22 08:55:57 WARNING unit.postgresql/0.install        14/edge    snap install --channel=14/edge charmed-postgresql
unit-postgresql-0: 2024-10-22 08:55:57 WARNING unit.postgresql/0.install
unit-postgresql-0: 2024-10-22 08:55:57 WARNING unit.postgresql/0.install        Please be mindful pre-release channels may include features not
unit-postgresql-0: 2024-10-22 08:55:57 WARNING unit.postgresql/0.install        completely tested or implemented. Get more information with 'snap info
unit-postgresql-0: 2024-10-22 08:55:57 WARNING unit.postgresql/0.install        charmed-postgresql'.
unit-postgresql-0: 2024-10-22 08:55:57 ERROR unit.postgresql/0.juju-log An exception occurred when installing charmed-postgresql. Reason: Snap: 'charmed-postgresql'; command ['snap', 'install', 'charmed-postgresql', '--channel="14/stable"', '--revision="124"'] failed with output = ''
unit-postgresql-0: 2024-10-22 08:55:57 INFO juju.worker.uniter.operation ran "install" hook (via hook dispatching script: dispatch)
unit-postgresql-0: 2024-10-22 08:55:58 WARNING unit.postgresql/0.upgrade-relation-created /var/lib/juju/agents/unit-postgresql-0/charm/./src/charm.py:2050: DeprecationWarning: Calling `ops.main.main()` is deprecated, call `ops.main()` instead
unit-postgresql-0: 2024-10-22 08:55:58 WARNING unit.postgresql/0.upgrade-relation-created   main(PostgresqlOperatorCharm)
unit-postgresql-0: 2024-10-22 08:55:58 INFO juju.worker.uniter.operation ran "upgrade-relation-created" hook (via hook dispatching script: dispatch)
unit-postgresql-0: 2024-10-22 08:55:59 WARNING unit.postgresql/0.database-peers-relation-created /var/lib/juju/agents/unit-postgresql-0/charm/./src/charm.py:2050: DeprecationWarning: Calling `ops.main.main()` is deprecated, call `ops.main()` instead
unit-postgresql-0: 2024-10-22 08:55:59 WARNING unit.postgresql/0.database-peers-relation-created   main(PostgresqlOperatorCharm)
unit-postgresql-0: 2024-10-22 08:55:59 INFO juju.worker.uniter.operation ran "database-peers-relation-created" hook (via hook dispatching script: dispatch)
unit-postgresql-0: 2024-10-22 08:56:00 WARNING unit.postgresql/0.restart-relation-created /var/lib/juju/agents/unit-postgresql-0/charm/./src/charm.py:2050: DeprecationWarning: Calling `ops.main.main()` is deprecated, call `ops.main()` instead
unit-postgresql-0: 2024-10-22 08:56:00 WARNING unit.postgresql/0.restart-relation-created   main(PostgresqlOperatorCharm)
unit-postgresql-0: 2024-10-22 08:56:00 INFO juju.worker.uniter.operation ran "restart-relation-created" hook (via hook dispatching script: dispatch)
unit-postgresql-0: 2024-10-22 08:56:01 INFO juju.worker.uniter found queued "leader-elected" hook
unit-postgresql-0: 2024-10-22 08:56:01 WARNING unit.postgresql/0.leader-elected /var/lib/juju/agents/unit-postgresql-0/charm/./src/charm.py:2050: DeprecationWarning: Calling `ops.main.main()` is deprecated, call `ops.main()` instead
unit-postgresql-0: 2024-10-22 08:56:01 WARNING unit.postgresql/0.leader-elected   main(PostgresqlOperatorCharm)
unit-postgresql-0: 2024-10-22 08:56:08 ERROR unit.postgresql/0.juju-log Uncaught exception while in charm code:
Traceback (most recent call last):
  File "/var/lib/juju/agents/unit-postgresql-0/charm/./src/charm.py", line 2050, in <module>
    main(PostgresqlOperatorCharm)
  File "/var/lib/juju/agents/unit-postgresql-0/charm/venv/ops/main.py", line 45, in main
    return _main.main(charm_class=charm_class, use_juju_for_storage=use_juju_for_storage)
  File "/var/lib/juju/agents/unit-postgresql-0/charm/venv/ops/_main.py", line 543, in main
    manager.run()
  File "/var/lib/juju/agents/unit-postgresql-0/charm/venv/ops/_main.py", line 529, in run
    self._emit()
  File "/var/lib/juju/agents/unit-postgresql-0/charm/venv/ops/_main.py", line 518, in _emit
    _emit_charm_event(self.charm, self.dispatcher.event_name, self._juju_context)
  File "/var/lib/juju/agents/unit-postgresql-0/charm/venv/ops/_main.py", line 134, in _emit_charm_event
    event_to_emit.emit(*args, **kwargs)
  File "/var/lib/juju/agents/unit-postgresql-0/charm/venv/ops/framework.py", line 347, in emit
    framework._emit(event)
  File "/var/lib/juju/agents/unit-postgresql-0/charm/venv/ops/framework.py", line 857, in _emit
    self._reemit(event_path)
  File "/var/lib/juju/agents/unit-postgresql-0/charm/venv/ops/framework.py", line 947, in _reemit
    custom_handler(event)
  File "/var/lib/juju/agents/unit-postgresql-0/charm/lib/charms/tempo_k8s/v1/charm_tracing.py", line 735, in wrapped_function
    return callable(*args, **kwargs)  # type: ignore
  File "/var/lib/juju/agents/unit-postgresql-0/charm/./src/charm.py", line 1087, in _on_leader_elected
    self.update_config()
  File "/var/lib/juju/agents/unit-postgresql-0/charm/lib/charms/tempo_k8s/v1/charm_tracing.py", line 735, in wrapped_function
    return callable(*args, **kwargs)  # type: ignore
  File "/var/lib/juju/agents/unit-postgresql-0/charm/./src/charm.py", line 1801, in update_config
    self._patroni.render_patroni_yml_file(
  File "/var/lib/juju/agents/unit-postgresql-0/charm/lib/charms/tempo_k8s/v1/charm_tracing.py", line 735, in wrapped_function
    return callable(*args, **kwargs)  # type: ignore
  File "/var/lib/juju/agents/unit-postgresql-0/charm/src/cluster.py", line 627, in render_patroni_yml_file
    version=self.get_postgresql_version().split(".")[0],
AttributeError: 'NoneType' object has no attribute 'split'
unit-postgresql-0: 2024-10-22 08:56:08 ERROR juju.worker.uniter.operation hook "leader-elected" (via hook dispatching script: dispatch) failed: exit status 1
unit-postgresql-0: 2024-10-22 08:56:08 INFO juju.worker.uniter awaiting error resolution for "leader-elected" hook
unit-postgresql-0: 2024-10-22 08:56:13 INFO juju.worker.uniter awaiting error resolution for "leader-elected" hook

Just for the history: the last post reports duplicate of https://warthogs.atlassian.net/browse/DPE-5648
... Installing snap charmed-postgresql, revision 124, tracking 14/stable
... error: snap "charmed-postgresql" is not available on 14/stable but is available

The CharmHub branch has been updated and now installable in #611.


Add ways to execute fennel code from neovim

@rktjmp I'm not sure if this falls under this plugin . But since it encourages using fennel even in small amounts I think it should help a bit with writting fennel too :)
It's too hard to write fennel without someway of exexuting and verifying that the code works . hotpot only loades the code once on require . Even re requiring the file after clearing package cache is clumsy .
After a good fight with fennel 😂
I've put this in my configs
(fn get_range_lines [line1 line2]
  "
    Get buffer lines from range line1 - line2
    line1 & line2 can either be line number or position line [row, col]
  "
  (var retval [])
  (if (= (type line1) "number")
      (set retval (vim.api.nvim_buf_get_lines 0 (- line1 1) line2 false))
    (= (type line1) "table")
      (let [[line1_row line1_col] line1
            [line2_row line2_col] line2
            buf (vim.api.nvim_buf_get_lines 0 (- line1_row 1) line2_row false)]
          (when (> (length buf) 0)
            (tset buf 1 (string.sub (. buf 1) line1_col + 1))
            (tset buf (length buf) (string.sub (. buf (length buf)) 1 (+ line2_col 1)))
            (set retval buf))))
  retval)

(fn exec_fennel_str [...]
   "Executes input strings as fennel code"
  (let [buf (table.concat [...] " ")
        compiled-str ((. (require "fennel") "compileString") buf)]
    ((loadstring compiled-str))))

(fn exec_fennel_range [line1 line2]
  "Execute range from line1 - line2"
  (let [lines (table.concat (get_range_lines line1 line2) "\n")]
     (exec_fennel_str lines)))

(fn exec_fennel_file [fname]
  "Execute file fname"
  (local fname (vim.fn.expand fname))
  (local file (io.open fname))
  (if file
    (let [buf (file:read "*a")]
      (file:close)
      (exec_fennel_str buf))
    (print "File not found")))

(fn exec_fennel [line1 line2 fname]
  "Executes range line1 - line2 when fname isn't provided.
   When fname is provided executes the file.
   Used by :FennelFile command
  "
  (if (= fname "")
    (exec_fennel_range line1 line2)
    (exec_fennel_file fname)))

(fn fennel_operator_eval []
  "Executes range from mark '[ to mark '] set by 'opfunc'"
  (let [line1 (vim.api.nvim_buf_get_mark 0 "[")
        line2 (vim.api.nvim_buf_get_mark 0 "]")]
     (exec_fennel_range line1 line2))
  (if (. (require "exec_fennel") "opfunc_backup")
    (tset vim.o "operatorfunc" (. (require "exec_fennel") "opfunc_backup"))
    (tset (require "exec_fennel") "opfunc_backup"  "")
  ))

(fn exec_fennel_operator []
  "Sets fennel_operator_eval as 'opfunc' and trigures oppending mode"
  (tset (require "exec_fennel") "opfunc_backup" "")
  (tset vim.o "operatorfunc" "v:lua.require'exec_fennel'.fennel_operator_eval")
  (vim.api.nvim_feedkeys "g@" "n" false))

(fn define_commands []
  "Defines vimL api"
  (vim.cmd "
   command! -range=% -nargs=? -complete=file FennelFile :lua require'exec_fennel'.exec_fennel(<line1>, <line2>, <q-args>)
   command! -nargs=+ Fennel :lua require'exec_fennel'.exec_fennel_str(<q-args>)
   au! my_commands SourceCmd *.fnl :FennelFile <afile>
   nnoremap <Plug>(exec-fennel-operator) :lua require'exec_fennel'.exec_fennel_operator()<cr>
   "))

{ : get_range_lines
  : exec_fennel_range
  : exec_fennel_str
  : exec_fennel
  : define_commands
  : exec_fennel_operator
  "opfunc_backup" ""
  : fennel_operator_eval }

It provides

:Fennel that directly executes fennel from argument. like :lua
:FennelFile that executes a fennel file. like :source . Just like source it excepts range so you can execute specific regions of curremt buffer with that . If :FinnelFile is executed without argument and range it just executes current buffer . Again just mimics :source interface.
A normal mode map for an operator \<Plug>(exec-fennel-operator) . This can execute fennel code from current buffer that is selected by operator . Like I have it mapped to \<leader>fe and I can go to a paran and do <leader>fe% or \<leader>fea( to execute the block
Also sets a auto command so you can :source fennel files .

If you like you can put some of these interface in this plugins as helper.

Thought Lisp had too many parens for you?? :vomiting_face:
Yeah I have been debating whether a :Fnl command was scope creep or not but I had been coming around to it. I think if Hotpot goal is "make you think Fennel is native" it makes sense.
I don't want to fall into the trap of writing a REPL when olical/conjure does such a great job, but I think these very focused tools would be a good fit.
Don't worry about submitting a patch as Hotpot will probably get a minor code-shuffle in the next few days now that I understand the problem space better and I'll probably fold them in then if that's ok. Right now they don't really have a place to live.
Adding :source support is particularly amazing, had no idea about SourceCmd!

Thought Lisp had too many parens for you??

It still is . As I said had a good fight with fennel . I thought I'll give fennel another try with hotpot.

if Hotpot goal is "make you think Fennel is native"

I've been treating hotpot that way . Definatly your call whether this makes sense here . :Fnl will be a better name . I didn't make a pr as I wasn't sure whether this makes sense here . Also the code might be crap in terms of lisp . I haven't written this much lisp in rest of my life 😁 . Just had written it as helper for my config thought I'd just make a proposal here .

I don't want to fall into the trap of writing a REPL when olical/conjure does such a great job

I agree . Complete REPL would be too much .

Don't worry about submitting a patch

I can put it in a separate file and make it use hotpots embeded compiler instead of system one if that's what you need .

I'll probably fold them in then if that's ok

I'm not sure what you mean by folding them . But you can make whatever modification you want .

Adding :source support is particularly amazing, had no idea about SourceCmd!

I didn't either before looking at neovims source :P . Also with SourceCmd :runtime also works . If ranges were exposed though SourceCmd we wouldn't need a FennelFile at all .

(fn fennel_operator_eval []
  "Executes range from mark '[ to mark '] set by 'opfunc'"
  (let [line1 (vim.api.nvim_buf_get_mark 0 "[")
        line2 (vim.api.nvim_buf_get_mark 0 "]")]
     (exec_fennel_range line1 line2))
  (if (. (require "exec_fennel") "opfunc_backup") ;; backup always == ""
    (tset vim.o "operatorfunc" (. (require "exec_fennel") "opfunc_backup")) ;; always runs?
    (tset (require "exec_fennel") "opfunc_backup"  "")
  ))

(fn exec_fennel_operator []
  "Sets fennel_operator_eval as 'opfunc' and trigures oppending mode"
  (tset (require "exec_fennel") "opfunc_backup" "") ;; always sets backup to ""
  (tset vim.o "operatorfunc" "v:lua.require'exec_fennel'.fennel_operator_eval")
  (vim.api.nvim_feedkeys "g@" "n" false))

@shadmansaleh  Feel like I am missing something with the opfunc_backup stuff? Seems like it's effectively a no-op? Is it missing code?
The docs don't seem to imply you have to save state of the last opfunc, is it just some left over test code?

You're right . It's a bug. I think my code was causing error somwhere and kept changing different stuff but when udoing those changes I missed this.
diff --git a/fnl/hotpot/exec_fennel.fnl b/fnl/hotpot/exec_fennel.fnl
index d687c03..a38e319 100644
--- a/fnl/hotpot/exec_fennel.fnl
+++ b/fnl/hotpot/exec_fennel.fnl
@@ -65,7 +65,7 @@

 (fn exec_fennel_operator []
   "Sets fennel_operator_eval as 'opfunc' and trigures oppending mode"
-  (tset (require "hotpot.exec_fennel") "opfunc_backup" "")
+  (tset (require "hotpot.exec_fennel") "opfunc_backup" vim.go.operatorfunc)
   (tset vim.o "operatorfunc" "v:lua.require'hotpot.exec_fennel'.fennel_operator_eval")
   (vim.api.nvim_feedkeys "g@" "n" false))

Now looking at it a ton of strings ("") I used could be replaced by :. Should I make another pr ?
Docs doesn't imply but I didn't want to leave user on changed state that's why backup & restore.

How am I supposed to use the operator? I have it mapped, it's feeding g@ but I cant get it to actually fire on any code.
Tried i" a) $ etc. Should be working right?

Nevermind, seems https://github.com/neovim/neovim/issues/14157 is the cause, can't use  "v:lua.require('hotpot.user.eval').eval_operator".


DataContextScope.GetContext duplicate key error

I have also created a pull request for this one, when being called in parallel, for example when a generated ReferenceDataProvider executes:
Parallel.ForEach(types, (type, state) => { var x = this[type]; });
a second thread can get past the initial key check in GetContext while the first thread is still waiting for a connection to open resulting in an attempt to add the key twice.
The pull request just contains a lock around this code.

Hi @damiankennedy2012 - PR was accepted and NuGet packages published. Thanks for contributing :-)


PDF Friendly

PDF's do no render svg images embedded within fonts and often have a limited ability to render emoji. Show what emoji can export with PDF's, find a font that can render more emoji, or find an alternative (ie - service to render emoji as an image). This is what I've been successful with so far:

✈ airplane
◾ blackMediumSmallSquare
◼ blackMediumSquare
-✒ blackNib
▪ blackSmallSquare
✔ checkMark
© copyright
‼ doubleExclamationMark
↙ downLeftArrow
-↘ downRightArrow
-✴ eightPointedStar
-✳ eightSpokedAsterisk
⏏ ejectButton
✉ envelop
⁉ exclamationQuestionMark
❣ heartExclamation
㊗ japaneseCongratulationsButton
㊙ japaneseSecretButton
⌨ keyboard
0⃣ keycap0
1⃣ keycap1
2⃣ keycap2
3⃣ keycap3
4⃣ keycap4
5⃣ keycap5
6⃣ keycap6
7⃣ keycap7
8⃣ keycap8
9⃣ keycap9
*⃣  keycapAsterisk
#⃣ keycapHash
✝ latinCross
↪ leftArrowCurvingRight
↔ leftRightArrow
🀄 mahjongRedDragon
✖ multiply
〽 partAlternationMark
✏ pencil
▶ playButton
❤ redHeart
® registered
◀ reverseButton
➡ rightArrow
⤵ rightArrowCurvingDown
↩ rightArrowCurvingLeft
⤴ rightArrowCurvingUp
✂ scissors
❄ snowflake
❇ sparkle
✡ starOfDavid
™ tradeMark
↕ upDownArrow
-↖ upLeftArrow
-↗ upRightArrow
-✌ victoryHand
-⌚ watch
-〰 wavyDash
-◽ whiteMediumSmallSquare
-◻ whiteMediumSquare
-▫ whiteSmallSquare
-✍ writingHand

Specifically, I'm looking at how google sheets export emoji. There is limited control over what fonts can be used via https://sheets.google.com/

Exported PDF from https://docs.google.com/spreadsheets/d/1tbcjc6NImRPd1oyxGXH1Gi-Zd8cwxlBVdhFFgxoagG8/edit?usp=sharing
Emoji tester for PDF - Sheet1.pdf


fix(cdk/collections): SelectionModel does not always respect the compareWith function

Fixed bug in SelectionModel where compareWith function was not consistently respected in deselect method.
Fixes #25878

@crisbeto @andrewseguin Could you please take a look at this PR? It addresses an issue within my company.


Allow sending with no payload, plus some small fixes

@gauntface
Fixes #10

cc @petele
Awesome - thanks for doing this.
Only concern is still with the auth token, I can see people doing:
subscriptions.forEach(subscription => {
    if (!subscription.aesgcm) {
        return;
    }
    pushEncryption.sendWebPush('Totes rad msg', subscription, GCM_API_KEY);
});

Which means they are sharing their API key with the world :(
If we changed back to a method, we can be smarter and only include the header for GCM requests.
pushEncryption.setGCMAPIKey(GCM_API_KEY);
subscriptions.forEach(subscription => {
    if (!subscription.aesgcm) {
        return;
    }
    pushEncryption.sendWebPush('Totes rad msg', subscription);
});

If we changed back to a method, we can be smarter and only include the header for GCM requests.

I would be strongly in favour of this if we can push for it. I had similar concerns to @gauntface about API keys being shared with the world and can see folks tripping up here :/

@gauntface OK, done

One small nit on TTL, other than that - LGTM

@gauntface you're right, spec says TTL. No idea why I thought otherwise!


⚠ Jenkins Plugins Artifactory has degraded performance

In 8b850f3, Jenkins Plugins Artifactory (https://get.jenkins.io/plugins/artifactory/) experienced degraded performance:

HTTP code: 200
Response time: 1268 ms

Resolved: Jenkins Plugins Artifactory performance has improved in 016023b after 36 minutes.


fix: docs linking to localhost instead of proper relative URLS

Fixing a bug (docs)

Broken links in docs:

Go to https://liveblocks.io/docs/guides/getting-tiptap-state-on-the-server
Link to "how to use your Y.Doc on the server" points to http://localhost:3001

Related issue(s)

Sorry, just glanced over any issues, wasn't sure if this was already in pipeline to be fixed :)

Thanks for catching this! I've cherry-picked your change:

https://github.com/liveblocks/liveblocks/pull/1388


Enable Dependabot to keep dependencies up to date

Dependabot can be set up to check for outdated dependencies, or dependencies with reported security issues (I think I was wrong on this on. For Dependabot with Rust, we'd still need #18 for security issues), on a daily basis. It'll then create PRs if any such are detected.
Dependabot is added quite easily to the CI with a dependabot.yml file in the .github folder.
The file should include something like this:
version: 2
updates:
  - package-ecosystem: "cargo"
    directory: "/" # Location of package manifests
    schedule:
      interval: "daily"

@return I tried myself, but it seems only a repository owner is able to set this up.

Fixed by @return and in #33


Error on iOS version (1.2.8) No visible @interface for NSString declares the selector isNumeric'

Exception on line  386 - else if ([widthString isNumeric:widthString]) {
and line  409 - else if ([widthString isNumeric:widthString]) {
Someone forget to push something in last version ?

@arilsonkarmo sure that you have downloaded with tag #1.2.8 or did you download from master?

Just tested, version 1.2.8 (you need to explicitly add it with #1.2.8) works, where master is in development currently and does not work.

Hi! im download from master.
my cordova plugin ls shows:
plugin.google.maps 1.2.8 "phonegap-googlemaps-plugin"

Yes but this is wrong.
cordova plugin add https://github.com/wf9a5m75/phonegap-googlemaps-plugin#1.2.8 --variable API_KEY_FOR_ANDROID="...." --variable API_KEY_FOR_IOS="..."

Nice one!
I think you have to put it in readme for new users.
Thank you!

Normally master is fine, but I merged some code two hours ago for the next 1.2.9 release but it was buggy

Ok now we can put zIndex on markers?

no

OK thanks! :)

The master is fixed, thanks for the info

@arilsonkarmo I will add zIndex for iOS only on version 1.3.3. Android has no zIndex Support


do we still need to configure SDK for Python27-x64?

As you know, the PyPA "Packaging User Guide" has a page on "Supporting Windows using Appveyor":
http://python-packaging-user-guide.readthedocs.org/en/latest/appveyor/
https://github.com/pypa/python-packaging-user-guide/blob/master/source/appveyor.rst
In their guide, as well as in the example build.cmd batch script that they provide, they pass specific Windows SDK environment variables only for Python 3.3 and 3.4 (64-bit), and not also for Python 2.7 64-bit as it's recommended here in this demo repository.

Appveyor includes by default all of the compiler toolchains needed to build extensions for Python. For Python 2.7, 3.5+ and 32-bit versions of 3.3 and 3.4, the tools work out of the box. But for 64-bit versions of Python 3.3 and 3.4, there is a small amount of additional configuration needed to let distutils know where to find the 64-bit compilers. (From 3.5 onwards, the version of Visual Studio used includes 64-bit compilers with no additional setup).

So now I wonder who's right... Perhaps has something changed on Appveyor setup that it no longer requires us to configure environment when building extension for Python 2.7 with MSVC on a 64bit architecture?

I am not sure. If you feel like running experiments please report your results here so as to update the documentation.

I tried disabling the run_with_cmd.cmd script and run the Python27-x64 build on Appveyor. Even without the DISTUTILS_USE_SDK=1 etc., it is picking up the correct amd64 version of Visual C++ compiler:
https://ci.appveyor.com/project/anthrotype/python-appveyor-demo/build/1.0.1/job/7ih1muhv0tea0beu#L130

yes, only 3.3 and 3.4 (both 64 bit) fail when run without the correct environment setup:
https://ci.appveyor.com/project/anthrotype/python-appveyor-demo/build/1.0.2

Alright I understand: setuptools automatically picked up Visual C++ for Python. However that will only work for projects that builds their extension using a recent version of setuptools. Other projects that only use distutils or a patched version of distutils might fail (for instance I suspect that building numpy this way would not work although I have not tested).
https://ci.appveyor.com/project/anthrotype/python-appveyor-demo/build/1.0.2/job/hmaya7suq3lwl2f2#L118

I see. Thanks for the clarification!

I think we can close this issue. Both versions are right (it depends if you use setuptools to build the compiled extensions of your Python project or not).


Add creative block pick for heads

I forgot I had Travis CI set up for this repo...
I was wondering what this change was for a moment and then realised what it was, and Jesus Christ you are a genius. Some people I know have been able to do this kind of thing with their own clients rather than help from the plugin, and I've always wondered how but it looks like this is the solution. Thank you so much once again (Have just been able to test it too and it works perfectly)!


Create login functionality

Do all work for this task in a branch called issue-07
Create login functionality, creating the necessary form and fields. Allows user to create a new Profile.

Finished login functionality. Just need to spice things up visually.


MSBuild.exe is not in the Path

Hi, I just run a simple test for this action as follows:
    runs-on: windows-latest
    steps:
    - uses: actions/checkout@v2

    - name: Add MSBuild to PATH
      uses<EMAIL_ADDRESS>
Then I try to run msbuild, but the command was not found.
I suspect whether msbuild can be found via environment or not?
Here output the stepup-msbuild:
"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -products * -requires Microsoft.Component.MSBuild -property installationPath -latest
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise

Actually the msbuild.exe should in  C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild/Current/bin/
I use luchihoratiu/debug-via-ssh@main to connect to github runner and debug, run msbuild after setup-msbuild action, but msbuild was not recognized, which means the path was not added into the path.
What am I missing or misusage?
Thanks for the consideration

My guess is your SSH session is a different profile so it's not added to that user path.  You can add this to your test after running this action
    - name: echo MSBuild
      run: msbuild -version

to verify that it is working -- this is the same as our test and we've had no reported failures of this happening.

Thanks for your help.
When I run: msbuild --version, and delete SSH session, I can get msbuild version.

It is my mistake, sorry for that.  I use shell: bash on Winodws to run msbuild ...


User stories for roadmap

Include some descriptive user stories for future roadmap work.

We are moving our development planning to JIRA. This issue is now being tracked at https://clusterhq.atlassian.net/browse/FLOC-236. You are welcome to file additional issues in GitHub if that's easier for you.


Add support for buffers in uploadFile

Description of the feature request:
Changing the uploadFile function so it accepts a string or Buffer so that uploadingFile can work without needing the file to be locally available.
What problem are you trying to solve with this feature?
In the current version, the file has to be locally available in order to upload which is fine for most cases but not if the folder is read-only.
Any other information you'd like to share?
I have already implemented the changes and waiting for approval to file a PR.

+1 to this issue. Makes Gemini hard to use in server instances when there is not a local file system available. Is there any work around for this?

@YourAverageTechBro I've encountered this issue when deploying to vercel, the workaround is patching the package using your package manager. I've done it using Pnpm in this demo repo

Yes, I had same issues, so I used memoryStorage. I used the multer library with the memoryStorage option, which retains the files in memory instead of saving them to disk. The stored file data is subsequently converted into a Base64-encoded string for further processing.


Cdn release

release cdn

@chenjianfei2017 please update your branch with the latest master， The CI is failing.  Also please bump the major version here.

@chenjianfei2017 please update your branch with the latest master， The CI is failing. Also please bump the major version here.

done

@chenjianfei2017 The major version starts from X.0.0 in this case 5.0.0

@chenjianfei2017 The major version starts from X.0.0 in this case 5.0.0

fixed


add a new nodejs crawler

add a new nodejs crawler, webster.

Webster is a individual crawl framework, using puppeteer to scrape async content and using redis to implement task queue for concurency.


Support URLs and slashes in coordinates

@jeffmcaffer and I had some discussions with people knowledgeable in Go about supporting it. We came around to a problem: the ClearlyDefined coordinate slashes that delineate between type, provider, namespace, name, and revision are load-bearing.
Go integration will require supporting a URL (Go calls them "import paths") as part of the construction of the ClearlyDefined coordinates.
Import paths are defined such that they can contain any unicode character.  The spec does also mention:

A compiler may restrict ImportPaths to non-empty strings using only characters belonging to Unicode's L, M, N, P, and S general categories (the Graphic characters without spaces) and may also exclude the characters !"#$%&'()*,:;<=>?[]^`{|} and the Unicode replacement character U+FFFD.

I don't know if the main go compiler excludes any of those characters in practice, such that we could simply replace "/" with ":", for example.
@rspier for visibility

We have found a way around this by using url encoding for Go components, as laid out in this architecture doc
Note - we are still working on implementing this.

I believe this has been solved. Thanks all for contributing.


[Question] Specific interface for Config Context

Hello,
I wanted to ask if you can also select an interface for the individual interfaces with this script in the config context.
Example:
Zabbix Agent on Interface 01
SNMP on interface 02

I think that this is easier then expacted since the interface functionality class is decoupled from the device class. However i'm unavailable for next weekend. Please give me some time to think about it and i'll come back to this suggestion asap :)

Hello,
I wanted to ask what the status is and whether a possibility has been found.

To follow up on this request: There is a huge difference on whether the individual interfaces should also have unique IP addresses. Is this also something that you want in your use case? Or does the functionallity implemented in https://github.com/netbox-community/netbox/issues/8137 cover that use case?
Furthermore could you give an example of your use case? For example a server with 1 management address and one for IPMI?

Hello,
For example, if you have a server that is provisioned via "iDRAC". You have one IP for the "iDRAC" and one IP for the regular server.
For example, if you want to monitor the iDRAC and the things on the server. If you have the iDRAC on interface 1, SNMP should be running there and the main (primary) IP of the Zabbix agent on interface 2.
<IP_ADDRESS> (Interface 1)
<IP_ADDRESS> (Interface 2 | Primary)

Okay so with the new out-of-band management IP address field this is a lot simpeler. However i'm struggeling with the logic of interface adjustments. When an IP address changes, which one of the 2 interfaces should be adjusted? Or if the protocol switches from agent to SNMP, how would the sync script have any idea which interface to adjust? Stretching this issue further templates are linked to interfaces for certain functons. So Zabbix could complain about resetting an interface (or both interfaces.) I'll look into this but unfortunately i can't promise much.
A workaround for now (although a bit cumbersome) would be to have 2 hosts for a server. One for the agent coming from Netbox and 1 manually configured for the IPMI.

I second the idea of using OOB IP as a secondary interface in Zabbix.


Use Tailwindcss search box for Libraries

[x] Make search box more prominent
[x] Use JS client side
[ ] Ensure library authors review their descriptions to make for good searches

Styles search results to break up title from description...


Fix error

Fix error PHP Fatal error:  Uncaught TypeError: Argument 1 passed to iterator_to_array() must implement interface Traversable, array given
https://github.com/Microsoft/tolerant-php-parser/issues/159

This seems like a small (but important) contribution, so no Contribution License Agreement is required at this point. We will now review your pull request.
Thanks,
Microsoft Pull Request Bot

Thanks for the PR


Keyboard shortcuts for Windows?

I really love your extension. But for me the Ctrl+Enter hotkey doesn't work (it just inserts a new line).
Is it supported under windows, too?
I'm using v4.1
Clicking the link above the line works:

Yes, is it. I used it on windows too.  After I recover the Windows pc and check if it still works (there has just been a vscode update ...)

I just tested it on windows and it's working correctly.
I suppose you are using jq language mode instead jqpg because the filter string is not highlighted and the ctrl+enter keymap is binded to languageId jqpg.
Try to change language mode to jqpg you would be see the jq filter line highlighted and try again.

Ah excellent! I didn't pay attention to the language mode and didn't notice that there are two jq languages installed.


[ISSUE #3485]Optimize Grpc protocol for Java

Fixes #3485
Motivation
Explain the content here.
Explain why you want to make the changes and what problem you're trying to solve.
Modifications
Describe the modifications you've done.

Added EventMesh's CloudEvents protocol to replace the SimpleMessage protocol.

The SimpleMessage protocol is temporarily not removed and the code is still present in the project. It will be removed in the future.

The protocol has been replaced in the SDK and runtime modules.

Documentation

Does this pull request introduce a new feature? (yes / no)
If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)
If a feature is not applicable for documentation, explain why?
If a feature is not documented yet in this PR, please create a followup issue for adding the documentation

@xwm1992  PTAL!
design document Reference link issue or email that I had sended.

@mxsm please solve the conflicts.

@xwm1992  I will fix it later

@xwm1992  I have removed the useless class.


Update TW Phrases

Looks like this project isn't active recently, with all due respect, @BYVoid would you please help review this pull request? Many thanks!

Hi @lotem, I saw that you helped merged few of my pull requests, not sure if you could also take a look at this one? Thanks a lot!

Hi @lotem, I saw that you helped merged few of my pull requests, not sure if you could also take a look at this one? Thanks a lot!

Yes, I'm here to help maintain the project. My first priority is to resolve the blocking issues such as build errors and critical bugs in the code.
But sorry about this particular request, I don't think I have the competency in reviewing translated regional phrases. We need a reviewer in the role of linguist.

@sgalal would you help review this PR? Thanks.

@sgalal thanks! I've revised the changes.

IMHO the only valid pair might be 空氣淨化器 空氣清淨機
For other cases, both words exist in the vocabulary in either variant. It's just a matter of style, though author's preferences might be different depending on the region. If these pairs are included, you would be changing the word of choice by the author.
Sometimes the conversion is even incorrect, as 通過 is not replaceable by 透過 in the sentence 火車通過隧道. They are not equivalent in all meanings.

Thanks


[Entitas:] EntityIndex with multiple key support

Usually you generate one key for a given entity, e.g. name : string. In some cases it is helpful that one entity generates more than one key, e.g. a building on a map with position and size.
The building is at position(0,0) but because it has a size of (2,2) should also generate keys for all the other occupied positions.

Like a spatial hash algorithm ? :smile:

given:
a building with position(0,0) and size(2,2)
when:
added to an EntityIndex with multiple keys support
then:
it will be at
index.GetEntity(0, 0)
index.GetEntity(1, 0)
index.GetEntity(0, 1)
index.GetEntity(1, 1)

this can be helpful for all sorts og games

See CustomEntityIndex for a reference implementation

The CustomEntityIndex link above not 404s

Oh no, that custom entity index page is really useful, it's dead now - we need a replacement

There you go
https://github.com/sschmid/Entitas-CSharp/blob/develop/Tests/TestFixtures/Fixtures/CustomEntityIndex.cs

I dont know if other people have tried this but one thing i quite like to do for complex lookups use an intermediate string component with an entity index like this:
public class ThingAComponent : IComponent {
    public ThingA value;
}

public class ThingBComponent : IComponent {
    public ThingB value;
}

public class ThingAThingBHashComponent : IComponent {
    [PrimaryEntityIndex] public string value;
}

public static string GetThingAThingBHash(ThingA a, ThingB b) {
    return string.Format("{0}_{1}", a, b);
}

var e = _context.GetEntityWithThingAThingBHash(GetThingAThingBHash(a, b));

If you can represent this as an int, it would be great. Otherwise there's a risk to create lots of string and increase the gc pressure


Re-populate trigger from scheduler

Change description
In case interval and frequency is passed - construct custom CalendarIntervalTrigger instead of default SimpleTriggerImpl used in default TriggerBuilder
Does this PR introduce a breaking change? (check one with "x")
[ ] Yes
[x] No

some new tests would be nice :)

Mostly it'll be fiddling with mocks. But I should still add some regardless

I wonder why we didn't have recurrent triggers earlier. Is it something we planned to do?

I don't want to interpret as to why but let's say, by our implementation, triggers are not mandatory so just left aside. For list retrieval, we are forced to just say "null" for trigger field even though original request could've been something different. This PR introduces how to convert our simplified trigger model to the one in quartz and backwards

Codacy complains about underscores in tests, but let's update pmd ruleset instead.
I think draft-store has it configured.

Yes it's about using underscores in unit tests' name

Closing as the idea is prematurely implemented without clearly defined requirement of trigger schedules


Reproducibility Project - make standard java build process bit-for-bit reproducible

This will require stripping out or otherwise dealing with file timestamps, etc.  The end condition here is that if two different computers both execute a build of a java package (like meta_tools.release), with the exact same JDK version, then they should produce identical output (sha1s match).

@fkautz says "you should hop into OFTC #reproducible-builds or #debian-reproducible and ask what changes they needed to make, also, they open sourced their toolchains for reproducible builds, which i think includes the timestamp manipulator" https://reproducible-builds.org/tools/

https://github.com/wolfcw/libfaketime


SolverAnalytics Grafana Dashboard

Create a table we can dump the results from SolverAnalytics in
Setup a Grafana dashboard to display that table

This PR is in parallel to the SolverAnalyics PR https://github.com/ROCmSoftwarePlatform/SolverAnalytics/pull/16

The dashboard is at: http://ginger:3000/d/miGbCrF4z/solveranalytics

Please declare a ConvSolverAnalyticsMixin table that contains all but the 'sa' column. Similar to all our other Mixin tables in Tuna. Declare the 'sa' col, tablenames and UniqueConstraints in the extended tables.

Done!


mcp9808: Fix conversions between temperature and bits

The datasheet (http://ww1.microchip.com/downloads/en/DeviceDoc/25095A.pdf)
says that negative temperatures are stored in two's complement. See
page 22 for alert registers and pages 24-25 for the ambient temperature
register.
However, the code currently assumes negative values are stored in a
sign-and-magnitude representation. Fix this to handle two's complement
values correctly.
For register bits to temperature conversion this implementation follows
the datasheet, but the code in the datasheet isn't quite right -- it
should be temp - 256 instead of 256 - temp -- but the fact that the
256 figure is in Microchip's code backs up the idea stated in the text
that negative values are in two's complement. Others seem to agree that
this is correct: https://electronics.stackexchange.com/a/244826
For temperature to bits conversion this implementation relies on the
fact that Go also uses two's complement. I've added a long comment in
the code about this.

Tagging @NeuralSpaz, who added MCP9808 support.
I haven't actually put an MCP9808 in the freezer to test this, but the info in the datasheet points toward this implementation for negative temperatures.

Codecov Report

Merging #403 into master will increase coverage by 0.07%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master     #403      +/-   ##
==========================================
+ Coverage   64.66%   64.74%   +0.07%
==========================================
  Files         116      116
  Lines       11726    11721       -5
==========================================
+ Hits         7583     7589       +6
+ Misses       3942     3932      -10
+ Partials      201      200       -1

Impacted Files
Coverage Δ

experimental/devices/mcp9808/mcp9808.go
100% <100%> (ø)
:arrow_up:

experimental/devices/ads1x15/ads1x15.go
79.8% <0%> (+0.96%)
:arrow_up:

host/sysfs/thermal_sensor.go
83.84% <0%> (+2.3%)
:arrow_up:

experimental/devices/hx711/hx711.go
77.64% <0%> (+7.05%)
:arrow_up:

Continue to review full report at Codecov.

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

gohci

You can add yourself to AUTHORS and CONTRIBUTORS if you want.

Oh I confirmed that'd be only CONTRIBUTORS for you since you are already covered in AUTHORS.

Never gets that cold here so I've popped one in the freezer.

freezer test lgtm:
-4.062°C
-4.125°C
-4.062°C
-4.062°C
-4.125°C
-4.187°C
-3.875°C
-2.500°C
-1.562°C
-1.437°C
-750m°C
-500m°C
-187.500m°C
187.500m°C
625m°C
1.125°C
1.375°C
1.687°C
1.937°C
2.312°C
2.500°C
2.875°C
3.125°C
3.375°C
3.625°C
3.937°C
4.062°C

freezer test lgtm:

Fantastic! Thanks for testing.


feat: add flat routes convention

Closes: #4483

[ ] Docs
[ ] Tests

This is the initial PR to add flat routes convention
Testing Strategy:

Ok, here's my initial PR. I simply copied over my flatRoutes function. I will work on integrating with existing config and updating the tests.

We'll want it behind a future flag, too. Let's go with:
// remix.config.js
{
  future: {
    v2_routeConvention: true
  }
}

Future flags were merged here: https://github.com/remix-run/remix/pull/4566
If you run into questions about future flags, reach out to @chaance :)

@ryanflorence regarding the flag name, have you reached a conclusion regarding keeping or removing the current convention in V2? (Question raised in the RFC)
We may want to change the flag name to v2_flatRoutesConvention if we keep both.

@ryanflorence ok so the plan is if the feature flag is true for flat routes, then this will automatically use the flat routes convention instead of the default (i.e., no need to specify the routes config option). Correct?

Let's move forward as if this is the only built-in convention for v2, so let's use v2_routeConvention.
As folks start updating we can revisit if it maybe shouldn't be the only convention, or even the default. I suspect people will prefer it, though.

Ok, I've pushed the latest version. This also includes the hybrid routes.
I think this gives you the best of both worlds. You can still organize with nested folders, but you also get colocation.

@kiliman Tested hybrid routes on 0.5.0, works like a charm 👌🏼 Thank you so much for this.

closed in favor of #4880 (which includes these commits)


chore: break earlier in macro contains!

Which issue does this PR close?

Closes #.
Rationale for this change

What changes are included in this PR?

Are these changes tested?

Are there any user-facing changes?

Actually, I did similar improvements in my array_has implementation #6990 before I know this PR. However, merging this PR is fine with me.

Thanks everyone


segfault in emiting op

Hello, I'm seeing a segfault in the traced app, when it's trying to write to the shared memory buffer back to fsatrace:
<segv>
#4  emitOp (oc=oc@entry=114, op1=<optimized out>, p2=p2@entry=0x0) at src/emit.c:118
#5  0x00007f6fa63525f3 in fdemit (c=c@entry=114, fd=fd@entry=16) at src/unix/fsatraceso.c:118
#6  0x00007f6fa6352937 in openat64 (fd=-100, p=<optimized out>, f=<optimized out>, m=<optimized out>) at src/unix/fsatraceso.c:269

I don't have much more info at this time, but from looking at the source, is this likely to be running past the end of the buffer?
From my reading of main(), all accesses are buffered in the shared memory buffer until the process is complete, and then written, correct? (no concurrent access)
https://github.com/jacereda/fsatrace/blob/master/src/fsatrace.c#L193-L203
And the default logsize is 1MB of text?
https://github.com/jacereda/fsatrace/blob/master/src/fsatrace.h#L4
Which can be overridden by setting the env var FSAT_BUF_SIZE?

I see this even if I set the buffer to larger and larger sizes, up to a size large enough that fsatrace fails to allocate the buffer.

Hi, thanks for the report.
Can you reproduce this? Can you share how?

From my reading of main(), all accesses are buffered in the shared memory buffer until the process is complete, and then written, correct? (no concurrent access) https://github.com/jacereda/fsatrace/blob/master/src/fsatrace.c#L193-L203

Right.

And the default logsize is 1MB of text? https://github.com/jacereda/fsatrace/blob/master/src/fsatrace.h#L4
Which can be overridden by setting the env var FSAT_BUF_SIZE?

Right.

The issue that I linked to this: https://github.com/dart-lang/sdk/issues/48413 has the setup where we found it.
It's a pretty deeply nested conglomeration of processes to setup the issue.  I haven't been able to reproduce it outside of that context.

Can you generate a coredump? Also, the buffer is stack-allocated, can you replace that by a malloc() and increase the FSAT_BUF_SIZE?

Also can you try the current master? That one gets rid of FSAT_BUF_SIZE and has a static 16MB buffer.

@fangism - I don't know how to update and rebuild fsatrace within the Fuchsia build, can you help with this?  (if you push a new binary to CIPD, I can snag it locally and test on my workstation that's seeing this issue).

Looks like we're getting different results, now:
fsatrace(87243): error: freeing shared memory (4)

I found this error in 41b02a0 (2020-10-10), which is currently packaged in Nixpkgs, but it seems to work in the latest commit c031f8da (2022-03-30).


One color gradient function

One color that will make the gradient fade to white or black over given distance.

Completed in commit 02cb550


Fix first hyperlink

Link to Cadence client library gives 404 not found.

It looks like it is working after repository switched to public.


Add unique ID to edimax switches

Description:
Add unique_id and device info for edimax switches

[x] ~WIP until new version of pyedimax is published (PR with changes merged: https://github.com/andreipop2005/pyedimax/pull/1)~

Example entry for configuration.yaml (if applicable):
switch:
  - platform: edimax
    name: Lamp
    host: <IP_ADDRESS>

Checklist:

[x] The code change is tested and works locally.
[x] Local tests pass with tox. Your PR cannot be merged unless tests pass
[x] There is no commented out code in this PR.
[x] I have followed the development checklist

If the code communicates with devices, web services, or third-party tools:

[x] The manifest file has all fields filled out correctly. Update and include derived files by running python3 -m script.hassfest.
[x] New or updated dependencies have been added to requirements_all.txt by running python3 -m script.gen_requirements_all.
[x] Untested files have been added to .coveragerc.

Accidentally marked as ready to review, and now cannot set back to draft, grr.
Still WIP until update to pyedimax dep is released

Something I need to do about that failing check? It seems to be unrelated to this PR's changes.


Restore previous input test on undo

On 'undo' (bound to C-z), restore the previous content of the editor
widget. This simplifies fixing typos and lets you redo the choice
whether want the text to be treat verbatim.

Thanks! Looks good to me on first glance. Will merge once #15 is merged, as this branch is on top of the comments branch.

Don't hurry. I assumed #15 to be the very soon master :-)

It gets confused when you use undo at the "Add this transaction" prompt. Try undoing all the way back to the date prompt, the inputs will be shifted to the left (the input to the description prompt will now be filled in for you at the date prompt).
But I think that's a bug in the actual undo implementation, since undo at the date prompt skips the last account prompt and goes straight to the previous amount question.

But I think that's a bug in the actual undo implementation, since undo at the date prompt skips the last account prompt and goes straight to the previous amount question.

I never noticed that, so the current 'undo' behaviour might be more natural than the more consistent 'undo'. For the time being, I fixed the shifting bug in the present pull request.

Yeah. Reading the code, the undo behaviour seems intentional. Probably because it's easy to return to the empty account prompt by typing n.
Thanks again, will look at it and hopefully merge it later

After 20 hours I got what you mean by 'typing n'. And in case of typing n for the final confirmation question, the 'undo' history got messed up again. Now I don't save the answer 'n' in the final confirmation question either.
I hope my pull requests covers all odd cases now...

github didn't notice that I already merged this into master because the pull request was against the features/comments branch. It also wasn't possible to change the target branch to master any more because the commits from this pull request were already in master. So to have it be displayed as "merged", I now merged it into features/comments.


Item smooshing (Sentinel)

Sentinel brings with it the possibility to take two items and mix them together. Here are some notes I took during the Q&A (that I didn't listen fully to…).
pick one of the two base types, or may choose a new base type that can only be obtained like this
retains all the properties of the core base types:

corrupted
implicits
catalysts

how explicits are chosen:

puts all mods in the pool
take a few of them
can reroll values
can choose new special mods that can only be obtained like this

influences:

when mixing two influenced item, the influence of the base that was chosen is kept, the other influence (if any) is lost
if the item that was not chosen as the base type contains influence mods that cannot spawn with the influence of the selected base type, those mods will not be chosen when mixing

I took down pretty much the same notes during the stream for CoE. Here's how i think its actually working.
First i would think that the special mods will be in their own modgroup which we will see in the dataset, i would also assume that their weighting will be pretty low compared to the usual weightings.
I would also assume its a pure 50/50 for which item base it keeps. Then it would probably roll for how many affixes spawn from the item with the same probabilities as usual (4-mod 8/12, 5-mod 3/12, 6-mod 1/12). Then roll affixes as usual but within that limited pool which includes the special mods.
I think i heard chris say they could change tiers, or maybe i misheard. If so then i would assume that it puts all tiers of the modifiers that were present in the modpool.
Values being rerolled makes sense since it essentially recreates an item from scratch.

Actual rules for combining items
Combining influenced items

retains all the properties of the core base types:
* corrupted
* implicits
* catalysts

also keeps enchants (taken from the q&a)

There's also the case of fractured items, is the fractured mod (or mods) garanteed to follow, does that mean you can have 2 frac mod items. I would guess no and yes respectively. But these are guesses.
My guess for the astral plate in the league info page, they used a fractured grasping mail and a fractured astral plate, the base that got picked was the astral plate and the mod that got transfered was the 100% global Defence mod. atleast from the current info that is available. with 2 fracture mods maybe possible but I guess you summarized it pretty well with:

One thing is clear though : this will require some community testing to figure out for sure.

Thanks for your inputs nebuchenazarr, that's very useful!
Regarding tiers, my hope is that mods are likely to keep their tiers, as this opens up a lot of possibilities. Otherwise the result would be closer to a kind of harvest reforge more likely.
Overall there are many unknowns:

what is the weight for mods taken from base items: is it the same as the weight from the regular mod pool? or equiprobable? (hard to design a simple experiment to reach a conclusion here)
is the regular mod pool present? (easy to prove true: if we get an item with a normal mod that wasn't in the base items, then yes)
how many mods are taken from base items? is it variable, or more like awakener's orb? (we'll quickly get a rough idea from initial experiments)
if the same mod is present on both items, does it make it more likely?
how often do mods keep their tier?
if they don't keep their tier, do they tend to get a tier which is close to the original one? (a small sample size should give us a rough idea)
maybe the special mods are actually special tiers of regular mods, kind of like elevated mods? (we may get an idea from datamining)

Thanks for your inputs nebuchenazarr, that's very useful!
Regarding tiers, my hope is that mods are likely to keep their tiers, as this opens up a lot of possibilities. Otherwise the result would be closer to a kind of harvest reforge more likely.
Overall there are many unknowns:

what is the weight for mods taken from base items: is it the same as the weight from the regular mod pool? or equiprobable? (hard to design a simple experiment to reach a conclusion here)
is the regular mod pool present? (easy to prove true: if we get an item with a normal mod that wasn't in the base items, then yes)
how many mods are taken from base items? is it variable, or more like awakener's orb? (we'll quickly get a rough idea from initial experiments)
if the same mod is present on both items, does it make it more likely?
how often do mods keep their tier?
if they don't keep their tier, do they tend to get a tier which is close to the original one? (a small sample size should give us a rough idea)
maybe the special mods are actually special tiers of regular mods, kind of like elevated mods? (we may get an idea from datamining)
can fractured mods appear spontaneously or do they need to be fractured in the original item?
can we obtain two fractured mods? (we can try mixing two fractured items)
can we obtain two essence mods (something which is not normally possible)? (we can try mixing two essence-crafted items)
what happens if the base items have a very small number of mods, like zero, or one? (we can try to annul and mix)
can we mix magic or normal items?
can we mix corrupted items? (my bet is: no)

Today, it is hard to get three T1 prefixes, but reasonable to get two T2 prefixes. I'm betting that mixing two items with two T1 prefixes each (e.g. two bows essence-crafted with two good elemental damage prefixes) has a good chance of giving three T1 prefixes. Depending on the cost of the new currency used to smoosh items, it may be the more cost effective approach. But they said that the currency was rare.
Is there a place (discord?) where it is likely that players gather their experiment results and try to reverse-engineer how it works?
If you intend to gather data (by mixing items and noting the results), I strongly suggest to explicitly say out loud "I'm going to note this" before each attempt. And then always note the result. If you didn't say this out loud, I strongly suggest to NOT note the result. The reason I say that is that if you don't decide that you will note the result BEFORE the experiment, you may introduce bias, for instance by only noting good or weird results.

Is there a place (discord?) where it is likely that players gather their experiment results and try to reverse-engineer how it works?

I often work with people of TfT for experiments such as these. The consensus seems to be that the item recombinators will be quite rare so it will make testing annoying. But lets wait and see.

Some useful info:

list of recombinator-only mods: https://poedb.tw/us/Recombinator#RecombinatorMods
a few notes about mechanics: https://poedb.tw/us/Recombinator#CommunityWiki
Captain Lance's video: www.youtube.com/watch?v=kJYIqwt-0X0

In the JSON files of RePoE, all recombinator mods have identifiers that start with Recombinator (and no other mod starts with that). However last time I looked the JSON files do not contain the information of which item type the mods can spawn on. But the list of mods is not very long so worst case it can be hard-coded from the list at poedb.

I can't currently play so I can't experiment in-game, so instead I looked at the 15 crafts of Captain Lance's video. Not only is the sample size from this video very small, but also samples almost entirely consist of items with 4 to 6 mods (with one exception where one item has 3 mods). But it does give an idea. The most obvious result to me is that most of the times, all mods in the resulting item come from the original items (there is only one exception in this sample set).
So far, my conclusions (which are probably obvious) are that the process is probably something like this:

mods of both items are put in a pool
a target number of mods is chosen (let's call it T)
T mods are chosen from the pool
then an effect can occur, either: upgrade the tier of one mod, downgrade the tier of one mod, add (or replace a mod with?) another completely random mod (which can be a non-recombinator-only mod)
"mod parity" is not respected: the game doesn't try to choose the same number of mods from item 1 and item 2. Proof: one item got 3 mods from original item number 1, and only 1 from original item number 2. The fact that most of the time parity happens can be explained because once you take a mod, say, from item 1, the pool contains more mods from item 2, etc. so it naturally balances out.

The unknowns:

how to compute T? It looks like T is greater with more initial mods, but we need a large sample size for each combination of (number of prefixes/suffixes for item 1/2/result) to know the formula exactly. We could assume that T only depends on the total number of mods but this may not be accurate and it's better to count prefixes and suffixes separately for all three items.
can the effect occur multiple times? (e.g. one mod gets downgraded, another gets upgraded, and a mod is added/replaced by another) here we just need one example where this occurred to know that it can, but it would be nice to get a large sample size to know if the probabilities are independent for each mods or not
what is the chance to get each effect (looks like about 1/5 to upgrade or downgrade a mod but that is a very rough estimate)
when a non-recombinator-only mod that was not on the original items appears, is it added, or does it replace an existing mod? Looks like we need a large sample size here to get an idea (we need to estimate probability of T when this effect doesn't happen and then compare this with when the effect does happen; if T is higher when this effect happens, then we can conclude that the mod gets added, else, we can conclude that it replaces an existing mod)

Here is a table with the number of prefixes/suffixes for each case. If you know of a place where a large table like this is being constructed, please let me know :)
| #P1 | #S1 | #P2 | #S2 | #P' | #S' | Special                                          |
|-----+-----+-----+-----+-----+-----+--------------------------------------------------|
|   3 |   1 |   3 |   1 |   3 |   1 |                                                  |
|   3 |   0 |   3 |   1 |   3 |   0 | upgraded tier of 1 mod                           |
|   2 |   2 |   3 |   3 |   3 |   2 |                                                  |
|   2 |   2 |   3 |   3 |   3 |   2 |                                                  |
|   1 |   3 |   1 |   3 |   2 |   2 |                                                  |
|   1 |   3 |   1 |   3 |   1 |   3 | upgraded tier of 1 mod (or rerolled value)       |
|   3 |   3 |   2 |   3 |   2 |   2 | no mod parity (more likely because lots of mods) |
|   2 |   2 |   1 |   3 |   2 |   2 | added a new non-recombinator mod                 |
|   2 |   3 |   3 |   1 |   3 |   1 | upgraded tier of 1 mod                           |
|   1 |   3 |   1 |   3 |   1 |   3 |                                                  |
|   2 |   3 |   1 |   3 |   2 |   3 |                                                  |
|   2 |   3 |   2 |   2 |   2 |   2 | downgraded tier of 1 mod                         |
|   2 |   3 |   3 |   2 |   3 |   3 | downgraded tier of 1 mod                         |
|   3 |   3 |   2 |   3 |   3 |   2 | downgraded tier of 1 mod                         |
|   2 |   3 |   2 |   2 |   2 |   3 | downgraded tier of 1 mod                         |

Forgot to mention that I implemented partial support for recombinators a couple weeks ago. Partial because it doesn't implement special mods and chance to upgrade / downgrade tiers.

Closing for now because recombinators, while still available in standard, are no longer available in leagues.
If they ever come back, they'll probably work differently anyway.


Error while startup

Hi, I have a bit of a problem with palcalc, but i don't really think this is the problem there.
In fact, when i launch palcalc, i get the famous "an error occured". But the thing is that I can't use any other save-related palworld tool, like xNul palworld-host-save-fix or palworld-save-tools.
I get this error, whatever i try to launch :
File "C:\Users\imthe\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\palworld_save_tools\archive.py", line 493, in property
raise Exception(f"Unknown type: {type_name} ({path})")
Exception: Unknown type: ByteProperty (.SaveParameter.Level)
Do you have an idea about how to resolve this?

@imtheluk The latest version of Palworld, v0.3.7, includes some changes to the save file format which were incompatible with palworld-save-tools which I (and others) based my code on - the issue is being tracked in palworld-save-tools here
I just released Pal Calc v1.7.5 based on the findings in the linked thread

Alright!
The thing is, someone found a temporary solution, but i can't manage to do it correctly xd
https://github.com/cheahjs/palworld-save-tools/issues/187#issuecomment-2359196290

@imtheluk Whoever wrote the software you're using will need to provide an update

It appears after using my attachment of "temporary fix", @imtheluk was able to make it work again.

Yup, this fix works with all instances of palworld-save-tools, even if installed with python or pip.
You just have to know where to search


Kata Containers 1.9.0-alpha0

rootfs: upgrade docker images for fedora
rootfs: Make sure etc exists.

edb770e rootfs: upgrade docker images for fedora
27dddf0 rootfs: Make sure etc exists.

/test


HMM_LookAt Using/Returning Partially Uninitialized Matrix

Hi there. I was struggling to debug an issue and traced it back to HMM_LookAt...
The issue has been marked below with comments.
hmm_mat4 Result; // uninitialized

hmm_vec3 F = HMM_NormalizeVec3(HMM_SubtractVec3(Center, Eye));
hmm_vec3 S = HMM_NormalizeVec3(HMM_Cross(F, Up));
hmm_vec3 U = HMM_Cross(S, F);

Result.Elements[0][0] = S.X;
Result.Elements[0][1] = U.X;
Result.Elements[0][2] = -F.X;
// not setting the element at [0][3]

Result.Elements[1][0] = S.Y;
Result.Elements[1][1] = U.Y;
Result.Elements[1][2] = -F.Y;
// (or at [1][3])

Result.Elements[2][0] = S.Z;
Result.Elements[2][1] = U.Z;
Result.Elements[2][2] = -F.Z;
// (or [2][3])

Result.Elements[3][0] = -HMM_DotVec3(S, Eye);
Result.Elements[3][1] = -HMM_DotVec3(U, Eye);
Result.Elements[3][2] = HMM_DotVec3(F, Eye);
Result.Elements[3][3] = 1.0f;

// result returned without initializing the totality of the bottom row
return (Result);

It was fixed by initializing Result to HMM_Mat4d(1.f), but am unsure how you'd like to solve this particularly (it's probably better to just directly write to those elements that weren't initialized).

I swear I fixed that before...sorry about that. Fix version incoming.

No worries! Thanks for the quick response :)


gatttool is depracated

Hi,
I am on archlinux which does not have gatttool in the std package list . Any plans on updating this project to use some other tool or module ? Thank you

currently, no immediate plans.
the reason is that that part is a 'hard' part to do properly and gatttool does work and works well for what it is.
I really dont see the need to re-invent what already works.
there are some tools like this dmm tool that are more native python.
but I chose to keep a loose coupling between the bluetooth part and the decoding part (that is the value-add of this application).
I understand that calling a process and scraping its text output is less than ideal.
but you ARE on linux.  you should be able to find a pre-built gatttool or just build one yourself.  arch is source based.
I honestly dont think I can do better than gatttool.  I am not a bluetooth person (very little experience in the BT protocols and devices) and I'd rather have that part worked out and just concentrate on the part that is the DMM serial decode.
to me, this is a little like having a network stack (tcp/ip) and just using it as-is.  I'd never want to re-implement a comms stack that already works.  there would be more bugs and it would gain no new functionality for that effort.
longer term, what I DO want to try - is to move this entirely over to an esp32 and use its bluetooth stack.  then you would not need linux at all; it would be a wifi/restful remote access method rather than a linux cli command being called repeatedly.
I do plan to get to that project but its not on the short term list.

Ok that make sense.. will close this, 10x for feedback!

I do hope that eventually this can be moved to an esp32.  it would boot instantly and you can use the $4 chips as web/http front ends and not have to care about linux specifics.
I'm happy to accept help in doing the BT decode on the esp32.  I have a good amount of esp background but I'm not a BT expert and have not touched esp bt code (yet).
so again, volunteers accepted for this task ;)

I just added some early beta code that will run ENTIRELY on esp32 !
This will entirely solve any linux gatt issue (lol).


maybe a bug of displaying '^J'

a text opened by vim is displayed only one line, and line break is displayed by "^J".
when the .vimrc is deleted, line break is ok.

This isn't something I can reproduce.


IE & Safar Support?

Hello and thank you for your great work on this library.
I have one small problem: it doesn't seem to work for Safari 9. I get the error that default parameter assignment is not supported.
SyntaxError: Unexpected token '='. Expected a ')' or a ',' after a parameter declaration.
(anonymous function) — dust.js:2

It seems that default operator assignment is also not support in IE. Is dust a library for only Chrome, Firefox, and Safar >= 10? Are you aware of any cross platform particle system libraries for Pixi?
Any thoughts would be greatly appreciated.

Can you provide a reduced test case? I have no problems running the particle example from the Hexi repo on Safari 9.1.2

Hello, thank you so much for your time on this.
When I link dust from src I get the error in Safari. When I link it from bin I get a different error:
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>Hello World</title>
    <script src="tink/src/tink.js"></script>
    <script src="dust/src/dust.js"></script>

  </head>

  <body>
    <script>
      let t = new Tink(PIXI, renderer.view);

      let d = new Dust(PIXI);
    </script>

  </body>

</html>

Errors:
[Error] SyntaxError: Unexpected token '='. Expected a ')' or a ',' after a parameter declaration.
(anonymous function) (tink.js:2)
[Error] SyntaxError: Unexpected token '='. Expected a ')' or a ',' after a parameter declaration.
(anonymous function) (dust.js:2)
[Error] SyntaxError: Unexpected identifier 't'
(anonymous function) (<IP_ADDRESS>:13)
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>Hello World</title>
    <script src="tink/bin/tink.js"></script>
    <script src="dust/bin/dust.js"></script>

  </head>

  <body>
    <script>
      let t = new Tink(PIXI, renderer.view);

      let d = new Dust(PIXI);
    </script>

  </body>

</html>

[Error] ReferenceError: Can't find variable: exports
global code (dust.js:5)
[Error] SyntaxError: Unexpected identifier 't'
(anonymous function) (<IP_ADDRESS>:13)

OK so there are a few things going on here:

Safari 9 does not support the let keyword so your inline script will always fail when you try to assign t using it.
The src folder contains ES2015 javascript so you can't run it directly in the browser; it's meant to be compiled with babel. So no sense putting it in a script tag as your first example
The exports variable error is because you're using an old version of the library that was designed to be used only as a module. If you use the current version from this repo you should be fine.

Wow, fantastic, thank you. Can you recommend a way to include it as a module?

Just use the latest version in this repo and you don't have to worry about modules.

Hi Matt, thank you very much again for this. I replaced all let with var and now getting an error on this line:
pointer.tap = () => console.log("The pointer was tapped");
SyntaxError: Unexpected token ')'
What is this = () => syntax? It is happening throughout the dust example code like during the d.create portion. Is there some equivalent for Safari? I realize this is possibly more about Safari than dust, but I don't know what to google for. Any thoughts would be greatly appreciated. Thank you again!

The () -> (arrow) and ()=> (fat arrow) are syntactic sugar that is part of the ES2015 javascript spec.  Your confusion is caused by the fact that ES2015 is not fully implemented in all browsers yet. You're also using an old version of Safari, which definitely doesn't implement most of it. Babel is a 'transpiler' that eats ES2015 (or other languages) and spits out 'legacy' javascript that will run in older browsers, depending on how you configure it. We are in a transitional time period now, with more people using Babel and other transpilers to get ES2015 features into their codebase before browsers implement them, so you'll see ES2015 in examples more and more frequently. I would recommend you read up on how the ES2015 spec adds to the javascript language. Here is a good starting point. If you are ready to start writing ES2015 you can use Babel, or one of the other transpilers (my fave is coffeescript ) that give you access to ES2015 features across browsers. Good luck!

Oh wow, incredible! I can not thank you enough, sir! May you live long and prosper. Thanks again.


Configure Dbghelp.dll path manually.

Hi
On ProcessHacker 3.x there's no option to configure dbghelp.dll and it is not detected from the registry.
On Pe 2.x there was an option to set the dbghelp.dll path..
Setting manually is also needed in case of using a portable version.
PH: 3.0.3263
OS:  Win7x64 7601
Debugging tools: Debugging Tools for Windows (x64) <IP_ADDRESS>3 - Installed on C:\Program Files\Debugging Tools for Windows (x64)

ProcessHacker 3.x there's no option to configure dbghelp.dll and it is not detected from the registry.

The option to configure the path was removed since a anticheat product was modifying our settings file in their kernel driver filter callbacks and stripping those lines from the file to prevent Process Hacker loading symsrv and downloading symbols.

it is not detected from the registry.

I removed the settings in favour of the registry detection. The KitsRoot10 key provided by the SDK specifies the dbghelp path:

The detection works fine on my test machines so if dbghelp is not being detected and the KitsRoot10 key is valid then a registry filter callback or some other software is blocking access to the registry key. It would also be affecting other software since Visual Studio, Windbg and other software also depend on those registry values.

Setting manually is also needed in case of using a portable version.

If you're using a portable version then just copy these DLLs into the Process Hacker installation directory:
symsrv.dll
dbghelp.dll
dbgcore.dll
If the KitsRoot10 key doesn't exist then these files are loaded from the default search path including System32 and the current installation directory. Those three files are required because symsrv depends on dbghelp and dbghelp depends on dbgcore. If they don't exist then they can't be loaded.

In my machine, KitsRoot10 was pointing to the x86 version - C:\Program Files (x86)\Windows Kits\10\ which did not contain the debug dlls. I believe this key was modified from a VS2017 libraries install.
Installing afterwards the debugging tools for windows x64 did not modify the registry key (nor do I think it should have) which resulted in the debug dlls no getting detected.
Just a note, the windows 7 x64 debugging tools for windows do not include dbgcore.dll
Copying symsrv.dll and dbghelp.dll  into Process hacker's directory (on windows 7,) is enough to display the symbols..
Thanks

the windows 7 x64 debugging tools for windows do not include dbgcore.dll

dbgcore is only required for recent versions of Windows 10 👍🏿


Terminal Theme

Would it be possible to get a terminal theme to match operating system terminals to the IDE terminal?

:+1: it would be great to have it as a highlight theme:
http://www.andre-simon.de/doku/highlight/en/changelog.php
https://gitlab.com/saalen/highlight/tree/master/themes


Merge ayamir/nvimdots to main

Sorry for the pull request. This was meant to be on my personal repo.


UnFit Effect on Depth？

The visual effect in front view is well, but in vertical view does not works. The distance in xy-axis and in z-axis(depth) are obviously not fit. @statho

Is it possible to send me your video, so I can give it a try from my side?

Is it possible to send me your video, so I can give it a try from my side?

Hello, in my implementation for a lot video, I figure out that the varying range of depth is obviously larger than x/y axis. (x/t axis is about 2, depth is about 5+)

@Sun-Happy-YKX Can i ask you about something? Please give me your contact.


Form elements must have labels

Multiple component demos exhibit this same issue. Details related to this accessibility violation can be found here: https://dequeuniversity.com/rules/axe/3.0/label
Below are the URLs that illustrate the problem:

/components/Login/examples-full/
/components/Switch/examples-full/
/upgrade-examples/LoginUpgradeExamples/examples-full/

This is a critical a11y issue.
To learn more about how to build and test locally, check out: https://github.com/patternfly/patternfly-next#testing-for-accessibility
As part of this issue, please complete the following items. These will help reviewers know what issues were addressed in the PR, and also will help us keep our total a11y violation count down.

Run the a11y audit. Check if the violation returned is part of a PF3 component. For any violations in PF3 components, paste them in a comment below. If all violations are in the PF3 component, close this issue. Otherwise, continue with the next step...
Run the a11y audit, copy the issues from the audit that were fixed in the PR, and paste them into the PR description.

Instructions for running the audit are here: https://github.com/patternfly/patternfly-next#testing-for-accessibility
Issues that are returned in the terminal look like this. Find the issues you are addressing and copy the following information provided for them or take a screencap to include in the PR.1 error found in: /upgrade-examples/AlertUpgradeExamples/examples-full/

1) Buttons must have discernible text -- https://dequeuniversity.com/rules/axe/3.1/button-name -- impact: critical

-------html violation instances-------

<button class="btn btn-link dropdown-toggle" type="button" id="dropdownKebabRight" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">

</button>

Reduce the threshold by number of issues being addressed

This update is made here
The new value should be derived by:

subtracting the number of issues you are addressing in the PR (e.g. the line that looks like this in the info you copied from the audit report in item 1 above):
5 errors found in: /components/Toolbar/examples-full/
from current violations (e.g. this line in the audit report, near the end):
20 violations in total

Hey @jgiardino, should we star a new PR for this ticket in order to isolate the "upgrade examples"? Or should we just remove the upgrade portion from this ticket? @rachael-phillips, we had to close #1441 due to similar issues.

@jgiardino, I went ahead and removed the "/upgrade-examples/LoginUpgradeExamples/examples-full/" task since we are no working on anything related to PF3 for ARIA.

Due to the nature of the aria-labelledby, all labels for the switch component are driven dynamically by a set of handlebar rules, aria-labelledby="switch-is-{{id}}". Because of this, the aria-labelledbycan never match the elements ID because of the prefix "switch-is-" at the beginning. According to @mcoker, there is an enhancement on another ticketed issue that is being handled by @christiemolloy on https://github.com/patternfly/patternfly-next/pull/1473.

@jgiardino, I went ahead and removed the "/upgrade-examples/LoginUpgradeExamples/examples-full/" task since we are no working on anything related to PF3 for ARIA.

That's fine as long as the issues were related to the PF3 component and not the PF4 component on that page. Since issues were also flagged for /components/Login/examples-full/, it's possible that the PF4 component on that page has issues. But it's also possible that if you fix the issues in /components/Login/examples-full/, that the PF4 issues in /upgrade-examples/LoginUpgradeExamples/examples-full/ will automatically be fixed too.
Regarding the switch, I'd say to focus on the issues flagged for /components/Login/examples-full/ for now.

I plugged '/upgrade-examples/LoginUpgradeExamples/examples-full/' back into the issue as a reference.


Permission denied although I have set to "anyone with link"

I have 355 MB file on google drive
I have download before with gdown and it worked (around Nov 2021)
Today 14 Feb 2022, when I tried again it didn't worked.
I use : gdown --id
Error:
Access denied with the following error:
    Cannot retrieve the public link of the file. You may need to change
    the permission to 'Anyone with the link', or have had many accesses.

You may still be able to access the file from the browser:
     https://drive.google.com/uc?id=1QWzmHdF1L_3hbjM85nOjfdHsm-iqQptG

I am the owner of the file on Google drive, I checked again for the status of the link (set to "Anyonae with the link")
I have asked a colleague to download the file and it worked for him using the same command : gdown --id
I uninstall and reinstall gdown
Still doesn't work
Any idea?

Solved!
after restarting my terminal. It worked!
I have no idea why. If someone knows?

having the same question, but still stuck. it might be google's problem

Google Drive link (Get link → Anyone with the link): https://drive.google.com/file/d/1AHn99gSXRWjPHixmni1Z5fAQ9Jf3xjrt/view?usp=sharing
> gdown --id 1AHn99gSXRWjPHixmni1Z5fAQ9Jf3xjrt

Access denied with the following error:

 	Cannot retrieve the public link of the file. You may need to change
	the permission to 'Anyone with the link', or have had many accesses.

You may still be able to access the file from the browser:

	 https://drive.google.com/uc?id=1AHn99gSXRWjPHixmni1Z5fAQ9Jf3xjrt

Same result with --no-cookies.
Changing permissions (restricted, viewer, editor) didn't help.
Small files work OK.

When the "Download anyway" button is pressed, a direct link is generated:

This link works only in the same browser.

Same issue here.

The page that is displayed (see comment two up for an example) contains a link in the source that can be used to download the item without being forced to click the button. The link has a query parameter of confirm=true. I'm able to download a file using curl like so:
curl -L -s -o data/my-file.h5 'https://drive.google.com/uc?id=my-file-id-here&confirm=t

@robmoore This works for me if I modify it slightly
curl -L -o 'FILENAME.h5' 'https://drive.google.com/u/0/uc?id=MY_ID_HERE&export=download&confirm=t'
(I also removed the -s to ensure it is downloading the correct file)

In the last week, I started having this problem with a file that I hadn't previously had any trouble with.  This is the fix I found:
gdown.download(
    f"https://drive.google.com/uc?export=download&confirm=pbef&id={file_id}",
    output
)

In the last week, I started having this problem with a file that I hadn't previously had any trouble with. This is the fix I found:
gdown.download(
    f"https://drive.google.com/uc?export=download&confirm=pbef&id={file_id}",
    output
)

This solution worked for me. Huge thanks

Gdown v4.3.0 is out! https://github.com/wkentaro/gdown/releases/tag/v4.3.0
Hope it fixes this issue. (Please request reopening if not)

In the last week, I started having this problem with a file that I hadn't previously had any trouble with. This is the fix I found:
gdown.download(
    f"https://drive.google.com/uc?export=download&confirm=pbef&id={file_id}",
    output
)

The new version still produced the same error, but this comment solve it.
Thanks :pray:

@abdelmalek13 Can you possibly share the file id (privately via email)? I need to know why is that.

@wkentaro Does it have something to do with open vs uc links? The first snipped below works (using the open link) and the second doesnt (using the uc link):
# Works:
>>> for i in range(10):
...     gdown.download('https://drive.google.com/open?id=1EC5XAM-maBPsbMTfvpBs_NFo3UC_qFMy', 'temp.pdf', use_cookies = False, quiet = True)
...
'temp.pdf'
'temp.pdf'
'temp.pdf'
'temp.pdf'
'temp.pdf'
'temp.pdf'
'temp.pdf'
'temp.pdf'
'temp.pdf'
'temp.pdf'

# Fails
>>> for i in range(10):
...     gdown.download('https://drive.google.com/uc?id=1EC5XAM-maBPsbMTfvpBs_NFo3UC_qFMy', 'temp.pdf', use_cookies = False, quiet = True)
...
Access denied with the following error:

        Cannot retrieve the public link of the file. You may need to change
        the permission to 'Anyone with the link', or have had many accesses.

You may still be able to access the file from the browser:

         https://drive.google.com/uc?id=1EC5XAM-maBPsbMTfvpBs_NFo3UC_qFMy

@abdelmalek13 Can you possibly share the file id (privately via email)? I need to know why is that.

I'm too sorry :pray:  @wkentaro it's a sensitive document that belonged to a customer I can't share this file with you

Solved! after restarting my terminal. It worked! I have no idea why. If someone knows?

Thanks a lot

Solved by upgrading python version 2.7 to latest along with pip3 version

Try this, it solved my issue
!pip install --upgrade --no-cache-dir gdown

Gdown v4.3.0 is out! https://github.com/wkentaro/gdown/releases/tag/v4.3.0 Hope it fixes this issue. (Please request reopening if not)
FYI, you can upgrade gdown by:
pip install --upgrade --no-cache-dir gdown

thanks, mine works after updating. Hope it doesn't crash again

In the last week, I started having this problem with a file that I hadn't previously had any trouble with. This is the fix I found:
gdown.download(
    f"https://drive.google.com/uc?export=download&confirm=pbef&id={file_id}",
    output
)

Huge Thanks ! Saviour

Hello!
I understand if this is a beginners question, but nonetheles:
I get the above error msg:
"Access denied with the following error:
Cannot retrieve the public link of the file. You may need to change
the permission to 'Anyone with the link', or have had many accesses.

You may still be able to access the file from the browser:"
And I have tried reading through the fixes for this problem. However, Im not sure how to try them since I just use GitHub through the web browser to do RVC (change audio files through pre-trained voice models). All I do is run a session with the small play-button and I dont know how to solve the problem that I can no longer add new AI-voice models.
Is this problem solvable without using external software (many are refering to updating python and gdown)
Thanks for your help! :)

In the last week, I started having this problem with a file that I hadn't previously had any trouble with. This is the fix I found:
gdown.download(
    f"https://drive.google.com/uc?export=download&confirm=pbef&id={file_id}",
    output
)

Huge thanks!