text:
Ability to transform proxied content

Right now this proxy isn't useful for anything other than forwarding traffic to somewhere else.
Including patterns for transforming proxied content would be really useful.
Some transformations that I would want to support:

Manipulating headers in some way (adding and removing HTTP headers sent to and retrieved from the proxied backend)
Content transformations on the body

A challenge with content transformations is that they are harder to implement in a streaming fashion - often they'll need to accumulate the entire response body before being applied. Supporting a neat pattern for optionally doing that would be useful too.

It would be fun to experiment with transforming streaming content - using ijson for JSON and some streaming HTML parser for HTML.

Built this quick prototype with the help of ChatGPT:
import asyncio
from html.parser import HTMLParser
import sys

class AddClassToPTagParser(HTMLParser):
    def handle_starttag(self, tag, attrs):
        if tag == "p":
            attrs = dict(attrs)
            if "class" in attrs:
                if "foo" not in attrs["class"].split():
                    attrs["class"] += " foo"
            else:
                attrs["class"] = "foo"

            attrs_str = " ".join([f'{k}="{v}"' for k, v in attrs.items()])
            self.modified_html += f"<{tag} {attrs_str}>"
        else:
            self.modified_html += self.get_starttag_text()

    def handle_endtag(self, tag):
        self.modified_html += f"</{tag}>"

    def handle_data(self, data):
        self.modified_html += data

    def handle_entityref(self, name):
        self.modified_html += f"&{name};"

    def handle_charref(self, name):
        self.modified_html += f"&#${name};"

    def feed(self, data):
        self.modified_html = ""
        super().feed(data)
        return self.modified_html

async def transform_html(async_generator):
    parser = AddClassToPTagParser()

    async for chunk in async_generator:
        yield parser.feed(chunk)

async def test():
    async def html_generator():
        chunks = [
            "",
            "<title>Te",
            "st</title></he",
            "ad>
Hello, ","world!
","
',
            'Hello again, ","world!
',
        ]
        for chunk in chunks:
            yield chunk
            await asyncio.sleep(0.5)

    async for transformed_chunk in transform_html(html_generator()):
        print(transformed_chunk, end='')
        sys.stdout.flush()
    print()

# Run the test coroutine
asyncio.run(test())

For ijson I think this example is relevant, from https://github.com/ICRAR/ijson/tree/master#push-interfaces
import ijson

events = ijson.sendable_list()
coro = ijson.items_coro(events, 'earth.europe.item')
f = urlopen('http://.../')
for chunk in iter(functools.partial(f.read, buf_size)):
   coro.send(chunk)
   process_accumulated_events(events)
   del events[:]
coro.close()
process_accumulated_events(events)

ijson example (ChatGPT wanted remove_keys to be an async def but I fixed that):
import asyncio
import ijson

def remove_keys(obj):
    """Remove keys starting with '_' from an object"""
    if isinstance(obj, dict):
        return {
            k: remove_keys(v) for k, v in obj.items() if not k.startswith("_")
        }
    elif isinstance(obj, list):
        return [remove_keys(item) for item in obj]
    else:
        return obj

async def transform_json(async_generator):
    events = ijson.sendable_list()
    coro = ijson.items_coro(events, "item")

    async for chunk in async_generator:
        coro.send(chunk)
        while events:
            transformed_item = remove_keys(events.pop(0))
            yield transformed_item
    coro.close()

async def test():
    async def json_stream():
        chunks = [
            b'[{"item": {"_id": 1, "name": "test1"}},',
            b'{"item": {"_id": 2, "name": "test2"}},',
            b'{"item": {"_id": 3, "name": "test3"}}]',
        ]
        for chunk in chunks:
            yield chunk
            await asyncio.sleep(0.1)

    async for transformed_item in transform_json(json_stream()):
        print(transformed_item)

# Run the test coroutine
asyncio.run(test())

Note that this outputs:
{'item': {'name': 'test1'}}
{'item': {'name': 'test2'}}
{'item': {'name': 'test3'}}

Losing the [ and ]. Needs more work.
ChatGPT transcript that got me here: https://chat.openai.com/share/3461da01-6e49-4324-9ece-cc2be1134f04

So I think the interface for this ends up looking something like this:
# As seen above:
async def transform_html(async_generator):
    parser = AddClassToPTagParser()

    async for chunk in async_generator:
        yield parser.feed(chunk)

app = asgi_proxy("https://datasette.io", body_transformer=transform_html)

This may be too simple though, since the transformer should probably take into account things like the content-type header before deciding what to do.
Maybe something like this instead:
def transform_factory(httpx_response):
    # At this point we just have the headers
    if 'text/html' in httpx_response.headers.get('content-type'):
        return transform_html

app = asgi_proxy("https://datasette.io", body_transform_factory=transform_factory)

repo: simonw/asgi-proxy-lib


text:
Don't default to allow all CORS

Someone running Datasette on localhost it on a private network could easily accidentally expose their data because of #24.
Solution: pick up in the --cors command line option instead, which is off by default.
Thanks, Paul McMillan: https://twitter.com/paulm/status/1291289516934758401

The datasette mydb.db --cors option sets datasette.cors = True - since I have access to the Datasette object I can read that flag directly.

source: gharchive/issue

repo: simonw/datasette-graphql

license_type: permissive

license_source: github-api


text:
Merging does not remove old keys from the combined metadata

https://git-history-demos.datasette.io/-/metadata right now looks like this:
{
  "title": "git-history demos",
  "about": "About these demos",
  "about_url": "https://github.com/simonw/git-history/tree/main/demos",
  "plugins": {
    "datasette-remote-metadata": {
      "url": "https://raw.githubusercontent.com/simonw/git-history/main/demos/metadata.yml"
    }
  },
  "databases": {
    "511": {
      "title": "511.org incidents",
      "source": "dbreunig/511-events-history",
      "source_url": "https://github.com/dbreunig/511-events-history"
    },
    "pge-outages": {
      "title": "PG&E Outages",
      "source": "simonw/pge-outages",
      "source_url": "https://github.com/simonw/pge-outages"
    },
    "sf-bay-511": {
      "title": "511.org incidents",
      "source": "dbreunig/511-events-history",
      "source_url": "https://github.com/dbreunig/511-events-history"
    },
    "ca-fires": {
      "title": "fire.ca.gov incidents",
      "source": "simonw/ca-fires-history",
      "source_url": "https://github.com/simonw/ca-fires-history"
    },
    "pge": {
      "title": "PG&E Outages",
      "source": "simonw/pge-outages",
      "source_url": "https://github.com/simonw/pge-outages"
    },
    "fires": {
      "title": "fire.ca.gov incidents",
      "source": "simonw/ca-fires-history",
      "source_url": "https://github.com/simonw/ca-fires-history"
    }
  }
}

That's because I originally had keys fires and then renamed to ca-fires in this commit: https://github.com/simonw/git-history/commit/a7b0cd2e6b7be4b7bd332dcbb672f92b9216abc3
But the old keys were not removed.

My mistake: that's not what happened here at all. The deployed instance was using the first version of metadata.yml and it then loaded and combined the second version - re-deploying the instance would have fixed this.

repo: simonw/datasette-remote-metadata


text:
Add “updated” to metadata

To give an indication as to when the data was last updated.
This should be a field in the metadata that is then shown on the index page and in the footer, if it is set.
Also support setting it using an option to “datasette publish” and “datasette package” - which can either be a string or can be the magic string “today” to set it to today’s date:
datasette publish file.db --updated=today

Having this as a global option may not make sense when  publishing multiple databases. We can revisit that when we implement per-database and per-table metadata.

We have per-database and per-table metadata now. I think it's time to make this actually happen.

I think I'll just call it "updated" to avoid the ugly underscore.

This may be the feature that causes me to add dateutilas a dependency (so I can use dateutil.parser.parse)

This is still a good idea.

This is STILL a good idea.

Still a good idea today too! Would be great for https://cdc-vaccination-history.datasette.io/ for example.

I'm going to use https://github.com/dateutil/dateutil for this - it's been maintained constantly (by an evolving team of contributors) since 2003 and is a very trustworthy dependency.

So this is a metadata key called updated which can be applied at the table, database or instance level. It is represented as a .isoformat() timestamp.
Question: should I support just the date - yyyy-mm-dd - in addition to the datetime?
I think so. I can easily imagine situations where the exact time of day that a change was made hasn't been recorded, but the overall date is known.

Side-note: Django 4.0 will switch from using pytz to using the standard library zoneinfo module introduced in Python 3.9, which has a backport that works as far back as 3.6: https://github.com/pganssle/zoneinfo (https://pypi.org/project/backports.zoneinfo/)
If I need to handle timezones I'll use that, but I think I can get away without it?

The simplest possible version of this: it's always represented as a UTC ISO datetime, like this: 2020-10-31T12:00:00+00:00
Later versions of Datasette could extend this to handle other timezones or support just the date (though that's a backwards incompatible change so probably better to decide on the date thing right now).

The audiences I care about here are:

Producers of this timestamp - generally that will be users who are using datasette publish to share their data
Human consumers of this timestamp - end users who look at a Datasette site and want to know how recent the data is
Machine consumers of this timestamp - API integrations that might want to check if a Datasette instance has been updated before downloading new data

For producers I think there are going to be two categories. The first is users who run "publish" and want the site to reflect when they did so (probably using --updated=now when they publish). The second are users who are willing to spend more time thinking about this - for example my various git scraping projects where I want to use a date derived from the git history.
For humans... I'd like to be able to calculate a relative time (3 hours ago) in addition to showing the display time, because that helps avoid confusion over timezones.
For machine consumers, it might be nice to offer a calculated Unix timestamp-since-1970, since those can be easier to work with in some languages than running a full ISO date parser.

https://github.com/rcaught/querydata.io/commit/a661d43bf4fc6f562a40b80a8eb24748e349c1f4

I've started it off here: https://github.com/rcaught/datasette-updated
I've changed it to use an environment variable for the configuration value. I don't really see a hook or option that I could use - happy to be proven wrong though. From your comments above though, it seems like this might be a change to the CLI options; and a plugin might not be the right choice.
I'm not going to publish this to anything yet. Happy to have you hijack it or ask for changes!

authors: rcaught simonw

repo: simonw/datasette


text:
--rexec option for replacing with executed command

Refs:

#34

Needs tests and docs.

source: gharchive/pull-request

repo: simonw/symbex


text:
currentUser lost with two windows open

This might be related to #523
Every time I open a second tab, the currentUser object is 'lost' on the old one, this is caused by
  bindToStorageEvents: function() {
    var _this = this;
    Ember.$(window).bind('storage', function(e) {
      var data = _this.restore();
      if (!objectsAreEqual(data, _this._lastData)) {
        _this._lastData = data;
        _this.trigger('sessionDataUpdated', data);
      }
    });
  }

I'm not 100% clear on why, or if it's intentional or not, but data has a class instance of currentUser while _lastData has just an object referencing the currentUser which is being set as the new data session.

(first object represents data, second object represents _lastData)
You can even see the session.currentUser change on the first window you have open

(first object is on first load, second object is after opening a second tab)
It might also be related to the persist model as I can see it's setting some currentUser objects and some currentUser classes, starting here it went over my head pretty quickly so I'm not even sure.
Just in case it's related, this is my code for getting the currentUser
import Session from "simple-auth/session";
import Ember from 'ember';

export default {
  name: 'cusotm-session',
  before: 'simple-auth',
  initialize: function(container, app) {

    Session.reopen({
      setCurrentUser: function() {
        if(this.get('isAuthenticated')){

          var _this = this;
          var store = container.lookup("store:main");

          Ember.$.ajax(url).then(function(data){
            var me = store.push('user', data.load.me);
            _this.set('currentUser', me);
            // custom app logic unrelated to the user
          });
        }
      }.observes('isAuthenticated')
    });
  }
};

I'd love to provide more info, not sure what else could be relevant, pretty new to ember so my apologies if theres any obvious mistake I'm not aware of.

You shouldn't store class instances in the session, only POJOs, storing class instances isn't supported. Checkout this example for adding a currentUser property to the session.

Alright, I understand, so there's no way to use that user computed properties I guess? is that intended?

You can use a computed property to make the current user accessible via the session but not store an actual user object in the session.

authors: marcoow tmayr

repo: simplabs/ember-simple-auth

license: mit

license_source: bigquery


text:
Compile Error with ESP32...

I'm trying to run the following sketch on an ESP32 (WEMOS LOLIN32):
Simple_FOC/examples/utils/driver_standalone_test/bldc_driver_6pwm_standalone/bldc_driver_6pwm_standalone.ino
However, I am getting compiler errors as shown below when I try to compile this sketch or any of the other examples in the library.  The last lines are:
exit status 1
Error compiling for board WEMOS LOLIN32.

and above that are all the following error messages:

/Users/jim/Sync/Documents_Shared/Arduino_Shared/libraries/Simple_FOC/src/drivers/hardware_specific/esp32_mcu.cpp: In function 'void _configureTimerFrequency(long int, mcpwm_dev_t*, mcpwm_unit_t, float)':
/Users/jim/Sync/Documents_Shared/Arduino_Shared/libraries/Simple_FOC/src/drivers/hardware_specific/esp32_mcu.cpp:127:22: error: 'volatile union mcpwm_clk_cfg_reg_t' has no member named 'prescale'
   mcpwm_num->clk_cfg.prescale = 0;
                      ^~~~~~~~
/Users/jim/Sync/Documents_Shared/Arduino_Shared/libraries/Simple_FOC/src/drivers/hardware_specific/esp32_mcu.cpp:143:23: error: 'volatile struct mcpwm_timer_regs_t' has no member named 'period'
   mcpwm_num->timer[0].period.prescale = prescaler;
                       ^~~~~~
/Users/jim/Sync/Documents_Shared/Arduino_Shared/libraries/Simple_FOC/src/drivers/hardware_specific/esp32_mcu.cpp:144:23: error: 'volatile struct mcpwm_timer_regs_t' has no member named 'period'
   mcpwm_num->timer[1].period.prescale = prescaler;
                       ^~~~~~
/Users/jim/Sync/Documents_Shared/Arduino_Shared/libraries/Simple_FOC/src/drivers/hardware_specific/esp32_mcu.cpp:145:23: error: 'volatile struct mcpwm_timer_regs_t' has no member named 'period'
   mcpwm_num->timer[2].period.prescale = prescaler;
                       ^~~~~~
/Users/jim/Sync/Documents_Shared/Arduino_Shared/libraries/Simple_FOC/src/drivers/hardware_specific/esp32_mcu.cpp:148:23: error: 'volatile struct mcpwm_timer_regs_t' has no member named 'period'
   mcpwm_num->timer[0].period.period = resolution_corrected;
                       ^~~~~~
/Users/jim/Sync/Documents_Shared/Arduino_Shared/libraries/Simple_FOC/src/drivers/hardware_specific/esp32_mcu.cpp:149:23: error: 'volatile struct mcpwm_timer_regs_t' has no member named 'period'
   mcpwm_num->timer[1].period.period = resolution_corrected;
                       ^~~~~~
/Users/jim/Sync/Documents_Shared/Arduino_Shared/libraries/Simple_FOC/src/drivers/hardware_specific/esp32_mcu.cpp:150:23: error: 'volatile struct mcpwm_timer_regs_t' has no member named 'period'
   mcpwm_num->timer[2].period.period = resolution_corrected;
                       ^~~~~~
/Users/jim/Sync/Documents_Shared/Arduino_Shared/libraries/Simple_FOC/src/drivers/hardware_specific/esp32_mcu.cpp:152:23: error: 'volatile struct mcpwm_timer_regs_t' has no member named 'period'
   mcpwm_num->timer[0].period.upmethod = 0;
                       ^~~~~~
/Users/jim/Sync/Documents_Shared/Arduino_Shared/libraries/Simple_FOC/src/drivers/hardware_specific/esp32_mcu.cpp:153:23: error: 'volatile struct mcpwm_timer_regs_t' has no member named 'period'
   mcpwm_num->timer[1].period.upmethod = 0;
                       ^~~~~~
/Users/jim/Sync/Documents_Shared/Arduino_Shared/libraries/Simple_FOC/src/drivers/hardware_specific/esp32_mcu.cpp:154:23: error: 'volatile struct mcpwm_timer_regs_t' has no member named 'period'
   mcpwm_num->timer[2].period.upmethod = 0;
                       ^~~~~~
/Users/jim/Sync/Documents_Shared/Arduino_Shared/libraries/Simple_FOC/src/drivers/hardware_specific/esp32_mcu.cpp:165:73: warning: 'esp_err_t mcpwm_sync_enable(mcpwm_unit_t, mcpwm_timer_t, mcpwm_sync_signal_t, uint32_t)' is deprecated: please use mcpwm_sync_configure() instead [-Wdeprecated-declarations]
   mcpwm_sync_enable(mcpwm_unit, MCPWM_TIMER_0, (mcpwm_sync_signal_t)1, 0);
                                                                         ^
In file included from /Users/jim/Sync/Documents_Shared/Arduino_Shared/libraries/Simple_FOC/src/drivers/hardware_specific/esp32_mcu.cpp:5:
/Users/jim/Library/Arduino15/packages/esp32/hardware/esp32/2.0.1/tools/sdk/esp32/include/driver/include/driver/mcpwm.h:838:11: note: declared here
 esp_err_t mcpwm_sync_enable(mcpwm_unit_t mcpwm_num, mcpwm_timer_t timer_num, mcpwm_sync_signal_t sync_sig,
           ^~~~~~~~~~~~~~~~~
/Users/jim/Sync/Documents_Shared/Arduino_Shared/libraries/Simple_FOC/src/drivers/hardware_specific/esp32_mcu.cpp:165:73: warning: 'esp_err_t mcpwm_sync_enable(mcpwm_unit_t, mcpwm_timer_t, mcpwm_sync_signal_t, uint32_t)' is deprecated: please use mcpwm_sync_configure() instead [-Wdeprecated-declarations]
   mcpwm_sync_enable(mcpwm_unit, MCPWM_TIMER_0, (mcpwm_sync_signal_t)1, 0);
                                                                         ^
In file included from /Users/jim/Sync/Documents_Shared/Arduino_Shared/libraries/Simple_FOC/src/drivers/hardware_specific/esp32_mcu.cpp:5:
/Users/jim/Library/Arduino15/packages/esp32/hardware/esp32/2.0.1/tools/sdk/esp32/include/driver/include/driver/mcpwm.h:838:11: note: declared here
 esp_err_t mcpwm_sync_enable(mcpwm_unit_t mcpwm_num, mcpwm_timer_t timer_num, mcpwm_sync_signal_t sync_sig,
           ^~~~~~~~~~~~~~~~~
/Users/jim/Sync/Documents_Shared/Arduino_Shared/libraries/Simple_FOC/src/drivers/hardware_specific/esp32_mcu.cpp:166:73: warning: 'esp_err_t mcpwm_sync_enable(mcpwm_unit_t, mcpwm_timer_t, mcpwm_sync_signal_t, uint32_t)' is deprecated: please use mcpwm_sync_configure() instead [-Wdeprecated-declarations]
   mcpwm_sync_enable(mcpwm_unit, MCPWM_TIMER_1, (mcpwm_sync_signal_t)1, 0);
                                                                         ^
In file included from /Users/jim/Sync/Documents_Shared/Arduino_Shared/libraries/Simple_FOC/src/drivers/hardware_specific/esp32_mcu.cpp:5:
/Users/jim/Library/Arduino15/packages/esp32/hardware/esp32/2.0.1/tools/sdk/esp32/include/driver/include/driver/mcpwm.h:838:11: note: declared here
 esp_err_t mcpwm_sync_enable(mcpwm_unit_t mcpwm_num, mcpwm_timer_t timer_num, mcpwm_sync_signal_t sync_sig,
           ^~~~~~~~~~~~~~~~~
/Users/jim/Sync/Documents_Shared/Arduino_Shared/libraries/Simple_FOC/src/drivers/hardware_specific/esp32_mcu.cpp:166:73: warning: 'esp_err_t mcpwm_sync_enable(mcpwm_unit_t, mcpwm_timer_t, mcpwm_sync_signal_t, uint32_t)' is deprecated: please use mcpwm_sync_configure() instead [-Wdeprecated-declarations]
   mcpwm_sync_enable(mcpwm_unit, MCPWM_TIMER_1, (mcpwm_sync_signal_t)1, 0);
                                                                         ^
In file included from /Users/jim/Sync/Documents_Shared/Arduino_Shared/libraries/Simple_FOC/src/drivers/hardware_specific/esp32_mcu.cpp:5:
/Users/jim/Library/Arduino15/packages/esp32/hardware/esp32/2.0.1/tools/sdk/esp32/include/driver/include/driver/mcpwm.h:838:11: note: declared here
 esp_err_t mcpwm_sync_enable(mcpwm_unit_t mcpwm_num, mcpwm_timer_t timer_num, mcpwm_sync_signal_t sync_sig,
           ^~~~~~~~~~~~~~~~~
/Users/jim/Sync/Documents_Shared/Arduino_Shared/libraries/Simple_FOC/src/drivers/hardware_specific/esp32_mcu.cpp:167:73: warning: 'esp_err_t mcpwm_sync_enable(mcpwm_unit_t, mcpwm_timer_t, mcpwm_sync_signal_t, uint32_t)' is deprecated: please use mcpwm_sync_configure() instead [-Wdeprecated-declarations]
   mcpwm_sync_enable(mcpwm_unit, MCPWM_TIMER_2, (mcpwm_sync_signal_t)1, 0);
                                                                         ^
In file included from /Users/jim/Sync/Documents_Shared/Arduino_Shared/libraries/Simple_FOC/src/drivers/hardware_specific/esp32_mcu.cpp:5:
/Users/jim/Library/Arduino15/packages/esp32/hardware/esp32/2.0.1/tools/sdk/esp32/include/driver/include/driver/mcpwm.h:838:11: note: declared here
 esp_err_t mcpwm_sync_enable(mcpwm_unit_t mcpwm_num, mcpwm_timer_t timer_num, mcpwm_sync_signal_t sync_sig,
           ^~~~~~~~~~~~~~~~~
/Users/jim/Sync/Documents_Shared/Arduino_Shared/libraries/Simple_FOC/src/drivers/hardware_specific/esp32_mcu.cpp:167:73: warning: 'esp_err_t mcpwm_sync_enable(mcpwm_unit_t, mcpwm_timer_t, mcpwm_sync_signal_t, uint32_t)' is deprecated: please use mcpwm_sync_configure() instead [-Wdeprecated-declarations]
   mcpwm_sync_enable(mcpwm_unit, MCPWM_TIMER_2, (mcpwm_sync_signal_t)1, 0);
                                                                         ^
In file included from /Users/jim/Sync/Documents_Shared/Arduino_Shared/libraries/Simple_FOC/src/drivers/hardware_specific/esp32_mcu.cpp:5:
/Users/jim/Library/Arduino15/packages/esp32/hardware/esp32/2.0.1/tools/sdk/esp32/include/driver/include/driver/mcpwm.h:838:11: note: declared here
 esp_err_t mcpwm_sync_enable(mcpwm_unit_t mcpwm_num, mcpwm_timer_t timer_num, mcpwm_sync_signal_t sync_sig,
           ^~~~~~~~~~~~~~~~~
/Users/jim/Sync/Documents_Shared/Arduino_Shared/libraries/Simple_FOC/src/drivers/hardware_specific/esp32_mcu.cpp:169:23: error: 'volatile struct mcpwm_timer_regs_t' has no member named 'sync'
   mcpwm_num->timer[0].sync.out_sel = 1;
                       ^~~~
/Users/jim/Sync/Documents_Shared/Arduino_Shared/libraries/Simple_FOC/src/drivers/hardware_specific/esp32_mcu.cpp:171:23: error: 'volatile struct mcpwm_timer_regs_t' has no member named 'sync'
   mcpwm_num->timer[0].sync.out_sel = 0;
                       ^~~~

I can compile it just fine on an Arduino Nano, and I can compile other sketches on the ESP32 (the WEMOS LOLIN32 is the board I use nearly all the time and buy them in 100 piece lots once or twice a year).
I have seen other threads here that are similar concerning the support of the ESP32 and compiler errors, but no solutions.
Is the ESP32 supported by the SimpleFOC library?
Thank you!

Hey @TSJim,
This is the issue with the new 2.0.1 version of the esp32 SDK package.
We did not support it yet. Please use the version 2.0.0
We will support the 2.0.1 as soon as possible.

authors: TSJim askuric

repo: simplefoc/Arduino-FOC-drivers

license: MIT


text:
on_attach not triggering

I've got the following config:
local lsp_on_attach = function(_, bufnr)
  local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr, ...) end

  buf_set_keymap('n', 'K', '<Cmd>lua vim.lsp.buf.hover()<CR>', { noremap=true, silent=true })
end

require('packer').startup(function(use)
  use {
    'simrat39/rust-tools.nvim',
    requires = {
      {'mattn/webapi-vim'},
      {'neovim/nvim-lspconfig'}
    },
    config = function()
      require('rust-tools').setup {
        -- all the opts to send to nvim-lspconfig
        -- these override the defaults set by rust-tools.nvim
        -- see https://github.com/neovim/nvim-lspconfig/blob/master/CONFIG.md#rust_analyzer
        server = {
          on_attach = lsp_on_attach,
          flags = {
            debounce_text_changes = 150,
          }
        }, -- rust-analyer options
      }
    end
  }
end)

When I open a Rust file, I can see that rust-tools is loaded (I can, for example, run runnables), but the key binding K is missing. I've pieces this together from the different docs on packer and lspconfig, but there appears to be something that makes on_attach not work as expected?

Actually, on further investigation, it seems the culprit is bufn not being set. I'm continuing to investigate what's causing this.


text:
Sass Caching

Implements incremental builds using Sass's caching mechanism. Adds a clearCache function to clear the intermediate compilation directory that may contain outdated file names (if you rename or remove Sass source files).
Breaking changes due to no longer clearing intermediate cache on every run. See clearCache docs for situations where the clearCache will be needed.
Merging into 2.0 branch.
Fixes #111

Closed in favor of a more up to date PR against master.

repo: sindresorhus/gulp-ruby-sass


text:
Fix GitHub's buggy "scroll to focused comment" feature

GitHub adds an annoying and buggy double-scroll that happens every time a comment is focused.

I think the reason behind this is the fixed header: when a comment is focused, by default it ends up under the header, so GitHub tries to push it lower.
The problem is that this fix is visible and buggy (you can see that the position changes every time you focus a comment)

Test comment

This also happens for files in PRs, e.g. https://github.com/sindresorhus/refined-github/pull/3257/files#diff-b3df289d90dbc15afa339bff816f4838

This is impossible to solve because of the sticky header.
If you keep pressing it fast enough, you see all three behaviors happening.

Fixed view with glitching.
Fixed view without glitching.
Incorrect view, ignoring the fix completely.

We can not say when we see each of these behaviors, except for adding smooth scroll ourselves, overriding GH's offsetting logic.

Yeah it looks like it's buggy because there are several pieces of code that try to change the scroll position in various event handlers. If we try to replace that logic, we have to implement all of it (e.g. there's logic that opens collapsed comments when they're :targeted and logic that starts loading the rest of the file in a diff when a specific line is :targeted)
Perhaps we can just find a way to fix https://github.com/sindresorhus/refined-github/pull/3242 since we control the URL changing. We need to do this without triggering hashchange:

set location.hash
trigger the :target style (<- this might not be possible)
scroll the element into view

Perhaps we can just find a way to fix #3242 since we control the URL changing. We need to do this without triggering hashchange:
...

What we could do to avoid glitching in #3242:

scroll the element into the position where it is supposed to be
replace hash (this triggers :target, also hashchange)
GH will try to scroll page to where it is supposed to be

As of 3, browser in most cases should not do anything, because 3 happens immediately invalidating 2. Not an exact solution, but should avoid some amount of glitch.

Just realized I essentially explained everything GH does after hashchange 😅

I think this can be fixed "easily" by copying GitHub’s CSS and avoiding the :target selector altogether

Copy GitHub’s CSS and adjust it:- .comment:target {
+ .comment.rgh-target {

On anchor click:

Use location.replace to set location.hash
Use comment.scrollIntoView()
Add rgh-target class to comment

onhashchange / click on body:

Remove rgh-target class
Remove location.hash

Modifying hash in any way (using location.hash or location.replace) immediately triggers GH targeting behavior.
In Firefox, even where using scrollIntoView() to set comment in desired position and then changing hash causes it to glitch.
The only way to fix this I think would be to hijack GH's handler somehow.

This doesn't:
history.replaceState({}, document.title, 'https://github.com/sindresorhus/refined-github/issues/3263#issuecomment-658685481')

However I think it's not worth getting into the trouble of recreating this behavior and very likely stumbling on conflicts and causing further bugs. Let's hope GitHub fixes it

authors: fregante notlmn

repo: sindresorhus/refined-github


text:
Add collapse-markdown-sections feature

LINKED ISSUES: Closes #3224

TEST URLS:

Repo roots

https://github.com/sindresorhus/refined-github
https://github.com/fregante/GhostText
https://github.com/microsoft/TypeScript

Markdown files

https://github.com/fregante/github-url-detection/blob/master/readme.md
https://github.com/ajv-validator/ajv/blob/master/docs/json-schema.md

SCREENSHOT:

I chose the approach of wrapping sections in <details> elements, with the <h2> headings acting as <summary>s. This preserves both native styles and the anchor link.

Took a few full-page screenshots to show that the layout remains largely undisturbed:

Before
After

Before
After

The only snag: according to this MDN article, wrapping headings in <summary> elements is an accessibility hazard. Though it could probably be mitigated by putting the right ARIA attributes on the <details> or <summary>.

Also this only seems to toggle h2s, but I think it should toggle all headers, refer to the "API documentation" example: https://github.com/sindresorhus/refined-github/issues/3224

Rewritten with the following behavior:

clicking on a header of any level (except h1) toggles the corresponding "section"
re-opening a section opens every "sub-section", even if they were hidden when the larger section was toggled off
alt-clicking a header toggles all the header of the same level in the current "super-section" only

The logic looks good! However it still differs from the original suggestion, which never hid any headings, leading to a "All collapsed" state that looks like an outline/toc, rather than having to manually still open each section.

Yeah that's a much better idea. The outline becomes immediately visible and navigation is a lot easier.

We got a problem: The section is also collapsed when text is selected

Maybe: https://stackoverflow.com/a/61364802

We got a problem: The section is also collapsed when text is selected
Maybe: stackoverflow.com/a/61364802

This mitigates the issue, but it doesn't work when double-clicking to select a word. We could listen to dblick, check that there's a selection and if yes re-open the section right after. Worth it?

IMHO return on double click

I haven’t tested it, but I assume that on the second click the section reopens. If that’s the case, it’s fine as is.
The only ways to avoid this are:

delaying the action until we’re sure there’s no second click (plz no)
moving this event out of the text altogether, for example on a button on the side

The problem with the latter is that there might be images on the right side of the headers and on small displays there’s no room on the sides.

Too bad didn't see this earlier, I think it makes sense to enable this for wiki as well.

authors: cheap-glitch fregante kidonng yakov116


text:
Correctly parse versions and require Node.js 10

Fixes: #3
cc @sindresorhus

@sindresorhus Ping!

Thanks for fixing 👍

authors: Richienb sindresorhus

repo: sindresorhus/to-semver


text:
Does flutter quill select text size?

Is there an existing issue for this?

[X] I have searched the existing issues

The question

I want to set text size but can't find it in flutter quill

You can set the default text style using QuillEditorConfigurations.customStyles.
In the example app code in file lib\screens\quill\my_quill_editor.dart line 48 shows how the h1 style is set. You could add a style for paragraph:
Code snippet:

defaultTextStyle.style.copyWith(fontSize: 32, ),

  Widget build(BuildContext context) {
    final defaultTextStyle = DefaultTextStyle.of(context);
    return QuillEditor(
        configurations: configurations.copyWith(
                customStyles: DefaultStyles(
                  paragraph: DefaultTextBlockStyle(
                    defaultTextStyle.style.copyWith(fontSize: 32, ),
                    const VerticalSpacing(0, 0),
                    const VerticalSpacing(0, 0),
                    null,
                  ),
                ),

repo: singerdmx/flutter-quill


text:
Update docstrings for new-shape feature

Issue and/or context: As tracked on issue https://github.com/single-cell-data/TileDB-SOMA/issues/2407/ [sc-51048].
Note that the intended Python and R API changes are all agreed on and finalized as described in https://github.com/single-cell-data/TileDB-SOMA/issues/2407
Changes:
Notes for Reviewer:

@nguyenv alas on my most recent commit I get
python-spec/src/somacore/data.py:176: error: X | Y syntax for unions requires Python 3.10  [syntax]
python-spec/src/somacore/data.py:310: error: X | Y syntax for unions requires Python 3.10  [syntax]
Found 2 errors in 1 file (checked 21 source files)

repo: single-cell-data/SOMA


text:
[r] [WIP] Port to_seurat() to SOMAExperiment

Allow creating Seurat object directly from SOMA experiments; this includes support reading in multimodal SOMA objects into a multimodal Seurat object
Implemented SOMA methods:

SOMAExperiment$to_seurat(): allows loading in entire Seurat objects, including partially suppressing layers in every ms/X, dimensional reduction information, and nearest-neighbor graphs

Future work (tracked in #1192):

This PR does not address extended assays (eg. Seurat::SCTAssay, Signac::ChromatinAssay)
This PR does not address support for spatially-resolved datasets

Codecov Report
Patch coverage has no change and project coverage change: -36.27 :warning:

Comparison is base (24b57de) 91.01% compared to head (99e8530) 54.75%.

:exclamation: Current head 99e8530 differs from pull request most recent head 8e23f58. Consider uploading reports for the commit 8e23f58 to get more accurate results

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #1261       +/-   ##
===========================================
- Coverage   91.01%   54.75%   -36.27%
===========================================
  Files          30       67       +37
  Lines        2416     5550     +3134
===========================================
+ Hits         2199     3039      +840
- Misses        217     2511     +2294

Flag
Coverage Δ

python
?

r
54.75% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.
see 97 files with indirect coverage changes

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

authors: codecov-commenter mojaveazure

repo: single-cell-data/TileDB-SOMA


text:
[python] update_obs/update_var

Issue and/or context:
Issue #1562
Changes:

For this v1, add/drop but no type-mutation for existing columns
A v2 with type-mutation for existing columns will be follow-on work

Notes for Reviewer:

Codecov Report
Patch coverage: 95.65% and project coverage change: +25.57% :tada:

Comparison is base (b85b66f) 65.47% compared to head (eba85d4) 91.05%.

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #1586       +/-   ##
===========================================
+ Coverage   65.47%   91.05%   +25.57%
===========================================
  Files         108       34       -74
  Lines        9003     2907     -6096
===========================================
- Hits         5895     2647     -3248
+ Misses       3108      260     -2848

Flag
Coverage Δ

python
91.05% <95.65%> (+0.07%)
:arrow_up:

r
?

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed
Coverage Δ

apis/python/src/tiledbsoma/io/ingest.py
85.54% <95.65%> (+0.81%)
:arrow_up:

... and 74 files with indirect coverage changes

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

Thanks @aaronwolen !

authors: codecov-commenter johnkerl


text:
[python] Port bounding-box logic from R to Python

Issue and/or context: Issue #1522; R PRs ##1513, #1644, with additional logic for append mode which isn't in R yet (see #1630). Also involves #1434 which will be a follow-on PR to this one.
Changes:
Notes for Reviewer:

@aaronwolen @mojaveazure @thetorpedodog ping 🙏

Thanks @aaronwolen !


text:
Refactoring (identifier naming)

Issue description
The identifier naming is 🐯 ("wild"). Some newer features try to make these easier to understand: (See #12)

fragment => fragmentOrder
fragmentCount => fragmentIndex
page => slideIndex
pageCount => slideCount
... (everything should use the same identifier for the same purpose

Steps to reproduce

Look at the source code (Store and anything in core that uses store + dependants)
Versions

dekk: 1.0.0-4

This should be refactored as soon as possible to allow future contributions to follow this concept and prevent breaking changes in future releases

repo: sinnerschrader/dekk


text:
Implement patternplate-transform-react-to-typescript-defintions

patternplate projects tend to be implemented on a React-based stack. Component definitions often contain valuable information in the form of React.PropTypes. This allows tooling to derive additional information/artifacts from existing component definitions, e.g. TypeScript definitions: https://github.com/KnisterPeter/react-to-typescript-definitions
Goals

[ ] effortless module/pattern typings for pattern authors
[ ] frictionless TypeScript typing support for pattern consumers

Non-Goals

Typescript type checking for components in patternplate
Visualization of Typescript typings in patternplate-client

Features

[ ] Must be compatible with patternplate commonjs build task
[ ] Create appropriate *.d.ts module declarations for patterns
[ ] Preserve inline comments for documentation purposes

Further reading

https://github.com/KnisterPeter/react-to-typescript-definitions

What if I'm working with Typescript and tsx instead of jsx is there a way that I can make patternplate detect my tsx like in https://github.com/styleguidist/react-styleguidist?

patternplate-transform-typescript should do the trick for you

I'm a bit confused on how I should integrate patternplate with typescript... I have my react components in tsx files and all my project is coded with typescript and we use webpack... I've been using styleguidist where I can use our webpack configuration.

As of now patternplate does the build and the patterns could be exported as commonjs package (npm package).
Right now there is no way to build the patterns with webpack.
CC @marionebl

@leonidax patternplate currently is designed as complete development environment including build tasks and overlaps with webpack in this regard. What feature are you seeking in patternplate?

We were evaluating different solutions, we want a life style document, patternplate and styleguidist were our top options, I think right now styleguidist would fit more our needs.

authors: KnisterPeter leonidax marionebl

repo: sinnerschrader/patternplate


text:
Panel de información de centro

@bermudoancio, hay que trasladar esta información, que ya estaba creada en la antigua sidebar a la nueva.

Al recomponer la interfaz, se ha incluido una opción ocultarBorrado, que se modifica a través de los ajustes, pensada para controlar si se quieren ver (tachadas) las enseñanzas y las adjudicaciones  desechadas, o si por el contrario no se quieren ver en absoluto. Habría que tenerlo en cuenta al hacer la migración.

@sio2sio2 ¿La oferta que esté extinta debe seguir la misma regla de tachado/no visualización que las demás correcciones?

Entiendo que sí. La única diferencia consiste en que son enseñanzas que jamás se verán sin tachar, porque la corrección se aplica automáticamente al cargar los datos y no hay forma a través de la interfaz de deshabilitarla.

@jbermudo Acabo de generar nuevos json que incluyen las nuevas plantillas orgánicas para el curso 2019/2020.. Como los datos del procedimiento de colocación de efectivos se hacen basándose en las plantillas orgánicas del curso presente (2018/2019 en este caso), después de la publicación de las plantiillas orgánicas y hasta que no se resuelve el nuevo procedimiento de colocación, el json tiene dos datos de plantillas orgánicas para cada puesto "org" que contiene las plantillas antiguas y "norg" que contiene las nuevas. En los json antiguos sólo existía "org".
Como no sabías nada, es obvio que al mostrar la información de centro sólo están teniendo en cuenta "org", pero sería conveniente que también incluyeras "norg" (en caso de existir y si es distinto a "org") porque es un dato interesante: si la plantilla orgánica ha aumentado, entonces quizás disminuyan las plazas ofertadas en el procedimiento. En la plataforma antigua, lo que se hacía es poner el dato de la plantilla orgániza y al lado entre paréntesis el dato de la nueva. Si quieres verlo échale un vistazo a la antigua aplicación: pàra Informática el IES La Marisma de Huelva capital ha aumentado su plantilla orgánica del puesto 00590107 de 3 a 4. Como la de 11590107 no ha variado, sólo muestra un número.

Hecho desde hace unos días.


text:
Add FSF and GNU

https://www.fsf.org/news/fsf-and-gnu-move-official-irc-channels-to-libera-chat-network

FSF has been added, could you rebase?

authors: ProgVal siraben

repo: siraben/freenode-exodus


text:
@sirutils/builder windows support ?

Path delimiter is fixed, it's according to platform
Source files are built group by group
And commit types is changed to relevant types

Run report for 08ee49f6
Total time: 13.1s | Comparison time: 27.1s | Estimated savings: 14s (51.7% faster)

Action
Time
Status
Info

🟩
SyncWorkspace
5.7ms
Passed

⬛
SetupToolchain(bun:1.1.27)
473.6ms
Skipped

🟩
SyncProject(bun, docs)
0.3ms
Passed

🟩
InstallWorkspaceDeps(bun:1.1.27)
10.7s
Passed

🟦
RunTask(docs:build)
1.9s
Cached

Touched files
.github/workflows/docs.yml
.moon/toolchain.yml
.prototools
apps/docs/.gitignore
apps/docs/.npmrc
apps/docs/README.md
apps/docs/app.config.ts
apps/docs/assets/css/tailwind.css
apps/docs/biome.jsonc
apps/docs/content/1.getting-started/1.introduction.md
apps/docs/content/1.getting-started/_dir.yml
apps/docs/content/2.api/_dir.yml
apps/docs/content/2.api/packages/1.core/1.motivation.md
apps/docs/content/2.api/packages/1.core/2.result-system/1.example-1.md
apps/docs/content/2.api/packages/1.core/2.result-system/2.example-2.md
apps/docs/content/2.api/packages/1.core/2.result-system/3.example-3.md
apps/docs/content/2.api/packages/1.core/2.result-system/_dir.yml
apps/docs/content/2.api/packages/1.core/3.plugin-system.md
apps/docs/content/2.api/packages/1.core/_dir.yml
apps/docs/content/2.api/packages/2.safe-toolbox/1.motivation.md
apps/docs/content/2.api/packages/2.safe-toolbox/2.usage.md
apps/docs/content/2.api/packages/2.safe-toolbox/_dir.yml
apps/docs/content/2.api/packages/2.toolbox/1.motivation.md
apps/docs/content/2.api/packages/2.toolbox/_dir.yml
apps/docs/content/2.api/packages/_dir.yml
apps/docs/content/3.internals/1.introduction.md
apps/docs/content/3.internals/2.installation.md
apps/docs/content/3.internals/3.rules.md
apps/docs/content/3.internals/_dir.yml
apps/docs/content/3.internals/changelogs/0.1.0.md
apps/docs/content/3.internals/changelogs/_dir.yml
apps/docs/content/index.md
apps/docs/moon.yml
apps/docs/nuxt.config.ts
apps/docs/package.json
apps/docs/public/favicon.ico
apps/docs/public/logo-dark.svg
apps/docs/public/logo.svg
apps/docs/tailwind.config.ts
apps/docs/tsconfig.json
biome.jsonc
bun.lockb
experiments/wizard-core/.prototools
experiments/wizard-core/moon.yml
experiments/wizard-core/package.json
experiments/wizard-core/schemas/_/blogs.ts
experiments/wizard-core/schemas/_/index.ts
experiments/wizard-core/schemas/_/users.ts
experiments/wizard-core/schemas/blogs.json
experiments/wizard-core/schemas/users.json
experiments/wizard-core/src/definitions/index.ts
experiments/wizard-core/src/definitions/wizard-core.ts
experiments/wizard-core/src/index.ts
experiments/wizard-core/src/program/api/users.ts
experiments/wizard-core/src/program/app.ts
experiments/wizard-core/src/program/db.ts
experiments/wizard-core/src/program/plugins/wizard.ts
experiments/wizard-core/src/tag.ts
experiments/wizard-core/tsconfig.json
package.json
packages/core/package.json
packages/core/src/definitions/core.ts
packages/core/src/definitions/plugin-system.ts
packages/core/src/index.ts
packages/core/src/plugin-system/action.ts
packages/core/src/plugin-system/app.ts
packages/core/src/plugin-system/context.ts
packages/core/src/plugin-system/internal/get.ts
packages/core/src/plugin-system/internal/lookup-by-option.ts
packages/core/src/plugin-system/internal/lookup.ts
packages/core/src/plugin-system/internal/use.ts
packages/core/src/plugin-system/plugin.ts
packages/core/src/result/error.ts
packages/core/src/result/message.ts
packages/core/src/result/option.ts
packages/core/src/tag.ts
packages/core/src/utils/common.ts
packages/core/src/utils/env.ts
packages/core/src/utils/lazy.ts
packages/core/src/utils/logger.ts
packages/core/src/utils/tags.ts
packages/core/tsconfig.json
packages/driver-mysql/moon.yml
packages/driver-mysql/package.json
packages/driver-mysql/src/definitions/index.ts
packages/driver-mysql/src/definitions/mysql.ts
packages/driver-mysql/src/index.ts
packages/driver-mysql/src/internals/logger.ts
packages/driver-mysql/src/internals/utils.ts
packages/driver-mysql/src/tag.ts
packages/driver-mysql/src/utils/cacher/redis.ts
packages/driver-mysql/src/utils/db.ts
packages/driver-mysql/src/utils/internals/db-exec.ts
packages/driver-mysql/src/utils/internals/db-initialize.ts
packages/driver-mysql/src/utils/internals/db-operations.ts
packages/driver-mysql/tsconfig.json
packages/driver-redis/moon.yml
packages/driver-redis/package.json
packages/driver-redis/src/definitions/driver-redis.ts
packages/driver-redis/src/definitions/index.ts
packages/driver-redis/src/index.ts
packages/driver-redis/src/internal/consts.ts
packages/driver-redis/src/internal/logger.ts
packages/driver-redis/src/tag.ts
packages/driver-redis/src/utils/internal/driver.ts
packages/driver-redis/src/utils/plugin.ts
packages/driver-redis/test/driver.ts
packages/driver-redis/tsconfig.json
packages/driver-scylla/moon.yml
packages/driver-scylla/package.json
packages/driver-scylla/src/definitions/driver-scylla.ts
packages/driver-scylla/src/definitions/index.ts
packages/driver-scylla/src/index.ts
packages/driver-scylla/src/internal/consts.ts
packages/driver-scylla/src/internal/logger.ts
packages/driver-scylla/src/tag.ts
packages/driver-scylla/src/utils/driver.ts
packages/driver-scylla/src/utils/migration.ts
packages/driver-scylla/src/utils/plugin.ts
packages/driver-scylla/test/app.ts
packages/driver-scylla/test/consts.ts
packages/driver-scylla/test/drivers.ts
packages/driver-scylla/test/handler.ts
packages/driver-scylla/test/migrations/index.ts
packages/driver-scylla/test/migrations/users.ts
packages/driver-scylla/tsconfig.json
packages/safe-toolbox/package.json
packages/safe-toolbox/src/definitions/safe-toolbox.ts
packages/safe-toolbox/src/index.ts
packages/safe-toolbox/src/tag.ts
packages/safe-toolbox/src/utils/fetch.ts
packages/safe-toolbox/src/utils/json.ts
packages/safe-toolbox/src/utils/merge.ts
packages/safe-toolbox/src/utils/object-like.ts
packages/safe-toolbox/src/utils/other.ts
packages/safe-toolbox/src/utils/proxy.ts
packages/safe-toolbox/src/utils/types.ts
packages/safe-toolbox/src/utils/url.ts
packages/schema/moon.yml
packages/schema/package.json
packages/schema/src/definitions/index.ts
packages/schema/src/definitions/schema.ts
packages/schema/src/definitions/typebox.ts
packages/schema/src/index.ts
packages/schema/src/internal/boolean-string.ts
packages/schema/src/internal/date.ts
packages/schema/src/internal/file.ts
packages/schema/src/internal/formats.ts
packages/schema/src/internal/initialize.ts
packages/schema/src/internal/numeric.ts
packages/schema/src/internal/object-string.ts
packages/schema/src/internal/other.ts
packages/schema/src/tag.ts
packages/schema/src/utils/compiler.ts
packages/schema/src/utils/create.ts
packages/schema/src/utils/type-system.ts
packages/schema/src/utils/validator.ts
packages/schema/test/index.ts
packages/schema/tsconfig.json
packages/seql/moon.yml
packages/seql/package.json
packages/seql/src/definitions/index.ts
packages/seql/src/definitions/seql.ts
packages/seql/src/index.ts
packages/seql/src/internal/adapters.ts
packages/seql/src/internal/adapters/mysql.ts
packages/seql/src/internal/adapters/postgres.ts
packages/seql/src/internal/consts.ts
packages/seql/src/internal/utils.ts
packages/seql/src/seql.ts
packages/seql/src/tag.ts
packages/seql/src/utils/builder.ts
packages/seql/src/utils/consts.ts
packages/seql/src/utils/create-adapter.ts
packages/seql/src/utils/generator.ts
packages/seql/src/utils/operations.ts
packages/seql/test/index.ts
packages/seql/tsconfig.json
packages/toolbox/package.json
packages/toolbox/src/definitions/toolbox.ts
packages/toolbox/src/index.ts
packages/toolbox/src/utils/crypto.ts
packages/toolbox/src/utils/dir.ts
packages/toolbox/src/utils/file.ts
packages/wizard/moon.yml
packages/wizard/package.json
packages/wizard/src/definitions/index.ts
packages/wizard/src/definitions/router.ts
packages/wizard/src/definitions/wizard.ts
packages/wizard/src/index.ts
packages/wizard/src/internal/consts.ts
packages/wizard/src/internal/error-config.ts
packages/wizard/src/internal/utils.ts
packages/wizard/src/plugin/api/base.ts
packages/wizard/src/plugin/internal/service.ts
packages/wizard/src/plugin/main.ts
packages/wizard/src/tag.ts
packages/wizard/src/utils/create.ts
packages/wizard/src/utils/error.ts
packages/wizard/src/utils/logger.ts
packages/wizard/src/utils/router.ts
packages/wizard/test/app.ts
packages/wizard/test/app2.ts
packages/wizard/test/consts.ts
packages/wizard/test/drivers.ts
packages/wizard/test/handler.ts
packages/wizard/test/services/test.ts
packages/wizard/test/services/users.ts
packages/wizard/test/wizard.ts
packages/wizard/tsconfig.json
tools/builder/package.json
tools/builder/src/actions/build.ts
tools/builder/src/definitions/builder.ts
tools/builder/src/utils/builder.ts
tools/builder/src/utils/config.ts
tools/plugin-schema/moon.yml
tools/plugin-schema/package.json
tools/plugin-schema/src/definitions/index.ts
tools/plugin-schema/src/definitions/plugin-schema.ts
tools/plugin-schema/src/index.ts
tools/plugin-schema/src/internal/logger.ts
tools/plugin-schema/src/internal/matchers.ts
tools/plugin-schema/src/internal/utils.ts
tools/plugin-schema/src/plugin.ts
tools/plugin-schema/src/tag.ts
tools/plugin-schema/src/utils/collect.ts
tools/plugin-schema/src/utils/create.ts
tools/plugin-schema/src/utils/generate.ts
tools/plugin-schema/src/utils/json-schema.ts
tools/plugin-schema/src/utils/normalize.ts
tools/plugin-schema/src/utils/other.ts
tools/plugin-schema/src/utils/parse.ts
tools/plugin-schema/tsconfig.json
tsconfig.base.json
tsconfig.json

authors: giveerr siaeyy

repo: sirius-tedarik/sirutils


text:
Blueprint wont change colour and is stuck pink

since the Valheim update, all my blueprints are pink and wont change transparency or colour in the config UI

I've noticed this also today. I can affect the color changes in my UI config manager, but they do not reflect in the actual game. Whether done from config file mod or in-game, its stuck on pink.

This should be fixed in 1.15 according to someone, haven't had time to try it out since I got other problems with a bunch of mods atm :P

Yes. It is! Thank you very much!

Yeah, I fixed it in 0.15.0 ;)

authors: MkToasted Sketaful sirskunkalot williamroboly wilroboly

repo: sirskunkalot/PlanBuild

license: WTFPL


text:
bumped version of testify along with yaml.v3 indirectly

This PR addressed https://github.com/sirupsen/logrus/pull/1343#issuecomment-1188912003
(related to https://github.com/sirupsen/logrus/pull/1337)
(Github's dependabot told that the recent update include CVE fix but I found the PR was reverted reasonably)

Hi @thaJeztah , @dgsb,
Could you please take a look at this PR and approve if you think it could be fine?

Hi @sirupsen,
Could you please take a look at this PR? It could be nice if the module dependency is updated. (please see the related comments on the other PRs for the details)

Hi @sio4 @sirupsen
any update on when this PR will be merged?

repo: sirupsen/logrus


text:
Upload speed not throttled

Hi,
As the title suggests, I can't get the upload speed to throttle. Download is throttling as expected.
Any ideas?
I'm on 10.13.2
Thanks

Hi @Ajaay ok, must be bug then, mostly used this for testing web pages so the upload speed isn't so important. Do you have a good way of testing so I can replicate and look into how we set up the rules?
Best
Peter

authors: Ajaay soulgalore

repo: sitespeedio/throttle


text:
Sync with json from github

Is your feature request related to a problem? Please describe.
When distributing design tokens via github, it is a potential problem if users have to download a json from a repo to update it in figma.
Describe the solution you'd like
It would be great if the plugin could sync with a json file (similar to jsonBin) from github.
E.g. just point it at a github url to the raw file, add access credentials and allow it to sync this way. (Ideally it would even grab the version from a package.json if it exists)
Describe alternatives you've considered
Using JsonBin is not an option for every org. :( It also means another source of truth that is not the same as the one the dev team uses.

Hey @lukasoppermann - thanks for the feedback, I really appreciate it! ❤
I'm pretty far along with a github sync and am currently running the beta with some teams. If you'd like to betatest that feature I've written a short guide.
The feature is working so far, I'm mainly looking for feedback regarding if that solution could work or if there's anything broken in edge-cases.
I've also setup a test repository that transforms tokens stored in Figma Token to something SD can work with (no math). That repo contains a lot of code that's not needed for demonstrative purposes but I've set it up so there's a live updating token reference page at https://tokens-example.vercel.app/ - the interesting part is the github action that uses both token-transformer (strip tokens of math, aliases and combine themes) and style-dictionary

I got the Beta version running and syncing the json to Github. Though the part after that I can't seem to get working :)
Figma Tokens .json -> Token-Transformer -> Style-dictionary
(I blame the lack of Git knowledge on my part :D

Thank you, I'll try this out!

authors: lukasoppermann six7 vkoopmans-resoluut


text:
可否额外支持 vite 打包

原来的插件系统也是 vite 打包的，如果新的系统也可以 vite 的话迁移起来会容易很多。

ok!

repo: siyuan-note/plugin-sample


text:
How reasonable would it be to have Identity a be Similar to a?

From further investigations regarding issues raised in #24, I found that a possible solution to all my concerns would be the ability to have an instance Similar (Identity a) a. That would mean that I could recover the older flexibility of over2 by writing unpack . over2. However, as I don't know the details of the implementation, I'm not sure if this is feasible or if it would break some other assumptions.

No, I don't think that can work very well. Using overlapping instances will definitely cause trouble for typed holes (even worse error messages! Yay!). Using incoherent instances will work okay in many cases, but I'm not sure how reliable it is and it limits some other potential future changes. Additionally, ad hoc instances here seem likely to confuse a lot of people. I'm not a fan. I'd much rather add new combinators to get the power you need, and resurrect the old API.

Yeah, in retrospect, this doesn't even address the problem I thought it did. Thank you for clarifying though - it'll help me come up with a good motivating example explaining what I need more clearly.

authors: kozross treeowl

repo: sjakobi/coercible-utils


text:
Temporary fix for Crawl() on Mono.

On Mono, abot would not crawl due to an exception caused by HttpWebResponse.IsMutuallyAuthenticated, which seems to be not implemented.
This commit fixes #123

It looks like the property has no usages, so it should be safe to remove it all togetter.

Giving it another thought, it should be fixed properly, not sure how many people use this method on Windows. Leaving it here as quick reference from the issue.

Thanks Michael
On Sun, Apr 17, 2016 at 7:27 AM, Michael Overhorst <notifications@github.com

wrote:

Giving it another thought, it should be fixed properly, not sure how many
people use this method on Windows. Leaving it here as quick reference from
the issue.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
https://github.com/sjdirect/abot/pull/126#issuecomment-211028657

For Info. Reference .NET Source to IsMutuallyAuthenticated

authors: LeMoussel ViezeVingertjes sjdirect

repo: sjdirect/abot


text:
Ensure documentation versions are up-to-date

The two first commits enable the versions number in documentation to stay up-to-date without updating them manually. Extraction from project.clj is not the prettiest thing around but I don't think this is worth doing complex stuff.
The two last commits are unrelated, I can do a separate PR if needed.

Thank you!

authors: michaelklishin vincentbernat

repo: sjl/metrics-clojure


text:
Add printfilename option

This PR adds the printfilename flag, which includes the filename which produced the error in the resulting error message (a la https://www.gnu.org/prep/standards/html_node/Errors.html)
This is useful when using html-linter with multiple input files.
For example:
$ html_lint.py --printfilename test/data/more_invalid.html
test/data/more_invalid.html:2:4: Error: Document Type: Do not close void elements: Remove the trailing "/" from the br tag.

Coverage increased (+0.003%) to 99.471% when pulling 9b3a937520e2d6e08aa3614b1c1cbecd8c78dba7 on di:add-printfilename into ab6ac074a84a11533ee8c1378f989fe676f8a63d on sk-:master.

@sk- Any chance on this getting merged?

FWIW, I would love to see this PR merged and released. It's a life-saver for linting dozens of files at once.

@di Dustin, that would be awesome. I sent you an invite to be a collaborator on the project. Could you send me your Pypi username so I can add you as a maintainer of the package.
For travis I think it should be automatic once you have collaborator access to the project.

@sk- Awesome, thanks! My username is the same: https://pypi.org/user/di/

@alanhdu This has been released: https://pypi.org/project/html-linter/0.4.0/

authors: alanhdu coveralls di sk-

repo: sk-/html-linter


text:
Adding proper links to social media icons

Is your feature request related to a problem? Please describe.
I observed that links for social media icons are not working.
I want to add proper links to social media icons
Additional context
I am GSSOC'24 Contributor.
Please assign me this task.
I want to work on this issue.

@harikasayani
Thank you for raising this issue. We've reviewed it, and it seems that no further action is needed at the moment. If you have any additional issues, feel free to reach out. To keep our issue tracker organized, I will be closing this issue.


text:
Cannot run findex after install

After following the brief instruction and trying to run Findex-gui, I get the following:
(findex)root@machine:~/findex/bin# Traceback (most recent call last):
  File "/root/findex/bin/findex-gui", line 9, in <module>
    load_entry_point('findex-gui==0.0.1', 'console_scripts', 'findex-gui')()
  File "/root/findex/local/lib/python2.7/site-packages/click-6.0-py2.7.egg/click/core.py", line 695, in __call__
    return self.main(*args, **kwargs)
  File "/root/findex/local/lib/python2.7/site-packages/click-6.0-py2.7.egg/click/core.py", line 675, in main
    rv = self.invoke(ctx)
  File "/root/findex/local/lib/python2.7/site-packages/click-6.0-py2.7.egg/click/core.py", line 1039, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/root/findex/local/lib/python2.7/site-packages/click-6.0-py2.7.egg/click/core.py", line 868, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/root/findex/local/lib/python2.7/site-packages/click-6.0-py2.7.egg/click/core.py", line 513, in invoke
    return callback(*args, **kwargs)
  File "/root/findex/local/lib/python2.7/site-packages/findex_gui-0.0.1-py2.7.egg/findex_gui/daemon.py", line 54, in start
    start_as_daemon()
  File "/root/findex/local/lib/python2.7/site-packages/findex_gui-0.0.1-py2.7.egg/findex_gui/daemon.py", line 43, in start_as_daemon
    from findex_gui.__main__ import main
  File "/root/findex/local/lib/python2.7/site-packages/findex_gui-0.0.1-py2.7.egg/findex_gui/__main__.py", line 11, in <module>
    from findex_gui.bin.config import FindexGuiConfig
  File "/root/findex/local/lib/python2.7/site-packages/gevent-1.1rc1-py2.7-linux-x86_64.egg/gevent/builtins.py", line 58, in __import__
    result = _import(*args, **kwargs)
ImportError: No module named config

Am I doing something wrong? Or is this a big?

Hello, you seem to be the first one who attempts to install Findex from scratch. Congrats :+1:
Your error is due to the findex-gui package being outdated. If you git clone the repo right now you will get further. Hopefully.
I say hopefully because the current version is not even an alpha and chances are you will run into more problems. For example; you won't be able to add servers to crawl as this functionality is not in the findex-gui package yet. Also, there is no documentation yet.
So if you really want to get it to run; re-download. And else; please wait a month or two!

Thanks for your response! I cloned the repo again, but still no luck. I'll wait :+1:.

authors: nickbouwhuis skftn

repo: skftn/findex-gui


text:
Node.appendChild duplicates a RAII handle

Node.appendChild currently needs to be used this way:
auto reduntantRef = result.appendChild(*logo);
*reduntantRef.ptr = 0;

That's because appendChild copies the JsHandle contained in *logo into it's return value. If I don't manually nullify it, its destructor runs, and prematurely deletes the JavaScript object *logo refers to.
Clearly the API of Node.appendChild needs rethinking.

Oh sorry, there's the JavaScript export Node_appendChild that is called, that does copy the handle so double free should not happen. I think I was looking at appendChild JavaScript export without realizing it isn't the one that's called.
It is something else that nullified my object pointer.

repo: skoppe/spasm


text:
Make audio devices stream DASH-audio from YouTube

Hey. With YouTube offering audio-only DASH streams, we can utilize StreamInfo to enable this for audio devices, saving users a bit of bandwith.

It's more than "a bit", it's quite significant. Thanks for the PR!

authors: skorokithakis theychx

repo: skorokithakis/catt


text:
Add dark theme on your website

Also, I told you to follow the steps mentioned in the hyperlink. You made all the changes in main branch, i cannot merge this pr. Please change the branch and fix the issues.

@skpandey885 Sure I will be doing it

Hey @skpandey885
I have changed the branch and the changes are now in it...
The main branch is different now
Please see if it has been done...

Please make a new PR


text:
Plugin currently broken on Binary Ninja >= 4.1

Describe the bug
This plugin no longer works in the latest Binary Ninja releases.
To Reproduce
Steps to reproduce the behavior:

Install ipybinja on latest Binary Ninja
Observe no builtin ipython console
Observe jupyter-notebook and jupyter-lab fail to start ipybinja kernel:

[I 2024-04-04 11:20:58.018 ServerApp] Creating new notebook in
[I 2024-04-04 11:20:58.265 ServerApp] Kernel started: 4013b3be-5d73-4301-832a-b36684c6b4dd
[I 2024-04-04 11:21:01.253 ServerApp] AsyncIOLoopKernelRestarter: restarting kernel (1/5), new random ports
[I 2024-04-04 11:21:04.269 ServerApp] AsyncIOLoopKernelRestarter: restarting kernel (2/5), new random ports
[I 2024-04-04 11:21:07.287 ServerApp] AsyncIOLoopKernelRestarter: restarting kernel (3/5), new random ports
[I 2024-04-04 11:21:10.304 ServerApp] AsyncIOLoopKernelRestarter: restarting kernel (4/5), new random ports
[I 2024-04-04 11:21:13.322 ServerApp] AsyncIOLoopKernelRestarter: restarting kernel (5/5), new random ports
[W 2024-04-04 11:21:16.338 ServerApp] AsyncIOLoopKernelRestarter: restart failed
[W 2024-04-04 11:21:16.338 ServerApp] Kernel 4013b3be-5d73-4301-832a-b36684c6b4dd died, removing from map.[W 2024-04-04 11:21:58.288 ServerApp] Timeout waiting for kernel_info reply from 4013b3be-5d73-4301-832a-b36684c6b4dd
[I 2024-04-04 11:21:58.289 ServerApp] Connecting to kernel 4013b3be-5d73-4301-832a-b36684c6b4dd.
[W 2024-04-04 11:21:58.291 ServerApp] 404 GET /api/kernels/4013b3be-5d73-4301-832a-b36684c6b4dd/channels?session_id=97d45d7f-ec02-4fe0-b4e6-b2bf3364c40c (::1): Kernel does not exist: 4013b3be-5d73-4301-832a-b36684c6b4dd

Expected behavior
Plugin should work in both builtin ipython console and Jupyter lab/notebook environments.
Screenshots
If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):

OS: Linux
Binary Ninja 4.1
Python 3.12

Additional context
Add any other context about the problem here.

I don't get this issue in 4.1.5527, but:

I don't get any UI IPython console
I can connect to the kernel, but the magic variables aren't being updated


text:
Output filtering by level of inspection

refs #181
It adds minimalLevel property, that defaults to Levels.Info.
Also, the -Pscapegoat:minimalLevel: compiler option is added.
If specified, the output will be filtered by level, for ex. if it is set to warning, only warnings and errors will be displayed in the reports. Triggered inspections count is not affected by this change, all numbers will be visible in HTML report.

Nice job.

authors: eugene-sy sksamuel

repo: sksamuel/scapegoat


text:
加个保存图片的功能会更好。

如题！！！

看来你们都没发现啊，你试试在照片上长按😄

......


text:
Feature Request: support for $utils.rds

Please provide support for $utils.rds or a mechanism to pass mock functions
https://docs.aws.amazon.com/appsync/latest/devguide/resolver-mapping-template-reference-rds.html

Hi unfortunately our team doesn't have time to add this feature at the moment (we don't use RDS) but if you are able to add a PR I'm happy to review it.

authors: alan-cooney chipat


text:
debian rules complains about missing /build when cross compiling in pbuilder

While packaging lagrange for PrawnOS (armhf/arm64) I found the included debian/rules complains about a missing /build directory when cross compiling in pbuilder.
I ended up settling on the following https://github.com/SolidHal/PrawnOS/blob/master/filesystem/packages/lagrange-gemini-browser/src/debian/rules
which worked quite well! I can submit a PR for this if you'd like. I think there is some logic available in debian/rules to change flags depending on arch, so I would include that as well to enforce sw rendering on arm* platforms.
Thanks for your work on lagrange, it makes for a great ship in geminispace! :D

Sounds good! A PR would be nice.

authors: SolidHal skyjake

repo: skyjake/lagrange


text:
Rename UDP to Udp

I suggest rename all UDP in class names such as UDPDataEvent and UDPHandle to Udp, to get consistency with those Tcp classes which already use camel-case rather than uppercase.

I knew sooner or later someone would have asked it... :joy:

Btw I'd rather change TcpHandle in TCPHandle instead of the other way around with UDP.
It's somehow more correct, also referring to their RFC.

haha, either would be ok.

Upstream.

authors: ZgblKylin skypjack

repo: skypjack/uvw


text:
🛑 PT Site Home is down

In f22b0df, PT Site Home (https://qbit.rexsky-blog.com/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: PT Site Home is back up in 36cae11 after 5 hours, 49 minutes.

repo: skywalkerRex/RexSky-Blog-Uptime


text:
Replace More Culling with Cull Less Leaves

More Culling tends to cause quite a lot of issues with mod compatibility, and can often break certain rendering features in-game. For example, issue #34, and VanillaTweaks’ 3D models breaking. It also hasn’t been definitively proven to improve performance in any major way over Cull Less Leaves.
The only issue is that Cull Less Leaves is not updated to versions past 1.20.1. I’d say that a fork could be made with author permission, or I could ask them if they’d be interested in updating to newer versions. Don’t want to bother them though. For now More Culling will stay in the modpack until there’s a solution to the issue.
Edit: Cull Less Leaves for 1.20.1 works perfectly fine on latest versions. I will replace next time I update.

I have some doubts, why didn't you just disable by default the features that are giving conflicts in 3D models? And what are the incompatibilities that this mod causes?

I have some doubts, why didn't you just disable by default the features that are giving conflicts in 3D models? And what are the incompatibilities that this mod causes?

The mod can be incompatible/cause issues with many things. It breaks Serene Seasons for example, can mess up item frame rendering, and is full of micro optimizations that really don't do that much

I have some doubts, why didn't you just disable by default the features that are giving conflicts in 3D models? And what are the incompatibilities that this mod causes?

I have seen quite a few issues involving crashing or rendering issues with Serene Seasons, I think Create, and I have personally experienced a few issues with some other mods that I can’t exactly name off the top of my head. It also has issues with resource packs that mess with block models, like Vanilla Tweaks. It also breaks item frame rendering in some cases. If I disable those features that conflict with the models and item frame issues, then there would be no point in even including the mod in the first place since those are the only main unique features it has. Those features haven’t been proven to improve performance in any major way and it’d just be a better choice to use Cull Less Leaves. I do plan on setting CLL’s randomRejection value to 0 so that trees look better, which I forgot to do.

I find it very strange not to find a lot of issues about its incompatibility with other mods, I only had a problem with More Culling with Create itself. I've never noticed much of a difference with it either, but I'd still find it interesting to have its other optimizations - I know it won't be that useful or it'll be a 5% difference in performance or something.

authors: intergrav omo50 seriousfreezing

repo: skywardmc/adrenaline


text:
WIP Localization System & Main Menu bug fixes

With some help from @tux7k

LGTM!


text:
SyntaxError: Cannot use import statement outside a module

Please describe the a concise description and fill out the details below. It will help others efficiently understand your request and get to an answer instead of repeated back and forth. Providing a minimal, complete and verifiable example will further increase your chances that someone can help.
Steps for Reproduction
created a basic CRA app. Visit the bare minimum reproducible repo at https://github.com/gitneeraj/test-quill-rte
Expected behavior:
when running the tests yarn test should mount the component and test should pass
Actual behavior:
Throws below error -
/home/xx/personal/test-quill/node_modules/quill/quill.js:1
({"Object.":function(module,exports,require,__dirname,__filename,jest){import Quill, { Parchment, Range } from './core.js';
^^^^^^
SyntaxError: Cannot use import statement outside a module

> 1 | import RickTextEditor from "quill";
    | ^
  2 | import React, { forwardRef, useEffect, useLayoutEffect, useRef } from "react";
  3 | import "quill/dist/quill.snow.css";
  4 |

  at Runtime.createScriptFromCode (node_modules/jest-runtime/build/index.js:1728:14)
  at Object.<anonymous> (src/Editor.js:1:1)
  at Object.<anonymous> (src/App.js:2:1)
  at Object.<anonymous> (src/App.test.js:2:1)
  at TestScheduler.scheduleTests (node_modules/@jest/core/build/TestScheduler.js:333:13)
  at runJest (node_modules/@jest/core/build/runJest.js:404:19)

Platforms:
node - 19 & 20
Include browser, operating system and respective versions
Version:
I have looked at issue https://github.com/slab/quill/issues/4038 but this does not work anymore

Same errror here

I believe this is a duplicate of https://github.com/facebook/create-react-app/issues/9938.

@luin Not really - the issue appears to be that quill is defined as type: module but doesn't define a module
See: https://nodejs.org/api/packages.html#dual-commonjses-module-packages
main should still point to a commonJS build
module should point to an ESM build
Subpath exports can be used to define both require and module exports, and have types for them https://nodejs.org/api/packages.html#subpath-exports
As it stands today this package doesn't appear to fully support dual packages which makes integration with tools like jest challenging.
Please consider using one of the dual package approaches outlined in the link

@chrishoage - thank you for the input. Do you think there is any workaround getting the unit tests running with this package?
I tried to mock the entire package but it leads to whole lot of issues.

We used jest moduleNameMapper to point to the dist/quill.js file that is still in the package but not otherwise exposed via package.json
This allowed jest to use the "ADM" build of quill which jest can use with out any extra compilation on quill

@chrishoage thanks for the hint, that's worked for us!
Specifically, in our jest.config.ts, we've added:
export default {
  //...
  moduleNameMapper: {
    '^quill$': 'node_modules/quill/dist/quill.js'
  },
}

@daiscog I get
 Could not locate module quill mapped as:
    node_modules/quill/dist/quill.js

when I use that code, anything else I need to do?

@luin please chime in if you have anything else to add

authors: RichMatthews chrishoage cjnoname daiscog gitneeraj luin

repo: slab/quill


text:
docs: detail oauth configuration options and common cases

Summary
This PR updates the OAuth installation docs to include a bit more detail on configuration options and common cases. Kinda hoping this can be a solid reference page for Bolt developers with enough linking to additional resources to be dangerous 😈 ⚡
Fixes: #2215. But some other notable changes might include:

Quick reference of available app and installer options
Reference for various installation objects
Hints at finding and adjusting default installation pages and routes
Details around requesting and processing user tokens
Limitations around Sign in with Slack and a suggested workaround
Common API errors found throughout authentications

Reviewers
Checkout this branch and read the changes!
$ cd docs
$ npm install
$ npm start
$ open http://localhost:3000/bolt-js/concepts/authenticating-oauth

Notes

The included snippets were tested throughout various cases, but I couldn't get the final "extra authorizations" concept to work well with the state store...
Markdown formatting from deno fmt was applied to this file for easier future edits - open to reverting this!

Requirements

[x] I've read and understood the Contributing Guidelines and have done my best effort to follow them.
[x] I've read and agree to the Code of Conduct.

@lukegalbraithrussell thank you too for the excellent feedback 🙏  This is reading so much better IMO!

@seratch @lukegalbraithrussell @filmaj 🙏 🔐 Thank y'all for all of these suggestions and improvements - 'twas so much great knowledge shared. Stoked to have learned all the bit more about authorizations 🤓
I'm feeling pretty solid with where this is at so will go ahead with the merge, although I remain always open to following up for fixes of all kind! 🚢 💨

@zimeg Fantastic job! Thanks for putting the efforts on the document!

authors: seratch zimeg

repo: slackapi/bolt-js


text:
Timepicker integration

Hey! Just a short question. I know that timepicker in beta stage, but is it possible to use it via slack-bolt? I gave it a try, but slack denies my attempt to use it. And also i enabled beta features on my app website.  Is there a workaround for it? Many thanks
slack-bolt 1.4.4
Python runtime version
3.7.4
OS info
ProductName:    macOS
ProductVersion: 11.2.3
BuildVersion:   20D91
Darwin Kernel Version 20.3.0: Thu Jan 21 00:07:06 PST 2021; root:xnu-7195.81.3~1/RELEASE_X86_64
Expected result:
(Tell what you expected to happen)
Actual result:
I got unexpected type timepicker, skipping....

Hi @tomeszmh, thanks for asking the question! Of course, you can use the feature as long as you configured your Slack app properly.
I've created an example Bolt app that utilizes timepicker. Check the source code in the repository should be helpful for you.

https://github.com/seratch/send-it-later-for-slack/blob/e5f3555f347826576099f2f8551b03089ba7479d/README.md
https://github.com/seratch/send-it-later-for-slack/blob/e5f3555f347826576099f2f8551b03089ba7479d/app/modals.py#L141-L151
https://github.com/seratch/send-it-later-for-slack/blob/e5f3555f347826576099f2f8551b03089ba7479d/app/listeners.py#L135

Thank you so much. I tried, but same error. I investigated and found something. i
link to code in slack-sdk
In this method if type does not exist it will be skipped.
I always get   Unknown element detected and skipped message. I think my code runs into the else block.
Many thanks, Tamas

@tomeszmh As it's still in beta, we haven't merged the change for it: https://github.com/slackapi/python-slack-sdk/pull/876 I do understand you prefer using classes for building blocks but please use dict values for the time being.

@tomeszmh Thanks for your positive reaction to my last comment. It seems everything is clear now. Would you mind closing this issue?

Yes, sure, thx

authors: seratch tomeszmh

repo: slackapi/bolt-python


text:
How to install Bolt apps when OpenID Connect is enabled?

When I call asOAuthApp(true) on App instance I can normally install app via browser. When I call asOpenIDConnectApp(true) instead I get invalid scope requested when trying to install app via browser.
Bot scopes I am requesting: commands,chat:write,chat:write.public,team:read,usergroups:read,users:read,channels:read,groups:read,mpim:read

👋 Let us know if you need more help here. If we don't hear back for a few more days, we'll close this issue.

authors: instantiationexception seratch

repo: slackapi/java-slack-sdk


text:
reified usage on Compose function crashes ParameterOrderDetector

@Composable
inline fun <reified T> MyComposable(text: String = "123", modifier: Modifier = Modifier, lambda: () -> Unit) : T { }

Running lint on provided reified compose function causes getText method to throw exception.
NullPointerException:ParameterOrderDetector$Companion$createErrorMessage$1.invoke(ParameterOrderDetector.kt:30)
ParameterOrderDetector$Companion$createErrorMessage$1.invoke(ParameterOrderDetector.kt:30)
StringsKt__AppendableKt.appendElement(Appendable.kt:85)←CollectionsKt___CollectionsKt.joinTo(_Collections.kt:3490)
CollectionsKt___CollectionsKt.joinToString(_Collections.kt:3507)
CollectionsKt___CollectionsKt.joinToString$default(_Collections.kt:3506)
ParameterOrderDetector$Companion.createErrorMessage(ParameterOrderDetector.kt:30)
ParameterOrderDetector.visitComposable(ParameterOrderDetector.kt:98)
ComposableFunctionDetector$createUastHandler$1.visitMethod(ComposableFunctionDetector.kt:33)
UElementVisitor$DispatchPsiVisitor.visitMethod(UElementVisitor.kt:

Using version 1.3.1 of compose-lints.
Seeing this similar stacktrace when upgrading from AGP 8.5.2 to AGP 8.60.
Works fine on AGP 8.5.2, but getting this on AGP 8.6.0
Looks like this PR is not yet in the latest release?
java.lang.NullPointerException: getText(...) must not be null
        at slack.lint.compose.ParameterOrderDetector$Companion$createErrorMessage$1.invoke(ParameterOrderDetector.kt:30)
        at slack.lint.compose.ParameterOrderDetector$Companion$createErrorMessage$1.invoke(ParameterOrderDetector.kt:30)
        at kotlin.text.StringsKt__AppendableKt.appendElement(Appendable.kt:85)
        at kotlin.collections.CollectionsKt___CollectionsKt.joinTo(_Collections.kt:3490)
        at kotlin.collections.CollectionsKt___CollectionsKt.joinToString(_Collections.kt:3507)
        at kotlin.collections.CollectionsKt___CollectionsKt.joinToString$default(_Collections.kt:3506)
        at slack.lint.compose.ParameterOrderDetector$Companion.createErrorMessage(ParameterOrderDetector.kt:30)
        at slack.lint.compose.ParameterOrderDetector.visitComposable(ParameterOrderDetector.kt:98)
        at slack.lint.compose.ComposableFunctionDetector$createUastHandler$1.visitMethod(ComposableFunctionDetector.kt:33)
        at com.android.tools.lint.client.api.UElementVisitor$DispatchUastVisitor.visitMethod(UElementVisitor.kt:531)
        at com.android.tools.lint.client.api.UElementVisitor$DelegatingUastVisitor.visitMethod(UElementVisitor.kt:811)
        at org.jetbrains.uast.UMethod.accept(UMethod.kt:42)
        at org.jetbrains.uast.internal.ImplementationUtilsKt.acceptList(implementationUtils.kt:15)
        at org.jetbrains.uast.kotlin.AbstractKotlinUClass.accept(AbstractKotlinUClass.kt:213)
        at org.jetbrains.uast.internal.ImplementationUtilsKt.acceptList(implementationUtils.kt:15)
        at org.jetbrains.uast.UFile.accept(UFile.kt:89)
        at com.android.tools.lint.detector.api.UastLintUtilsKt.acceptSourceFile(UastLintUtils.kt:936)
        at com.android.tools.lint.client.api.UElementVisitor$visitFile$3.run(UElementVisitor.kt:215)
        at com.android.tools.lint.client.api.LintClient.runReadAction(LintClient.kt:1781)
        at com.android.tools.lint.client.api.LintDriver$LintClientWrapper.runReadAction(LintDriver.kt:2745)
        at com.android.tools.lint.client.api.UElementVisitor.visitFile(UElementVisitor.kt:212)
        at com.android.tools.lint.client.api.LintDriver$visitUastDetectors$1.run(LintDriver.kt:2046)
        at com.android.tools.lint.client.api.LintClient.runReadAction(LintClient.kt:1781)
        at com.android.tools.lint.client.api.LintDriver$LintClientWrapper.runReadAction(LintDriver.kt:2745)
        at com.android.tools.lint.client.api.LintDriver.visitUastDetectors(LintDriver.kt:2046)
        at com.android.tools.lint.client.api.LintDriver.visitUast(LintDriver.kt:2008)
        at com.android.tools.lint.client.api.LintDriver.runFileDetectors(LintDriver.kt:1282)
        at com.android.tools.lint.client.api.LintDriver.checkProject(LintDriver.kt:1068)
        at com.android.tools.lint.client.api.LintDriver.checkProjectRoot(LintDriver.kt:622)
        at com.android.tools.lint.client.api.LintDriver.access$checkProjectRoot(LintDriver.kt:174)
        at com.android.tools.lint.client.api.LintDriver$analyzeOnly$1.invoke(LintDriver.kt:445)
        at com.android.tools.lint.client.api.LintDriver$analyzeOnly$1.invoke(LintDriver.kt:442)
        at com.android.tools.lint.client.api.LintDriver.doAnalyze(LintDriver.kt:501)
        at com.android.tools.lint.client.api.LintDriver.analyzeOnly(LintDriver.kt:442)
        at com.android.tools.lint.LintCliClient$analyzeOnly$1.invoke(LintCliClient.kt:258)
        at com.android.tools.lint.LintCliClient$analyzeOnly$1.invoke(LintCliClient.kt:255)
        at com.android.tools.lint.LintCliClient.run(LintCliClient.kt:312)
        at com.android.tools.lint.LintCliClient.analyzeOnly(LintCliClient.kt:255)
        at com.android.tools.lint.Main.run(Main.java:1766)
        at com.android.tools.lint.Main.run(Main.java:282)
        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
        at java.base/java.lang.reflect.Method.invoke(Method.java:580)

I can confirm this is fixed with the latest 1.4.0-SNAPSHOT as of today

This wasn't a problem for us until AGP 8.6.0, so using AGP 8.5.2 might be a workaround for some.

Downgrading AGP to 8.5.2 doesn't seem to be a workaround for my project.

authors: kozaxinan saket yogurtearl

repo: slackhq/compose-lints


text:
use GetState for H.get

If I don't want to trigger a re-render of my component when querying its state, MonadState's get shouldn't be used, because its implemented in terms of ModifyState.
This defines get and gets in terms of GetState and re-exports them instead.
I think users should also be warned somewhere not to use get of the MonadState instance if performance is important to them.
Ideally, we could define the MonadState instances using a separate get and modify like in Haskell, but I guess implementing get+modify or state is not possible in PureScript?

Another option might be to do a referential check before re rendering. I prefer to try and make something like that unnecessary, but it's a decent workaround that lets us keep the instance.

@themoritz thanks for opening this, I meant to check this out after a problem we recently had with initializers where doing a get seemed to be triggering a render.

@themoritz: Ideally, we could define the MonadState instances using a separate get and modify like in Haskell, but I guess implementing get+modify or state is not possible in PureScript?

It's not (at the moment), as we can't specify default member implementations in classes - there are quite a few things that would potentially benefit from being able to do this, but for now it's still on the todo list.

@natefaubion: Another option might be to do a referential check before re rendering. I prefer to try and make something like that unnecessary, but it's a decent workaround that lets us keep the instance.

I like that. Well, "like", but I think it's a decent solution for now.

I'll look into this and the other issues you opened a bit later on today.

I agree, a referential check would also be nice, and I guess in JS doing this is safe compared to doing similar things in Haskell? Then the GetState could also be dropped, since it's not used anywhere.

It's safe regardless. Because get is polymorphic in the state type, it can't do anything but yield the same reference.

authors: garyb natefaubion themoritz

repo: slamdata/purescript-halogen


text:
Add printRelativeTo

Sometimes you have a Sandboxed path, but it needs to be printed relative to some other directory, which may involve ../. relativeTo does not handle ParentIn for security reasons, so it's not possible to print a path like this safely. Adding a printRelativeTo function would allow one to take an absolute sandboxed path, and print it relative to another arbitrary absolute path.

I think we can close this now as it's probably not as relevant as it was - sandboxing, relativeTo and printing of paths are all different now 🙂

authors: garyb natefaubion

repo: slamdata/purescript-pathy


text:
Feature/#43

Description of what I changed:

Added to cards shadows
Change what we do text colour and padding

@Bawanthathilan right side text is not balanced with the left side lot of space. Can you fix it as well?

authors: Bawanthathilan Shehanka

repo: sliit-foss/sliitfoss


text:
Next page token for nearby_search fails with lat_lon required.

Hey slimkrazy,
I noticed that nearby_search fails when going to the next page asking for lat_lon. I looked at the code and added on my side that if page_toke is None, then run
lat_lng_str = self._generate_lat_lng_string(lat_lng, location)
self.request_params = {'location' : lat_lng_str}
That fixed the issue. But in fact a cleaner way would be to add all the needed parameters when pagetoken is None and when a pagetoken is added, just add the pagetoken and the key to the url.
Hope this helps.
Luis

Hey Luis, i've had the same error, i'm trying to fix it myself, but at least i'm not the only one.
Pablo

Guys,
I'm travelling at the moment, so I'll take a look  at this when I get back
in three days.
On Tue, 14 Feb 2017 3:38 am pablolp99, notifications@github.com wrote:
Hey Luis, i've had the same error, i'm trying to fix it myself, but at
least i'm not the only one.
Pablo
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/slimkrazy/python-google-places/issues/92#issuecomment-279590802,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABI14D5wjP3J9kvJLuJ3KLK13dv5hUpJks5rcROugaJpZM4Lvv0D
.

Ok, is not a big deal for me right now. Thanks by the attention

I've been getting this issue too. I found a few threads about this API, that said you have to wait for the next-page token to be "ready." Here's one. (Found other threads but didn't save them.) In that thread, someone suggests they do a sleep for 2 seconds. In another thread, I saw someone say it could take 5 seconds for them.
This constraint in the API is probably not a big deal for a web-application with an end user (they are probably spending time on page 1 before requesting page 2), but it is a bit of a bummer for other use cases.

Here is a snippet I'm using to deal with this constraint. I don't think this is generic enough to merge to master in this repository but maybe it'll give other folks some ideas.
import googleplaces
from funcy import retry

class GooglePlacesService(object):
    """ Wrapper around Google Places Web API.

    current implementation uses python-google-places library.
    """

    NEARBY_SEARCH = "nearby_search"
    TEXT_SEARCH = "text_search"
    RADAR_SEARCH = "radar_search"

    def __init__(self, api_key):
        self.google_places = GooglePlaces(api_key=api_key)

    def search(self, search_type, *args, **kwargs):
        if search_type == self.NEARBY_SEARCH:
            return self.google_places.nearby_search(*args, **kwargs)
        elif search_type == self.TEXT_SEARCH:
            return self.google_places.text_search(*args, **kwargs)
        elif search_type == self.RADAR_SEARCH:
            return self.google_places.radar_search(*args, **kwargs)
        else:
            raise TypeError("search type not supported (yet) by wrapper around python-google-places")

    @retry(tries=5, errors=googleplaces.GooglePlacesError, timeout=lambda attempt: 1 + attempt * 0.5)
    def search_with_delay_and_retry(self, search_type, *args, **kwargs):
        """ Search with an initial sleep, plus retrying. Useful for those pesky "next-page-token" delays.

        See:
        - https://github.com/slimkrazy/python-google-places/issues/92
        - http://stackoverflow.com/questions/24445478/
        """
        return self.search(search_type=search_type, *args, **kwargs)

That @retry decorator is from funcy, which I use in almost every project. If you didn't want the dependency, the implementation of such a decorator would not be difficult (source is small).  http://funcy.readthedocs.io/en/stable/flow.html But funcy is pretty great, I recommend it 😬

Hey,
Are you sure this is an issue with the code, or an issue with making calls back up to Google prior to the next page data being ready?  Are you able to execute the following code without issues?
from time import sleep

from googleplaces import GooglePlaces, types, GooglePlacesError

MAX_FETCH = 200
google_places = GooglePlaces('YOUR_TOKEN_HERE')

query_result = google_places.nearby_search(
        location='London, England', keyword='Fish and Chips',
        radius=20000, types=[types.TYPE_FOOD])

fetched = 0
while fetched < MAX_FETCH:
  for place in query_result.places:
    print '[%i] %s' %(fetched, place.name)
    fetched = fetched + 1
  if query_result.has_next_page_token:
    sleep(3)
    print '========================================='
    print '[NPT: %s]' % query_result.next_page_token
    print '========================================='
    query_result = google_places.nearby_search(
        pagetoken=query_result.next_page_token)

Hi @slimkrazy!
Sorry I have been disconnected on this for a WHILE. I have not tried this approach yet as I was pulled to another effort, but I am hoping the effort will come back again in the next few months. I will keep you posted. For now, I will close this issue.

I had the same issue and resolved the issue by downgrading python-google-places from 1.4.1 to 1.4.0

authors: anadaf commapp hangtwenty pablolp99 slimkrazy

repo: slimkrazy/python-google-places


text:
Batched CSS query

Hopefully to minimize multiple "layout" calculations under the hood.

Looks like the multiple key .css() syntax was added in 1.9 which is fine, but the separate calls are still how jQuery UI does it, which makes me hesitate. Can you point me to the jQuery internals that show that the batched query is faster?

Go to https://jquery.com/
Open console in dev tools
Run this code
var target = $("body");
var ITERATIONS = 10000;

console.time("batched");
for(var i = 0; i <= ITERATIONS; i++) {
    target.css(["marginTop",
                "background",
                "marginBottom",
                "paddingBottom",
                "paddingTop",
                "paddingRight",
                "marginRight"]);
}
console.timeEnd("batched");

console.time("single");
for(var i = 0; i <= ITERATIONS; i++) {
    target.css("marginTop");
    target.css("background");
    target.css("marginBottom");
    target.css("paddingBottom");
    target.css("paddingTop");
    target.css("paddingRight");
    target.css("marginRight");
}
console.timeEnd("single");

Not a significant difference, but if you were to offer me a gold ring vs 10ms less runtime. I'd pick the latter. 😉

Good enough for me, thanks!

authors: NeekSandhu slindberg

repo: slindberg/jquery-scrollparent


text:
Added new column_casing Target Option

column_casing was implemented recently in issue 34.
This was implemented on the Sling CLI but the sling-python package is missing this new option.

FYI @flarco created this to address a gap as we started to use Sling with Dagster

repo: slingdata-io/sling-python


text:
Drain on root logger must not require 'static.

Logger::root() requires drain: 'static, but it seems unnecessary.
pub struct Logger {
    drain: Arc<Drain<Error=Never>+Send+Sync>,
    values: OwnedKeyValueList,
}

Logger struct does not have a same constraint, and no impl depends on 'static
And I think root must be a root of one logger hierarchy, not root of global.
Example use case
Currently, I'm trying to capture logs as string to bypass https://github.com/rust-lang/rust/issues/12309. As it must be done once per #[test] fn, buffer string is not 'static. I can do it via thread_local!, but it's quite hacky as it depends on bug.
---- definition::parser::tests::expansion_order_detection stdout ----
# I want to see logs for the test at here

I will do it soon, and I want to know if you will merge it to slog.
(git clone from github is 8kb/s using msys2/windows 10)

I thought that + 'static there was to prevent Drain from having outside references. I'll be happy to review the change and then we can discuss as I'm a bit confused now.

I was wrong about 'static. Sorry for that.
And judging from my attempt to add lifetime to logger, it would break api compatability (if it's used in struct). I don't think it worth breaking all downstream crates. So I decided to leave slog as is, and implemented capture function using Arc<RwLock<Vec>>
let mut buf = Arc::new(RwLock::new(vec![]));

let _guard = PanicGuard { buf: buf.clone() };
let logger = init_slog(LogWriter { w: buf.clone() });

slog_scope::scope(logger, || op())

and it prints like (with color)
---- test name stdout ----
op: detecting expansion order
   DEBG [1] expr(1: g), depth: 2, max: 2
   DEBG [2] expr(2: g()), depth: 1, max: 2
   DEBG [0] expr(3: "test"), depth: 1, max: 2
   DEBG [3] expr(4: g()("test")), depth: 0, max: 2

Arc is used because I can't take drain back.
My problem is solved, but leaving it open because I'm not sure if it should required 'static.
Please feel free to close it.

Ah, now I see what you were aiming at exactly.
So yes - Loggers share one Drain by reference counting and can use it from different threads, and anyone that has Logger can create it's clone or a sub-logger, so adding lifetime to loggers wouldn't generally work.
Closing it, but always feel free to reopen in case something could be improved.

repo: slog-rs/slog


text:
Camera sensitivity and movement speed are inconsistent when the simulation is on the runner thread

As the fps drops on the runner thread, so does the camera sensitivity and movement speed. Implementing a form of DeltaTime control could alleviate the issue. Attached is a video showing the problem.
https://user-images.githubusercontent.com/65092445/231595135-0a5348e9-4b25-4c9f-882b-44d3b1b00af3.mp4
Outside of this issue, I'd like to say amazing work on this project. It's amazing to see that this is even possible in GameMaker.

Hey,
thanks for suggesting this improvement. The commit 07fa67e has frame independent camera controls.

authors: QuartzFox slojanko