issue commentmatryer/bitbar
Provide a way for plugins to know if they're being run for the first time
In my specific case, I'm creating a plugin that's part of a multi-script bundle of code to manage corporate network VPN connections. The BitBar plugin's purpose is to show the current up/down state of the VPN, provide statistics about the connection in grey items in the menu (connection duration, how long until you get automatically cut off, etc), and Connect/Disconnect options.
The "First time ever" scenario would be useful because I could use that to automatically install all the scripts, binaries, packages, and LaunchAgent plist files needed to support things. That would let the BitBar plugin basically handle it all, instead of needing a custom installer like I have now that installs the BitBar plugin, creates the directory the binaries go into, downloads needed packages, etc.
Having a "First time for this version of the plugin" event/notification/signal would let me check to see if the tools are up to date, but only if necessary, saving some time during startup. It would also let me do things like update the format of configuration data as needed, and that kind of thing, if necessary (there's no need for it as things stand but I could see it in the future).
Both of those would also let me do things like handle any needed LaunchAgent setup that needs doing.
Having a "First time since BitBar started up" would let me do things like launch needed background tasks, and that kind of thing. I don't have to launch them on subsequent runs of my script, since those tasks are already running after the first pass.
Yeah, there are ways around some these, either by simulating these events using things like a marker file that I can create/delete to indicate first-run scenarios, but that can be pretty fragile. Having a proper mechanism to make my script aware of which scenario is the case would be very useful.
I can think of many other ways they would be handy, but you asked for my specific case. :)
comment created time in 14 minutes
issue openedsidneys/pb-for-desktop
<!--- ⬆️ Add your issue title in the "Title" field above ⬆️ -->
🤷🏽♂️ Current Behaviour
<!---
Bug Reports: Describe what currently happens.
Feature Suggestions: Describe how a feature currently works (if it exists).
-->
I usually notice a high CPU usage:

🎯 Expected Behaviour
<!--- Bug Reports: Describe what should have happened. Feature Suggestions: Describe how a feature should work. --> Normal CPU usage
👟 Steps to Reproduce (S2R)
<!---
(Bug Reports only) Provide a simple set of steps for reproducing the issue.
-->
I suspect it has started when I rebooted and started getting this kind of notification:

🏡 Environmental Context
<!--- (Bug Reports only) Provide details about where the issue occurred. --> App Version 11.0.2 Installation Type Setup Operating System MacOS Catalina 10.15.7
created time in 28 minutes
issue commentmawww/kakoune
`gf` support for environment variables
@Kratacoa I'm using a custom function for this purpose for a quite a long time: search-file. It is basically an emulation of Vim's behavior of gf, which is capable of smart recursive search under several paths. Paired with another function - smart-select-file and mapped to gf like this I have never used inbuilt gf feature of Kakoune. See if this works for you?
comment created time in an hour
issue commentCeltoys/Remotery
Access violation calling Thread32Next when lots of threads present
The above isn't the only error which can occur on the run, some of which seem pretty odd so I suspect some form of corrupt state.
Sometimes the line 5562 in Remotery.c:
rmtU32 nb_thread_profilers = LoadAcquire(&thread_profilers->nbThreadProfilers);
returns 1, and so triggering assert(table_size_log2 >= 2); in GaloisLFSRMask.
The assert on line 4665 assert(sample != NULL); in FlattenSamples also triggers on some runs.
There are lots of other weird errors which occur. I've tried running with _NO_DEBUG_HEAP off (i.e. not set to 1 so full debug heap), but this doesn't help narrow things down.
I have to do other work now, and I don't sufficiently understand the code to know where to add extra debugging to narrow things down. If you have any suggestions of what to look at I can have a go debugging tomorrow.
In case this is my own code causing a problem, I'd be happy to run your test code which runs lots of threads doing work. I have confirmed that removing the remotery calls results in a working example.
comment created time in an hour
issue commentnlohmann/json
unused-parameter on OSX when Diagnostics is off
Same as #2646 @nlohmann This should be a simple fix.
comment created time in an hour
pull request commentAnthonyCalandra/modern-cpp-features
Merge pull request #1 from AnthonyCalandra/master
See this link on how to sync an upstream repo: https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/syncing-a-fork
comment created time in an hour
PR closed AnthonyCalandra/modern-cpp-features
Syncing repos
pr closed time in an hour
PR opened AnthonyCalandra/modern-cpp-features
Syncing repos
pr created time in an hour
issue commentonqtam/doctest
How to call individual tests and how to pass runtime data to test?
Normally graphics API supports glFlush command analog that allows to wait for all GPU commands to be executed. So you can do something straightforward like:
TEST_CASE("TestRenderer")
{
MyRenderer r;
while( !r.done() )
{
r.drawFrame();
r.flush();
CHECK(/*something*/);
}
}
Anyway, passing runtime data and executing specific tests in a specific order with some user code between, sounds like the wrong way to do things. Maybe it's better to write your own testing loop and use doctest just as an assertion library.
comment created time in an hour
issue commentCeltoys/Remotery
Access violation calling Thread32Next when lots of threads present
If I add a return at Remotery.c#L5221 so the GatherThreads no longer makes does anything, then I get an assert at: Remotery.c#L5973 after a while - but much later than the initial issue showed in the call to Thread32Next.
Surrounding data:
| Name | Value | Type |
|---|---|---|
| ◢ | message | 0x000002dc20923e70 {id=MsgID_SampleTree (0x00000003) payload_size=0x00000020 threadProfiler=0x000002dc20326ec8 {...} ...} |
| id | MsgID_SampleTree (0x00000003) | MessageID |
| payload_size | 0x00000020 | unsigned int |
| ◢ threadProfiler | 0x000002dc20326ec8 {registerBackup0=0x000000195367881c registerBackup1=0x00000000d33ff9c0 nbSamplesWithoutCallback=...} | ThreadProfiler * |
| registerBackup0 | 0x000000195367881c | unsigned __int64 |
| registerBackup1 | 0x00000000d33ff9c0 | unsigned __int64 |
| nbSamplesWithoutCallback | 0x00038bda | int |
| processorIndex | 0xffffffff | unsigned int |
| lastProcessorIndex | 0xffffffff | unsigned int |
| threadId | 0x00002c20 | unsigned int |
| threadHandle | 0x00000000000001a8 | void * |
| ▶ threadName | 0x000002dc20326ef0 "enkiTS_12" | char[0x00000040] |
| threadNameHash | 0x05d3205b | unsigned int |
| ▶ sampleTrees | 0x000002dc20326f38 {0x000002dc203be850 {allocator=0x000002dc203c0170 {object_size=0x00000070 constructor=...} ...}, ...} | SampleTree *[0x00000005] |
| ◢ payload | 0x000002dc20923e80 "" | unsigned char[0x00000001] |
| [0x00000000] | 0x00 '\0' | unsigned char |
| Name | Value | Type |
|---|---|---|
| ◢ | rmt | 0x000002dc20316a40 {server=0x000002dc2030d260 {listen_socket=0x000002dc20315a50 {tcp_socket=0x000002dc203177f0 {...} ...} ...} ...} |
| ▶ server | 0x000002dc2030d260 {listen_socket=0x000002dc20315a50 {tcp_socket=0x000002dc203177f0 {socket=0x00000000000000c4 } ...} ...} | Server * |
| ▶ timer | {counter_start={0x000000ec0a6d364e} counter_scale=0.10000000000000001 } | usTimer |
| ▶ mq_to_rmt_thread | 0x000002dc20315bd0 {size=0x00100000 data=0x000002dc20315cf0 {size=0x00100000 ptr=0x000002dc208b0000 "" ...} ...} | rmtMessageQueue * |
| ▶ thread | 0x000002dc20315750 {handle=0x00000000000000d4 callback=0x00007ff62a785640 {enkiTSRemoteryExample.exe!Remotery_ThreadMain(Thread_t *)} ...} | Thread_t * |
| ▶ string_table | 0x000002dc20316c10 {text=0x000002dc203157b0 {alloc_granularity=0x00002000 bytes_allocated=0x00002000 ...} ...} | StringTable * |
| ▶ logfile | 0x0000000000000000 <NULL> | _iobuf * |
| map_message_queue_fn | 0x0000000000000000 | void(*)(Remotery *, Message *) |
| map_message_queue_data | 0x0000000000000000 | void * |
| ◢ threadProfilers | 0x000002dc20326490 {timer=0x000002dc20316a48 {counter_start={0x000000ec0a6d364e} counter_scale=0.10000000000000001 } ...} | ThreadProfilers * |
| ▶ timer | 0x000002dc20316a48 {counter_start={0x000000ec0a6d364e} counter_scale=0.10000000000000001 } | usTimer * |
| ▶ mqToRmtThread | 0x000002dc20315bd0 {size=0x00100000 data=0x000002dc20315cf0 {size=0x00100000 ptr=0x000002dc208b0000 "" ...} ...} | rmtMessageQueue * |
| compiledSampleFn | 0x000002dc20290000 | void * |
| threadProfilerTlsHandle | 0x00000005 | unsigned int |
| ▶ threadProfilers | 0x000002dc203264b0 {{registerBackup0=0x00000000cccccccc registerBackup1=0x00000000d26ffdb0 nbSamplesWithoutCallback=...}, ...} | ThreadProfiler[0x00000100] |
| nbThreadProfilers | 0x00000024 | unsigned int |
| maxNbThreadProfilers | 0x00000100 | unsigned int |
| ▶ threadProfilerMutex | {DebugInfo=ntdll.dll!0x00007ffa84999f60 {Type=0x0000 CreatorBackTraceIndex=0x0000 CriticalSection=0x000002dc2032fcb8 {...} ...} ...} | _RTL_CRITICAL_SECTION |
| ▶ threadSampleThread | 0x000002dc203156f0 {handle=0x00000000000000d0 callback=0x00007ff62a783090 {enkiTSRemoteryExample.exe!SampleThreadsLoop(Thread_t *)} ...} | Thread_t * |
| ▶ threadGatherThread | 0x000002dc20315ff0 {handle=0x00000000000000e4 callback=0x00007ff62a783d60 {enkiTSRemoteryExample.exe!GatherThreadsLoop(Thread_t *)} ...} | Thread_t * |
I did not have a web browser connected at the time.
comment created time in 2 hours
Pull request review commentmawww/kakoune
+# http://fennel-lang.org+# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾++# Detection+# ‾‾‾‾‾‾‾‾‾++hook global BufCreate .*[.]fnl %{+ set-option buffer filetype fennel+}++# Initialization+# ‾‾‾‾‾‾‾‾‾‾‾‾‾‾+hook global WinSetOption filetype=fennel %{+ require-module fennel+ fennel-configure-window+}++hook -group fennel-highlight global WinSetOption filetype=fennel %{+ add-highlighter window/fennel ref fennel+ hook -once -always window WinSetOption filetype=.* %{ remove-highlighter window/fennel }+}++hook -group fennel-insert global BufNewFile .*[.]fnl %{+ require-module fennel+}
@mawww, should be fine now
comment created time in 2 hours
Pull request review commentemilk/loguru
Use size_t type for get_thread_name length
Website: www.ilikebigbits.com #pragma GCC system_header #endif +#include <stddef.h> // For standard definitions i.e. size_t type definition
Duly noted. I have instead casted the length parameter when used in the snprintf calls.
comment created time in 2 hours
push eventscylladb/seastar
commit sha 564ee58f2a6a2c993e4ee701a9d4a3dc217a8ad6
io_tester: Put results printing code into a helper fn Not to pollute main() with yaml stuff in the future. Signed-off-by: Pavel Emelyanov <[email protected]>
commit sha b15523319a47ff2cbff710372c723759634b4e89
io_tester: Move class::name to public This method will be called from outside. Signed-off-by: Pavel Emelyanov <[email protected]>
commit sha 0d464fe943e7ad99161ebd1f2291c17911c76ae1
io_tester: Print results in YAML format The template is like - shard: $shard_id $class_name: throughput: $value IOPS: $value latencies: average: $value $quantile: $value maximum: $value Signed-off-by: Pavel Emelyanov <[email protected]>
commit sha 90099392f84f74c1a696863f209892e61c29e900
io_tester: Remove unused code The class_data::describe_class() is no longer used Signed-off-by: Pavel Emelyanov <[email protected]>
commit sha ea5e529f300dce1297adc615f5e7d847571a04da
Merge "Teach io_tester to generate YAML output" from Pavel E " Currently io-tester tool generates hard to parse pretty-formatted output, but my wish is to automate (up to some extent) the analysis of its results. tests: io-tester(dev) " * 'br-io-tester-yaml-output' of https://github.com/xemul/seastar: io_tester: Remove unused code io_tester: Print results in YAML format io_tester: Move class::name to public io_tester: Put results printing code into a helper fn
push time in 3 hours
issue commentscylladb/seastar
RPC framework: sending `sink` inside structures (specifically, `optional`)
(call back to the client after it connects)
That's interesting, but meh. IMO too complicated, I'd rather create the throw-away stream: the operation is not so common anyway, so the additional wasted connection doesn't make a difference; also the version mismatch is actually an exceptional situation.
or make version check as part of data that goes through the stream
This could be done by having something like
rpc::sink<std::variant<version, large_struct_fragment>>
Then sending first the version, then large struct fragments. But that's ugly :( We know during compile time that version comes only once, then everything else is fragments. But because of the APIs we need to dispatch on the variant on each received element.
Anyway you cannot make returning sink optional anyway.
:(
comment created time in 3 hours
push eventreal-logic/aeron
commit sha 7a9396e82d31c89fd23051999dc030cb95ab887f
[C++] Adjust progress default timeout for ReplayMerge.
push time in 3 hours
issue commentscylladb/seastar
RPC framework: sending `sink` inside structures (specifically, `optional`)
On Mon, Mar 01, 2021 at 07:37:50AM -0800, Kamil Braun wrote:
The only way I see to resolve this is to have the client contact the server twice:
- once to obtain
need_stream,- the second time to obtain the source (if
need_stream == true).Unfortunately, there's a problem here: between 1 and 2
need_streammay change.
Good point. You can make server create the stream instead (call back to the client after it connects), or make version check as part of data that goes through the stream. Anyway you cannot make returning sink optional anyway. It has to be closed explicitly by the stream initiator.
-- Gleb.
comment created time in 3 hours
issue commentCeltoys/Remotery
Compile failures with latest changeset
This is going to take me a couple days to sort out properly. MS has gone all-in on rearranging headers so that the same set of includes doesn't work with different SDK versions. Right now 2015 can't find
<timeapi.h>
Let me know if you have anything you want me to try out on my end, thanks!
comment created time in 3 hours
push eventreal-logic/aeron
commit sha fc412ae431dbc1745ff282ac4df47f43c0032614
[Java] Adjust timeouts for ReplayMergeTest and progress checking.
push time in 3 hours
issue commentscylladb/seastar
RPC framework: sending `sink` inside structures (specifically, `optional`)
I already explained the logic: the client doesn't know need_stream. Only the server does. So the server knows whether or not to open a stream.
So we have a contradiction:
- the client must decide whether to open a stream before contacting the server,
- but the client can know how to open a stream only after contacting the server.
The only way I see to resolve this is to have the client contact the server twice:
- once to obtain
need_stream, - the second time to obtain the source (if
need_stream == true).
Unfortunately, there's a problem here: between 1 and 2 need_stream may change.
comment created time in 3 hours
issue commentCeltoys/Remotery
Access violation calling Thread32Next when lots of threads present
I'll try and dig more into it when I get time later on since you can't replicate.
comment created time in 4 hours
issue commentscylladb/seastar
RPC framework: sending `sink` inside structures (specifically, `optional`)
On Mon, Mar 01, 2021 at 06:18:00AM -0800, Kamil Braun wrote:
How does the client (the one executing the snippet you provided) know the value of
need_stream? In whatever way you want it to. You know the logic, I have no idea. The point is it is done before you open a stream, not after.
-- Gleb.
comment created time in 4 hours
issue commentCeltoys/Remotery
Access violation calling Thread32Next when lots of threads present
Wow...
comment created time in 4 hours
issue commentCeltoys/Remotery
Access violation calling Thread32Next when lots of threads present
I'd actually already tried that, forgot to mention - the issue still occurs.
comment created time in 4 hours
issue commentCeltoys/Remotery
Access violation calling Thread32Next when lots of threads present
Any result commenting out ThreadProfilers_GetThreadProfiler?
I can't reasonbly suspect the outer loop. Something in the inner loop is trampling the stack, maybe.
comment created time in 4 hours
issue commentCeltoys/Remotery
Access violation calling Thread32Next when lots of threads present
That reads 38.
More:
| Name | Value | Type |
|---|---|---|
| ▶ | timer | 0x0000022795375388 {counter_start={910998200798} counter_scale=0.10000000000000001 } |
| ▶ | mqToRmtThread | 0x0000022795370e80 {size=1048576 data=0x00000227953710c0 {size=1048576 ptr=0x00000227958c0000 "" file_map_handle=...} ...} |
| compiledSampleFn | 0x0000022795300000 | void * |
| threadProfilerTlsHandle | 5 | unsigned int |
| ▶ | threadProfilers | 0x0000022795383de0 {{registerBackup0=14829735431805717965 registerBackup1=14829735431805717965 nbSamplesWithoutCallback=...}, ...} |
| nbThreadProfilers | 38 | unsigned int |
| maxNbThreadProfilers | 256 | unsigned int |
| ▶ | threadProfilerMutex | {DebugInfo=ntdll.dll!0x00007ffa84999f60 {Type=0 CreatorBackTraceIndex=0 CriticalSection=0x000002279538d5e8 {...} ...} ...} |
| ▶ | threadSampleThread | 0x0000022795371480 {handle=0x00000000000000cc callback=0x00007ff779bc3090 {enkiTSRemoteryExample.exe!SampleThreadsLoop(Thread_t *)} ...} |
| ▶ | threadGatherThread | 0x0000022795442750 {handle=0x00000000000001ec callback=0x00007ff779bc3d60 {enkiTSRemoteryExample.exe!GatherThreadsLoop(Thread_t *)} ...} |
Somewhat amazed this pastes so easily from VS...
comment created time in 4 hours
issue commentCeltoys/Remotery
Access violation calling Thread32Next when lots of threads present
Actually, what does thread_profilers->nbThreadProfilers say?
comment created time in 5 hours
issue commentCeltoys/Remotery
Access violation calling Thread32Next when lots of threads present
No repro here, I'm afraid.
What happens if you comment out the ThreadProfilers_GetThreadProfiler logic?
comment created time in 5 hours
issue commentscylladb/seastar
RPC framework: sending `sink` inside structures (specifically, `optional`)
Could you include a snippet with the full (high-level) algorithm of the client? Including how he obtains need_stream.
comment created time in 5 hours
issue commentscylladb/seastar
RPC framework: sending `sink` inside structures (specifically, `optional`)
How does the client (the one executing the snippet you provided) know the value of need_stream?
In my previous snippet, it was the server who can calculate need_stream.
comment created time in 5 hours
issue commentscylladb/seastar
RPC framework: sending `sink` inside structures (specifically, `optional`)
On Mon, Mar 01, 2021 at 06:11:46AM -0800, Kamil Braun wrote:
Could you provide a snippet of code that sketches the solution? In particular, I'm interested in the type(s) of the handler(s).
Do not create an rpc stream until you verified that you will use it. What king of sketch do you need for that?
if (need_stream) { sink = create one source = rpc_send(sink); }
?
-- Gleb.
comment created time in 5 hours