Crash Report: update failed for AnAction(nl.rubensten.texifyidea.action.sumatra.ForwardSearchAction) with ID=texify.sumatra.ForwardSearch

Description
Stacktrace
update failed for AnAction(nl.rubensten.texifyidea.action.sumatra.ForwardSearchAction) with ID=texify.sumatra.ForwardSearch

java.lang.ExceptionInInitializerError
	at nl.rubensten.texifyidea.action.sumatra.ForwardSearchAction.update(ForwardSearchAction.kt:43)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareUpdate(ActionUtil.java:136)
	at com.intellij.openapi.actionSystem.impl.Utils.a(Utils.java:256)
	at com.intellij.openapi.actionSystem.impl.Utils.updateGroupChild(Utils.java:333)
	at com.intellij.openapi.actionSystem.impl.Utils.a(Utils.java:307)
	at com.intellij.openapi.actionSystem.impl.Utils.a(Utils.java:273)
	at com.intellij.openapi.actionSystem.impl.Utils.expandActionGroup(Utils.java:213)
	at com.intellij.openapi.actionSystem.impl.Utils.fillMenu(Utils.java:350)
	at com.intellij.openapi.actionSystem.impl.ActionMenu.a(ActionMenu.java:321)
	at com.intellij.openapi.actionSystem.impl.ActionMenu.access$600(ActionMenu.java:42)
	at com.intellij.openapi.actionSystem.impl.ActionMenu$MenuListenerImpl.menuSelected(ActionMenu.java:276)
	at javax.swing.JMenu.fireMenuSelected(JMenu.java:1038)
	at javax.swing.JMenu$MenuChangeListener.stateChanged(JMenu.java:1118)
	at javax.swing.DefaultButtonModel.fireStateChanged(DefaultButtonModel.java:349)
	at javax.swing.DefaultButtonModel.setSelected(DefaultButtonModel.java:232)
	at javax.swing.JMenu.setSelected(JMenu.java:305)
	at com.apple.laf.ScreenMenu$2.run(ScreenMenu.java:135)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:301)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:762)
	at java.awt.EventQueue.access$500(EventQueue.java:98)
	at java.awt.EventQueue$3.run(EventQueue.java:715)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
	at java.awt.EventQueue$4.run(EventQueue.java:737)
	at java.awt.EventQueue$4.run(EventQueue.java:735)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:734)
	at com.intellij.ide.IdeEventQueue.j(IdeEventQueue.java:781)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:722)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:382)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: java.io.IOException: Cannot run program "reg": error=2, No such file or directory
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
	at java.lang.Runtime.exec(Runtime.java:620)
	at java.lang.Runtime.exec(Runtime.java:450)
	at java.lang.Runtime.exec(Runtime.java:347)
	at nl.rubensten.texifyidea.run.SumatraConversation.sumatraInstalled(SumatraConversation.kt:90)
	at nl.rubensten.texifyidea.run.SumatraConversation.<clinit>(SumatraConversation.kt:30)
	... 39 more
Caused by: java.io.IOException: error=2, No such file or directory
	at java.lang.UNIXProcess.forkAndExec(Native Method)
	at java.lang.UNIXProcess.<init>(UNIXProcess.java:247)
	at java.lang.ProcessImpl.start(ProcessImpl.java:134)
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
	... 44 more

Thanks for reporting! But, eh, Cannot run program "reg"?  What operating system are you using? Apparently Windows, but a Windows which does not have the reg program seems like somewhat of a contradiction...
Reference:
https://ss64.com/nt/reg.html
I double checked but the code in SumatraConversation clearly says
 if (!SystemInfo.isWindows || !isSumatraInstalled()) return@lazy false
and
private fun isSumatraInstalled(): Boolean {
    // Look up SumatraPDF registry key
    val process = Runtime.getRuntime().exec(
            "reg query \"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\SumatraPDF.exe\" /ve"
    )

    // ....
}

Hi, I’m running macOS 10.14.4 and PyCharm 2018.2.3.

Am 16.05.2019 um 17:36 schrieb Thomas Schouten<EMAIL_ADDRESS>Thanks for reporting! But, eh, Cannot run program "reg"? What operating system are you using? Apparently Windows, but a Windows which does not have the reg program seems like somewhat of a contradiction...
Reference:
https://ss64.com/nt/reg.html https://ss64.com/nt/reg.html
I double checked but the code in SumatraConversation clearly says
if (!SystemInfo.isWindows || !isSumatraInstalled()) return@lazy false
and
private fun isSumatraInstalled(): Boolean {
// Look up SumatraPDF registry key
val process = Runtime.getRuntime().exec(
"reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\SumatraPDF.exe" /ve"
)
// ....

}
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub https://github.com/Ruben-Sten/TeXiFy-IDEA/issues/896?email_source=notifications&email_token=AICPDKP53IJZXATF4GMSF5TPVV5RFA5CNFSM4HNMVVX2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODVSGNPI#issuecomment-493119165, or mute the thread https://github.com/notifications/unsubscribe-auth/AICPDKKFHMDS6UU2ISHEDGTPVV5RFANCNFSM4HNMVVXQ.

@johnruth96 Many thanks for the quick response! That is very interesting, it looks like the SystemInfo.isWindows is wrong for your system then.
@RubenSchellekens Would it be okay to ignore this error and assume that the OS check was wrong? Or do you have any better suggestion, or maybe a detail in the code that I overlooked?

I was just taking a look at the stacktrace, and this line is trowing me off:
at nl.rubensten.texifyidea.run.SumatraConversation.sumatraInstalled(SumatraConversation.kt:90)
Looking at the commit logs, the sumatraInstalled check has not been at line 90 since the 0.6 release, so I'm guessing this is an issue which has already been fixed in #443.
@johnruth96 could you maybe check which version of the TeXiFy plugin you are using? If the version is outdated, does updating to 0.6.5 solve the issue?

Hi,
indeed, I had version 0.5 installed. After updating to 0.6.5 the issue was gone. Didn’t notice, that the version was outdated.

Am 04.06.2019 um 17:46 schrieb Sten Wessel<EMAIL_ADDRESS>I was just taking a look at the stacktrace, and this line is trowing me off:
at nl.rubensten.texifyidea.run.SumatraConversation.sumatraInstalled(SumatraConversation.kt:90)
Looking at the commit logs, the sumatraInstalled check has not been at line 90 since the 0.6 release, so I'm guessing this is an issue which has already been fixed in #443 https://github.com/Ruben-Sten/TeXiFy-IDEA/pull/443.
@johnruth96 https://github.com/johnruth96 could you maybe check which version of the TeXiFy plugin you are using? If the version is outdated, does updating to 0.6.5 solve the issue?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/Ruben-Sten/TeXiFy-IDEA/issues/896?email_source=notifications&email_token=AICPDKLGQJ67R26E44JY2ODPY2E6LA5CNFSM4HNMVVX2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODW5AB2Q#issuecomment-498729194, or mute the thread https://github.com/notifications/unsubscribe-auth/AICPDKOBCPBNT7FO7FWYNVDPY2E6LANCNFSM4HNMVVXQ.

Cool, then the issue's solved!


Various fixes for v0.1

Add -fopenmp compiler flag

Disable compiler debug output

Move SRM examples to their own directory with a requirements.txt

Install tfa_extension in its package

Add link to (future) documentation

👍


ERROR: Unable to find 'sdl_gpu/20201002@sdl_gpu/20201002' in remotes

Good day!
I am trying to runnning FallingSandSurvival with much trouble.
I have error in conan's processing.
"ERROR: Unable to find 'sdl_gpu/20201002@sdl_gpu/20201002' in remotes"
Please advice conan remote url for "sdl_gpu/20201002@sdl_gpu/20201002"
thanks.

Did you run the setup script?
One of the things it does is install the correct version of sdl_gpu into conan locally, since it isn't on any of the online repos.
When you run setup.sh, it should print something like "Setting up Conan sdl_gpu...", and if it's already installed it should print "Conan sdl_gpu already installed."
If it isn't installed, the script will try to install sdl_gpu and print "Successfully installed sdl_gpu into conan" or "Failed to install sdl_gpu into conan"  depending on if it had any errors.

Thanks
I understood sed command
(
sed -i 's/20171229/20201002/g' ./conanfile.py
= replace  "20171229" to "20201002" in ./conanfile.py
)
and edited conanfile.py manually.
and installed sdl_gpu into conan locally successfully!
but still have some errors.
I want to fix these and play FallingSandSurvival.
C:\FallingSandSurvival-dev\FallingSandSurvival-dev\out\build\x64-Release\easy_profiler.lib(profile_manager.obj) : error LNK2001: unresolved external symbol __imp___std_init_once_begin_initialize
C:\FallingSandSurvival-dev\FallingSandSurvival-dev\out\build\x64-Release\easy_profiler.lib(profile_manager.obj) : error LNK2001: unresolved external symbol __imp___std_init_once_complete


add Stream.asyncPush api

/rebase

/rebase

/rebase

Same as in the other PR, dropping elements by default is not a good choice

Options could be { strategy: "unbounded" } by default and potentially accept { strategy: "dropping" / "sliding", size: 100 }
The nice aspect about this is that assuming we don't support backpressure we can guarantee sync push, which would be faster than the plain async way

/rebase

Same as in the other PR, dropping elements by default is not a good choice

Have changed it to "unbounded" by default.


Missing HRESULT definitions (E_NOTIMPL, E_FAIL, etc)

E_POINTER is defined as a constant:
pub const E_POINTER: HRESULT;
Lots of other HRESULTs aren't defined though. e.g. E_NOTIMPL, E_FAIL, etc. My use case: I have a function that will do some D3D12 work, but I haven't implemented it yet, so I temporarily want the function to return E_NOTIMPL.
@damyanp pointed out that E_NOTIMPL is defined in a DirectDraw namespace, but presumably that isn't intentional? It's also not typed as a HRESULT.

These look like namespace bugs in the win32 metadata. Will transfer the issue to the metadata repo.


A probable problem in radiotap-parser

hi, there
I'm using your library of radiotap-parser to develop a 802.11 sniffer, but I've found a problem probably exists.
		if ((((void*)iterator->arg)-((void*)iterator->rtheader)) &
		    ((rt_sizes[iterator->arg_index] >> 4) - 1))
			iterator->arg_index +=
				(rt_sizes[iterator->arg_index] >> 4) -
				((((void*)iterator->arg) -
				((void*)iterator->rtheader)) &
				((rt_sizes[iterator->arg_index] >> 4) - 1));

I guess the iterator->arg_index should be iterator->arg because I thought arg is the pointer while arg_index is not.

Hello,
The whole osdep directory is actually from the famous aircrack project
https://www.aircrack-ng.org/
It is now quite old and I think their code changed
If you investigate this, I'm interrested in keeping this repository up to date by upgrading the tap part


Please don't spoof/intercept links in notification mails

I just got a Zulip notification mail with a link to https://github.com/rust-lang/rust/issues/58619. However, clicking it raised the phishing warning of my email application, and indeed Thunderbird is correct -- the link pretends to go one waxy, but it actually links to https://mandrillapp.com/track/click/XXX/github.com?p=XXXX. There is a ling ID there which probably makes this particular link and in which email it got sent uniquely identifiable. Not only does this have all the characteristics of a phishing mail, it also is unacceptable tracking of users. Indeed, the term "track" in the link makes it sound like tracking me is the primary purpose of this. That is not okay. There is no reason you (or even some other company "mandrillapp.com" that I have no interaction with) should get to know which link I click when.
Please just use normal links in your notification emails, and respect your user's privacy.

This is definitely not intentional behavior on our part; we have no code of our own to do such tracking.  It appears this is a default feature of Mandrill (the outgoing email provider currently used by Zulip Cloud).  I just disabled this feature, since we had no use for that data.
Thanks for the report @RalfJung!


Uploading dSYM to Crashlytics hangs indefinitely in GitHub Actions environment

Description
I have an open source iOS app that uses Firebase SDK 9.3.0 and I use GitHub Actions as a CI.
I recently attempted to upgrade to 9.5.0 and found out that my GitHub Actions builds started hanging on the last build phase, which uploads dSYM to Crashlytics. In one of my nightly builds it'd been hanging for about 5 hours until the runner was terminated by timeout.
I reverted back to 9.3.0 and it all started working fine again.
I then attempted to upgrade to 9.4.1 with the same result: the upload again started to hang indefinitely. The reproducibility rate is 100%.
However, it only impacts the GitHub Actions environment: when I build locally on my computer, it all works as expected with both 9.4.1 and 9.5.0.
The dSYM uploading build step in my project is configured exactly according to the official documentation: Get started with Firebase Crashlytics.
So I'm wondering: has anything changed in 9.4.1 regarding the dSYM uploads that might cause this issue in the GitHub Actions environment?
Reproducing the issue

Take an iOS app that uses Crashlytics with a build step that uploads dSYM to Crashlytcis
Upgrade Firebase SDK to 9.4.1 or 9.5.0
Run a CI build in GitHub Actions

If it helps, here's the repository in question: https://github.com/vadimbelyaev/TbilisiCleanups. My commits to the main branch from d779a4ba19ca3dcd868ddc949535cbca87a6bdb7 to f600f742093df3a653f2edc9faf2ef812262ed2f are attempts to narrow the issue down.
Firebase SDK Version
9.4.1
Xcode Version
13.4.1
Installation Method
Swift Package Manager
Firebase Product(s)
Analytics, Authentication, Crashlytics, Firestore, Messaging
Targeted Platforms
iOS
Relevant Log Output
Thu, 01 Sep 2022 22:26:21 GMT
[22:26:21]: ▸ Copying GoogleService-Info.plist
5820
Thu, 01 Sep 2022 22:27:05 GMT
[22:27:05]: ▸ Processing Info.plist
5821
Thu, 01 Sep 2022 22:27:05 GMT
[22:27:05]: ▸ Running script 'SwiftLint'
5822
Thu, 01 Sep 2022 22:27:05 GMT
[22:27:05]: ▸ Generating 'TbilisiCleanups.app.dSYM'
5823
Thu, 01 Sep 2022 22:27:25 GMT
[22:27:25]: ▸ Running script 'Upload dSYM to Crashlytics'
5824
Fri, 02 Sep 2022 03:17:55 GMT
Error: The operation was canceled.

 Upon checking the release notes, there were no changes related to uploading dSYMs that time. We would like to know if the action has enough memory? Note that the upload-symbols can use a good amount of memory on large dSYMs.

@rizafran, thanks for looking into it and sorry for my delayed reply.
Unfortunately I was not able to find any info about memory limits for GitHub actions.
However, I've just tried to reproduce the issue with Xcode 14 and the latest Firebase iOS SDK 9.6.0 while having Crashlytics/run --debug in my build step and it all went successfully.
Since I'm no longer able to reproduce the issue, I'm closing it.
If it ever repeats, I'll try adding the verbose output of the run script to this issue.
Cheers!
-Vadim


Supplemental change of issue 4523 - [tdpl] .remove method for Associative Arrays returns void in all cases

http://d.puremagic.com/issues/show_bug.cgi?id=4523
This is the supplemental pull of dmd/pull/597.

Cross-post from pull 597: This is continuing the tradition of changing the compiler to special-case associative arrays. Although this works, I think it would be great to transfer an increasing amount of responsibility from the compiler to the associative array type included in druntime object.d.


stage1: rename container{,_test}.go -> pod{,_test}

All the internal names have already changed, but missed the filenames.

lgtm


epic: Kubernetes 1.28

Demo Objective
Objective
This epic is about tracking the progress in updating kcp to Kubernetes 1.28. This follows the guide @ https://github.com/kcp-dev/kcp/blob/main/docs/content/developers/rebasing-kubernetes.md
Demo Steps
No response
Action Items

[X] Scope of the current demo is necessary to fit in the prototype boundaries
[ ] Contribute to the final demo script and recording

Stories

[x] Update apimachinery
[x] Update code-generator
[x] Update client-go
[ ] update kubernetes
[ ] update kcp

### Tasks
- [ ] https://github.com/kcp-dev/apimachinery/pull/76
- [ ] https://github.com/kcp-dev/code-generator/pull/84
- [ ] https://github.com/kcp-dev/client-go/pull/29
- [ ] https://github.com/kubernetes/kubernetes/pull/120202

Kubernetes cherry-pick tracking:

[ ] 019506716a2 (kcp/kcp-1.26-split) Switch genericcontrolplane/apis to frob system:admin
[ ] 9b2bf8983e9 pkg/controller/resourcequota: nil out closed channels
[ ] c2dc4bb4d7c UPSTREAM: : update kcp repo dependencies
[ ] 37c22366c0c README
[ ] c36229523d3 LICENSES
[ ] ea0a4d6f8aa stuff
[ ] 32777ecf7d0 go.mod
[ ] 2fd83b5dcb9 client-go
[ ] ced1452f1d0 serviceaccounts
[ ] cfc41b37a3b registries
[ ] 7b01a1c29e1 auth
[ ] 9613d821282 pkg/controllers
[ ] 0596c4658c6 kube-aggregator/openapi
[ ] 6694ee05630 apiextensionsserver generated
[ ] ca05ca81284 apiextensionsserver
[ ] 199dd14369c admission
[ ] ece23f2e61f apiserver/endpoints
[ ] 5277c43574d apiserver/registry
[ ] 4a91465e84b apiserver/storage
[ ] 1556634c4e6 apiserver
[ ] 42396947e52 generic controlplane


Multi-Region Deployment - If user base is in Asia and US

We have equal amount of users in Asia and US, and if we select HongKong as Primary Region, then will it be slower Performance for users in USA to access our sites?
I am looking for a Pattern which supports both cross-region availability and disaster recovery. Azure SQL is the backend but its secondary replica is read-only.

@ashishmundrajll Thank you for your feedback! Since this channel is for driving improvements towards MS Docs, could you provide the URL of the specific documentation that your feedback is applicable to? That way, we are able to make sure your feedback is addressed by the right team.

Here it is - https://docs.microsoft.com/en-us/azure/architecture/reference-architectures/app-service-web-app/multi-region
In this deployment there will be a latency which users from US will face if Primary Region is HK. If Azure SQL can support Multi-master (master - master replication), this may work.
AWS has some multi-master feature but I only glanced over it, not sure if that is relevant.

@ashishmundrajll This reference architecture focuses on active/passive with hot standby, using Traffic Manager for failover. You can configure Traffic Manager as with the geographic traffic routing method to direct traffic to specific endpoints based on the geographic location where the requests originate.
Since there is no doc update required at the moment, we will now proceed to close this thread. If there are further questions regarding this matter, please tag me in your reply. We will gladly continue the discussion and we will reopen the issue.


BMAI is Passing on their turn when Pass is not allowed

the rules of the game state that if you have a valid attack you are not allowed to Pass your turn.
however in https://www.buttonweavers.com/ui/game.html?game=105095 we see this

game 3
fight
player 0 3 28
4:1
d6:2
d10:3
player 1 3 6
p(4,4):4
12:10
X-4:2
ply 2
max_sims 100
min_sims 5
maxbranch 400
surrender off
getaction
quit

result in

Time: 0.000000 s Sim: 1470  Sims/Sec: 0.000000  Mvs/Sms | 1.0/100.0 | 3.0/50.0 = 15000
l1 p0 best move (10.0 points, 99.8% win) pass
stats 2/5-100/400/0.50 Time: 0.000000 s Sim: 1470  Sims/Sec: 0.000000  Mvs/Sms | 1.0/100.0 | 3.0/50.0 = 15000
action
pass

even though there is a valid attack of SKILL 4:1 & d10:3 takes p(4,4):4
and then in https://www.buttonweavers.com/ui/game.html?game=105123 we see this

game 3
fight
player 0 4 27.5
4:3
d6:3
d10:5
R-11:9
player 1 3 34
20:16
20:10
20:15
ply 2
max_sims 100
min_sims 5
maxbranch 400
surrender off
getaction
quit

result in

Time: 0.000000 s Sim: 1465  Sims/Sec: 0.000000  Mvs/Sms | 1.0/100.0 | 6.0/33.0 = 19800
l1 p0 best move (2.7 points, 27.3% win) pass
stats 2/5-100/400/0.50 Time: 0.000000 s Sim: 1465  Sims/Sec: 0.000000  Mvs/Sms | 1.0/100.0 | 6.0/33.0 = 19800
action
pass

even though there is a valid attack of SKILL 4:3 & d6:3 & R-11:9 takes 20:15

here is a slightly simplified input that produces the same results

game
fight
player 0 3 28
4:1
d6:2
d10:3
player 1 2 6
4:4
12:10
getaction
quit

it might have something to do with stealth(d) skill which reads:

Stealth: d
These dice cannot perform any type of attack other than Multi-die Skill Attacks, meaning two or more dice participating in a Skill Attack. In addition, Stealth Dice cannot be captured by any attack other than a Multi-die Skill Attack.

the problem seems to be in or near or related to  void BMC_Game::GenerateValidAttacks(BMC_MoveList & _movelist) where it will test Skill Attacks but won't ever add the move, with the SKILL ATTACK, into the moveList

Glancing at the code, it must be not testing that particular skill combination (3+1 => 4). So most likely:
A) something wrong with die_stack.Cycle()
B) the "early out" test is incorrect
It would seem strange to have never run into this before, but another possibility may be some assumptions that loop makes that changed.  Will look at it.

fixed in pr #56

To summarize the issue, there was a bad "early out" optimization when trying all the skill combinations. The condition check was wrong. For example, if the total of all the attacker dice (in this case 6) is <= the largest defender die (in this case 10), then it does not check all combinations.  It checks (with 3 dice):

Dice 0, 1
Dice 0, 1, 2
Abort

The correct combinations it should check are (following the cycling logic):

Dice 0,1
Dice 0,1,2
Dice 0,2
Dice 1,2

The number of missed combinations, of course, is worse the more attacker dice there are. E.g. with 4 dice it drops 2/3rds in this scenario.
Unfortunately, this was a big bug and the fix may have a noticeable impact on compute cost (since there are more valid moves to try) and quality from missing out on high value moves.
It might also be a good idea to test that code further, or at least the cycle class, to make sure it does actually run through all combinations correctly.

Thanks. Ya stepping through the debugger I saw it checking some
combinations, then it went and from another die started checking
combinations. I observed it never hit the correct combo and was planning on
jumping in further sometime this weekend. Looks like the resolution ended
up being more thorough than I would have likely attempted.
I really appreciate your time. I hope you didn’t feel pressured to do it.
Sometimes I’ll put an issue in the bmai repo just to remind myself or to
show other players its on my radar.
Are you still using VS2017?
On Wed, Oct 2, 2024 at 10:08 PM Denis Papp @.***> wrote:

To summarize the issue, there was a bad "early out" optimization when
trying all the skill combinations. The condition check was wrong. For
example, if the total of all the attacker dice (in this case 6) is <= the
largest defender die (in this case 10), then it does not check all
combinations. It checks (with 3 dice):

Dice 0, 1
Dice 0, 1, 2
Abort

The correct combinations it should check are (following the cycling logic):

Dice 0,1
Dice 0,1,2
Dice 0,2
Dice 1,2

The number of missed combinations, of course, is worse the more attacker
dice there are. E.g. with 4 dice it drops 2/3rds in this scenario.
Unfortunately, this was a big bug and the fix may have a noticeable impact
on compute cost (since there are more valid moves to try) and quality from
missing out on high value moves.
It might also be a good idea to test that code further, or at least the
cycle class, to make sure it does actually run through all combinations
correctly.
—
Reply to this email directly, view it on GitHub
https://github.com/pappde/bmai/issues/55#issuecomment-2390475199, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AAFQDVEIOPMGLFEGPTW7KMLZZS7LFAVCNFSM6AAAAABPG4JHOOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOJQGQ3TKMJZHE
.
You are receiving this because you authored the thread.Message ID:
@.***>

It bothered me that there was an actual bug that was missing valid moves. It was also a good excuse to test the "build instructions".
I did actually use VS2017 for this, and it worked fine, but noticed that GIT_DESCRIBE is blank (i.e. "Version: (blank)").
I just tested with VS2022 cmake and it worked - better, in fact, since GIT_DESCRIBE was working. So the VS2017 dependency notes can be removed.

Version: I agree, this deserves a minor version bump. Also, it would be nice to see that on the output header, like "Version 3.1" in addition to the commit tag.
Flavor Text: I was "lunatic", but don't recall setting flavor text.

i thought you might like to know that somebody found another game where
BMAI played very sub-optimally but on v3.0-41 it played the most optimal
attack which was a skill attack. well done
im planning a few enhancements to the codebase then we can stamp it 3.1.
like VS2022, CMake 3.19, C++17
On Thu, Oct 3, 2024 at 10:10 AM Denis Papp @.***> wrote:

Version: I agree, this deserves a minor version bump. Also, it would be
nice to see that on the output header, like "Version 3.1" in addition to
the commit tag.
Flavor Text: I was "lunatic", but don't recall setting flavor text.
—
Reply to this email directly, view it on GitHub
https://github.com/pappde/bmai/issues/55#issuecomment-2391805748, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AAFQDVADKVQHBPJRFBGSSQDZZVUAZAVCNFSM6AAAAABPG4JHOOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOJRHAYDKNZUHA
.
You are receiving this because you authored the thread.Message ID:
@.***>

That's good to hear. I'm still amazed the overall performance was good in the past, but perhaps the failure scenario isn't common enough to drag down the overall stats.
I added issue 57 for an easy optimization on skill attack search. I'm not sure if compute time has been an issue, though.


Reorder booklet

Hello,
I tried to use pdftools/pdfposter to split a scanned image of an A4 booklet. The booklet has been unstapled and scanned like double sided A3. I used pdfposter -p 2x1A4 on it. The document got perfectly split into individual pages. The last step needed is to reorder the booklet into the original page order (1,2,3...). It would be great if you could add this function to the package.
Regards
Jiri

@jirmed In general for merging multiple files in one you can use pdfmerge. How do you determine the order of the files?

Example: I have a booklet 40 pages A4 portrait. If I unstaple it I get 10 sheets A3 (4 pages each). I put it into an automatic duplex scanner and I get PDF with 20 landscape A3 pages. In my 40 pages example the (double)pages are 40/1,2/39,38/3,4/37,...,22/19,20/21. Using pdfposter -p 2x1A4 I get a new 40 pages document (A4 portrait) in order 40,1,2,39,38,3,4,37,...,22,19,20,21. The last step needed is to reorder the PDF in the original sequence (1,2,3,4,...,39,40)

Ah I get it. It seems you have a very specific usecase there. The scripts in this repository are intended for general everday use. So this usecase is not supported. I guess for you it would be best to write your own little Python script using PyPdf2 directly to achieve your desired behaviour.

I think it is not such a very specific usercase. There is even a commercial (Win only) software that can do that (http://www.axpertsoft.com/booklet-to-normal-pdf/)

Haven' t had the need for it so far. But if you find it useful you' re very welcome to make a PR for the feature.


Error: Unable to resolve module core-js/features/promise

Guys i am unable to use the module as this error pops up whenever I run
I have downgraded to 0.11.6 because of this issue:https://github.com/microsoft/BotFramework-DirectLineJS/issues/317

Can you share some details about your usage? Is this for a Node .js project, a browser project, or something else?
Resolution with Node.js works properly as core-js is listed in the package dependencies. A quick test in the browser indicates that dist/directline.js has the correct dependencies bundled as well.
To use the bundled version of Directline you can try:
<script type="text/javascript"<EMAIL_ADDRESS>

i was just working on react native project (link)
@joshgummersall This helped Thanks.


[WIP] Route and view for file details

WIP; see #16491.

Heads up, going to be pushing some changes here shortly & then we can revisit next steps.

I reworked this to load all the file details onto the project details page and use anchors instead of having a separate route. This means that we won't have NxM new URLs to put into cache, but still allows us to deep-link to project details.


[support request] add more tests to docker-proxy

What is your problem or scenario?
docker-proxy UT request

/help

/close


Eloquent soft delete inconsistent behaviour

I spent a hour while catch my issue.
There are no notices in docs about this.
Short example:
class SomeModel extends \Eloquent{
use SoftDeletes;
public $table = 'some_table_withDeleted_at_column';
}
SomeModel::find($id)->delete(); // Perform soft delete
SomeModel::whereId($id)->delete(); // Actually remove row from database
SomeModel::destroy($id); // Perform soft delete
So why EloquentQueryBuilder don't care about soft delete trait in model?
Maybe we need to change EloquentQueryBuilder::delete() behaviour or at least notice about it in dosc?
Sry for my eng.

@EvgeniyN Which Laravel version? As far as I know, all 3 methods should work.

@acasar Composer's installed.json file say
"name": "laravel/framework",
"version": "v5.2.0",
"version_normalized": "<IP_ADDRESS>",

"version": "v5.2.0",

You need to use 5.2.*.

Yeah that was fixed after 5.2.0. so you should be good after you upgrade.

Yep, it helps, but now I have other issue with the latest update.
guest middleware applied in controller constructor to POST action with custom FormRequest doesn't work and trigger uncought HttpResponseException.
This issue cause only on production machine not on my local env - so I'm frustrated.
When middleware is applied in routes.php all works as expected,
when it applied in controller constructor - not.
It's look like issue.
PHP -v
PHP 5.6.17-0+deb8u1 (fpm-fcgi)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies

I suggest that you open a seperate ticket for that and provide a full exception and a snippet of relevant code, otherwise we can't help.


AMBARI-22952 UI Install is unable to work with 'Redhat Satellite/Spacewalk' as local repository

How was this patch tested?
30517 passing (27s)
157 pending

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/Ambari-Github-PullRequest-Builder/516/
Test FAILed.
Test FAILured.

retest this please

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/Ambari-Github-PullRequest-Builder/539/
Test PASSed.


Pull question

Hello. First of all I would like to say that I think this library is incredible. But I have a doubt.
I have an application that needs to monitor a git repository and with each modification to certain .yaml files that exist in this repository I need to perform some local operations based on the content of those files that have been changed remotely.
I thought about cloning the repository with this lib and from time to time pull to download the modifications, but I would like to know if during this pull operation I would be able to identify or list the files that were changed

Thanks for the report! I think what you'll want to do here is to pull all the changes and then iterate the history using a revwalk. I don't believe there's a way to figure out what changed while you're downloading it. If you'd like such a method though feel free to open an issue with libgit2


implement BBR congestion control

When will be quic-go support BBR congestion control?

It's still on our list, but we have a lot of higher-priority issues at the moment.

is BBR implemented in any quic-go branch now? Thanks a lot.

No, and we're currently not planning to implement it anytime soon.

No, and we're currently not planning to implement it anytime soon.

Got it. Thanks.

I do not know why this thing is not on the top list. Bbr is so critical in quic cc

It's been almost 3 years...

https://github.com/lucas-clemente/quic-go/issues/3417#issuecomment-1127961210 still stands

Update on BBR: We're not planning to implement BBR in quic-go. Over the years, BBR has been shown to not be the silver bullet to solve all of our performance problems. BBR remains a highly complex algorithm with an enormous set of magic configuration values. It has also not seen the widespread adoption that one might have expected after BBR's initial introduction.
In the mean time, different congestion controller algorithms have been explored by the congestion control community, with promising results. quic-go might experiment with those at some point in the future. Until then, there are lots of improvements outside of congestion control that will have a significant performance impact, for example #3526, #2482, #3563.

BBRv3 support is now tracked in #4565.


Issue mapping values from datasource

Hello,
I am trying to map series from my datasource in order to produce graph with multiple lines.
I am facing a particular issue: when I try to map the data, in the DataFrame JSON (from Query), I get the same name for different series of value, and so I can not refer them correctly when I try to map them.

I saw both documentation and Youtube tutorial, but I can t find any reference to this particular case.
How can I solve that?

@Alexstat98 I saw your reply in https://github.com/VolkovLabs/volkovlabs-echarts-panel/issues/230 and replied there.
Even, if I closed the issue, you can follow if you still have any questions, you don't need to open a new issue.


Upgraded everything to .NET Core 3.1

Since .NET Core 3.0 reach end of life on March 3, 2020 I thought it would make sense to bump to 3.1 here.
All .NET Core 3.0 projects are now updated 3.1. All of the library code is netstandard2.1 already so no change needed there.
The build agent has 3.1 SDK already too, so that SDK was already used for building this repo anyway.

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.:x: filipw sign nowYou have signed the CLA already but the status is still pending? Let us recheck it.


Allow IOptions values to be provided from the UI

This should be simplified so we have profiles, rather than loads of options.

We should define the categories and what values are changed in those categories

Beginners' hill
Fortress hill
Tourney hill
Limited process hill
Medium process hill
Metaswitch hill
Nano hill
Tiny hill
Tiny LP hill


Added the successor function (succ).

Thanks for this contribution. However, I do not think this adds enough value to this library. I will be closing this PR for now. But feel free to reopen it in case you want to provide strong points in favor of this PR.


Move keyring-controller dep to devdep in Accounts Controller

Explanation
Move the keyring-controller from a dependency to to dev dependency in Accounts Controller. This was accidentally recategorized in #3747, this PR undoes that change.
References
Changelog
@metamask/accounts-controller

Changed: Move keyring-controller from a dependency to devDependency in the AccountsController

Checklist

[x] I've updated the test suite for new or updated code as appropriate
[x] I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
[ ] I've highlighted breaking changes using the "BREAKING" category above as appropriate

I've updated the PR description to add a little more context


Can't override lsp.server setting

After setting config value to "javascript=typescript-language-server --stdio", plugin starts deno lsp.

Hey @albert200000 can you try the latest master branch? It should work in that...

Thanks! it works


Home page example does not work

Hi, I just tried the code posted on the home page of the repo and I get the following error:
Major version of Sparkling Water does not correspond to major Spark version.

Major Sparkling Water Version = 2
Major Spark Version = 1
Error in spark_dependencies(spark_version = spark_version, scala_version = scala_version) :

The actual code I used is in a Gist here:
https://gist.github.com/edgararuiz/6453d44a91c85a87998cfeb0dfed9fa9

Hi @edgararuiz
Thanks for the feedback. Can you provide logs?

Hi @navdeep-G , I would be glad to except that no logs are started since I'm not able to start a session.  Here is a copy of the last lines in my console:
> sc <- spark_connect(master = "local")
Major version of Sparkling Water does not correspond to major Spark version.

Major Sparkling Water Version = 2
Major Spark Version = 1
Error in spark_dependencies(spark_version = spark_version, scala_version = scala_version) :

>
> h2o_context(sc)
Error in h2o_context(sc) : object 'sc' not found

@edgararuiz Okay. Do you have a prior version of Spark installed?

I have several installed, which was the root cause.  The default version in my laptop is 1.6 so it worked once I changed passed the version argument when connecting
sc <- spark_connect(master = "local", version =  "2.0.0")

Thanks @navdeep-G , we can close this issue

@edgararuiz Great! Glad the issue is resolved.


Replace with np.clip

https://github.com/pzivich/zEpid/blob/0cf189e01936429e63e95faca5d88d31e1f1dc3d/zepid/causal/utils.py#L155
Replace the treatment probability bounding with np.clip since that is easier to keep up with overall
Same needs to be done for TMLE with the continuous outcome bounding

I don't need to replace with np.clip. I have another filtering approach that doesn't rely on any function (but also doesn't produce warnings). Implementation is in #151


Not running today (Wednesday) without schedule config

I run a renovate process twice a week. But at some point it stopped running. After checking the logs I found this message:
DEBUG: Checking schedule "before 5am on monday" (repository=services/backoffice-service, dependencies=request,nock,mocha,eslint-plugin-node,eslint,mongoose,aws-sdk,@maverick/service-client,@maverick/openplatform-sdk, branch=renovate/all)
       "parsedSchedule": {"schedules": [{"t_b": [18000], "d": [2]}], "exceptions": [], "error": -1}
DEBUG: schedule.d (repository=services/backoffice-service, dependencies=request,nock,mocha,eslint-plugin-node,eslint,mongoose,aws-sdk,@maverick/service-client,@maverick/openplatform-sdk, branch=renovate/all)
       "schedule_d": [2]
DEBUG: scheduledDays (repository=services/backoffice-service, dependencies=request,nock,mocha,eslint-plugin-node,eslint,mongoose,aws-sdk,@maverick/service-client,@maverick/openplatform-sdk, branch=renovate/all)
       "scheduledDays": ["Monday"]
DEBUG: Does not match schedule because Wednesday is not in Monday (repository=services/backoffice-service, dependencies=request,nock,mocha,eslint-plugin-node,eslint,mongoose,aws-sdk,@maverick/service-client,@maverick/openplatform-sdk, branch=renovate/all)
DEBUG: Package not scheduled (repository=services/backoffice-service, dependencies=request,nock,mocha,eslint-plugin-node,eslint,mongoose,aws-sdk,@maverick/service-client,@maverick/openplatform-sdk, branch=renovate/all)

My config has no reference to any schedule:
module.exports = {
  platform: 'gitlab',
  endpoint: 'https://gitlab/api/v3',
  onboarding: false,
  assignees: [ 8 ],
  logLevel: 'debug',
  labels: ['upgrade'],
  ignoreDeps: [ /* ... */ ],
  repositories: [
     // just an array of repo names
     //  ... repo1, repo2, etc
  ]
}

I did a quick check and removing the check isScheduledNow on workers/branc/index.js#31 solves my problem.
Is there something wrong with my config? I have the latest version, but didn't change anything in the config since long time.

Sorry for the inconvenience. I am not sure which logic change might have caused this, but I am pretty sure I can guess what's happening. "before 5am on monday" is the default schedule for lock file maintenance, and lock file maintenance is enabled by default. If you are using the "all" groupName to group all branches together then I think it's combining lock file maintenance and then that schedule gets used.
I think can quickly work around this by adding this to your config:
  "extends": [":maintainLockFilesDisabled"]

This will disable lock file maintenance to prevent it being grouped together (which would make no sense).
If that fixes it, please don't close this issue though. I'd like to add some code to prevent it happening without requiring a config workaround..

I've tried that but I see the same logs.

If you can email me the full debug log, that will probably help. Additionally:

Is there any particular reason why you are using the apiv3 endpoint? I thought GitLab have deprecated it now and I plan to deprecate it in Renovate soon too.
I think your config you pasted here is perhaps incomplete? There is no reference to groupName "all" in the config, yet your dependencies are all grouped to renovate/all

FYi I have a fix in https://github.com/singapore/renovate/pull/890 ready for merge soon

I've updated to latests Gitlab API v4.
I think is grouped because I'm used --group-name=all on my npm script

I run it again but didn't create any new PR because today is not Monday. Do you see anything missing in my config?

If it doesn't work with the latest release then please attach or send me the full debug log. I was able to reproduce same behaviour and fix today


TableView error: this.scrollbar.view.paint(); when ScrollbarEnabled is set to false.

foam.ui.TableView issue.

This should be fixed by<PHONE_NUMBER>1ad9f825b6ab3f5600231450faddb9; let me know if it's not.
If it's not fixed, then more detail about the error message and use case would be helpful.


Publish to NuGet

Update the github actions to publish the file to nuget when merging changes are pushed to master.

merge request to master will now build nuget packages and publish them


updated form of contactus.html page

The text inputs had placeholder attribute which didn't disappear on click.
So, i added the feature that when the user clicks the placeholder text disappears.

Before:

After clicking:

#93


Idea for hyperapp router

I want to add simple router to hyperapp, I thought that I use something like react router.
I can use url hash as state property, but I need to access action from outside of app, is there something like
init actions:
actions: {
  init: function(state, actions) {
    window.addEventListener('hashchange', function() {
      actions.url(localhost.hash.replace(/^#/, ''));
    });
  },
  url: function(state, actions, url) {
    return {url};
  }
}

Second I want to create Route widget but I need to have something like children
(Something like angularjs transclude or react props.children)
const Route = ({path, url}) => {
    if (match(path, url) {
       return ( children );
    }
}

so I can use:
app({
  state: {url: localhost.hash.replace(/^#/, ''))},
  view: (state, actions) => (

       <Route path={"/user"} url={state.url}>

user

       </Route>
       <Route path={"/category"} url={state.url}>

category

       </Route>

  ),
  actions: {
    init: function(state, actions) {
      window.addEventListener('hashchange', function() {
        actions.url(localhost.hash.replace(/^#/, ''));
      });
    },
    url: function(state, actions, url) {
      return {url};
    }
  }
});

are those two things possible with hyperapp?

Just notice you TodoMVC app is the router build in? Is it possible to use it with hash? From where this Route mixing coming from? In the app there is:
import { h, app, Router } from "hyperapp"

but I can find it in repo.

I think this idea is promising and, to me, a more useful type of router.
Mostly this should be possible!
For the route as state, you could make a state property that tracks the URL by adding an event listener on "hashchange" (in the init event of the app/mixin)
For the route component: you do get the children passed to it. The signature is (props, children) -> vnode   The only problem is that your component cant return an array of children, it needs to return a single vnode (which may in turn contain children) But I'm sure some nice solution can be designed around that limitation.

The router was recently moved to a separate repo hyperapp/router
The todo Mvc example just hasn't been updated yet

The current router doesn't yet support hash routes (I don't think) but it's been discussed!

Great, thanks. Will take a look into hyperapp/router and into mixins.

I have basic app working https://codepen.io/jcubic/pen/mwvMBV?editors=0010
but now I have problem I need to access data from Route widget inside children (to display selected user), to do this I need to update state from widgets but that's I believe is not possible because widgets are stateless.
Any idea how to resolve this? Maybe emit event from widget that will be accessed from Mixin?

Took a look at your example, but not sure I understand what it is you're trying to achieve. Your example seems to work fine, as you say.
If you need to modify state, that needs to be done via actions. In your example, children of the Route have the actions and state in their scope, so they can just use them.
If you're planning to separate out the children of Route (like one component for each state) (defined outside the main app.view)  Then yes, you'd need to forward the state / actions to them. Simply passing the state/actions along as props is a simple (not the most elegant perhaps) way:
app({
...
view: (state, actions) =>
  <Route path={"/user/{{name}}"} route={state.route}>
       <UserPage state={state} actions={actions} />
  </Route>
})

fwiw I've been working on and off on a solution for mixins with components that get pre-bound to the state and actions ( I call such components "widgets") so that you can use them without passing state/actions to them explicitly

That would be awesome, just like components in react+redux, I was looking for something like this.

Cool! Here's how far I got: https://codepen.io/zaceno/pen/YQjwNa
As you can see it basically works, without changing hyperapp's core, But on the other hand, it's kind of a lot of extra code, and you may want a simpler solution. But by all means use that as an inspiration. :)

Your code is interesting but it's lot of code it would be nice if widgets with state and actions would be supported by hypperapp itself. Maybe something like in React when you can have simple functions and classes, I'm thinking about forking the project.
As you suggested I've added actions to Route widget and I'm calling action to update route data from inside Route widget but data is not updating. It's always one step behind. To show user data for foo I need to click foo and then bar. I think that chaning state when widgets are created are ignored (maybe to prevent infinite loop) the same code https://codepen.io/jcubic/pen/mwvMBV?editors=0010
Will try to register the route in route mixin when Route is first called, maybe that will fix the issue.

@jcubic  You're right, it is a lot of code. Also, it does more than just widgets (there's the whole "scoped mixin" concept baked in there as well). Anyway it's not done, I'm just kind of playing with patterns to figure out what could/should go into core and what can be left in userland (if the pattern is useful at all -- I kind of took a break from the project to write some actual apps and battle test the patterns before proceeding)
I had a look at your code and I'm pretty sure what the problem is. You're right, its sort of to prevent an infinite loop. Because you call an action directly in the Route component (while it's being rendered, in effect) -- and that would normally cause another render loop, another action, render, action....
But as of recently we "debounce" renders with requestAnimationFrame, so actions called during the ongoing render will not cause a new render. That's why you're seeing the "one-step-behind" effect in your route data.

@jcubic When I run your codepen, there's a runtime error because "data" is not defined in the Route function.
const Route = ({route, path, actions}, children) => {
  if (route.routes.indexOf(path) == -1) {
    actions.router.register(path);
  }
  console.log(route);
  if (path == route.selected) {
    return (

{JSON.stringify(data)}
 // <--- Error here
        {children}

    );
  }
};

I'm not sure I understand why you think component classes are needed in this case.  Could you explain what problem that would solve for you?
Hyperapp has a fundamentally different approach than React, since it was inspired by Elm and the idea of having a single state tree, so it may take different patterns to achieve the same end result.

Registering route with mixin work but not all the time, maybe there is some race condition bug in hyperapp. I'm chaning hash at the beginning of the script (normal hash don't work on codepen)
If you refresh the page few times sometimes you get Route "/user/{{name}}" and User foo and sometime you don't. Is it a bug? I'm calling action inside widget before it return jsx.
https://codepen.io/jcubic/pen/mwvMBV?editors=0010

I'm calling action inside widget before it return jsx.

This will generally cause trouble, because calling the action inside there will cause a render while already in a render.
This solution: https://codepen.io/zaceno/pen/YQBBgE?editors=0010 (forked off your earlier version, only diff is line 45) seems to work well. But I don't really like the solution since it will effectively render the entire vdom twice for each update. (once for any other state updates, and then once again after we've "picked" the data, since we don't pick data until rendertime)

Maybe the router mixin could register all the routes to match (including capture-params like {{name}} in your case) on the first render and then the router.set action could take care of both setting the route and picking the data.

Was thinking the same thing. :+1:
Hyperapp will work best if the view is a simple state -> view function without side effects.

@SkaterDad it would simplify the app because you don't need to pass state in widgets that return other widgets, and I'm not referring to pure react but redux that have one state tree and each component can map global state object to props so you don't need to use real properties. and the same happen with dispatch that are like actions. That way you can have widgets like <Todos/> that don't have props but there are taken from redux mapping. In redux you do something like this:
const map_state_to_props = (state) => {
    return {
        grid: state.grid
    };
};

const map_dispatch_to_props = (dispatch) => {
    return {
        change_grid: (index) => {
            dispatch({
                type: 'CHANGE_GRID',
                index: index
            });
        }
    }
};

export default connect(map_state_to_props, map_dispatch_to_props)(Navigation);

Hyperapp could do the same as redux but instead of mapping for state and actions to properties it can just use state object and actions in widgets object it would simplify the implementation and will work like redux is build in.
Maybe something like:
let Navigation = widget((state, action, options, children) => {
   return

{state.page}

      foo

}):

and the Object or function returned by widget will be able to use the same as normal widget function that will stay the same. If I need to access more actions and state objects I ended up with widgets that look like this:
<Navigation state={state} actions={actions}/>

it make no sens to repeat that for every widget if that can be passed to widgets by the framework.

@jcubic @zaceno @SkaterDad Do you think we can move this discussion to https://github.com/hyperapp/router and close here? 👋

@jbucaran: I (speaking only for myself, of course) think we can close this here, but don't think we need to move anything to the router-repo, because as of yet we don't have anything concrete.
But in saying we can close the issue, I don't mean the discussion should end -- quite the opposite!
(Is it possible to migrate an entire issue with all the discussions et c from one repo to another?)
The basic idea of mapping routes to state rather than views is sound, but so different from the official router that it's probably best implemented as an unofficial alternative.
However, I think I've found a significant problem with implementing a react-style router for hyperapp (with <Route match="... style components). And that is: JSX translates the component tree into a tree of h(...) calls, and these calls will be executed depth-first (that's just how javascript works). So that means that for every route -- even all the ones that don't match, the child-trees will have to be built. So all the "pages" of an app must be built (even if we don't end up showing them) for every state update. That obviously doesn't scale  -- and will probably be riddled with runtime errors if you expect state vars to exist that don't in unmatched routes.
I honestly don't know how react-router get's around this problem. Probably they can get around the issue thanks to their component architecture somehow. I imagine a react component is kind of like a HyperApp-app in itself, managing it's own vdom.
The best I've been able to come up that is almost the same:
Instead of this:
...
<Router match="/users/foo">
  <UserPage user="foo" />
</Router>
...

you have this:
...
{emit('router:match?', '/users/foo') && <UserPage user="foo" />}
...

It works because by using the && operator, javascript will skip evaluation of the the right hand operand if the left hand is falsy.
This also means we can't use the "nested matching" or whatever it's called (where you can match on the first part of the route, and then in the child match on a follwing part, and below that another part et c.... That's what lets the react-router do that cool "recursive routes" trick. But I don't see how that's possible in hyperapp (without tossing performance and scalability completely out the window)

I agree this could be closed.  Also not sure it's worth migrating any of this to the router repo.
What this discussion highlights to me is that JSX makes things awkward since you're forced to write your functions in a very specifc way.  I don't personally use it, so it's hard for me to relate.  I see the appeal, but it seems restrictive.
@jcubic 's example of <Navigation state={state} actions={actions}/> could just be Navigation(state, actions) in vanilla JS land.
Here is a plain JS example from my own router experimentation.  A RouterView function, used in a Layout function.  There's a predefined routes array like you'd see in other frameworks.  The same philosophy could be adapted for RR4-style routing, I think, if you expose the match function to the view.
function RouterView(state, actions) {
  const route = routes.filter(r => r.path === state.router.match)[0] || {}
  if (route.view === undefined) return null
  return typeof route.view === "function" ? route.view(state, actions) : route.view
}

const Layout = (model, actions, children) => {
  return h('div', { id: 'layout' }, [
    h('header', {}, [
      h('h1', {}, 'Site Name'),
      h('nav', {}, [
        Link(actions.router, { to: '/', text: 'Home', attrs: {}}),
        Link(actions.router, { to: '/about', text: 'About', attrs: {}}),
        Link(actions.router, { to: '/about/1', text: 'About 1', attrs: {}}),
        Link(actions.router, { to: '/about/1?test=[2,3]', text: 'About Array', attrs: {}})
      ])
    ]),
    h('main', { class: 'page' }, RouterView(model, actions))
  ])
}

Interesting! Because it should be possible to expose the match function to all views, if you make it an event, and "call" it using emit. So you wouldn't have to pass it along as a prop (although you certainly could, the emit-pattern lends itself more nicely for wrapping it all up in a mixin)

I :heart: where this is going! @SkaterDad I am going to take inspiration from that last example and have a play.. I feel a component based router like this are the way to go. One state and one view feels right (so long as there is no redundant processing of h functions that @zaceno points out).
In that RR4 talk they were really hinting that this was there ah ha moments.

The router is just a react component
In the "react-router" the emphasis in no longer on the router but on react

s/react/hyperapp

@SkaterDad @jcubic @zaceno @lukejacksonn
To help me clarify things up a bit, is this what we are after:
  <Route path={"/user/{{name}}"} route={state.route}>
       <UserPage state={state} actions={actions} />
  </Route>

🤔

@jbucaran yes, essentially. It would also be nice with support for nested routes, so a Route tag inside another would match on the remainder. I think that's how the latest react-router is able to do that neat "recursive routes" trick.

@jbucaran

Would you be able to put together a minimal, cut-to-the-chase & not-bog-down-on-details requirements spec for this new router API?

Hmm... I'll have to think more about it. I haven't worked on/with routers enough to know what features are essential.🤔
The thing I see as important and different from the current router, is that we should consider the route -- including dynamic segments and perhaps even query parameters et c -- a part of the state and available on the state object. That way you can chose what to render at multiple levels in your view functions -- in more complex and useful ways that just simple: "if this route - show this view"
To me that's more relevant than implementing something like the <Route> component you described above. It is a prerequisite for it though. The <Route> component was more what the OP @jcubic was after.

Route tag inside another would match on the remainder

Can you reword this sentence please?

Not in as few words, I don't think. I'm basically talking about what's called "nested routes" in vue-router (https://router.vuejs.org/en/essentials/nested-routes.html) as well as react I think. Or consider this example of recursive routing in react: https://reacttraining.com/react-router/web/example/recursive-paths

One think to consider, If route tag would be implemented, it would be nice if you could access route variable from inside route like this:
      <Route path={"/user/{{name}}"} route={state.route}>
        <UserPage user={state.route.data.name}/>
      </Route>

so you can display different user user page.
I've update by demo using oncreate event, that was mention in other issue, https://codepen.io/jcubic/pen/mwvMBV?editors=0010 the only think that is not possible with that demo is initial state if app create and there is already a hash (it's added at the begining) the route is not updated because oncreate is executed after render of the children.
The only thing that is required is to make this work is to update DOM when action is called in oncreate.

I think a new router could easily be made to be used like this:
<Router>
  <Route path="/" route={MyView} />
</Router>

I am going to close here and ask you to take the discussion to the router repo.

https://github.com/hyperapp/router/issues/11

Thank you @jcubic @zaceno @lukejacksonn @SkaterDad


Disable mouse zoom (to be able to scroll page)

Hi,
Could you please add an option to disable mouse zoom?
I have a big (almost fullscreen) viewer on the opening page, and visitors can't scroll the page down, because the mouse scroll activates the zoom...
Thanks in advance! :-)
Benke

Hey @ragcsalo ! This request is now addressed and you can set a mouseZoom as either true or false in config.

Thank you very much!! :-)


Server restart errors not raised

If you put a value into node[:postfix][:main][:invalid_key] no server restart will raise. I had tested the restart with sudo service postfix restart and saw the error.

@brauliobo service restart is functioning correctly with your suggested test. Please close this issue as it is resolved now.


Test of ubFormattedWidth

I did a test of a Universal button similar to "next card>" where the ">" is a SVG drawing, supposily always aligned right.
Label is aligned left
Icon gravity is right
The change of label is not reflected on the formatted width, being herratic...Please note: the width in msg is opposite to the width in the property inspector.
The only way to make it works is to put a "wait x seconds with messages" after the change of label and before the ubFormattedWidth function
Any help is appreciated. Thanks
This is the code, from another button, used to verify the formatted width:
on mouseUp pMouseButton
     put the topRight of  widget "UbtnTest"  into tTopRight
     put the buttonText of widget "UbtnTest" into tLabel
     if tLabel = "next card" then
          set the buttonText of widget "UbtnTest" to "up"
     else
          set the buttonText of widget "UbtnTest" to "next card"
     end if
--wait 1 seconds with messages
     put the ubFormattedWidth of widget "UbtnTest" into tWidth
     put tWidth into msg
     set the width of widget "UbtnTest" to tWidth
     set the topRight of widget "UbtnTest" to tTopRight
end mouseUp

You are right, I noticed issues with the calculation of ubFormattedWidth and there is also a redraw problem. May be I will ditch the property and replace it with a handler call. This way the widget could be redrawn resizing the width of it's components to adjust the widget width to the "formatted width".

The way I intended to solve the problem didn't work as I expected. Adjusting the button's width right after changing the button label still needs to be a delayed. But I added a LC handler "ubResizeToFormattedWidth" to the widget's default script which should eliminate the glitches you observed by dynamically changing the button label. Provided that you add the ubResizeToFormattedWidth handler to the script object of the widget your sample script should read as follows:
command ubSwitchLabel
   local tTopRight, tLabel

   put the topRight of  widget 1  into tTopRight
   put the buttonText of widget 1 into tLabel

   set the iconSizeRatio of widget 1 to 0.55

   if tLabel = "next card" then
      set the buttonText of widget 1 to "up"
   else
      set the buttonText of widget 1 to "next card"
   end if

   dispatch "ubResizeToFormattedWidth" to widget 1
   set the topRight of widget 1 to tTopRight

   if the buttonText of widget 1 = "next card" then
      set the iconSizeRatio of widget 1 to 0.55
   else
      set the iconSizeRatio of widget 1 to 1
   end if
end ubSwitchLabel

Adjust the text margin in the "Text" section of the Property Inspector and possibly you may need to increase the delay in the ubResizeToFormattedWidth handler.

Hello.
Thanks for the effort but it still doesn’t work very well.
See attached test stack.
As a suggestion, it should have a more general way of handling the formatted size, without the need to manually calibrate the margins according to the length of text.
In my case, for example, I localise using properties profile (there are hundred in several language). They often share the code while having different label length.
Cordiali saluti
Roberto Trevisan

Trevix Design
di Trevisan Roberto

Il giorno 26 ott 2022, alle ore 12:55, Ralf Bitter @.***> ha scritto:
The way I intended to solve the problem didn't work as I expected. Adjusting the button's width right after changing the button label still needs to be a delayed. But I added a LC handler "ubResizeToFormattedWidth" to the widget's default script which should eliminate the glitches you observed by dynamically changing the button label. Provided that you add the ubResizeToFormattedWidth handler to the script object of the widget your sample script should read as follows:
command ubSwitchLabel
local tTopRight, tLabel
put the topRight of  widget 1  into tTopRight
put the buttonText of widget 1 into tLabel
set the iconSizeRatio of widget 1 to 0.55
if tLabel = "next card" then
set the buttonText of widget 1 to "up"
else
set the buttonText of widget 1 to "next card"
end if
dispatch "ubResizeToFormattedWidth" to widget 1
set the topRight of widget 1 to tTopRight
if the buttonText of widget 1 = "next card" then
set the iconSizeRatio of widget 1 to 0.55
else
set the iconSizeRatio of widget 1 to 1
end if
end ubSwitchLabel
Adjust the text margin in the "Text" section of the Property Inspector and possibly you may need to increase the delay in the ubResizeToFormattedWidth handler.
—
Reply to this email directly, view it on GitHub https://github.com/revig/universal-button-widget/issues/5#issuecomment-1291853089, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKGJKWIIJSALTP4FAPW6GULWFEE2ZANCNFSM6AAAAAAQ7Y5Y5Q.
You are receiving this because you authored the thread.

I don't see any attachment. Could you please attach the stack again as ZIP file?

Here you go.
Cordiali saluti
Roberto Trevisan

Trevix Design
di Trevisan Roberto
Torino Italy
ph: +39<PHONE_NUMBER>
web: https://www.trevix.it    email: @.***   Skype: trevisan.roberto
Via Cavallermaggiore 10
10139 Torino
C.F. TRVRRT54E23G914B
PEC: @.***    cod. destinatario:non disponibile
all informations and attachments are confidential and a trevix design intellectual property,
if you receive this message in error, please delete it and contact @.***

Il giorno 27 ott 2022, alle ore 13:03, Ralf Bitter @.***> ha scritto:
I don't see any attachment. Could you please attach the stack again as ZIP file?
—
Reply to this email directly, view it on GitHub https://github.com/revig/universal-button-widget/issues/5#issuecomment-1293357484, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKGJKWNP4S3JGTEOZHNVITTWFJOQDANCNFSM6AAAAAAQ7Y5Y5Q.
You are receiving this because you authored the thread.

Trying again
SVGTestButtons2.livecode.zip

Checked your test stack and noticed that you forgot, like described in the documentation, to add the ubResizeToFormattedWidth default handler to the widget's script object. And keep in mind that you no longer need to use the wait command in your own scripts. Possibly you may need to adjust the time period of the wait command in the ubResizeToFormattedWidth though.
One more note: I noticed that you tried to change the button label "on preOpenCard". Unfortunately this does not work, may be due to the same reason why adjusting the button width using lock screen fails. I replaced preOpenCard with openCard. However, this has the effect that the process of switching the label and resizing is visible. I know this solution for your issue is far from perfect, but this is what I can offer without completely recreating the widget.
Please see the attached test stack including my modifications.
SVGTestButtons2Mod.livecode.zip


Unable to change email for profile/user accounts

Server error:
Errno::ECONNREFUSED (Connection refused - connect(2) for "localhost" port 25):

Fixed! Created a SendGrid account, added ENV vars, and changed production.rb.


Duplicate ⌘␣ showing in KeyCastr

OSX 10.15.4
KeyCastr 0.9.8
Installed via brew
Pressing - to bring up spotlight shows double command spaces.

I have this as well (default visualiser). Using ␣+⌘ for zooming inside AcrobatDC.

Yep, this is annoying -- KeyCastr actually receives two separate events when ⌘␣ is pressed. Unclear as to why, but we'd need to special-case this in order to remove the unexpected behavior.

I have noticed that issue does not happen on certain machines (arm64 or the new keyboard layout). It still occurs in older models. It seems to be hardware-specific and is probably not worth addressing as a special case.


services/s3: Add tests upon minio

Add tests upon minio for s3.

service test s3 is not triggered, how about adding a space in s3/README.md for test?


Add enabled flag to PhysicsDebugConfig to globally disable debug rendering at runtime

This allows easily turning debug renderer on and off by changing enabled field of PhysicsDebugConfig
Also it matches similar approach by GizmoConfig from bevy and DebugRenderContext from rapier.

I wonder if this option should also disable debug rendering for entities with the DebugRender component. It might be useful to be able to disable all debug rendering without having to remove the components.

I wonder if this option should also disable debug rendering for entities with the DebugRender component. It might be useful to be able to disable all debug rendering without having to remove the components.

Doesn't it already disable all systems inside the plugin?

I wonder if this option should also disable debug rendering for entities with the DebugRender component. It might be useful to be able to disable all debug rendering without having to remove the components.

Doesn't it already disable all systems inside the plugin?

Oh my bad, it uses a run condition so it doesn't run the systems at all. For some reason I thought it still ran it for entities with DebugRender and skipped the rest, not sure why. But you're right👍

Looks good, I can merge this now


IR target locations required in mission setup

Infrared targets were eliminated from the rules. The mission config setup still requires infrared target locations.

Yes, I noticed this when working on #18.


ci: add container scanning to default checks

Signed-off-by: aldousalvarez<EMAIL_ADDRESS>

This appears to be a duplicate of https://github.com/hyperledger/cacti/pull/1981 - closing it for now as part of the PR backlog tidying operation.


FIPS code should be updated

Hello,
Please update the FIPS code for the following counties in the file
https://github.com/plotly/datasets/blob/master/geojson-counties-fips.json
Alaska | Kusilvak should be changed from 02270 to 02158
South Dakota | Oglala Lakota should be changed from 46113 to 46102
Source: https://www.cdc.gov/nchs/nvss/bridged_race/county_geography-_changes2015.pdf

Thanks for letting us know about these changes! This dataset exists for demonstration purposes rather than for any actual production or analysis use, so we're not keeping them up to date :)

So I'm assuming these changes won't be made?

I don't think we'd want to change this dataset today, no.


[quazip] update and build against Qt6

[x] Changes comply with the maintainer guide
[x] SHA512s are updated for each updated download
[ ] The "supports" clause reflects platforms that may be fixed by this new version
[ ] Any fixed CI baseline entries are removed from that file.
[ ] Any patches that are no longer applied are deleted from the port's directory.
[x] The version database is fixed by rerunning ./vcpkg x-add-version --all and committing the result.
[ ] Only one version is added to each modified port's versions file.

Feature quazip[bzip2] passed with following triplets:
x86-windows
x64-windows


RuntimeError: CUDA error: uncorrectable ECC error encountered

System Info
PyTorch version: 2.0.1
CUDA used to build PyTorch: 11.8
OS: Ubuntu 20.04.6 LTS (x86_64)
GCC version: gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0
Clang version: Could not collect
CMake version: version 3.27.5
Python version: 3.10.13
Is CUDA available: True
CUDA runtime version: 11.8
CUDA compiler version: 11.8.89
Nvidia driver Version: 520.61.05
GPU models and configuration: NVIDIA A100 80GB PCIe
Information

[X] The official example scripts
[ ] My own modified scripts

🐛 Describe the bug
python -m llama_recipes.finetuning  --use_peft --peft_method lora --quantization --model_name /path_to_Llama-2-7b-hf --output_dir /path_of_outdir --fp16

Error logs
Training Epoch: 0:   0%|                                         | 0/388 [00:00<?, ?it/s]/anaconda/envs/it/lib/python3.10/site-packages/bitsandbytes/autograd/_functions.py:322: UserWarning: MatMul8bitLt: inputs will be cast from torch.float32 to float16 during quantization
  warnings.warn(f"MatMul8bitLt: inputs will be cast from {A.dtype} to float16 during quantization")
Traceback (most recent call last):
  File "/anaconda/envs/it/lib/python3.10/site-packages/llama_recipes/utils/train_utils.py", line 79, in train
    loss = model(**batch).loss
  File "/anaconda/envs/it/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
    return forward_call(*args, **kwargs)
  File "/anaconda/envs/it/lib/python3.10/site-packages/peft/peft_model.py", line 918, in forward
    return self.base_model(
  File "/anaconda/envs/it/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
    return forward_call(*args, **kwargs)
  File "/anaconda/envs/it/lib/python3.10/site-packages/peft/tuners/tuners_utils.py", line 94, in forward
    return self.model.forward(*args, **kwargs)
  File "/anaconda/envs/it/lib/python3.10/site-packages/accelerate/hooks.py", line 165, in new_forward
    output = old_forward(*args, **kwargs)
  File "/anaconda/envs/it/lib/python3.10/site-packages/transformers/models/llama/modeling_llama.py", line 820, in forward
    outputs = self.model(
  File "/anaconda/envs/it/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
    return forward_call(*args, **kwargs)
  File "/anaconda/envs/it/lib/python3.10/site-packages/accelerate/hooks.py", line 165, in new_forward
    output = old_forward(*args, **kwargs)
  File "/anaconda/envs/it/lib/python3.10/site-packages/transformers/models/llama/modeling_llama.py", line 701, in forward
    layer_outputs = torch.utils.checkpoint.checkpoint(
  File "/anaconda/envs/it/lib/python3.10/site-packages/torch/utils/checkpoint.py", line 249, in checkpoint
    return CheckpointFunction.apply(function, preserve, *args)
  File "/anaconda/envs/it/lib/python3.10/site-packages/torch/autograd/function.py", line 506, in apply
    return super().apply(*args, **kwargs)  # type: ignore[misc]
  File "/anaconda/envs/it/lib/python3.10/site-packages/torch/utils/checkpoint.py", line 107, in forward
    outputs = run_function(*args)
  File "/anaconda/envs/it/lib/python3.10/site-packages/transformers/models/llama/modeling_llama.py", line 697, in custom_forward
    return module(*inputs, past_key_value, output_attentions)
  File "/anaconda/envs/it/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
    return forward_call(*args, **kwargs)
  File "/anaconda/envs/it/lib/python3.10/site-packages/accelerate/hooks.py", line 165, in new_forward
    output = old_forward(*args, **kwargs)
  File "/anaconda/envs/it/lib/python3.10/site-packages/transformers/models/llama/modeling_llama.py", line 424, in forward
    hidden_states, self_attn_weights, present_key_value = self.self_attn(
  File "/anaconda/envs/it/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
    return forward_call(*args, **kwargs)
  File "/anaconda/envs/it/lib/python3.10/site-packages/accelerate/hooks.py", line 165, in new_forward
    output = old_forward(*args, **kwargs)
  File "/anaconda/envs/it/lib/python3.10/site-packages/transformers/models/llama/modeling_llama.py", line 322, in forward
    key_states = self.k_proj(hidden_states)
  File "/anaconda/envs/it/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
    return forward_call(*args, **kwargs)
  File "/anaconda/envs/it/lib/python3.10/site-packages/accelerate/hooks.py", line 165, in new_forward
    output = old_forward(*args, **kwargs)
  File "/anaconda/envs/it/lib/python3.10/site-packages/bitsandbytes/nn/modules.py", line 441, in forward
    out = bnb.matmul(x, self.weight, bias=self.bias, state=self.state)
  File "/anaconda/envs/it/lib/python3.10/site-packages/bitsandbytes/autograd/_functions.py", line 563, in matmul
    return MatMul8bitLt.apply(A, B, out, bias, state)
  File "/anaconda/envs/it/lib/python3.10/site-packages/torch/autograd/function.py", line 506, in apply
    return super().apply(*args, **kwargs)  # type: ignore[misc]
  File "/anaconda/envs/it/lib/python3.10/site-packages/bitsandbytes/autograd/_functions.py", line 327, in forward
    CA, CAt, SCA, SCAt, coo_tensorA = F.double_quant(A.to(torch.float16), threshold=state.threshold)
  File "/anaconda/envs/it/lib/python3.10/site-packages/bitsandbytes/functional.py", line 2016, in double_quant
    nnz = nnz_row_ptr[-1].item()
RuntimeError: CUDA error: uncorrectable ECC error encountered
CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1.
Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.

Expected behavior
There should not be any errors since the CUDA version is compatible with the version of Pytorch 2.0.1.

I show bellow my current notebook that is resulting in this error. You can quickly tried. It's just fine tuning with guanaco-llama2-1k.
from tqdm import tqdm
from datasets import load_dataset
from transformers import (
    AutoModelForCausalLM,
    AutoTokenizer,
    BitsAndBytesConfig,
    TrainingArguments,
    pipeline,
)
from peft import LoraConfig, PeftModel
from trl import SFTTrainer
# The model that you want to train from the Hugging Face hub
model_name = "meta-llama/Llama-2-13b-chat-hf"

# Fine-tuned model name
new_model = "checkpoints/llama-2-13b-ft"

################################################################################
# QLoRA parameters
################################################################################

# LoRA attention dimension
lora_r = 256

# Alpha parameter for LoRA scaling
lora_alpha = 16

# Dropout probability for LoRA layers
lora_dropout = 0.1

################################################################################
# bitsandbytes parameters
################################################################################

# Activate 4-bit precision base model loading
#use_4bit = True

# Compute dtype for 4-bit base models
#bnb_4bit_compute_dtype = "float16"

# Quantization type (fp4 or nf4)
#bnb_4bit_quant_type = "nf4"

# Activate nested quantization for 4-bit base models (double quantization)
#use_nested_quant = False

################################################################################
# TrainingArguments parameters
################################################################################

# Output directory where the model predictions and checkpoints will be stored
output_dir = "./checkpoints"

# Number of training epochs
num_train_epochs = 1

# Enable fp16/bf16 training (set bf16 to True with an A100)
fp16 = False
bf16 = False

# Batch size per GPU for training
per_device_train_batch_size = 16

# Batch size per GPU for evaluation
per_device_eval_batch_size = 16

# Number of update steps to accumulate the gradients for
gradient_accumulation_steps = 1

# Enable gradient checkpointing
gradient_checkpointing = True

# Maximum gradient normal (gradient clipping)
max_grad_norm = 0.3

# Initial learning rate (AdamW optimizer)
learning_rate = 5e-5

# Weight decay to apply to all layers except bias/LayerNorm weights
weight_decay = 0.001

# Optimizer to use
optim = "paged_adamw_32bit"

# Learning rate schedule (constant a bit better than cosine)
lr_scheduler_type = "constant"

# Number of training steps (overrides num_train_epochs)
max_steps = -1

# Ratio of steps for a linear warmup (from 0 to learning rate)
warmup_ratio = 0.03

# Group sequences into batches with same length
# Saves memory and speeds up training considerably
group_by_length = True

# Save checkpoint every X updates steps
save_steps = 25

# Log every X updates steps
logging_steps = 25

################################################################################
# SFT parameters
################################################################################

# Maximum sequence length to use
max_seq_length = 4096

# Pack multiple short examples in the same input sequence to increase efficiency
packing = False

# Load the entire model on the GPU 0
device_map = {"": 0}
# Load tokenizer and model with QLoRA configuration

bnb_config = BitsAndBytesConfig(load_in_8bit = True)

hf_auth = "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"
model = AutoModelForCausalLM.from_pretrained(
    model_name,
    quantization_config=bnb_config,
    device_map="auto",
    use_auth_token=hf_auth,

)
# Load LLaMA tokenizer
#tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True,use_auth_token=True)
hf_auth = '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'
tokenizer = AutoTokenizer.from_pretrained(
    model_name,
    use_auth_token=hf_auth,
    add_bos_token = False,
    add_eos_token = False,
)
tokenizer.add_special_tokens({'pad_token': '[PAD]'})
tokenizer.padding_side = "right"
tokenizer.model_max_length = 4096
# Load LoRA configuration
peft_config = LoraConfig(
    lora_alpha=lora_alpha,
    lora_dropout=lora_dropout,
    r=lora_r,
    bias="none",
    task_type="CAUSAL_LM",
)

# Set training parameters
training_arguments = TrainingArguments(
    output_dir=output_dir,
    num_train_epochs=num_train_epochs,
    per_device_train_batch_size=per_device_train_batch_size,
    gradient_accumulation_steps=gradient_accumulation_steps,
    optim=optim,
    save_steps=save_steps,
    logging_steps=logging_steps,
    learning_rate=learning_rate,
    weight_decay=weight_decay,
    fp16=False,
    bf16=False,
    max_grad_norm=max_grad_norm,
    max_steps=max_steps,
    warmup_ratio=warmup_ratio,
    group_by_length=group_by_length,
    lr_scheduler_type=lr_scheduler_type,
    report_to="none"
)

data_train = load_dataset("mlabonne/guanaco-llama2-1k",split = "train")

# Set supervised fine-tuning parameters
trainer = SFTTrainer(
    model=model,
    train_dataset=data_train,
    peft_config=peft_config,
    dataset_text_field="text",
    max_seq_length = 4096,
    tokenizer=tokenizer,
    args=training_arguments,
    packing=packing,
)
trainer.train()

And my system:
Collecting environment information...
PyTorch version: 2.0.1+cu117
Is debug build: False
CUDA used to build PyTorch: 11.7
ROCM used to build PyTorch: N/A

OS: Ubuntu 20.04.5 LTS (x86_64)
GCC version: (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
Clang version: Could not collect
CMake version: version 3.27.5
Libc version: glibc-2.31

Python version: 3.9.16 (main, Dec  7 2022, 01:11:51)  [GCC 9.4.0] (64-bit runtime)
Python platform: Linux-5.19.0-45-generic-x86_64-with-glibc2.31
Is CUDA available: True
CUDA runtime version: 11.6.124
CUDA_MODULE_LOADING set to: LAZY
GPU models and configuration: GPU 0: NVIDIA A100 80GB PCIe
Nvidia driver version: 525.116.04
cuDNN version: Probably one of the following:
/usr/lib/x86_64-linux-gnu/libcudnn.so.8.4.1
/usr/lib/x86_64-linux-gnu/libcudnn_adv_infer.so.8.4.1
/usr/lib/x86_64-linux-gnu/libcudnn_adv_train.so.8.4.1
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_infer.so.8.4.1
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_train.so.8.4.1
/usr/lib/x86_64-linux-gnu/libcudnn_ops_infer.so.8.4.1
/usr/lib/x86_64-linux-gnu/libcudnn_ops_train.so.8.4.1
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

CPU:
Architecture:                    x86_64
CPU op-mode(s):                  32-bit, 64-bit
Byte Order:                      Little Endian
Address sizes:                   46 bits physical, 48 bits virtual
CPU(s):                          12
On-line CPU(s) list:             0-11
Thread(s) per core:              1
Core(s) per socket:              12
Socket(s):                       1
NUMA node(s):                    1
Vendor ID:                       GenuineIntel
CPU family:                      6
Model:                           106
Model name:                      Intel(R) Xeon(R) Gold 6342 CPU @ 2.80GHz
Stepping:                        6
CPU MHz:                         2800.050
BogoMIPS:                        5600.10
Hypervisor vendor:               Xen
Virtualization type:             full
L1d cache:                       576 KiB
L1i cache:                       384 KiB
L2 cache:                        15 MiB
L3 cache:                        432 MiB
NUMA node0 CPU(s):               0-11
Vulnerability Itlb multihit:     KVM: Mitigation: VMX unsupported
Vulnerability L1tf:              Mitigation; PTE Inversion
Vulnerability Mds:               Vulnerable: Clear CPU buffers attempted, no microcode; SMT Host state unknown
Vulnerability Meltdown:          Mitigation; PTI
Vulnerability Mmio stale data:   Vulnerable: Clear CPU buffers attempted, no microcode; SMT Host state unknown
Vulnerability Retbleed:          Not affected
Vulnerability Spec store bypass: Vulnerable
Vulnerability Spectre v1:        Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2:        Mitigation; Retpolines, IBPB conditional, STIBP disabled, RSB filling, PBRSB-eIBRS Not affected
Vulnerability Srbds:             Not affected
Vulnerability Tsx async abort:   Not affected
Flags:                           fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl cpuid tsc_known_freq pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch cpuid_fault pti intel_ppin ibpb fsgsbase bmi1 avx2 smep bmi2 rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves umip rdpid

Versions of relevant libraries:
[pip3] mypy-extensions==1.0.0
[pip3] numpy==1.26.0
[pip3] torch==2.0.1
[pip3] torchvision==0.15.2
[conda] Could not collect

There might be some fragile codes, but my issue was resolved after switching to another A100 GPU virtual machine within the same cluster. Unfortunately, I cannot provide the specific package version that triggered the error, as the environment in the previous machine has been deleted.

It's probably happening the same with me. Today is working. The exact same code...

I came across this issue while searching for the same error message. it looks like it was probably a hardware problem, so you may want to close this issue.
https://stackoverflow.com/questions/11839555/cuda-uncorrectable-ecc-error-encountered


Debug console stops autoscrolling when a line wraps around

Issue Type: Bug

Make sure the debug console is narrow enough that at least one line will wrap around
Scroll all the way to the bottom of the debug console so it will autoscroll as more output is generated
Run any task that produces output with long lines

Notice that when a line that wraps around is printed, autoscrolling stops working and you have to manually scroll to the end to resume it.
VS Code version: Code 1.36.1 (2213894ea0415ee8c85c5eea0d0ff81ecc191529, 2019-07-08T22:56:38.504Z)
OS version: Darwin x64 18.6.0

System Info

Item
Value

CPUs
Intel(R) Core(TM) i7-6920HQ CPU @ 2.90GHz (8 x 2900)

GPU Status
2d_canvas: enabledflash_3d: enabledflash_stage3d: enabledflash_stage3d_baseline: enabledgpu_compositing: enabledmultiple_raster_threads: enabled_onnative_gpu_memory_buffers: enabledoop_rasterization: disabled_offprotected_video_decode: unavailable_offrasterization: enabledskia_deferred_display_list: disabled_offskia_renderer: disabled_offsurface_synchronization: enabled_onvideo_decode: enabledviz_display_compositor: disabled_offwebgl: enabledwebgl2: enabled

Load (avg)
6, 5, 5

Memory (System)
16.00GB (0.12GB free)

Process Argv

Screen Reader
no

VM
0%

I can reproduce this, but only if the debug console panel is moved right, not bottom.

I am also running into this.
Possibly related: https://github.com/Microsoft/vscode/issues/70331

VSCode Version: 1.37.1
OS Version: Ubuntu 18.04.3 LTS

Steps to Reproduce:

Create a new Python project (requires numpy)
Add the code:

import numpy as np
x = 5

Place a breakpoint on x=5
Run the code, allow the breakpoint to be hit.
In the debug console type: np.ones((720,1))
In the debug console type: 4+4
Observe that the scroll returns to the top of the debug console

Does this issue occur when all extensions are disabled?: Yes

@JoshVarty nice steps. Thanks. I plan to look next week into this.

I can not reproduce this with node, even though I have multiple lines that wrap.
Unfortunetly I do not have pyhton setup on my machine to follow the exact python steps (after doing pip install numpy I get an exception when debugging the program No module named 'numpy')
I believe the issue is here
I am open for a PR which fixes this.
The solution would be to better aproximate the height based on the value length.
Due to this bad approximation the autoscrolling breaks.

I'm away from my desk this week so I can't double check myself, but instead
of using numpy you could try '[i for i in range(20000)]' in the debugger.
That should return a list of 20,000 numbers and I would assume be long
enough to trigger the bug.
Sent from my iPhone
On Sep 10, 2019, at 9:01 AM, Isidor Nikolic<EMAIL_ADDRESS>wrote:
I can not reproduce this with node, even though I have multiple lines that
wrap.
Unfortunetly I do not have pyhton setup on my machine to follow the exact
python steps (after doing pip install numpy I get an exception when
debugging the program No module named 'numpy')
I believe the issue is here
https://github.com/Microsoft/vscode/blob/5a9913099c077fe0c93abcdb88d0cb67169fefcf/src/vs/workbench/contrib/debug/browser/repl.ts#L794
I am open for a PR which fixes this.
The solution would be to better aproximate the height based on the value
length.
Due to this bad approximation the autoscrolling breaks.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/microsoft/vscode/issues/77837?email_source=notifications&email_token=AAJQ6P4DGKOFKAREKZDDHX3QI6SCBA5CNFSM4IGKQBP2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6LF4AQ#issuecomment-529948162,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAJQ6P3UJNFZZKXXZZXQ6LDQI6SCBANCNFSM4IGKQBPQ
.

Nope, this works for me

@isidorn
The line doesn't wrap around because the output is trimmed. You might want to try this instead:
'-'.join([str(i) for i in range(2000)])

Also I can only reproduce with the debug panel on the right (Right click > Move panel right).
I can't reproduce the problem with that python line above though.

In trying to come up with a numpy-free set of repro steps (see below), I noticed something unexpected. In the Python stand-alone console, numpy.ones((5,1)) outputs
array([[1.],
       [1.],
       [1.],
       [1.],
       [1.]])

while in the Debug Console, it outputs
array([[1.],\n       [1.],\n       [1.],\n       [1.],\n       [1.]])

The same is not true for some other non-numpy multiline-output, such as the one from print("a\nb"), which is shown in two lines in both cases. Also, commands such as print(str(numpy.ones((720,1)))) (not the extra str) do not cause this issue.
Based on this, consider the following hypotheses (speculative, but nevertheless):

This is a numpy-specific problem, so @isidorn might have a hard time reproducing it without setting up numpy in his Python environment.
VS Code uses a correct internal rendering of the output to estimate its height, but the actual output has a lower height due to \n being printed instead of converted into line breaks. This causes a height mismatch somewhere, leading to incorrect vertical scroll positions. This is somewhat supported by the "Copy All" command in the Debug Console copying line breaks, not \n characters.

I think it has something to do with Python's __repr__ (which might mean this isn't a VSCode bug, but a Python tools bug?)
I believe __repr__ creates a representation of a Python object for use in things like debuggers.
Anyways, I've got a numpy-free repro for you:

Create a new Python project
Add the code:

class Test:
    def __repr__(self):
        return "\n\t" * 10000
x = Test()

y = "this line is for your breakpoint"

Place a breakpoint on y = "this line is for your breakpoint"
Run the code, allow the breakpoint to be hit.
In the debug console type: x
In the debug console type: 4+4
Observe that the scroll returns to the top of the debug console

What's interesting is that if you create x="\n\t" * 10000 and then observe x in the debug console, you'll notice that it prints the value of x properly and has no problems with any subsequent commands in the debug console.
This only seems to reproduce for me within the context of __repr__.

Can you all reproduce this with the debug console panel to the bottom? I can only when it's to the right.
Here are my steps to reproduce:

Run command ext install ms-python.python
Open this extension sample folder in vscode
Start debugging session (F5)
Open debug console on host
Move it to the right
Open a python file in the guest

And observe the scrolling problem.
This forces me to have the debug console at the bottom while developing an extension.

@JoshVarty thanks for awesome repro steps. I can repro now, investigating...

Thanks! :tada:

I verified using the nice steps here: https://github.com/microsoft/vscode/issues/77837#issuecomment-534796235
I'm still seeing scroll return to the top of the console.

Let's keep this closed since there is already a duplicate which I will look into next milestone.
Though it should behave a bit better now
Duplicate https://github.com/microsoft/vscode/issues/81951#event-2687450865

Actually my fix just made it worse. Sorry about that. Reverting my fix and reopening this issue.
This milestone I will fix this proper, promise 🙏

@jeanp413  The fix is working. I now have the desired scroll behavoir back! @jeanp413 and @isidorn Thanks a lot!

Thanks, adding verified label.


Thief "steal cannabis" objective is nonsense

This relies on botany being nice to you and also wasting swabs on the cannabis so they have a better yield instead of only getting about 2 per harvest. The objective averages around 26-30 pieces of cannabis. If you really feel like completing it, an invisible crate is almost required due to that amount needing about 2/2.5 duffelbags to haul it all around. Wasting a kit on a single objective due to its sheer size is inefficient and majority of the time it does not synergize well with the rest of your objectives.
 On some maps there are trays or patches of soil to plant your own stuff in, but putting emphasis on SOME maps.  You may or may not have to go through the effort of asking science for a hydroponics tray board and cargo for an exotics seed crate, but once you get that set up, it takes time away from your other objectives, keeping in mind how shit the yield is for cannabis and the amount you need. If you've already gotten to this point, botany sure as hell isn't giving you a cocoa plant to swab. It is simply not worth doing this objective.
This is probably one of the only objectives that you cannot do solely on your own. Objectives that don't require help from other players aren't exactly the best, as the way the game plays out is to work with other players towards your goals, but cannabis in particular is ass. There is no way to get it without asking for external help, meanwhile stealing animals, cloaks, stamps etc can be gathered without doing so.
Sorry for getting all up in arms about it, but man is it unfun.

it straight up isnt stealing its just begging or growing
and if you are a botanist its a non-objective

A while ago i discussed with shu (the guy who made thief) and we agreed that instead of cannabis, it should be any kind of plant (randomised), but he’s been busy

Getting any plant seems trivially easy considering what botany is like atm?

growing a plant still isnt theft why would it be an objective
its like an objective to "steal" a stack of plastic that you buy at cargo ultra engaging gameplay

I dunno, I think "be a drug dealer" is pretty funny as a minor antag, but maybe it needs a more specific implementation separate from theif.

Alright, I wrote a PR. I agree a drug dealer minor antag would be funny, but this is rough.


TS error when trying to export xstyled with added utilities

🐛 Bug Report
TS error Exported variable 'styled' has or is using name 'XStyled' from external module "file:///node_modules/@xstyled/styled-components/dist/index" but cannot be named. when trying to export return value from createCss
To Reproduce
Steps to reproduce the behavior:

Follow the guide on adding utilities https://xstyled.dev/docs/adding-new-utilities/
Try to export {styled};
Get an error.

Expected behavior
No typescript error
Link to repl or repo (highly encouraged)
Typescript playground with issue
Run npx envinfo --system --binaries --npmPackages @xstyled/system,@xstyled/styled-components,styled-components --markdown --clipboard
## System:
 - OS: macOS 13.0.1
 - CPU: (8) x64 Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz
 - Memory: 1.68 GB / 16.00 GB
 - Shell: 5.8.1 - /bin/zsh
## Binaries:
 - Node: 16.13.0 - ~/.nvm/versions/node/v16.13.0/bin/node
 - Yarn: 1.22.19 - ~/.yarn/bin/yarn
 - npm: 8.1.0 - ~/.nvm/versions/node/v16.13.0/bin/npm
## npmPackages:
 - @xstyled/styled-components: ^3.7.0 => 3.7.0
 - styled-components: ^5.3.5 => 5.3.5

@gregberge are there any plans to release this fix? :)


[SILABS] Folder structure and build system re-factoring for thermostat

Fix/Changes done:
re-factoring for thermostat application to adapt according to silabs changed folder
Previously we had efr32 folder now changed to silabs/efr32
Testing Done:
basic sanity on below combos-
MG12+wf200
MG12+rs9116
MG24+wf200
MG24+rs9116

@nipatel-silabs please sign the CLA

@nipatel-silabs please sign the CLA

ok I have done it.


Clean up auth notification in peruse branch

Addressed by PR https://github.com/maidsafe/safe_browser/pull/278


Make the safe zone more obvious to the user

We have #2917 as the ticket to do this. Will close this ticket and link to that one to track.


MEN-3191 02.Overview/11.Security/docs.md

ChangeLog:none
Signed-off-by: Peter Grzybowski<EMAIL_ADDRESS>

@drewmoseley I seek your initial comments, I made lots of crazy decisions in this section, so please advise on the general direction.


Live H.264 stream transcoding.

Many devices do not correctly support interlaced content and some devices have no MPEG-2 support at all. I assembled a proof of concept that works very well and will be included as experimental in 0.4.

It is now available as an experimental feature.

This feature has been under extensive testing for almost a month now with no changes needed in regards to the transcoding parts. It is as stable as it is likely ever going to be.