[firebase_messaging 📚] Redundant loading of main.dart.js in firebase_messaging's web example

Hi,
In firebase_messaging's web example, "main.dart.js" is already loaded via:
<body>
...
  <script src="main.dart.js" type="application/javascript"></script>
...
</body>

loadMainDartJs seems to be in charge of adding it to the body via JS:
    function loadMainDartJs() {
      if (scriptLoaded) {
        return;
      }
      scriptLoaded = true;
      var scriptTag = document.createElement('script');
      scriptTag.src = 'main.dart.js';
      scriptTag.type = 'application/javascript';
      document.body.append(scriptTag);
    }

Is there any particular reason for having to invoke loadMainDartJs?
If so, could you please add a comment in the example to explain why?
Thanks.

Hi @russellwheatley @darshankawar ,
Could you please help me with clarifying this?
Thank you.
Best Regards.


crash in sdk when dev machine returning from sleep mode

From @ghost on March 24, 2014 19:35
Reference on googlecode: https://code.google.com/p/jmonkeyengine/issues/detail?id=582

I have noticed the SDK crashes when returning from sleep mode. I believe this to be related to the openGL preview window that is available in the SDK.
Crash 1: returning from sleep mode, openGL preview is up already displaying a model. crash throws many blank error boxes, must force quit application.
Crash 2: returning from sleep mode, openGL preview is not up. I added a model via import, when I went to go preview it in the SDK then crashed the same as before. Major note: SDK then went on to delete the original model file from my disk; luckily the model was still open in Blender, so I simply resaved the file and re-wrote it to disk.
Windows 8, 64bit

Copied from original issue: jMonkeyEngine/jmonkeyengine#93

I tried this on Mac OS X 10.9.5 and can't reproduce it (even the Controls continue working), so it's a corner case with W8 64bit it seems.
Feel free to test it but keep TaskManager and copies of your models open ;)

I'll try it on my Win7 tonight if it helps.

Didn't happen on my window 10 computer


Add new Periscope url www.pscp.tv

From yesterday I noticed when I try to download a periscope stream I get the following error:
ERROR:  Unsupported URL: https://www.pscp.tv/w/########/card
My guess is that periscope had changed the default URL from witch to download the stream/replay.
Thanks in advance.

This is already fixed.


Respond to failed commands

Commands with typos right now spit out a stack trace on the console. It would be nice to be able to see an error or something in discord instead.
Some command outputs like for /say also don't appear in discord for some reason.

Thanks for your issues.
Indeed command error messages isn't send because it is empty message. I will investigate further tomorrow.
/Say command dosent return the messages on discord because the chat message event isn't triggered. I will fix this in the next update.

Fix on 1.0.6


Task Scheduling work from database

Task Scheduling with database as queue jobs with database jobs and fail jobs
option with default(current) and database
That will be smarter than current Task Scheduling.

If this is intended to be a feature request or some idea, it should be posted in ideas issue tracker

thanks @Kyslik


DBs do not appear in Fauxton

I have started couchdb using:
docker run -d -p 5984:5984 -v $(pwd):/usr/local/var/lib/couchdb klaemo/couchdb:latest

but dbs at ´pwd´ do not show up in Fauxton and:
curl -X GET http://<IP_ADDRESS>:5984/_all_dbs

returns:
[]

The 2.0.0 image doesn't use /usr/local/var/lib/couchdb. You have to mount it in the appropriate directory /opt/couchdb/data.
Sorry, the readme isn't up to date. Kinda confusing atm

Clemens

Am 15.10.2016 um 13:54 schrieb Martin Clausen<EMAIL_ADDRESS>/usr/local/var/lib/couchdb

No, problem. I thought this might be a related to me using 2.0.0.
On Sat, Oct 15, 2016 at 2:01 PM Clemens Stolle<EMAIL_ADDRESS>wrote:

The 2.0.0 image doesn't use /usr/local/var/lib/couchdb. You have to
mount it in the appropriate directory /opt/couchdb/data.
Sorry, the readme isn't up to date. Kinda confusing atm

Clemens

Am 15.10.2016 um 13:54 schrieb Martin Clausen<EMAIL_ADDRESS>:
/usr/local/var/lib/couchdb

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/klaemo/docker-couchdb/issues/86#issuecomment-253980204,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAD6XA0Y6LUEHf8NkSCyRKpiglx1cxrmks5q0MCDgaJpZM4KXsCy
.

--
Martin Clausen
Mob. +45 61 55 50 95
https://www.vyte.in/martin.clausen


Space after function name

What's the reason why spaces after function name rule was chosen? I know this has been asked before, but I didn't see any answer. It just seems orthogonal to the purpose of a standard like this to choose something extremely uncommon in JS or even other languages.

Related: https://github.com/feross/standard/issues/89 https://github.com/feross/standard/issues/217 https://github.com/feross/standard/issues/311
Quoting @feross:

Let's be honest: this is an pretty unimportant issue. You might be able to find some minor reasons why your preferred style is better than the other style, but others can come up with reasons why their choice is better than yours, too.
It doesn't matter which choice we pick. Both choices are valid. Neither choice will lead to more bugs or programmer errors. So, we just need to pick something.

I like it as stated in https://github.com/feross/standard/issues/217#issuecomment-127057957
If you adopt it, I bet you'll eventually come to like it.

So the answer is "just because"? It wouldn't be important if spaces after function name was something someone used, but instead it's a completely goofy choice like 3 spaces for indentation would be. I hope that this "standard" sees only limited adoption, since even if it becomes common, it will look weird to everyone new to JS.

@slikts its a bike shed either way.  Personally, I didn't like it at first, but, it is more consistent.

@slikts The stats in this study show that space-after-function-name style is quite common – 33%.
If you're looking for a concrete reason why this style is better, I quite enjoy being able to search for function definitions vs. function invocations. With this style, it's possible to distinguish the two. For example, search myMethod ( when you want the definition, and myMethod( when you want places where the function is called.

Thanks, that's actually a good answer.

last update: 2014-07-19-1
Analyzed period: 2013-07-13 - 2014-07-19

I wonder if that has changed at all with the introduction of standard @feross

Yeah, I bet that it's changed. I'll email the author and see if he wants to update his stats. Might be interesting to see the change.

I'm not part of the folks who made this decision, but I can give some anecdotes. I work with a team with various degrees of JavaScript proficiency, and our codebases are often littered with both function () {, function name() {, and function() { indiscriminately.
I see function () in nameless function expressions come up very often, both in our workplace's codebases and open-source libraries. I see people happen to like that one a lot, while still write named function expressions (function name()) without a space before the parens, probably simply out of seeing that style in books and documentation examples.
I've probably done the same at some point in the past, but I really wanted to make the way I write JS consistent so I adopted the always-a-space-before style.

@feross

The stats in this study show that space-after-function-name style is quite common – 33%

These stats are wrong: https://github.com/outsideris/popularconvention/issues/62
It checks for function() vs function (), not for function foo () vs function foo() like advertised.
I did some researches: https://github.com/tkrotoff/space-after-function-name
Results: 8%

@tkrotoff thanks for the information!

@feross regarding the:

I enjoy being able to search for function definitions vs. function invocations

I would like to share a couple of other (IMO more reliable) methods:

in ST you can hit Ctrl+R and write the name of the function. This will move the cursor to the function's definition line.
if you have the Tern package installed in ST, whenever the cursor is on top of the function name you can hit alt+. (default keyboard shortcut) to go to its definition line (this works when the function is imported from another module too)

Caught me off-guard as well.  I had to search the issues for a Why? 😁

The answer is part bunk stats and part making definitions searchable. It's a fair guess that this decision has been one of the main reasons hampering 'standard'.js' adoption.

In all honesty, it’s actually less consistent, and a hack to make it "searchable”. I agree with every other configuration, and I’ve also adopted trends over time (no semicolon, single quote). I’ve been a JS developer for a long time, and love the functional/immutable direction it’s headed towards.


Cython backend doesn't behave the same as cffi/c

It is impossible to send a zero length string with send when using the cython backend (To close a connection with a STREAM socket), when doing the same with cffi it works fine.
example:
  File "server.py", line 33, in got_request
    socket.send_multipart([identity, b''])
  File "/lib/python2.7/site-packages/zmq/sugar/socket.py", line 278, in send_multipart
    return self.send(msg_parts[-1], flags, copy=copy, track=track)
  File "zmq/backend/cython/socket.pyx", line 574, in zmq.backend.cython.socket.Socket.send (zmq/backend/cython/socket.c:5434)
  File "zmq/backend/cython/socket.pyx", line 621, in zmq.backend.cython.socket.Socket.send (zmq/backend/cython/socket.c:5196)
  File "zmq/backend/cython/socket.pyx", line 182, in zmq.backend.cython.socket._send_copy (zmq/backend/cython/socket.c:2044)
  File "zmq/backend/cython/checkrc.pxd", line 21, in zmq.backend.cython.checkrc._check_rc (zmq/backend/cython/socket.c:6248)
zmq.error.ZMQError: Bad address

What pyzmq, libzmq versions? Can you provide a complete example that reproduces the problem and shows a difference in behavior between Cython and CFFI?

pyzmq version: 14.5.0
zmq version: 4.0.4
If you run the following script (taken from the example how to use the ZMQ_STREAM socket):
import zmq

context = zmq.Context()
socket = context.socket(zmq.STREAM)
socket.bind('tcp://<IP_ADDRESS>:8000')

while True:
    identity = socket.recv()
    req = socket.recv()
    print req
    socket.send(identity, zmq.SNDMORE)
    socket.send('HTTP/1.1 200 OK\r\nConnection: Close\r\nContent-length: 11\r\n\r\nHello World')
    # Close Connection
    socket.send(identity, zmq.SNDMORE)
    socket.send('')

With cffi it works fine: it returns a http response and closes the connection, then accepts the next request. With the cython backend you get the Exception above.
It is probably also better to default to cffi, as it seems to be the move in the python community to use for c extensions.

It is probably also better to default to cffi, as it seems to be the move in the python community to use for c extensions.

The Cython backend is generally more reliable and more efficient and preferable to CFFI, except on PyPy, so I don't think the default should switch on CPython.

So far, I've found a bug in the CFFI backend, which is failing to check the returncode that Cython is checking. The CFFI backend is actually seeing the same Bad Address error, it's just not reporting it. Since it doesn't affect any other socket type, I think this is going to prove to be a bug in the underlying STREAM socket in libzmq.

Should I open this bug at libzmq for it?

@pvanderlinden looks like the bug's already been fixed in libzmq, and there's already a test for it. Apparently I even wrote it and completely forgot. From the comments, it looks like the fix was supposed to be backported to 4.0, but never was.

empty frame fix backported to zeromq 4.0.x in zeromq/zeromq4-x#107. If you use the 4.1rc, it should have no problem.


⚠ All Access Electrical has degraded performance

In 82c3318, All Access Electrical (https://allaccesselectrical.com.au) experienced degraded performance:

HTTP code: 200
Response time: 8110 ms

Resolved: All Access Electrical performance has improved in 4888d45 after 9 minutes.


Dynamically change lanes if alternative lane is on the same road and available

Everyone wants to use right lane, even ones changing lane after crossing to middle one!
Scene from Kraków map, unmodified anything, robot proletariat traffic model.

Drivers in a real-life Kraków could be better, but they are not so bad :)

In extreme cases it is one of reasons for deadlocks

Attempting to reproduce this kind of problem in a smaller setting, to make it easier to iterate on a fix and prevent regressions. You can reproduce this by editing tests/src/main.rs, going to test_lane_changing, doing map.save(); scenario.save();, then cargo run --bin game -- --dev data/system/oneshot/scenarios/lane_selection/lane_changing.bin. As you can tell, the lane selection actually looks half-reasonable in the test case, except for everyone insisting on using the rightmost lane to vanish at the border. Any ideas how to force a map and set of trips to reproduce the weird choices? Maybe that small road just before the traffic signal is important, because everybody waits to not block the box, but settles into their lane choice too early?

Maybe that small road just before the traffic signal is important

I think so. Looking at https://user-images.githubusercontent.com/899988/98115670-78345780-1ea7-11eb-9cde-a3ac15a059ca.gif again: note that next vehicle enters only after both first crossing is empty AND small road is empty.
If car would be able to enter center/left lane then it would not wait until small road is completely empty, right?
Not sure whatever it would also fix problem with passing crossing one by one (is it possible to have multiple vehicles at crossing at the same time if all are going without conflict between them)

editing tests/src/main.rs, going to test_lane_changing doing map.save(); scenario.save();

What

doing map.save(); scenario.save();

means here?

To try out the synthetic map and scenario used in the test:

Change https://github.com/dabreegster/abstreet/blob/7854823c28a2a7728eb1d7d3dc60607a76f772e6/tests/src/main.rs#L216 to true
cargo run --bin tests
You can stop the test process almost immediately after it starts; the lane-changing test code gets run first, and the other tests take a few minutes
You should then be able to run it: cargo run --bin game -- --dev data/system/oneshot/scenarios/lane_selection/lane_changing.bin

If car would be able to enter center/left lane then it would not wait until small road is completely empty, right? It should result in doubling (maybe even trippling) capacity.

Correct. The main issue here is really bad choice of lane. The secondary issue is the rules for not blocking the intersection. I think I'll try allowing blocking the intersection for these "degenerate" cases where there's just a crosswalk. Pedestrians may suffer, but this is a little closer to reality. And in most cases, there's probably not even a crosswalk there anyway.
My experience hand-crafting the synthetic map and trying to specify a traffic pattern that approximates this setup was tedious, and the result still doesn't match. I wonder if there's something more direct we could do. Maybe a way to specify a small test area from an existing map, record the exact timing of vehicles passing through there, and replay it.

Maybe a way to specify a small test area from an existing map, record the exact timing of vehicles passing through there, and replay it.

If that is possible without spending an extremely long time on that - it would be an ideal solution. Not sure is there some sane way to record blocked outflow (what is some cases may be important, but not here so it is not some blocker)

Alright, after a few false starts, I finally have a recorded scenario that reproduces lots of silly behavior here. I've yet to cleanly make this a test case that can last forever and survive binary map format changes, but at least I can iterate on the LC behavior now.

Not sure if it would be useful, but I can record video how this crossing behaves with a real traffic.

Not sure if it would be useful, but I can record video how this crossing behaves with a real traffic.

Hmm, I think I have intuition for how things flow here, but if it's not much trouble, sure! It'd be a neat experiment to see how closely we can get the simulation to look like a sample of real behavior.

I've been poking at this and wanted to check in and verify my understanding @dabreegster.
I think what's happening is:
A car's route is a list of lane IDs (and their connections) that will be traversed.
A lane ID identifies one segment of road between two particular intersections - so if you pass through an intersection, even if you stay in the right most lane, the Lane ID changes. This is important for later.
When a car crosses an intersection, provided the intersection is clear[1], we allow the crossing car to opportunistically switch lanes while crossing the intersection.
The car chooses the best lane to switch to  based on a scoring of all possible lanes: backed up traffic, a bike in the lane, and changing lanes all count against a lane.
A little example: Imagine a one-way road with two lanes and three segments.
[----1a--->][----1b--->][----1c--->]
[----2a--->][----2b--->][----2c--->]

Let's say my original planned route is:

1a
1b
1c

However, when I reach the end of 1a, and am about to cross, I see a cyclist in 1b, so I opportunistically decide to change lanes to 2b. So now my planned route is

1a
~1b~ 2b
1c

Notably, I made no updates to the third step — 1c is still currently on my planned route.
Fortunately, normally when we reach the end of 2b, we'll have another opportunity to update our trip plan, and be biased for updating to 2c since it avoids the lane change penalty. But there's one final caveat, if the intersection is part of an uber turn[2], we don't even consider an opportunistic lane change. So if 2b were part of an uber turn, while we're in that lane, we can make no further updates to our trip plan, and end up switching back to 1c.
https://user-images.githubusercontent.com/899988/98115670-78345780-1ea7-11eb-9cde-a3ac15a059ca.gif
So looking back at our Krakow scenario, the lane that everyone is changing too is indeed part of an uber turn and part of their original travel route. What's happening is drivers approaching the intersection have opportunistically changed lanes before the uber turn. But then once they're in the uber turn,  they're prevented from further updating their original plan, which forces them to switch back to their original lane.
Does that sound correct and plausible @dabreegster ?
If so, some possible solutions might be:

allow opportunistic lane updates in an uber turn.

I naively tried this and hit a cascade of asserts - it seems like you had specific and thorough reasons for preventing this.

cascade opportunistic lane changes

When changing lanes - update more than just the next step - update the entire trip plan (or some forward looking portion of it).

change trip plans to not be LaneID based

e.g maybe road based, or "index of lane" based rather than LaneId based (obviously we'd have to handle changing the number of lanes - maybe it could be a float... drive 25% from the right edge 🙃, just throwing stuff at the wall really.
Any inclinations?

[1]

provided the intersection is clear[1], we allow the crossing car to opportunistically switch

More specifically - when laggy_head.is_none() - I'm not sure why this matters though. Removing this restriction triggers an assert.
[2]

uber turn

I'm not completely sure what this is - it seems to be used in a couple of related but slightly different contexts. One context is surfaced in the UI as a visual tool to visualize arbitrary combinations of turns through intersection. The other context is that an individual intersection can be "in an uber turn". My intuition is that this just happens when a bunch of turns are close together, but I haven't yet verified that.

More specifically - when laggy_head.is_none() - I'm not sure why this matters though. Removing this restriction triggers an assert.

For reference, this is a call in mechanics/driving.rs before calling car.router.opportunistically_lanechange. If there is a laggy head, it means the current car isn't actually at the front of the lane yet; somebody in front of them is partly in the intersection, partly still in the lane. The car will stay in the Queued state, and once the laggy head clears the lane, they'll wakeup their follower (the car), putting them back into a Crossing state.
If you remove this check, the crash happens before the laggy head clears the lane, tries to wake up its follower, but it's already WaitingToAdvance, not Crossing. That's here: https://github.com/dabreegster/abstreet/blob/4690ea36cdeaa2849b8a9d7ad60c18fd09cafbf1/sim/src/mechanics/driving.rs#L359

Does that sound correct and plausible @dabreegster ?
I'm not completely sure what this is - it seems to be used in a couple of related but slightly different contexts.

Ah, yes! The traffic signal intersection in question is just north of another traffic signal, and that proximity causes uber-turns to be created there. There's a second case forcing uber-turns: turn restrictions -- but there are none defined here.

allow opportunistic lane updates in an uber turn.

There is/was a reason, but I need to think about it again to explain it; I'll followup shortly.

cascade opportunistic lane changes

This could work, but it's likely just a performance issue. Also, the number of vehicles in a future lane could change by the time we get there, so waiting to decide seems nice. Plus, I'm not sure changing the plan ahead of time would even help in this case -- there's still some reason why lane-changing in the middle of an uber-turn is tricky.

change trip plans to not be LaneID based

This is a possibility. Also need to think about it a bit more.
I'll think through 2 of these ideas more and reply soon.

Uber-turns and lane-changing
Background
UT=uber-turn
LC=lane-changing
An UT is a sequence of lane->turn->lane->turn...->lane. They get created for two reasons:

Some traffic signals are within 25 meters of each other. In reality, humans would probably treat this area as one intersection. Creating UTs between the cluster of close signals is an attempt to make sure vehicles don't get stuck "in the middle" of two lights.

OSM has turn restrictions with via as a road segment. An example is:

If the pathfinding layer operated purely at the level of road segments, then it might return a path including this movement. At the graph search level, we have to instead stick in special nodes and edges to represent only the legal movements.

For reference, there's another unsolved bug involving editing a lane in/near the end of an UT: #259
Why can't we LC during an UT?
I introduced this restriction during the handle_uber_turns experiment. This bool is enabled by default right now. It has a few effects:

prevent LCing right before or during an UT
inside mechanics/intersection.rs: if we started an UT successfully but hit a red light in the middle of the UT, plow right through it
also in that file: before we start the first turn in an UT, check that right now we could successfully make it through the entire UT, ignoring red lights. aka, make sure another vehicle isn't blocking some future turn. if everything passes, "lock" the entire UT by inserting a reserved request in those future intersections.

I started this experiment roughly around https://github.com/dabreegster/abstreet/issues/114#issuecomment-657255650. But I don't think it was successful -- I didn't really make progress on the south_seattle map there. And since then, one of the problems -- dealing with unsynchronized traffic signals -- has gotten easier to manually edit, and there's very primitive "autotuning" to line up pairs of signals. In retrospect, handle_uber_turns is one of the things making the intersection code really complicated -- it's especially weird to think about the cycle detection in context of reserving an entire UT.
Solutions
Ideally we would delete this experiment. I think first you can try your repro scenario passing --disable_handle_uber_turns. If that helps, run cargo run --release --bin game -- --prebake --disable_handle_uber_turns and make sure both scenarios finish without gridlock. (Or maybe more usefully, run the full weekday scenario in the UI in both montlake and lakeslice.)  If this works, let's just delete this entire experiment; it's making things worse here, it's complicated, and I don't have evidence it helps.
If this doesn't work, then maybe we still need to reserve an UT, but we can relax and allow LCing inside an UT, removing the restriction from router.rs. I think the only thing that might go wrong is the reserved code in intersections.
A third option is to allow LCing near an UT in a specific case: when the UT is actually just a single turn. That's the case in this situation; all of the UTs along Aleja Juliusza Słowackiego  are just single turns. So the reservation logic wouldn't do anything funny. We could either detect this one-step case in router.rs, or maybe even more simply, go update pathfind/driving.rs to not push onto the list of uber_turns there when it's a one-stepper.
I'm thinking through your third proposal, will write it up too

Can a vehicle path be a list of roads?
Only focusing on paths for vehicles here; for pedestrians, "go from intersection1 to i2" is ambiguous because side of the road isn't clear.
The idea is to make a HighLevelPath (with a better name) that's just a list of DirectedRoadIDs. (Or equivalently, IntersectionIDs or RoadIDs, with a little bit of logic to figure out the direction along the roads.) As needed, Router would pick a specific lane to use.
Side effects
First the easy implications of this kind of change:

the contraction hierarchy would be smaller and cheaper to compute, because the graph of roads is smaller than the graph of lanes
We'd have to adapt how we draw routes. When we're previewing a route and we only know roads, we could draw a thick fuzzy band or along centerlines or something. When we're drawing the route that a vehicle has followed so far or in the past, we might want to continue showing exactly their lane changes -- or maybe not, if it's not useful to see that.

Why would this change be hard?

Imagine we're a car pulling out of the driveway of the red house. Right now, the driving_pos connection is the rightmost lane, so if our path ideally starts by turning left onto Louisa, we have to follow the green route and loop around the block to get into the proper lane. This is because we can't lane-change in the middle of a lane, only at an intersection.
If we routed by roads, then the first step of the path might say to immediately turn left, following the blue route. If we keep spawning cars in the rightmost lane only, then that wouldn't work. We could maybe try to workaround this by starting the routing from a road that we definitely can reach from the rightmost lane, but there are a few arbitrary choices, and running several pathfinding queries and picking the cheapest feels like a possible performance problem.
So, should we change the model to allow spawning a car on any lane? In many situations, this probably matches reality better, and would compensate for the lack of realistic LCing. How should we do it? We could cheat and just call start_car_on_lane with the left lane, and just ghost through stuff in the right lane. Or maybe we could do the safety check on all lanes in the way, and only go once they're all clear.
If we go this route, should we also allow cars to start from a building or parking lot by turning left, across the road center line? If we could do all the safety checks reasonably, this would fix some "parking blackhole" problems along borders like this:

These houses can't be used for parking, and most trips can't start here, because if the driveway only lets you turn right, then all you can do is vanish off the border. If we more realistically allowed turning left from a driveway, I think lots of the blackhole cases would go away -- but not all.
Are there situations where it's impossible in reality to turn left out of a driveway? Yes, and OSM captures that -- as a divided one-way pair. No issue.
If we manage all of this, then it's also worth asking if we can make vehicles end their route by turning left into a driveway, across opposing traffic. We'd have to bake in a new CarState to represent this and figure out how to make the safety checks work with the discrete event system, but it would increase realism. It might also hurt gridlock -- we might need some amount of dynamic replanning to give up on turning left across a busy street, and just do the loop-around-the-block thing.
Will this help the current problem?
I'm not convinced pathing at the coarser granularity of roads would help here. It depends how the router chooses the exact lane to use, and if UTs are still a complication. Since intersection reservations for handle_uber_turns are at the level of TurnID, I think we'd have the same issue.
So, I think to fix this particular bug, we should still try nuking handle_uber_turns. BUT I would also love to support left turns to/from driveways, and then simplify the pathing layer to return roads.

One last thing that came up:
When do we lock in the Turn we want?
As soon as a vehicle hits WaitingToAdvance, they call opportunistically_lanechange just once, and then forever wait for that one particular turn. I've observed situations before where a car picks a clear lane, but while the light is red for them. By the time they can go, actually a bike has picked that lane. But the car's fate is already set, so they follow the bike into the right most lane, with the left lane being nice and clear.
I'm losing steam, but I think it's worth revisiting the protocol that agents use to communicate with intersections. Should vehicles submit all possible turns they want to do? Should the request they submit be coarser and just at the level of a destination road? Then the "opportunistic LCing" can be lazily evaluated inside mechanics/intersection.rs, when the most recent information is available. This complicates things inside there like blocked_by, though -- potentially we'd have to say a car waiting to turn is waiting on the last vehicle in every possible lane.

Thank you for all this excellent feedback! I will consider over night and respond in the AM - I'd like to keep working on this.

Thanks for the clarity around how doing lane-based pathfinding avoids certain unsupported scenarios (e.g. mid-segment lane changing). I see why it would be complicated to switch to a road-based route.
With --disable_handle_uber_turns (and commenting out a couple asserts) the situation is improved a bit:

I'm currently running through some other scenarios to see what the impact is...
Honestly though, now that you've explained it more, special handling of compound turns ("uber turns") makes sense to me. And I'm a little hesitant to just completely rip it out.
Instead, maybe we could take it a bit further:

cascade opportunistic lane changes

This could work, but it's likely just a performance issue.

Why can't we LC during an UT?

I'm wondering if there's a compromise here, where we could opportunistically cascade updates to the path, not for the entire trip, but for entire uber turn, and still require that it all be "locked in" before the car enters the intersection.
Since it's (hopefully/usually) only a handful of segments making up the uber turn, it should be more tractable vs. updating their entire trip plan.
And since it's locked in at the point of entry, I'm hoping we could keep the bulk of uberturn logic untouched like the "don't get locked in the middle of an uber turn" behavior from https://github.com/dabreegster/abstreet/issues/114

With --disable_handle_uber_turns (and commenting out a couple asserts) the situation is improved a bit:

It looks much better! But all but one of the cars in the video are going straight, so it's still far from realistic -- all 3 lanes should be advancing at the same time, without any switching around...

I'm wondering if there's a compromise here, where we could opportunistically cascade updates to the path, not for the entire trip, but for entire uber turn, and still require that it all be "locked in" before the car enters the intersection.

This is a nice idea! The performance should be fine, and the code complexity shouldn't blow up too much. I am not sure it'll help this specific situation, though -- the uber-turn is only across the traffic signal, not the two little stop signs before and after:

I never finished the process of playing around with how to automatically group UTs. Maybe we can take away checks like https://github.com/dabreegster/abstreet/blob/308eb90956be7d963f308957168bf0e91a1c504c/map_model/src/pathfind/uber_turns.rs#L181 and just go by distance. I think I saw some pretty unintuitively large groups when I did that.

It looks much better! But all but one of the cars in the video are going straight, so it's still far from realistic -- all 3 lanes should be advancing at the same time, without any switching around...

Tweaking the costing function helps this. Currently we'll lane change if there's even just one car in front of us, which is probably not very realistic. If we combine the "number of cars ahead of us" and "number of lanes" into a single score component, we can get more realistic behavior.
Note there are still one or two lane changes in the intersection, but from what I can tell they represent reasonable choices for the car - i.e. they eventually need to be in that lane.

There is a comment about a desire to "keep it simple" and avoid linear combinations of the score function, but this does seem more realistic. WDYT?
@@ -407,7 +407,7 @@ impl Router {
                 } else {
                     slow_lane = 0;
                 }
-                let cost = (lt, bike, slow_lane, vehicles, lc);
+                let cost = (lt, bike, slow_lane, vehicles + lc);

                 (cost, turn1, l, turn2)
             })

Alternatively, we could try explicitly penalizing "short lanes" and add that as an explicit cost in our function to exclude lane-changing. (language is tricky here! by exclude lane-changing I mean that in the context of allowing changing the trip plan to avoid changing lanes.)

There is a comment about a desire to "keep it simple" and avoid linear combinations of the score function, but this does seem more realistic. WDYT?

Switching to a sum here SGTM. The preference for the lexicographic ordering is understandability. Maybe we shouldn't switch 1 lane over until there's a 2 or 3 vehicle advantage, to add a bit more hysteresis. I'm allergic to parameter tuning, especially when we don't have a convenient way of trying different parameters against a representative sample of traffic loads. But since this little change improves things so much and feels more realistic, seems worth it.

Alternatively, we could try explicitly penalizing "short lanes" and add that as an explicit cost

That's also pretty intuitive -- getting stuck behind a slow vehicle for very short distance doesn't matter so much. Where would it get prioritized in this tuple?

That's also pretty intuitive -- getting stuck behind a slow vehicle for very short distance doesn't matter so much. Where would it get prioritized in this tuple?

If we went that route, I'd guess pretty early on, something like: (lt, short_lane, bike, slow_lane, vehicles, lc).
I kind of prefer the combination score though - it seems like it would effectively accomplish the same thing (you can't have more than one car in the lane if it's very short) plus it seems like it handles some other real world cases (I think people don't usually lane change to get around just one car).
Plus it's easier to implement. ;)

SGTM! So IIUC, the immediate plan is to:

keep handle_uber_turns
make opportunistically_lc adjust ahead the entire uber-turn
update the cost function to use vehicles + lc

Sounds right, yes!

As an update, I'm still working on this.
My work in progress (https://github.com/dabreegster/abstreet/compare/master...michaelkirk:mkirk/lane-change-2?expand=1) attempts to update router.rs so that an entire uber turn can be optimized just before the agent enters the turn.
However, this has introduced some failures that I'm trying to track down. Here are two that I'm seeing:
thread 'main' panicked at 'Queue has spillover on Traversable::Lane(2027) at 00:01:30.5 -- can't draw Car #2, bound is -4.7508m. Laggy head is None. This is usually a geometry bug; check for duplicate roads going between the same intersections.', sim/src/mechanics/queue.rs:156:17
stack backtrace:
   0: rust_begin_unwind
             at /rustc/8256379832b5ecb7f71e8c5e2018446482223c12/library/std/src/panicking.rs:493:5
   1: std::panicking::begin_panic_fmt
             at /rustc/8256379832b5ecb7f71e8c5e2018446482223c12/library/std/src/panicking.rs:435:5
   2: sim::mechanics::queue::Queue::inner_get_last_car_position
             at ./sim/src/mechanics/queue.rs:156:17
   3: sim::mechanics::queue::Queue::get_car_positions
             at ./sim/src/mechanics/queue.rs:59:9
   4: sim::mechanics::driving::DrivingSimState::get_unzoomed_agents
             at ./sim/src/mechanics/driving.rs:908:30
   5: sim::sim::queries::<impl sim::sim::Sim>::get_unzoomed_agents
             at ./sim/src/sim/queries.rs:468:26
   6: map_gui::render::agents::AgentCache::calculate_unzoomed_agents

Another one like:
thread 'main' panicked at 'invalid reserved length: Distance(-6.8051), car: Car { vehicle: Vehicle { id: CarID(9924, Car), owner: Some(PersonID(11505)), vehicle_type: Car, length: Distance(5.9454), max_speed: None }, state: Crossing(TimeInterval { start: Time(10837.0747), end: Time(10837.6318) }, DistanceInterval { start: Distance(0.0), end: Distance(7.4713) }), router: Router { path: Path { steps: [Turn(TurnID { parent: IntersectionID(16), src: LaneID(2349), dst: LaneID(2027) }), Lane(LaneID(2027)), Turn(TurnID { parent: IntersectionID(342), src: LaneID(2027), dst: LaneID(2039) }), Lane(LaneID(2039)), Turn(TurnID { parent: IntersectionID(341), src: LaneID(2039), dst: LaneID(2036) }), Lane(LaneID(2036)), Turn(TurnID { parent: IntersectionID(340), src: LaneID(2036), dst: LaneID(2033) }), Lane(LaneID(2033)), Turn(TurnID { parent: IntersectionID(339), src: LaneID(2033), dst: LaneID(2811) }), Lane(LaneID(2811)), Turn(TurnID { parent: IntersectionID(338), src: LaneID(2811), dst: LaneID(2030) }), Lane(LaneID(2030)), Turn(TurnID { parent: IntersectionID(337), src: LaneID(2030), dst: LaneID(2814) }), Lane(LaneID(2814)), Turn(TurnID { parent: IntersectionID(336), src: LaneID(2814), dst: LaneID(1619) }), Lane(LaneID(1619)), Turn(TurnID { parent: IntersectionID(182), src: LaneID(1619), dst: LaneID(1610) }), Lane(LaneID(1610)), Turn(TurnID { parent: IntersectionID(87), src: LaneID(1610), dst: LaneID(1604) }), Lane(LaneID(1604)), Turn(TurnID { parent: IntersectionID(220), src: LaneID(1604), dst: LaneID(1616) }), Lane(LaneID(1616)), Turn(TurnID { parent: IntersectionID(207), src: LaneID(1616), dst: LaneID(2841) }), Lane(LaneID(2841)), Turn(TurnID { parent: IntersectionID(64), src: LaneID(2841), dst: LaneID(2282) }), Lane(LaneID(2282)), Turn(TurnID { parent: IntersectionID(367), src: LaneID(2282), dst: LaneID(2312) }), Lane(LaneID(2312)), Turn(TurnID { parent: IntersectionID(219), src: LaneID(2312), dst: LaneID(2300) }), Lane(LaneID(2300)), Turn(TurnID { parent: IntersectionID(354), src: LaneID(2300), dst: LaneID(2306) }), Lane(LaneID(2306)), Turn(TurnID { parent: IntersectionID(214), src: LaneID(2306), dst: LaneID(2288) }), Lane(LaneID(2288)), Turn(TurnID { parent: IntersectionID(217), src: LaneID(2288), dst: LaneID(2294) }), Lane(LaneID(2294)), Turn(TurnID { parent: IntersectionID(400), src: LaneID(2294), dst: LaneID(2225) }), Lane(LaneID(2225)), Turn(TurnID { parent: IntersectionID(70), src: LaneID(2225), dst: LaneID(2232) }), Lane(LaneID(2232)), Turn(TurnID { parent: IntersectionID(399), src: LaneID(2232), dst: LaneID(2244) }), Lane(LaneID(2244)), Turn(TurnID { parent: IntersectionID(289), src: LaneID(2244), dst: LaneID(1749) }), Lane(LaneID(1749)), Turn(TurnID { parent: IntersectionID(351), src: LaneID(1749), dst: LaneID(2615) }), Lane(LaneID(2615)), Turn(TurnID { parent: IntersectionID(234), src: LaneID(2615), dst: LaneID(2609) }), Lane(LaneID(2609)), Turn(TurnID { parent: IntersectionID(148), src: LaneID(2609), dst: LaneID(659) }), Lane(LaneID(659))], end_dist: Distance(0.0), total_length: Distance(2128.6857), crossed_so_far: Distance(519.3439), total_lanes: 34, uber_turns: [UberTurn { path: [TurnID { parent: IntersectionID(338), src: LaneID(2811), dst: LaneID(2030) }] }], currently_inside_ut: Some(UberTurn { path: [TurnID { parent: IntersectionID(10), src: LaneID(2331), dst: LaneID(2349) }, TurnID { parent: IntersectionID(16), src: LaneID(2349), dst: LaneID(2027) }, TurnID { parent: IntersectionID(342), src: LaneID(2027), dst: LaneID(2039) }] }) }, goal: ParkNearBuilding { target: BuildingID(2378), spot: None, stuck_end_dist: None, started_looking: false }, owner: CarID(9924, Car) }, trip_and_person: Some((TripID(32535), PersonID(11505))), started_at: Time(10805.0), total_blocked_time: Duration(5.7794), last_steps: [] }', sim/src/mechanics/queue.rs:261:9
stack backtrace:
   0: rust_begin_unwind
             at /rustc/8256379832b5ecb7f71e8c5e2018446482223c12/library/std/src/panicking.rs:493:5
   1: std::panicking::begin_panic_fmt
             at /rustc/8256379832b5ecb7f71e8c5e2018446482223c12/library/std/src/panicking.rs:435:5
   2: sim::mechanics::queue::Queue::free_reserved_space
             at ./sim/src/mechanics/queue.rs:261:9
   3: sim::mechanics::driving::DrivingSimState::trim_last_steps
             at ./sim/src/mechanics/driving.rs:801:21
   4: sim::mechanics::driving::DrivingSimState::update_laggy_head
             at ./sim/src/mechanics/driving.rs:745:13
   5: sim::sim::Sim::do_step
             at ./sim/src/sim/mod.rs:601:17

Current theory is that something about my change is preventing queues from releasing their reserved length properly. I don't immediately understand why, but still looking.

Can I repro that on the south_seattle map? I read through your change and it all looks correct to me, not sure what's wrong either.

south seattle crashes almost immediately for me. I see you added some debugging to the analytics demand bit. I'm confused how your changes could affect this... it must mean the rewritten path picks different road1->road2 pairs. The indexing in there based off segment is a little confusing to me; I'll read through the debug output more carefully for one of the changed paths.

Steps changed. Before:
[Lane(LaneID(29096)), Turn(TurnID { parent: IntersectionID(6278), src: LaneID(29096), dst: LaneID(40201) })
vs After:
:[Lane(LaneID(29096)), Turn(TurnID { parent: IntersectionID(3989), src: LaneID(40201), dst: LaneID(22642) })
Path has a hidden validate_continuity method; it might be useful to temporarily expose this and call it after you do the rewrite. For this crashing case, something _very_wrong is happening; that first turn warps.

Ah, your bug is self.path.modify_step(1, 2, 3...) -- the number is an exact index into the steps. Since you're modifying into the future, need to add segment * 2 to all of these

ah!! thank you!!

--disable_handle_uber_turns no longer works. This is one of the likely crashes you'll run into:
thread 'main' panicked at 'assertion failed: self.currently_inside_ut.is_none()', map_model/src/pathfind/mod.rs:276:9

Whoops! I don't regularly test that flag. Do you think it's worth keeping around? Are we likely to want to try simulating without reserving UTs, to see if it helps some particular map? Keeping around all of the optional flags definitely increases code complexity, but we might regret it later if we remove them.

I think we want to reduce UT via merge, but I don’t believe they will completely go away. One way to find good merge candidates might be to remove UT and watch for jams. If that’s the case, then I think we might want to fix some things. I’m guessing, but I suspect it’s a hand full of asserts or unwraps that need additional filtering.

Visualizing the dynamic "ghosts" for better debugging


fix blog link for wrapper cookbooks

there is a broken link/rewrite which results in this (note the "blog.chef.io2013/....").  The link appears ok, but when it is clicked, it is broken, and ends up as shown below:
This patch fixes the broken link.
This link:
https://www.chef.io/blog/2013/12/03/doing-wrapper-cookbooks-right/
gets redirected here (which obviously does not work)
https://blog.chef.io2013/12/03/doing-wrapper-cookbooks-right/
changing the link to this would also fix it:
https://blog.chef.io/2013/12/03/doing-wrapper-cookbooks-right/
Description
Describe what this change achieves
Issues Resolved
List any existing issues this PR resolves
Check List

[ ] All tests pass. See TESTING.md for details.
[ ] New functionality includes testing.
[ ] New functionality has been documented in the README if applicable.

this shows the bad redirect:
$ curl -sI https://www.chef.io/blog/2013/12/03/doing-wrapper-cookbooks-right | egrep 'HTTP|Location'
HTTP/1.1 301 Moved Permanently
Location: https://blog.chef.io2013/12/03/doing-wrapper-cookbooks-right

so there is probably some other fix needed to address that redirect issue.
the immediate issue to fix the link on this README would be to change the URL to one of these two:
https://blog.chef.io/doing-wrapper-cookbooks-right
https://blog.chef.io/2013/12/03/doing-wrapper-cookbooks-right/

yes, I’d be happy to. However, I don’t know how…should I just do a new PR for
https://github.com/sous-chefs/resolver/blob/master/CHANGELOG.md
Thanks,
Karl

Ah, I should just make a proposed change to CHANGELOG.md in this existing PR, correct?

@karlamrhein if it's difficult for you, I can do it for you in this PR assuming I have access. I'll give it a try in a bit. Thanks-

Thanks.  I'm happy if you are able to do it, then I'll have a process to follow for next time.  If you don't have access in this PR, then I'm happy to give it a try.

Released as: 3.0.3


I cannot add any extra parameters to paths including file-paths

First check

[x] I added a very descriptive title to this issue.
[x] I used the GitHub search to find a similar issue and didn't find it.
[x] I searched the FastAPI documentation, with the integrated search.
[x] I already searched in Google "How to X in FastAPI" and didn't find any information.
[x] I already read and followed all the tutorial in the docs and didn't find an answer.
[x] I already checked if it is not related to FastAPI but to Pydantic.
[x] I already checked if it is not related to FastAPI but to Swagger UI.
[x] I already checked if it is not related to FastAPI but to ReDoc.
[x] After submitting this, I commit to one of:

Read open issues with questions until I find 2 issues where I can help someone and add a comment to help there.
I already hit the "watch" button in this repository to receive notifications and I commit to help at least 2 people that ask questions in the future.
Implement a Pull Request for a confirmed bug.

Example
Here are two test that checks

the approach recommended in the manual https://fastapi.tiangolo.com/tutorial/path-params/#path-convertor
an approach that quotes the path

import pytest
from urllib.parse import quote_plus
from pydantic import constr

@pytest.fixture
def client():
    # https://fastapi.tiangolo.com/tutorial/path-params/#path-convertor
    app = FastAPI()

    @app.get("/files/{file_path:path}").                    #(1)
    def get_file(file_path: str):
        return {"path": file_path}

    @app.get("/files/{file_path:path}/{version}").    #(2)
    def get_file_with_version(
        file_path:str, version: constr(regex=r"[\d\.]+")
    ):
        return {"path": file_path, "version": version}

    with TestClient(app) as cli:
        yield cli

def test_with_double_slash(client):
    file_path = "/home/johndoe/myfile.txt"

    # Users // as noted in the Tip in https://fastapi.tiangolo.com/tutorial/path-params/#path-convertor
    resp = client.get(f"/files/{file_path}")
    assert resp.status_code == 200, resp.json()
    assert resp.json()["path"] == file_path

    resp = client.get(f"/files/{file_path}/3.5.4")
    assert resp.status_code == 200, resp.json()
    assert resp.json()["path"] == file_path
    assert resp.json()["version"] == "3.5.4"

def test_with_quoted_path(client):
    file_path = "/home/johndoe/myfile.txt"
    quoted_path = quote_plus(file_path)

    print()
    print("Request done with:", f"/file/{quoted_path}")
    print()

    resp = client.get(f"/files/{quoted_path}")
    assert resp.status_code == 200, resp.json()
    assert resp.json()["path"] == file_path

    resp = client.get(f"/files/{quoted_path}/3.5.4")
    assert resp.status_code == 200, resp.json()
    assert resp.json()["path"] == file_path
    assert resp.json()["version"] == "3.5.4"

Description
Dear FastAPI gurus,
I am trying to add a route as files/{file_path}/{version}, where file_path: Path and version: str.
I am aware that the path convertor allows the file path but as soon as I try adding an extra parameter, it is not able to separate both entries.
I also noticed that the order in which the routes are included, produce different result.

Run test above
Both tests FAIL in the second assert, when the version is added
Now, revert the declaration of routes (i.e. #(2) and then #(1)
Now the first assert fails since fastapi routes it to #(2) instead of #(1)

Environment

OS: [e.g. Linux / Windows / macOS]:
Linux
FastAPI Version:
0.61.2
Python version:
Python 3.6.12

I also noticed that the order in which the routes are included, produce different result.

You are supposed to notice! Check this: https://fastapi.tiangolo.com/tutorial/path-params/?h=+order+matter#order-matters

I also noticed that the order in which the routes are included, produce different result.

You are supposed to notice! Check this: https://fastapi.tiangolo.com/tutorial/path-params/?h=+order+matter#order-matters

THx @Kludex I missed that one.
But it still does not explain the issues with the path

I need to investigate. If someone has time, or if you want @pcrespov, you can check https://github.com/encode/starlette/blob/master/starlette/routing.py and search for path:path and try to find out why you have this issue.
Solution until then: if you use a forward slash at the end, like /home/johndoe/myfile.txt/, it works as supposed.
Code that works:
from fastapi import FastAPI
from pydantic import constr

app = FastAPI()

@app.get("/files/{file_path:path}/{version}")
def get_file_with_version(file_path:str, version: constr(regex=r"[\d\.]+")):
    return {"path": file_path, "version": version}

@app.get("/files/{file_path:path}")
def get_file(file_path: str):
    return {"path": file_path}

I need to investigate. If someone has time, or if you want @pcrespov, you can check https://github.com/encode/starlette/blob/master/starlette/routing.py and search for path:path and try to find out why you have this issue.

@Kludex thx again! I will investigate the issue in starlette as well

Thanks for the help @Kludex! 🍰
If you solved your use case, you can close the issue @pcrespov ☕

Sorry for the long delay! 🙈  I wanted to personally address each issue/PR and they piled up through time, but now I'm checking each one in order.


[Feature request] Customise keymap

Describe the bug / feature
Since the update to 0.1.0b, there is a ctrl+Q to quit without warning picotron. It will erase from memory work which hadn't been saved. Unfortunately, there is another bug which make it easy to type CTRL + Q instead of CTRL + A (see https://github.com/ace-dent/picotracker/issues/6)
Expected behavior
I'd like to remap the keyboard, there is the /appdata/system/scancodes.pod but I don't understand how to remap a combination of keys. Besides, I suppose the bug with CTRL + AZERTY will make it tedious to remap something.
Software (please complete the following information):

OS: Linux Mint 21.3
Version: v0.1.0b

@farvardin - is the enhancement to make a warning when closing without saving?

@ace-dent I'd like to remap keys, or at least prevent it to understand CTRL+Q when I type CTRL+A.
But the fact that CTRL+Q, even in US keymap, is closing without confirmation is quite annoying and can lead to data loss, so maybe it should be another issue about this one...

@farvardin please can you check if the latest release addresses some of these Issues? Many thanks.

Re-tested with release v0.1.0g on macOS. Issue of quitting without confirmation still exists.


Improve: model's functions documentation

Hi, first of all, thanks for the gem!
It would be great to describe at README the functions in the models.
I want to get a color interpolation and print as background in a table, I need the hexadecimal color, i had to inspect the code to find that it could be done with color.hex
gradient = Gradient::Map.new(
      Gradient::Point.new(0, Color::RGB.new(255, 255, 255), 1.0),
      Gradient::Point.new(1, Color::RGB.new(226, 82, 82), 1.0)
    )
gradient.at(0.5).color.hex

I suggest to add this info to the readme and the other functions... it could help.

Ok! I'll do it soon

Here is the PR: https://github.com/zeeraw/gradient/pull/6


When pressing tab, there is a list of emotes on orion.

Describe the bug
When you open the player list all the players online are shown, but besides that there is also a list of emotes next to them.
To Reproduce
Steps to reproduce the behavior:

Go to 'Orion'
Click on 'tab' or what keybind you have for the playerlist
See error

Expected behavior
Only the players are expected to show
Screenshots

Username:
Menno516
Server name (all applicable):
Orion (the screenshot given)
Beta (just some :haa: variants.)

Fixed as of next reboot, closing


Redirections using the uuid are not working

http://data.landportal.info/library/resource/f7125bd2-c5be-4100-b097-4e063c0bb0fa
http://data.landportal.info/news/e56fb7e8-d596-4c56-bf3c-9bd01aeb03c6
previously, they worked using .htaccess (source file in bitbucket private repository- shared by email)

For example:

http://data.landportal.info/library/resource/f7125bd2-c5be-4100-b097-4e063c0bb0fa
redirected to https://landportal.info/node/f7125bd2-c5be-4100-b097-4e063c0bb0fa
later, due to Drupal configuration, redirected (finally) to https://landportal.org/library/resources/luísa-borges-andré-calengo-com-beatriz-galan-antonieta-coelho2011/guião-para

fixed,  please closed the the ticket after your review.

do not try yet, there was an issue related with redirections

Thanks!


Specifying one option in addons/options overrides all

https://github.com/storybooks/storybook/tree/master/addons/options
If I want to just set this
setOptions({ showDownPanel: false })

Then it clears all options without a fallback.

<EMAIL_ADDRESS><EMAIL_ADDRESS>

Resolved after upgrading 🎉


Provide a way to clear DNS cache

Currently there is no way to clear the DNS cache when using Intra.
One can do this with the native Android DNS cache by changing wifi networks or enable/disabling wifi.  Disabling Intra does not clear it's DNS cache.
One can test this with this site:
http://dnscookie.com/

Intra doesn't have its own DNS cache, but it's possible that the Android DNS cache is not clearing as it normally would, because it's associated with the long-lived VPN interface that Intra creates.  You can clear the cache by disabling and re-enabling Intra.
We might be able to approximate Android's cache clearing behavior by re-establishing the VPN after network change events.  (Android theoretically supports atomic re-establishment of the VPN, although when I've tried this previously I've encountered some misbehavior.)

Why not t.func clearcache. Yes?

Intra does not have a cache, and cannot instruct the OS to clear its cache, so there is no action possible here.


Remove usages of window/localstorage

window should not be used
localstorage should be replaced with asyncstorage

@sirpy @L03TJ3 I believe this is completed

confirmed, closing


When express is a dependency in package.json, will it run if user does not have NodeJS installed, or is it self contained?

Sorry that this isn't an issue, just wondering if anyone could give me a quick answer 💯

[ ] I have read the contribution documentation for this project.
[ ] I agree to follow the code of conduct that this project follows, as appropriate.
[ ] I have searched the issue tracker for an issue that matches the one I want to file, without success.

Please describe your issue:

Console output when you run electron-packager with the environment variable DEBUG=electron-packager. Please include the stack trace if one exists.
Put the console output here

What command line arguments are you passing? Alternatively, if you are using the API, what
parameters are you passing to the packager() function?
Put the arguments or parameters here

Please provide either a failing minimal testcase (with a link to the code) or detailed steps to
reproduce your problem. Using electron-quick-start
is a good starting point.

First, you should probably ask whether you actually need to use express. I don't think there are that many use cases where you wouldn't be able to use Node code directly. (Insert caveats about security here.)
If you do decide to use it, you'll need to fork the express process yourself when you run the Electron app. I'm not entirely clear on how to do it personally, but I'm sure if you ask your question in one of the Electron community forums, you'll get an answer.


Change highlighted text color

Highlighted text is not readable now

We can change it to white, and highlight color to brand bloody orange maybe?

@stackingsaunter can you please share the device and browser your screenshot is from? Not seeing this behavior on firefox or chromium-based browsers (brave/chrome)

Arc browsers / macbook pro

@stackingsaunter can you confirm if this issue still persists?

All good now


Initial trivial simulator framework & "smart contract" mock

A new simulator server which can behave as both a transport (via websockets) and have "smart contract" style logic attached to it, including an initial concept of wallet balances (but no mutating of wallet balances or enforcement yet)
A transport implementation that uses the simulator server instead of libp2p (for simulations only! not for production!)
A test which demonstrates that the rest of the Bacalhau infrastructure still basically works when using the simulator transport (centralized communication & smart contract) instead of libp2p

<3 props to @binocarlos for the main part of this 🎉


only support pg？can not for greenplum？

Make sure to check documentation https://clickhouse.com/docs/en/ first. If the question is concise and probably has a short answer, asking it in community Slack is probably the fastest way to find the answer. For more complicated questions, consider asking them on StackOverflow with "clickhouse" tag https://stackoverflow.com/questions/tagged/clickhouse

If you still prefer GitHub issues, remove all this text and ask your question here.

AFAIK, pg client can be used to connect greenplum. So, greenplum should be ok

{
"name": "ChdbError",
"message": "Code: 36. DB::Exception: Error: ERROR:  column "attgenerated" does not exist
LINE 1: ... atttypid as type_id, atttypmod as type_modifier, attgenerat...
^
(in query: SELECT attname AS name, format_type(atttypid, atttypmod) AS type, attnotnull AS not_null, attndims AS dims, atttypid as type_id, atttypmod as type_modifier, attgenerated as generated FROM pg_attribute WHERE attrelid = (SELECT oid FROM pg_class WHERE relname = 'dim_org_integration' AND relnamespace = (SELECT oid FROM pg_namespace WHERE nspname = 'tenant_fastfish_dm')) AND NOT attisdropped AND attnum > 0 ORDER BY attnum ASC). (BAD_ARGUMENTS)",
"stack": "---------------------------------------------------------------------------
ChdbError                                 Traceback (most recent call last)
File /Users/mac/Library/Mobile Documents/com~apple~CloudDocs/code/python/my_chdb.py:12
1 #%%
2 sql="""create table tmp_operating_unit
3 ENGINE = MergeTree()
4 --PRIMARY KEY (brand_code)
(...)
10 group by a.operating_unit_sk,b.brand_code
11 ;"""
---> 12 exesql(sql)
File /Users/mac/Library/Mobile Documents/com~apple~CloudDocs/code/python/my_chdb.py:4
2 def exesql(sql):
3     print(sql)
----> 4     sess.query(sql)
File /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/chdb/session/state.py:47, in Session.query(self, sql, fmt, udf_path)
43 def query(self, sql, fmt="CSV", udf_path=""):
44     """
45     Execute a query.
46     """
---> 47     return query(sql, fmt, path=self._path, udf_path=udf_path)
File /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/chdb/__init__.py:78, in query(sql, output_format, path, udf_path)
     76 res = _chdb.query(sql, output_format, path=path, udf_path=g_udf_path)
     77 if res.has_error():
---> 78     raise ChdbError(res.error_message())
     79 return result_func(res)

ChdbError: Code: 36. DB::Exception: Error: ERROR:  column \"attgenerated\" does not exist
LINE 1: ... atttypid as type_id, atttypmod as type_modifier, attgenerat...
                                                             ^
 (in query: SELECT attname AS name, format_type(atttypid, atttypmod) AS type, attnotnull AS not_null, attndims AS dims, atttypid as type_id, atttypmod as type_modifier, attgenerated as generated FROM pg_attribute WHERE attrelid = (SELECT oid FROM pg_class WHERE relname = 'dim_org_integration' AND relnamespace = (SELECT oid FROM pg_namespace WHERE nspname = 'tenant_fastfish_dm')) AND NOT attisdropped AND attnum > 0 ORDER BY attnum ASC). (BAD_ARGUMENTS)"
}

need postgres12+?
but gp6 is pg9.4.


fix: make valid from and valid to not to have default values

Review Checklist

Summary*

[ ] fix: Bug fix for Add the items tackled here as checklists
[x] feat: Completed task
[ ] chore: Incomplete task

[ ] test: Sub-task 1

Structure*

[ ] The Pull Request has a proper title that conforms to our MR title standards
[ ] The Pull Request has one commit, and if there are more than one, they should be squashed
[ ] The commit should have a proper title and a short description
[ ] The commit must be signed off
[ ] Unused imports are not present
[ ] Dead code is not present
[ ] Ensure dry running library to confirm changes

Tests

[ ] Proper and high quality unit, integration and acceptance(if applicable) tests have been written
[ ] The coverage threshold should not be lowered

Sign off*

[ ] All comments have been resolved by the reviewers
[ ] Approved by Czar {replace_with_czar_name}
[ ] Signed off by second reviewer {replace_with_name}
[ ] Ensure all checks are done before merging :warning:
[ ] All PRs needs to be signed before merging :warning:

N/B:

Add a checklist if more than one item is done.
Add screenshots and/or images where necessary
Indicate any breakages caused in the UI :exclamation:
Where necessary, indicate which issue the Pull Request solves (Closes #)
Any new files are updated in the folder structure in the README

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Details

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 84.252%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
321

Relevant Lines:
381

💛  - Coveralls


Create qgan_script.py

created a Python script that accepts command-line arguments for defining the number of qubits and latent dimensions

Closing the work has been moved to #270.


Symbol organiser doesn't work for 1 of my sketch file.

Sketch 51.3
after I run the symbol organiser. It only organised the symbol order in the folder list, but the view of symbol page doesn't change. It happen only to one of my sketch file, other ones works file.

@mokulawa are you using Symbol Organizer with titles by chance? There was an issue when using titles in versions prior to Sketch 52, which I just resolved (v15.6). Could you please update and let me know if it resolves your issue?

@sonburn Hi, I updated and now it works for me :D thank you very much !

Great news! Thank you for using my plugin! I will close this issue now.


Mark items from workqueue as Done()

TL;DR
Item processor queue used to process catalog items and outputs coalescing for arrays has a bug where it doesn't mark items as done when it finishes processing. This leads to the items being processed again and again wasting resources, clogging the queue and flooding external services with unnecessary requests.
Type

[X] Bug Fix
[ ] Feature
[ ] Plugin

Are all requirements met?

[X] Code completed
[ ] Smoke tested
[ ] Unit tests added
[ ] Code documentation added
[ ] Any pending items have an associated Issue

Tracking Issue
https://github.com/lyft/flyte/issues/587

Lets get some unit tests going for this.


.avi not work

very good this player. but not going to .avi?
and another question
how can I do to make zoom? there do not understand the explanation, can say in English?

can u give the video url？thank u.
double click video view will toggle scale type then u will find which you want

http://www.videostudio.co.uk/cinedemo.avi this video sample and more avi videos.

the video codec is dvsd,however the GiraffePlayer base on ijkplayer only support H264

Thanks for the reply.


Use bevy as a dependency rather than bevy_render.

I believe this allows for simpler integrations with other bevy apps.

thank you! i'll push a release shortly


ci: Add attribution to better understand donations

What
ci: Add attribution to better understand where donations are coming from

Codecov Report

Merging #3491 (5979267) into develop (2ffe6f8) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff            @@
##           develop    #3491   +/-   ##
========================================
  Coverage    11.09%   11.09%
========================================
  Files          262      262
  Lines        12830    12830
========================================
  Hits          1424     1424
  Misses       11406    11406

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


fix: solve faker deprecations

Resolves faker deprecation warnings in console when testing according to official docs :

faker.company.companySuffix -> faker.company.name
faker.date.between -> faker.date.between given boundaries
faker.datatype.json -> proprietary implementation based on the current faker.datatype.json implementation
faker.random.alpha -> faker.string.alpha

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

9 of 9 (100.0%)  changed or added relevant lines in 3 files are covered.
2 unchanged lines in 2 files lost coverage.
Overall coverage decreased (-0.02%) to 92.073%

Files with Coverage Reduction
New Missed Lines
%

src/routes/transactions/mappers/common/transaction-info.mapper.ts
1
77.59%

src/validation/patterns.ts
1
50.0%

Totals

Change from base Build<PHONE_NUMBER>:
-0.02%

Covered Lines:
4145

Relevant Lines:
4391

💛  - Coveralls


Clear text input field for passwords

After discussion today with @lbrpdx I've agreed to adjust this to only clear the password when the ENFORCE SECURITY option is enabled.

Thanks!


Update GitHub actions

Changes proposed in this pull request
By the way, would you agree to a mechanism automatically suggesting upgrades of GitHub Actions?
Keeping your actions up to date with Dependabot
I don't expect more than a PR / year.

Documentation that should be reviewed

Yes, please go ahead and add a dependabot config. Actions only. We have our own process for updating Python dependencies.

Discarded my manual changes and added the Dependabot rule.
A PR to upgrade GitHub actions should be created automatically in a few days at most.

LGTM. Thanks!


chore: update dependencies

BREAKING CHANGE: major dependency bumps

@anbraten Can you review? I removed the problematic rule, should be non breaking in practice.


Add a version of transform for built-in icons

Clear and concise description of the problem
In my app, I use Ionic's icon component, which takes an SVG data URI for the icon.
However, the closest this plugin provides is raw SVG strings, which do not work.
Suggested solution
In general, I would like to simply be able to run a transform function on any and all icons, where I could then do whatever I want.
Like the current transform function, but for built-in icons as well.
Alternative
An alternative is to add a compiler option to provide data URIs instead of raw SVG strings.
Something like compiler: 'uri'.
Additional context
No response
Validations

[X] Follow our Code of Conduct
[X] Read the Contributing Guide.
[X] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

+1

这似乎是iconify自身没有提供内部图标的transform函数，能否通过再次包裹一层函数在loadNodeIcon后再去强行转换？


potential race condition

Hi,
I encountered a bug in v0.13.1 (python v3.6.15), where file integrity is broken when using xopen to read from rapidgzip stdout.
input file (test.fastq.gz)
@NB501486:703:HJLNGBGXV:4:23612:12350:20352 1:N:0:CCAACATT+AAGAGAGC
GCGGCGGCGGCAGCCGAGGCCCAAGCGCAGTCGGGGGCTGGGCGGGTGCGGGGGCTGCGGCCGTAGCTACCCCTGGGGACCAGGCAGAGGCAAATGTGGAGAGGGCCCCCGGCCATTTACCGGGGTGGGGGCCCCCGGCTCCTTGCATTG
+
AAAAAEEEEEEEEEEEEEEEEEAEEEEEAEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE<EEEEEEAEEEEEEEEEEEAEE/EEEEEEE<EEE<AA<AAAAAAAEEAEAAEEEEEEEAAAA/AAEEA<<A</EA/E<A

reader.py (using xopen)
from xopen import xopen
with xopen("/dev/stdin") as f:
    data = f.read()
    print(data)

rapidgzip -kcd test.fastq.gz | python3 reader.py results in
6:703:HJLNGBGXV:4:23612:12350:20352 1:N:0:CCAACATT+AAGAGAGC
GCGGCGGCGGCAGCCGAGGCCCAAGCGCAGTCGGGGGCTGGGCGGGTGCGGGGGCTGCGGCCGTAGCTACCCCTGGGGACCAGGCAGAGGCAAATGTGGAGAGGGCCCCCGGCCATTTACCGGGGTGGGGGCCCCCGGCTCCTTGCATTG
+
AAAAAEEEEEEEEEEEEEEEEEAEEEEEAEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE<EEEEEEAEEEEEEEEEEEAEE/EEEEEEE<EEE<AA<AAAAAAAEEAEAAEEEEEEEAAAA/AAEEA<<A</EA/E<A

Since xopen is for example used by cutadapt, this tool terminates with an error
cutadapt --quiet <(rapidgzip -kcd test.fastq.gz)
cutadapt: error: Could not determine whether file <_io.BufferedReader name='/dev/fd/63'> is FASTA or FASTQ. The file extension was not available or not recognized and the first character in the file is unexpected.

A similar error occurs randomly when using jellyfish
jellyfish bc -m 23 -s 100000000 -o /dev/null <(rapidgzip -kcd test.fastq.gz)
terminate called after throwing an instance of 'std::runtime_error'
  what():  Unsupported format
Aborted (core dumped)

A workaround would be for now to use cat or a process group with a sleep
rapidgzip -kcd test.fastq.gz | cat | python3 reader.py
cutadapt --quiet <(rapidgzip -kcd test.fastq.gz | cat)

I did not observe this issue in v0.12.0, though having a similar issue when exporting the index from stdin
rapidgzip -kcd test.fastq.gz | gzip -kc | rapidgzip -f --export-index test.fastq.idx
Either stdin must have input, e.g., by piping to it, or an input file must be specified!

Urgh, this is bad. The 0.12.0 issue is different. That was simply a problem with detecting input on stdin.
I think the problem is with the vmsplice usage. I think that rapidgzip quits before all of the spliced output has been fully read, which leads to that memory being reused or repaged, or I don't know :/. I can reproduce the issue with your test file and can fix it by adding a sleep inside rapidgzip before it quits. And I can then reproduce the issue again if I add a larger sleep before the output is read like this: m rapidgzip && src/tools/rapidgzip -kcd issue-39.fastq.gz | ( sleep 2s; cat ) | python3 issue-39-reader.py.
If you are installing rapidgzip from source, then you can comment out the #define HAVE_VMSPLICE inside FileUtils.hpp to fix the issue. I think it is random chance that 0.12.0 works, but I guess I could try a bisection to be sure. I don't think there is a way to query whether the splice output has been read. I guess I'll have to disable vmsplice again because it just is impossibly hard to use :(. Or, I'll need to refactor it work with a custom allocator based on mmap, so that I can be sure that the allocated memory is not reused even on program end.

I have pushed a fix that simply disables vmsplice. You can try it out with:
python3 -m pip install --force-reinstall 'git+https://github.com/mxmlnkn/indexed_bzip2.git@master#egginfo=rapidgzip&subdirectory=python/rapidgzip'

If it works for you, I'll release it as soon as possible and probably yank the old 0.13.1 release just to be sure.

mh.. By curiosity I compiled without commenting out the vmsplice section and currently I am unable to reproduce the issue. Now I am unsure if this this problem lies somewhere in the cython wrapper instead or if I mixed something up.

Did you try the call with the sleep? rapidgzip -kcd test.fastq.gz | ( sleep 1s; python3 reader.py ). With this, I can reproduce it very reliably. And, I'm also testing with the pure C++ version, so Cython shouldn't be an issue, but it might change the timing slightly.
Note that the fix will reduce performance until I get around to reimplement vmsplice cleanly with a custom mmap allocator, that should work then.
The windows wheels for rapidgzip 0.13.2 have already finished building and are uploaded already. The other wheels should have finished building in ~15 min.

Yes, I tried it that way, but might be a timing/caching thing as suggested. Looking forward to your re-implementation. Good luck with that!

@mxmlnkn  is 0.13.0 affected by this bug?

@mxmlnkn is 0.13.0 affected by this bug?

Yes, and many even older versions. Note that this only affects Linux systems because only those have vmsplice.

@mxmlnkn is the bug only when another command is chained/piped after rapidgzip?

@mxmlnkn is the bug only when another command is chained/piped after rapidgzip?

Yes, that's correct.


Is there a way to dynamically load css with slate?

Not sure if this is a question that should be posed to the starter theme repo but here goes.
I'm looking for a way to load CSS that corresponds to a particular section only when necessary.
I split my scss files by section. For example if I have a homepage-carousel.liquid section, I also have a /src/styles/sections/homepage-carousel.scss file that corresponds to it. Right now to load the CSS for that I either have to include it globally in the theme.scss file, or via the index.js file. Both not ideal because homepage-carousel.liquid may actually never be used; it's an option that not required. In both cases I'd be loading unneeded CSS.
So I wanted to know if anyone (or if slate has a method) knows of a way to load CSS via the section file. As in, if the client / store owner decides to use homepage-carousel.liquid then pull in the SCSS/CSS file for it. Otherwise, don't.

You could probably use a dynamic import in JS if I understand you correctly (apologies if I misunderstood).
If a condition is met (a particular section exists on the page) then use a dynamic import to grab that CSS.
Seems a little overkill IMO but up to you. In a current project I'm working on I'm loading JS/CSS on a per page basis, which is functionality that is built into slate, so that in itself might be enough to reduce your bundle sizes. https://shopify.github.io/slate/docs/template-and-layout-bundles

You could write your styles directly into the section using a {% stylesheet 'scss' %} tag. This has a few drawbacks like not being connected to any variables you may be using in your main stylesheet, however you could utilize CSS Variables to get around that.
This may feel a bit janky, but it's technically component based development. You're scoping your styles and logic to that section and making updates easier in the future. If you're using a Utility CSS approach this could also be a great method since you would only be adding light customizations to the section file, the majority of styling would be done with existing classes.


await GoogleOneTapSignIn.signIn() returns true instead of the user

return new Promise(async (resolve, reject) => {
    try {
      await GoogleOneTapSignIn.hasPlayServices();
      const userInfo = await GoogleOneTapSignIn.signIn();
      resolve(userInfo);
    } catch (error: any) {
      reject(error.code);
    }
  });

This returns {user: true}

Probably because i forgot GoogleOneTapSignIn.configure(); but i can't test it because the configure function can't be run.
TypeError: null is not an object (evaluating 'RNGoogleOneTapSignIn.configure')

This package is meant only for Android only. If you are using it on iOS, we suggest avoiding calling its methods.


Fixups to allow compilation of cl-ppcre

add :test parameter to subst
allow for declare as first line of defgeneric, as is allowed by http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/mac_defgeneric.html

Already fixed.


Week 7 Review Ticket Nathan Manangan

Score _/4.5 (Graded by Ritvik K.)
Github Page Link - Notes
AP Test + Corrections
AP Test 1 (45/50) - Corrections
AP Test 2 (46/50) - Corrections
AP Test 3 (45/50) - Corrections
Week Plan
Week Plan - AP Plan
Monday: Create Task review day, finalize create task after goign over again and submit fully.
Tuesday: Crossover grading, prepare by possibly doing some of the optional MCQ quizzes and over notes.
Wednesday: Proctored AP Exam Day 4
Thursday: Correct test 4, then complete/finish the optional MCQ quizzes if not already, then go over missed questions on day 4.
Friday: Crossover grading, plan to review all units over the weekened for preparation for AP Exam.

Graded By: Ritvik Keerthi
Has all AP Test Quizzes and Corrections are linked for all
Study Plan is clearly organized
Individual page link is clearly set in place
Good participation in improv ASI
4.5/4.5


Advises kernel to use random access for disk bucket mmaps

Problem
The accounts index has an in-mem and an on-disk component. The on-disk component uses disk buckets, which is modeled after a hash map. It shares similarities that when doing lookups, the key and value may be in an arbitrary location within the map. Since the accesses are effectively random, we can let the kernel know too, so that it doesn't waste cycles prefetching data we don't end up using.
Summary of Changes
Advise kernel to use random access for disk bucket mmaps.
Testing Results
I ran two nodes to do A/B testing of this PR vs master. I started both with this PR and ran them for many hours. I restarted both with master and repeated. Finally I restarted again with this PR, in case startup from fastboot vs snapshot impacted anything.
I observed effectively identical behavior with this PR vs master on the following metrics:

disk iops
replay load time
flush/clean/shrink time

@alessandrod any thoughts on this? We use mmaps in a few places.

@alessandrod any thoughts on this? We use mmaps in a few places.

Yeah this makes sense to me! I remember profiling this a few months ago and didn't make a huge difference, but conceptually unless we have a lot of collisions (which we shouldn't, else we need to change something), it doesn't make sense to have readahead on.


Add support for JSON Lines / NDJSON

JSON Lines and NDJSON are file formats which have become common in many scenarios. The format is very similar to JSON: it's a sequence of multiple JSON content, each JSON object one per line.
Semantically, a JSON Lines / NDJSON file is an ARRAY of JSON.
Input in JSON Lines (.jsonl) or NDJSON (.ndjson) should render as hierarchical, collapsible, color-coded display.
The differences between JSON Lines or NDJSON versus JSON are trivial: other than the constraints on newlines and an initial '[' and ']' for an outer array container, they are effectively the same.

I must have missed #277. I'll close this issue, since it's a dupe.


Add a smooth transition for the nav links

Add a smooth transition for the nav links
Preview link :- https://yoshitharathnayake.github.io/Pakistan-Tourism-Website

thanks for this one u are amazing

thanks for this one u are amazing

@AlizayAyesha you welcome!


Start LinkLiar on system startup

I know I can do it myself but it would be nice if application can handle it for me.
Great app BTW :+1:

Ah, the way of the Internet, you fix one thing, people want more things ;)
You can thank this guy because he provided dead-simple code for this I just could copy and paste :)

Thanks, that was really fast :)

BTW, I can't find this option in the menu. maybe we should reopen this issue

Hm, first open "Help" to make sure you're on version 1.1.1.
Then, while the menu is open press the ⌥ key to see the menu item.

TNX, didn't know about the option key

Ok, I'll close it until the next one doesn't find it, then I'll have to rethink my GUI design ;)


Display user username

How i can display a user username in a query message to a channel like this
username of sender : user_username

You're searching to print an user's nickname?
if yes:
username = ['from']['username']
bot.sendMessage(chat_id,"@"+username)

it works on_callback parameters?


Add privacy and cookies link to documentation website

Why are these changes needed?
Add privacy and cookies link to documentation website, to provide information on the associated privacy policy.

Related issue number

Checks

[ ] I've included any doc changes needed for https://microsoft.github.io/autogen/. See https://microsoft.github.io/autogen/docs/Contribute#documentation to build and test documentation locally.
[ ] I've added tests (if relevant) corresponding to the changes introduced in this PR.
[ ] I've made sure all auto checks have passed.

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

Comparison is base (3a768c3) 26.63% compared to head (7292a45) 26.44%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #966      +/-   ##
==========================================
- Coverage   26.63%   26.44%   -0.19%
==========================================
  Files          28       28
  Lines        3777     3777
  Branches      858      858
==========================================
- Hits         1006      999       -7
- Misses       2700     2706       +6
- Partials       71       72       +1

Flag
Coverage Δ

unittests
26.44% <ø> (-0.14%)
:arrow_down:

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

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


.Net Anthropic connector progress (Claude 3)

Progress of implementation of Anthropic Claude 3 family connector.
Current implementation BRANCH
TODO

ChatCompletionService

[x] Get chat

[x] Create examples

[x] Stream chat

[x] Create examples

[x] Add DI extensions
[x] Provide metadata from response
[x] Pass images with prompt

Others

[x] Logging
[x] Telemetry

Bump

Any update on this? @RogerBarreto

@Pekket I hold with developing connector until function calling abstraction will be ready. But probably fca won't be ready fast, so yesterday we decided with @RogerBarreto to deploy connector now without fc functionality. I am working currently on connector code.

@Krzysztof318 Thanks for the work, looks good 🦸
Any idea when the stream chat will be implemented?

@Pekket soon but before we merge claude to main brach I think it will take couple of weeks.

@Krzysztof318 We’re so excited for it.

Hear hear! Claude support please!

There is any update?

Sorry, I have much work last time, but I started working on streaming. I hope I will publish PR this week.

I wanted to check in and see if there are any updates on the current development status. Specifically, I would like to know if there is an estimated date when the ongoing work will be merged into the master branch.
Thank you for your time and support.
Mik

@payoff I hope soon, currently I am waiting for review latest PR.

@payoff I hope soon, currently I am waiting for review latest PR.

Looks like 2 unit tests are failing?

Any plans to support prompt caching at some point?
https://docs.anthropic.com/en/docs/build-with-claude/prompt-caching

Is this up to date? Does the lack of function calling mean we can't use the new computer tool?

Hi guys, I'm having a hard time finding a way to connect to Anthropic. It's something that's actually implemented in the latest versions of SemanticKernel. I'm currently working with version 1.72, which is the most stable, using KernelFactory. I don't really know why higher versions don't work with KernelFactory, and with Anthropic I have a connection error. It's something that's being tested.
Thank you all very much.

@nonoc Funny you ask, I started implementing computer use tool off where this work was stopped, have prototype here: https://github.com/BorgGames/semantic-kernel/tree/AnthropicTools
Beta package is here: https://www.nuget.org/packages/Lost.SemanticKernel.Connectors.Anthropic/1.22.0-alpha0
Usage
var chatHistory = new ChatHistory();
chatHistory.AddUserMessage("Open Notepad and type Hi!");

var sut = new AnthropicChatCompletionService(this.AnthropicGetModel(), this.AnthropicGetApiKey(), new(beta: ComputerUse_2024_10_22.Beta));

var kernel = new Kernel();
kernel.Plugins.Add(ComputerUse_2024_10_22.ComputerPlugin(NoOpComputer.Instance));

// Act
var response = await sut.GetChatMessageContentsAsync(chatHistory, kernel: kernel);

// Assert
var lastMessage = response[^1];
var metadata = lastMessage.Metadata as AnthropicMetadata;
Assert.NotNull(metadata);
this.Output.WriteLine($"FinishReason: {metadata.FinishReason}");
Assert.Equal(AnthropicFinishReason.ToolUse, metadata.FinishReason);

var supposedlyScreenshotCall = lastMessage.Items
    .OfType<FunctionCallContent>()
    .FirstOrDefault();
Assert.NotNull(supposedlyScreenshotCall);
Assert.Equal("computer", supposedlyScreenshotCall.FunctionName);
if (supposedlyScreenshotCall.Arguments?["action"] is not JsonElement action)
{
    Assert.Fail("action is not supplied or wrong type");
    return;
}
Assert.Equal("screenshot", action.Deserialize<string>());

Any updates? really looking formward to use anthropic in my projects..

Just updated the alpha to the latest official release 1.25.0, and enabled an option to auto execute tools.
https://www.nuget.org/packages/Lost.SemanticKernel.Connectors.Anthropic/1.25.0-alpha2#readme-body-tab

@lostmsu hi, nice to see you are working also on this connector. But instead of creating own repo could you contribute to anthropic branch and create PR in SK?

@Krzysztof318 sure, I didn't notice the branch until recently.

@Krzysztof318 have you tested on Google vertex? For me earlier I was having issues unless I made changes, which I commented on your PR.

Why we need to use .NET Standard 2.0 to use it?

@glanik it will, PR is waiting for final review. AI.extensions is designed to integration with existing .net sdk of model providers. But anthropic doesn't have .net sdk.

I noticed that the related PR (https://github.com/microsoft/semantic-kernel/pull/7364) to introduce Anthropic support for C# was recently closed. Could you clarify what this means for the expected timeline for supporting Anthropic models in C# independently of Bedrock?


remove default channel

we had an issue on Slack when we made the dev channel public the bot stopped working
after some exploring we discovered that specifying the channel in the payload (which the bot always did) only worked for private channels. and so we need to remove the default and only add channel to the payload in cases where it's explicitly used as input.

closed by #73


feat: add app config

I have a requirement to set app config which will change with each deploy (i need to set my app version based on the release tag).

I don't really want to overcomplicate this because folks will complain about newlines, base64 support, or even other dokku commands.
Can you tell me a bit more about your specific use case, and maybe why the GIT_REV isn't useful enough?

I don't really want to overcomplicate this because folks will complain about newlines, base64 support, or even other dokku commands.
Can you tell me a bit more about your specific use case, and maybe why the GIT_REV isn't useful enough?

I had similar concerns tbh.
My use case is I collect app metrics and I need an app version that is "human readable". I set my app version using my release tag (eg 0.0.1, 0.0.2 etc) allowing me to analyse the metrics easier. Using the git sha would also not work with the hacky approach outlined in https://github.com/dokku/github-action/pull/5

I had similar concerns tbh.
My use case is I collect app metrics and I need an app version that is "human readable". I set my app version using my release tag (eg 0.0.1, 0.0.2 etc) allowing me to analyse the metrics easier. Using the git sha would also not work with the hacky approach outlined in https://github.com/dokku/github-action/pull/5

Another possible approach would be opening up the ssh command in the GitHub to allow us to run arbitrary dokku commands

Another possible approach would be opening up the ssh command in the GitHub to allow us to run arbitrary dokku commands

I could potentially work around this as part of the docker build phase. I can save the version to disk and read that at runtime.

I could potentially work around this as part of the docker build phase. I can save the version to disk and read that at runtime.

Yeah I think if you're pushing an image, thats probably the way to go in your case. I think the use case is reasonable, but my concern is that this opens up the image to structured ways of performing any arbitrary command, which is something I'd like to avoid for my own sanity.

Yeah I think if you're pushing an image, thats probably the way to go in your case. I think the use case is reasonable, but my concern is that this opens up the image to structured ways of performing any arbitrary command, which is something I'd like to avoid for my own sanity.

Understood, and agree 👍  I'll close the PR's. Thanks.

Understood, and agree 👍  I'll close the PR's. Thanks.


Added content, example

Clarified some details

[x] I have read freeCodeCamp's contribution guidelines.
[x] My pull request has a descriptive title (not a vague title like Update index.md)
[x] My pull request targets the master branch of freeCodeCamp.
[x] None of my changes are plagiarized from another source without proper attribution.
[x] My article does not contain shortened URLs or affiliate links.

If your pull request closes a GitHub issue, replace the XXXXX below with the issue number.
Closes #XXXXX

Closed and Reopened this PR to attempt to resolve a specific Travis build failure.

@BTmathic Thank you for your contribution to the page! 👍
We're happy to accept these changes, and look forward to future contributions. 📝


Restoring cache of the wrong arch

Hello. I have a [workflow that builds a nightly flatpak for my app] on every commit.
The workflow has two architectures: x86 and arm. Because the ARM build is emulated, its builds always finish last.
This means that my x86 builds always try to restore the cache from the ARM build (because it always finishes last), which does not work. Here is an action you can check to see the behaviour: https://github.com/vixalien/muzika/actions/runs/7039137348/job/19157539977
I attached the logs:
Run flatpak/flatpak-github-actions/flatpak-builder@v6
  with:
    bundle: com.vixalien.muzika.nightly.flatpak
    repository-name: gnome-nightly
    repository-url: https://nightly.gnome.org/gnome-nightly.flatpakrepo
    manifest-path: build-aux/flatpak/com.vixalien.muzika.Devel.json
    cache-key: flatpak-builder-032b880e6a5da2f4ddd501c95ca21e7b67cfa6d0-nightly
    arch: x86_64
    build-bundle: true
    run-tests: false
    cache: true
    restore-cache: true
    branch: master
    verbose: false
/usr/bin/docker exec  744742b8f89f6cfb80b41c294758f7342026a0d2ab0d8157fb9fac595f12ff11 sh -c "cat /etc/*release | grep ^ID"
/usr/bin/flatpak remote-add --if-not-exists gnome-nightly https://nightly.gnome.org/gnome-nightly.flatpakrepo
Received 130023424 of 258351338 (50.3%), 124.0 MBs/sec
Cache Size: ~246 MB (258351338 B)
/usr/bin/tar -xf /__w/_temp/3f12f78c-a217-47e3-86b8-5cfbb035cc09/cache.tzst -P -C /__w/muzika/muzika --use-compress-program unzstd
Received 258351338 of 258351338 (100.0%), 123.1 MBs/sec
Cache restored successfully
Restored cache with key: flatpak-builder-18deaf17f52a7ff697fc9539917e90cb9d253847-nightly-aarch64
__________________________________________________________________________________________^

Building the flatpak..

Notice that the restored cache has a -aarch64 suffix, even though we are making an x86 build.
It seems that currently, the logic of the action is to restore the latest cache, and does not check that the requested cache was made for certain architecture or not.

It seems to be fixed, or was never an issue. Sorry.


[CHUNKER] I'm looking forward to converting entities and inventory.

I converted my world from Java to Bedrock, at first it didn’t work out for me, because... the world weighed more than 1GB, but by removing unnecessary chunks I reduced the size and did the conversion. However, all my residents with the trade items I needed were gone, as well as all other entities. I look forward to further development of Chuker,
and the possibility of transferring worlds between the computer version of java to the bedrock version on both PCs and phones (I know this is already possible through iTunes and Explorer).

Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

ID: 9f2fb27f-0ce1-9541-e617-7fe8148f8297
Version Independent ID: 6777fa19-93ad-1984-5fd8-a9adc3dc3a3a
Content: Chunker - Overview
Content Source: creator/Documents/ChunkerOverview.md
Service: minecraft-bedrock-edition
GitHub Login: @neonerz

Microsoft Alias: mikeam

Thank you for your feedback, I'll pass it on to our team :)


entering "(, +, *"  causing an error

when writing any of the characters "(, +, *" in a formik input cases a crash. This is related to the preventWordCutting where when I turned it off I didn't have the issue anymore.

Thanks for the great library.

Hi @Ilaiwi , thanks for reporting the issue.
1.5.2 should fix that.
https://github.com/OoDeLally/formik-undo/commit/163b8fb7ee4414ba4af6162217a580f5baa59541


Client generated offer id

Not sure if it belongs here or in stellar-core repo.
Is it possible to return offer id from Manage offer operation? If not, is it possible to allow client generated uuid as offer id?
It's currently quite hard to trade using horizon endpoints.

An offer Id is returned from Manage Offer. It is in the result_xdr string.
Try making a manage offer operation in stellar lab and review the result_xdr string.

@s-a-y Could you please provide better details as to what specifically you're trying to achieve and why the current API makes that hard.  I need to understand your problem better to figure a solution.

@poliha thanks, I'm stupid, I haven't actually checked result_xdr.
That solves it for me for now.
@nullstyle I'm not there yet, but I thought client generated ids might be useful in case you have many users trading, then submitting their transactions will go through the queue and channels and then you don't need to build feedback loop to communicate back offer id, because client already knows it

I'm going to close this for now until we have a better specified use case to work against