text:
Multiple auth providers and dingo

Q
A

Bug?
yes

New Feature?
no

Framework
Laravel

Framework version
8.x

Package version
3.x.x

PHP version

Actual Behaviour
I have created multiple guards and providers in auth.php. I have User model and AdminUser model. I can actually login and generate JWT token in both cases. But then problem is in my auth middleware where I try to check if the user is authenticated. The below code (It resides inside a middleware) always checks the default Users model and not the admin users model. Is there any way to fix it?
$this->auth->authenticate($route->getAuthenticationProviders());

Hi
I don't overly understand your issue (in particular the user model vs admin model), but the way dingo authentication works is it just goes down the list of authentication providers until one authenticates, and if none do, then it considers the request unauthenticated.
You should also read this, as you should be using dingo auth, not laravel auth (which you might be)
https://github.com/dingo/api/wiki/Authentication

authors: prasanthsd specialtactics


text:
Release v3.5.0-RC2 - Can not start due to Comms Error

Describe the bug
Charging do not start, Display says "EV meter Comms Error", which make sense since the EV meter (Eastron 3P) is switched of when not charging, but comes alive when charging starts. This seems to prevent charging to start.
There is a breaking change due to the address of the EV meter, but its correct in my case.
All works again when roll back to RC1
Upload your config
{"version":"v3.5.0-RC2","mode":"OFF","mode_id":0,"car_connected":true,"wifi":{"status":"WL_CONNECTED","ssid":"Useme","rssi":-73,"bssid":"E4:5E:1B:FB:86:5A"},"evse":{"temp":28,"temp_max":65,"connected":true,"access":false,"mode":0,"loadbl":0,"pwm":1024,"solar_stop_timer":0,"state":"Charging Stopped","state_id":9,"error":"EV Meter Comm Error","error_id":4,"rfid":"Not Installed"},"settings":{"charge_current":0,"override_current":0,"current_min":6,"current_max":16,"current_main":22,"current_max_circuit":22,"current_max_sum_mains":600,"solar_max_import":11,"solar_start_current":5,"solar_stop_time":10,"enable_C2":"Not present","modem":"Not present","mains_meter":"API","starttime":1712175060,"stoptime":0,"repeat":0},"mqtt":{"host":"192.168.86.36","port":1883,"topic_prefix":"SmartEVSE-49475","username":"mqtt","password_set":true,"status":"Connected"},"home_battery":{"current":0,"last_update":0},"ev_meter":{"description":"Eastron3P","address":101,"import_active_power":0,"total_kwh":0,"charged_kwh":0,"currents":{"TOTAL":0,"L1":0,"L2":0,"L3":0},"import_active_energy":0,"export_active_energy":0},"mains_meter":{"import_active_energy":0,"export_active_energy":0},"phase_currents":{"TOTAL":249,"L1":79,"L2":82,"L3":88,"last_data_update":1712168038,"original_data":{"TOTAL":249,"L1":79,"L2":82,"L3":88}},"backlight":{"timer":120,"status":"ON"}}

You put the kWh meter after the contactor? I think most/almost all people have differential switch => xx Amp breaker => kWh meter => contactor 1 or maybe 1&2 and then the ev type 2 plug?
Any specific reason you cut off the kWh meter?

Yes, the EV meter is after the contactor. The EV meter was added after the initial installation, and due to physical limitation it was added after the contactor. It have been working flawless in that manner up till now, but yes, it should really be before the contactor, so I have a weekend project of rewiring and reorganising the setup. So maybe not a bug, it just my poor setup that have worked up till now.

I've got a similar issue, charging stops almost immediately after starting due to a communication error. However, I do not turn off the EV meter with the relay so it is always on. Communication with my EV meter does work (partly), because I can see the current on all three phases jump to 15,x A for a second. There are no other MODBUS devices attached. I am not using a termination resistor on either end. This issue is both during normal charging and smart charging.
It worked with RC1, but not with RC2. A roll-back solved my issue.
EV meter: Eastron SDM630-Modbus V2, purchased from SanderVunderink.

This is very strange, yesterday I had the exact same setup in my test bench, without any timeouts.
If you configure the Eastron (temporarily) as your Mainsmeter, does it timeout too or is it a specific EVMeter problem?

Ok guys thanks for your bug report, this should fix it:
cf35328e.zip

Ok guys thanks for your bug report, this should fix it: cf35328e.zip

Unfortunately I am still getting a communications error, even when not charging.
I forgot to mention that I also use the API to push my DSMR5 smart meter readings to the EVSE. I'll try disabling that and see if it changes something.

Check your meter settings! Because we added some kWh meters your config might be off; see release notes!

I checked those meter settings yesterday and checked them again after installing cf35328e, they were correct.
After disabling the mains meter I no longer got communications errors, so I think the problem is with the API calls. I am using the following YAML in my ESPhome config:
interval:
  - interval: 5sec
    then:
      - http_request.post:
          url: !lambda |-
              std::string url;
              float l1 = id(returnedl1).state > 0 ? - id(currentl1).state : id(currentl1).state;
              float l2 = id(returnedl2).state > 0 ? - id(currentl2).state : id(currentl2).state;
              float l3 = id(returnedl3).state > 0 ? - id(currentl3).state : id(currentl3).state;
              url.append("http://192.168.10.12/currents?L1=");
              url.append(to_string(l1*10));
              url.append("&L2=");
              url.append(to_string(l2*10));
              url.append("&L3=");
              url.append(to_string(l3*10));
              return url.c_str();

My car battery is basically full, so I do not have a lot of time to debug this at the moment.

You can test without charging; does feeding the SmartEVSE with curl work?
curl -X POST "http://ip-addr/currents?L1=100&L2=200&L3=300"
...feeds your SmartEVSE with 10A,20A and 30A respectively on L1-L3. If you resend that info within 11 seconds you should not get a timeout....
If this works, the problem lies with your HA not feeding the SmartEVSE.
If this doesn't work, the problem lies in our firmware...

I think a found why its not working for me, and its not related to the EV meter. The time on the LCD says the GMT time, but the Web GUI show the correct time, GMT+2. So when i push NORMA/SOLAR/SMART, nothing happens, and on the LCD it says starting 21.00 (when i pushed to start) and LCD clock says time:19.00. So this trigger the timer with an offset of two hours.
Where does the SmartEvse fetch its time from? can I manually change that?
Maybe a should start a new issue so this one not going OT from TommyBoys problem?

No keep it at this issue, the symptoms are the same....
The webui gets its time from ntp from SmartEVSE, but gets its timezone from the OS/browser.
The SmartEVSE gets its Timezone info from the Wifi Setup Portal; if you re-setup your wifi you will see the automatically detected timezone, that is then stored in NVS memory.
We had to upgrade the ESPAsyn_wifimanager from 1.14.1 to 1.15.1 because the author took 1.14.1 offline; that might cause the problem...

@dingo35 do you think that this fix that you did https://github.com/dingo35/SmartEVSE-3.5/commit/5707a8f5f0237050ef20e5641e9123581a6082c6 would resolve also this issue?

If @Xnygra s report is accurate, it is not solved by the ntp change; his problem was that the timezone was inaccurate, your problem was that the time was inaccurate.
The starting/stopping is directly related to that: you were both delayed charging without noticing it, although it is clearly stated on the LCD screen AND the upper part of the webserver...

I did another try with the RC2 version, and restarted my router (Google nest wifi, if that matter) but still wrong time zone. And yes, it is stated delayed charging on the webserver, i just hadn't noticed that earlier, Start Time two hours ahead from that i pressed "Smart"

@Xnygra: READ: If you don't resetup your wifi, your timezone will not change.
You can also try this alpha 3.5.1 test version that has a totally different webserver, wifimanager and timezone detection:
26eae13983e.zip
By the way, no spiffs.bin to flash there, we are getting rid of that...

@Xnygra: READ: If you don't resetup your wifi, your timezone will not change.  Got it, didn't read your comment well enough.
The alpha 3.5.1 seems to work, got the correct time in display. Thank you.

source: gharchive/issue

authors: TommyboyNL Xnygra devdems dingo35 fluppie

license: MIT

license_type: permissive

license_source: github-api


text:
上传组件在安卓点击无反应

微信小程序嵌套的webview换成有上传功能的H5页面后，ios，微信开发工具，h5页面没问题，在安卓点击上传时没反应

这是来自QQ邮箱的假期自动回复邮件。

您好，我最近正在休假中，无法亲自回复您的邮件。我将在假期结束后，尽快给您回复。

检查一下是否有层级覆盖的情况，这边排查webview嵌套H5在android可正常上传。


text:
fix(common): polygon native address

[x] fix polygon native token address
[x] yarn changeset

LGTM

source: gharchive/pull-request

authors: Jeff-CCH zodahu

repo: dinngo/protocolink-js-sdk


text:
🛑 Iris Development API is down

In 905c964, Iris Development API (https://api.iris.dioptra-sandbox.xyz/docs) was down:

HTTP code: 404
Response time: 315 ms

Resolved: Iris Development API is back up in 60fd091.

repo: dioptra-io/iris-uptime


text:
Add Andreessen Horowitz

Summary
Adding a16z's program
Quality Assurance Checklist
< Confirmation of this pull request meeting the following requirements, prior to merge >

Review Items
Y/N

Site has a publicly known bug bounty or vulnerability disclosure program
Y

Disclosure policy is publicly available
Y

Public URL
Y

Submission follows the Diodb schema
Y

Your Twitter handle (Optional): N/A

LGTM! Thanks @rjwhitworth

repo: disclose/diodb


text:
No-phone join request

What is your username and discriminator?
truth#1932
Why did you join Discord Linux?
to learn and to share my knowledge - I'm a Linux user since 1997
Where did you hear about Discord Linux?
discord.me search
What is the passphrase that was assigned to you by the bot?
secure-pine-chicken-eurocentrism

From simonizor#0420 :
Looks good.  I've given you a temporary role so that you can enter the passphrase in the welcome channel.

authors: DiscordLinuxBot falsz

repo: discordlinux/rules


text:
UX: Tweak the archived channel UI

Before / After

How is longer text looking when in mobile or float?

:hugs: ?

The longer text was before! 😃 My thinking was:

Displaying "Archive channel completed" (grammatically dubious btw) for the rest of the time is a bit weird, as it looks like a just-in-time message but is actually a description for the archived channel 🤷
The name "destination topic" is uncommon and makes me think of "destination vacation" 🏝 😂
The period after the label "Channel is archived" was unnecessary

authors: CvX jjaffeux

repo: discourse/discourse-chat


text:
Windows Installation fails

In response to the request here
https://discuss.ocaml.org/t/windows-installation-failed/12875
I used powershell in administrator mode.
The output I got was.
PS G:\download\programminglanguages\ocaml> .\setup-diskuv-ocaml-windows_x86_64-1.2.0.exe
dkml-package.bc: [e[34mINFOe[0m] Writing to registry for Add/Remove Programs
dkml-package.bc: [e[34mINFOe[0m] Running: C:\WINDOWS\system32\reg.exe import
C:\Users\slayc\AppData\Local\Temp\uninstallf60055.reg
The operation completed successfully.
dkml-package.bc: [e[34mINFOe[0m] Detecting whether administrator privileges are needed by running
C:\Users\slayc\AppData\Local\Temp\7z9F5C695C\sg\network-ocamlcompiler\windows_x86_64\setup-machine.bat
-DkmlPath
C:\Users\slayc\AppData\Local\Temp\7z9F5C695C\sg\network-ocamlcompiler\windows_x86_64\dkmldir
-TempParentPath
C:\Users\slayc\AppData\Local\Temp\path_eval_3398a7
-SkipProgress -AllowRunAsAdmin
-SkipAutoInstallVsBuildTools
Start-Job : The pwsh executable cannot be found at "C:\Users\slayc.dotnet\tools.store\powershell\6.2.3\powershell\6.2.3\tools\netcoreapp2.1\any\win\pwsh.exe".
Note that 'Start-Job' is not supported by design in scenarios where PowerShell is being hosted in other applications. Instead, usage of the 'ThreadJob' module is recommended in such scenarios.
At line:1 char:1

-NoProfile -ExecutionPolicy Bypass -Command & {& 'C:\Users\slayc\AppD ...

CategoryInfo          : NotInstalled: (C:\Users\slayc.dot\u2026.1\any\win\pwsh.exe:String) [Start-Job], PSNotSupportedException
FullyQualifiedErrorId : IPCPwshExecutableNotFound,Microsoft.PowerShell.Commands.StartJobCommand

& 'C:\Users\slayc\AppData\Local\Temp\7z9F5C695C\sg\network-ocamlcompiler\windows_x86_64\setup-machine.ps1' -DkmlPath C:\Users\slayc\AppData\Local\Temp\7z9F5C695C\sg\network-ocamlcompiler\windows_x86_64\dkmldir -TempParentPath C:\Users\slayc\AppData\Local\Temp\path_eval_3398a7 -SkipProgress -AllowRunAsAdmin -SkipAutoInstallVsBuildTools; exit $LASTEXITCODE
dkml-package.bc: [INFO] Detected that a compatible Visual Studio was already installed; will not request administrator privileges
dkml-package.bc: [INFO] Running: C:\Users\slayc\AppData\Local\Temp\7z9F5C695C\bin\dkml-install-user-runner.exe
install-user-staging-opam64
--verbosity=info --color=always --prefix
C:\Users\slayc\AppData\Local\Programs\DiskuvOCaml
--staging-files
C:\Users\slayc\AppData\Local\Temp\7z9F5C695C\sg
dkml-package.bc: [INFO] Running: C:\Users\slayc\AppData\Local\Temp\7z9F5C695C\bin\dkml-install-user-runner.exe
install-user-staging-ocamlrun
--verbosity=info --color=always --prefix
C:\Users\slayc\AppData\Local\Programs\DiskuvOCaml
--staging-files
C:\Users\slayc\AppData\Local\Temp\7z9F5C695C\sg
dkml-package.bc: [INFO] Running: C:\Users\slayc\AppData\Local\Temp\7z9F5C695C\bin\dkml-install-user-runner.exe
install-user-staging-unixutils
--verbosity=info --color=always --prefix
C:\Users\slayc\AppData\Local\Programs\DiskuvOCaml
--staging-files
C:\Users\slayc\AppData\Local\Temp\7z9F5C695C\sg
dkml-package.bc: [INFO] Running: C:\Users\slayc\AppData\Local\Temp\7z9F5C695C\bin\dkml-install-user-runner.exe
install-user-staging-desktop-compile
--verbosity=info --color=always --prefix
C:\Users\slayc\AppData\Local\Programs\DiskuvOCaml
--staging-files
C:\Users\slayc\AppData\Local\Temp\7z9F5C695C\sg
dkml-package.bc: [INFO] Running: C:\Users\slayc\AppData\Local\Temp\7z9F5C695C\bin\dkml-install-user-runner.exe
install-user-staging-desktop-full
--verbosity=info --color=always --prefix
C:\Users\slayc\AppData\Local\Programs\DiskuvOCaml
--staging-files
C:\Users\slayc\AppData\Local\Temp\7z9F5C695C\sg
dkml-package.bc: [INFO] Running: C:\Users\slayc\AppData\Local\Temp\7z9F5C695C\bin\dkml-install-user-runner.exe
install-user-staging-opam32
--verbosity=info --color=always --prefix
C:\Users\slayc\AppData\Local\Programs\DiskuvOCaml
--staging-files
C:\Users\slayc\AppData\Local\Temp\7z9F5C695C\sg
dkml-package.bc: [INFO] Running: C:\Users\slayc\AppData\Local\Temp\7z9F5C695C\bin\dkml-install-user-runner.exe
install-user-staging-withdkml
--verbosity=info --color=always --prefix
C:\Users\slayc\AppData\Local\Programs\DiskuvOCaml
--staging-files
C:\Users\slayc\AppData\Local\Temp\7z9F5C695C\sg
dkml-package.bc: [INFO] Running: C:\Users\slayc\AppData\Local\Temp\7z9F5C695C\bin\dkml-install-user-runner.exe
install-user-staging-dkmlconfdir
--verbosity=info --color=always --prefix
C:\Users\slayc\AppData\Local\Programs\DiskuvOCaml
--staging-files
C:\Users\slayc\AppData\Local\Temp\7z9F5C695C\sg
dkml-package.bc: [INFO] Running: C:\Users\slayc\AppData\Local\Temp\7z9F5C695C\bin\dkml-install-user-runner.exe
install-user-offline-opamshim
--verbosity=info --color=always --prefix
C:\Users\slayc\AppData\Local\Programs\DiskuvOCaml
--staging-files
C:\Users\slayc\AppData\Local\Temp\7z9F5C695C\sg
dkml-install-user-runner.exe: [INFO] Running bytecode with: C:\Users\slayc\AppData\Local\Temp\7z9F5C695C\sg\staging-ocamlrun\windows_x86_64\bin\ocamlrun
C:\Users\slayc\AppData\Local\Temp\7z9F5C695C\sg\offline-opamshim\generic\install_user.bc
--verbosity=info
--color=always
--opam-exe
C:\Users\slayc\AppData\Local\Temp\7z9F5C695C\sg\staging-opam64\windows_x86_64\bin\opam.exe
--with-dkml-exe
C:\Users\slayc\AppData\Local\Temp\7z9F5C695C\sg\staging-withdkml\windows_x86_64\bin\with-dkml.exe
--target-dir
C:\Users\slayc\AppData\Local\Programs\DiskuvOCaml
FATAL [ebe9e0f2]. rename C:\Users\slayc\AppData\Local\Programs\DiskuvOCaml\bin\bos-808e45.tmp to C:\Users\slayc\AppData\Local\Programs\DiskuvOCaml\bin\opam-real.exe: Permission denied
dkml-package.bc: [ERROR] FATAL [5f927a8b].
A transient failure occurred.
                     Root cause: The command had exit code 20:
                                   C:\Users\slayc\AppData\Local\Temp\7z9F5C695C\bin\dkml-install-user-runner.exe
                                     install-user-offline-opamshim --verbosity=info --color=always
                                     --prefix C:\Users\slayc\AppData\Local\Programs\DiskuvOCaml
                                     --staging-files
                                     C:\Users\slayc\AppData\Local\Temp\7z9F5C695C\sg

                     >>> A transient failure occurred. <<<

and as a follow up
I found two issues. Pwsh did not exist in the target directory but did exist earlier in the path. I copied the pwsh.exe to the target directory and the installation proceeded further before reaching the could not copy issue. On investigation the relevant directory already contained the file that the .tmp file was trying to be renames to. It seems I have an earlier installtion of ocaml but have no recollection of trying to do so. I deleted the relevant ocaml directories and .\setup-diskuv-ocaml-windows_x86_64-1.2.0.exe ran to completion without errors.
I closed the administrator mode powershell window and opened a new powershell.
Utop is not a recognised command. Do I need to add some paths to the %PATH% environment variable.?

Can you tell me about this other OCaml installation?
C:\Users\slayc.dotnet\tools.store\powershell\6.2.3\powershell\6.2.3\tools\netcoreapp2.1\any\win: It sounds like Microsoft Store. Can you confirm that "PowerShell" was installed through the Microsoft Store? I can then try to recreate your environment in a sandbox.
Can you paste your PATH (run PowerShell, type echo $env:PATH)?

Thanks.

Unfortunately, no.

If the directory 'C:\Users\slayc\AppData\Local\Programs\DiskuvOCaml' exists then the installation fails.
If I delete 'C:\Users\slayc\AppData\Local\Programs\DiskuvOCaml' then the installation gets as far as the 'press "y"  then enter to exit installation' after about 5 minutes. If I press "y" then the installation exits with no errors.  However, when I restart powershell utop is not recognised.
This pattern in repeated if I use the pwsh.exe I copied to 'C:\Users\slayc.dotnet\tools.store\powershell\6.2.3\powershell\6.2.3\tools\netcoreapp2.1\any\win' and also if I use the more recenlty installed Powershell 7.3.6.

Adter lots of shenanigins this evening my current path environment variable is

C:\Program Files\PowerShell\7;C:\Program Files\WindowsApps\Microsoft.PowerShell_7.3.6.0_x64__8wekyb3d8bbwe;S:\ProgLang\Python\Scripts\;S:\ProgLang\Python\;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\dotnet\;C:\WINDOWS\System32\OpenSSH\;G:\Code\D\dmd2\windows\bin;G:\Code\D\D1\dmd\windows\bin;C:\Program Files\Crucial\Crucial Storage Executive;C:\Users\slayc\AppData\Local\Android\Sdk\platform-tools;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files (x86)\Rust nightly MSVC 1.42\bin;C:\Program Files (x86)\Rust nightly GNU 1.42\bin;C:\Program Files\OpenJDK\jdk-13.0.2\bin;C:\Program Files\Java\jdk1.8.0_211\bin;G:\NAS\;C:\Users\slayc\AppData\Roaming\Python\Python39\Scripts;C:\Users\slayc\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Git\cmd;C:\ProgramData\chocolatey\bin;C:\Program Files\OpenJDK\jdk-16\bin;C:\Program Files\Microsoft SQL Server\140\Tools\Binn\;C:\Program Files\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files\VSCodium\bin;C:\Users\slayc\.nimble\bin;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Users\slayc\AppData\Roaming\nvm;C:\Program Files\nodejs;C:\Program Files\Go\bin;C:\Program Files\Erlang OTP\bin;S:\ProgLang\Haxe\haxe;S:\ProgLang\Haxe\neko;S:\ProgLang\GoLang\bin;S:\ProgLang\Erlang\Erlang OTP\bin;S:\ProgLang\Elixir\Elixir\bin;C:\WINDOWS\system32\config\systemprofile\.mix\escripts;C:\Program Files\nodejs\;C:\Program Files\PowerShell\7\;C:\Users\slayc\scoop\shims;G:\Download\ProgrammingLanguages\vlang\v_windows\v\.bin;S:\ProgLang\vLang\v\.bin;C:\Users\slayc\source\repos\Cpp\mingw64\bin;C:\Program Files (x86)\Microsoft Visual Studio\Common\MSDev98\Bin;C:\Program Files (x86)\Microsoft Visual Studio\Common\Tools;C:\Program Files (x86)\Microsoft Visual Studio\VC98\bin;C:\Users\slayc\.cargo\bin;C:\Users\slayc.cargo\bin;C:\Users\slayc\AppData\Local\Microsoft\WindowsApps;C:\Program Files (x86)\Microsoft VS Code\bin;C:\Users\slayc\AppData\Roaming\npm;C:\Users\slayc\.dotnet\tools;C:\Users\slayc\go\bin;C:\Users\slayc\AppData\Local\GitHubDesktop\bin;C:\Users\slayc\.nimble\bin;C:\Users\slayc\AppData\Roaming\nvm;C:\Program Files\nodejs;C:\Program Files\Erlang OTP\bin;c:\Haskell\ghcup\bin;C:\tools\ghc-9.4.3\bin;C:\Users\slayc\.dotnet\tools;C:\Users\slayc\AppData\Local\Programs\Julia-1.8.5\bin;S:\ProgLang\Kotlinc\bin;C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2023.1\bin;;C:\Gradle\gradle-8.1\bin;C:\Users\slayc\go\bin;G:\Download\ProgrammingLanguages\Odin\Odin;C:\Users\slayc\AppData\Local\Programs\Microsoft VS Code\bin;E:\rakudo\bin;E:\rakudo\share\perl6\site\bin;S:\ProgLang\Haxe\haxe;C:\ProgramData\chocolatey\lib\Elixir\tools\bin;
PS C:\Users\slayc>

which shows that I've been trying to play around with lots of different programming languages recently.

If the installer finished the PATH would be updated. But right now, that is a side issue.
Main issue: I understand you are copying pwsh.exe around, but forget about the DkML installer if PowerShell is broken ... you have far worse issues! I hear you tell me you installed PowerShell 6.3 but that didn't include pwsh.exe (yikes!). It sounds like your system can't install either PowerShell or DkML. Is that accurate?
(Sent from mobile)
Get Outlook for iOShttps://aka.ms/o0ukef

From: FullValueRider @.>
Sent: Monday, August 21, 2023 2:47:00 PM
To: diskuv/dkml-installer-ocaml @.>
Cc: Jonah Beckford @.>; Comment @.>
Subject: Re: [diskuv/dkml-installer-ocaml] Windows Installation fails (Issue #63)

Unfortunately, no.

If the directory 'C:\Users\slayc\AppData\Local\Programs\DiskuvOCaml' exists then the installation fails.
If I delete 'C:\Users\slayc\AppData\Local\Programs\DiskuvOCaml' then the installation gets as far as the 'press "y" then enter to exit installation' after about 5 minutes. If I press "y" then the installation exits with no errors. However, when I restart powershell utop is not recognised.
This pattern in repeated if I use the pwsh.exe I copied to 'C:\Users\slayc.dotnet\tools.store\powershell\6.2.3\powershell\6.2.3\tools\netcoreapp2.1\any\win' and also if I use the more recenlty installed Powershell 7.3.6.

Adter lots of shenanigins this evening my current path environment variable is

C:\Program Files\PowerShell\7;C:\Program Files\WindowsApps\Microsoft.PowerShell_7.3.6.0_x64__8wekyb3d8bbwe;S:\ProgLang\Python\Scripts;S:\ProgLang\Python;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\dotnet;C:\WINDOWS\System32\OpenSSH;G:\Code\D\dmd2\windows\bin;G:\Code\D\D1\dmd\windows\bin;C:\Program Files\Crucial\Crucial Storage Executive;C:\Users\slayc\AppData\Local\Android\Sdk\platform-tools;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files (x86)\Rust nightly MSVC 1.42\bin;C:\Program Files (x86)\Rust nightly GNU 1.42\bin;C:\Program Files\OpenJDK\jdk-13.0.2\bin;C:\Program Files\Java\jdk1.8.0_211\bin;G:\NAS;C:\Users\slayc\AppData\Roaming\Python\Python39\Scripts;C:\Users\slayc\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Git\cmd;C:\ProgramData\chocolatey\bin;C:\Program Files\OpenJDK\jdk-16\bin;C:\Program Files\Microsoft SQL Server\140\Tools\Binn;C:\Program Files\Microsoft SQL Server\150\Tools\Binn;C:\Program Files\VSCodium\bin;C:\Users\slayc.nimble\bin;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\Users\slayc\AppData\Roaming\nvm;C:\Program Files\nodejs;C:\Program Files\Go\bin;C:\Program Files\Erlang OTP\bin;S:\ProgLang\Haxe\haxe;S:\ProgLang\Haxe\neko;S:\ProgLang\GoLang\bin;S:\ProgLang\Erlang\Erlang OTP\bin;S:\ProgLang\Elixir\Elixir\bin;C:\WINDOWS\system32\config\systemprofile.mix\escripts;C:\Program Files\nodejs;C:\Program Files\PowerShell\7;C:\Users\slayc\scoop\shims;G:\Download\ProgrammingLanguages\vlang\v_windows\v.bin;S:\ProgLang\vLang\v.bin;C:\Users\slayc\source\repos\Cpp\mingw64\bin;C:\Program Files (x86)\Microsoft Visual Studio\Common\MSDev98\Bin;C:\Program Files (x86)\Microsoft Visual Studio\Common\Tools;C:\Program Files (x86)\Microsoft Visual Studio\VC98\bin;C:\Users\slayc.cargo\bin;C:\Users\slayc.cargo\bin;C:\Users\slayc\AppData\Local\Microsoft\WindowsApps;C:\Program Files (x86)\Microsoft VS Code\bin;C:\Users\slayc\AppData\Roaming\npm;C:\Users\slayc.dotnet\tools;C:\Users\slayc\go\bin;C:\Users\slayc\AppData\Local\GitHubDesktop\bin;C:\Users\slayc.nimble\bin;C:\Users\slayc\AppData\Roaming\nvm;C:\Program Files\nodejs;C:\Program Files\Erlang OTP\bin;c:\Haskell\ghcup\bin;C:\tools\ghc-9.4.3\bin;C:\Users\slayc.dotnet\tools;C:\Users\slayc\AppData\Local\Programs\Julia-1.8.5\bin;S:\ProgLang\Kotlinc\bin;C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2023.1\bin;;C:\Gradle\gradle-8.1\bin;C:\Users\slayc\go\bin;G:\Download\ProgrammingLanguages\Odin\Odin;C:\Users\slayc\AppData\Local\Programs\Microsoft VS Code\bin;E:\rakudo\bin;E:\rakudo\share\perl6\site\bin;S:\ProgLang\Haxe\haxe;C:\ProgramData\chocolatey\lib\Elixir\tools\bin;
PS C:\Users\slayc>
which shows that I've been trying to play around with lots of different programming languages recently.
—
Reply to this email directly, view it on GitHubhttps://github.com/diskuv/dkml-installer-ocaml/issues/63#issuecomment-1687089220, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AREG4PLDOXMI4ZT67NF3WKTXWPJNJANCNFSM6AAAAAA3Y56ODI.
You are receiving this because you commented.Message ID: @.***>

In response to the request here
https://discuss.ocaml.org/t/windows-installation-failed/12875
I used powershell in administrator mode. The output I got was.
PS G:\download\programminglanguages\ocaml> .\setup-diskuv-ocaml-windows_x86_64-1.2.0.exe dkml-package.bc: [e[34mINFOe[0m] Writing to registry for Add/Remove Programs dkml-package.bc: [e[34mINFOe[0m] Running: C:\WINDOWS\system32\reg.exe import C:\Users\slayc\AppData\Local\Temp\uninstallf60055.reg The operation completed successfully. dkml-package.bc: [e[34mINFOe[0m] Detecting whether administrator privileges are needed by running C:\Users\slayc\AppData\Local\Temp\7z9F5C695C\sg\network-ocamlcompiler\windows_x86_64\setup-machine.bat -DkmlPath C:\Users\slayc\AppData\Local\Temp\7z9F5C695C\sg\network-ocamlcompiler\windows_x86_64\dkmldir -TempParentPath C:\Users\slayc\AppData\Local\Temp\path_eval_3398a7 -SkipProgress -AllowRunAsAdmin -SkipAutoInstallVsBuildTools Start-Job : The pwsh executable cannot be found at "C:\Users\slayc.dotnet\tools.store\powershell\6.2.3\powershell\6.2.3\tools\netcoreapp2.1\any\win\pwsh.exe". Note that 'Start-Job' is not supported by design in scenarios where PowerShell is being hosted in other applications. Instead, usage of the 'ThreadJob' module is recommended in such scenarios. At line:1 char:1

-NoProfile -ExecutionPolicy Bypass -Command & {& 'C:\Users\slayc\AppD ...

CategoryInfo          : NotInstalled: (C:\Users\slayc.dot\u2026.1\any\win\pwsh.exe:String) [Start-Job], PSNotSupportedException
FullyQualifiedErrorId : IPCPwshExecutableNotFound,Microsoft.PowerShell.Commands.StartJobCommand

& 'C:\Users\slayc\AppData\Local\Temp\7z9F5C695C\sg\network-ocamlcompiler\windows_x86_64\setup-machine.ps1' -DkmlPath C:\Users\slayc\AppData\Local\Temp\7z9F5C695C\sg\network-ocamlcompiler\windows_x86_64\dkmldir -TempParentPath C:\Users\slayc\AppData\Local\Temp\path_eval_3398a7 -SkipProgress -AllowRunAsAdmin -SkipAutoInstallVsBuildTools; exit $LASTEXITCODE dkml-package.bc: [INFO] Detected that a compatible Visual Studio was already installed; will not request administrator privileges dkml-package.bc: [INFO] Running: C:\Users\slayc\AppData\Local\Temp\7z9F5C695C\bin\dkml-install-user-runner.exe install-user-staging-opam64 --verbosity=info --color=always --prefix C:\Users\slayc\AppData\Local\Programs\DiskuvOCaml --staging-files C:\Users\slayc\AppData\Local\Temp\7z9F5C695C\sg dkml-package.bc: [INFO] Running: C:\Users\slayc\AppData\Local\Temp\7z9F5C695C\bin\dkml-install-user-runner.exe install-user-staging-ocamlrun --verbosity=info --color=always --prefix C:\Users\slayc\AppData\Local\Programs\DiskuvOCaml --staging-files C:\Users\slayc\AppData\Local\Temp\7z9F5C695C\sg dkml-package.bc: [INFO] Running: C:\Users\slayc\AppData\Local\Temp\7z9F5C695C\bin\dkml-install-user-runner.exe install-user-staging-unixutils --verbosity=info --color=always --prefix C:\Users\slayc\AppData\Local\Programs\DiskuvOCaml --staging-files C:\Users\slayc\AppData\Local\Temp\7z9F5C695C\sg dkml-package.bc: [INFO] Running: C:\Users\slayc\AppData\Local\Temp\7z9F5C695C\bin\dkml-install-user-runner.exe install-user-staging-desktop-compile --verbosity=info --color=always --prefix C:\Users\slayc\AppData\Local\Programs\DiskuvOCaml --staging-files C:\Users\slayc\AppData\Local\Temp\7z9F5C695C\sg dkml-package.bc: [INFO] Running: C:\Users\slayc\AppData\Local\Temp\7z9F5C695C\bin\dkml-install-user-runner.exe install-user-staging-desktop-full --verbosity=info --color=always --prefix C:\Users\slayc\AppData\Local\Programs\DiskuvOCaml --staging-files C:\Users\slayc\AppData\Local\Temp\7z9F5C695C\sg dkml-package.bc: [INFO] Running: C:\Users\slayc\AppData\Local\Temp\7z9F5C695C\bin\dkml-install-user-runner.exe install-user-staging-opam32 --verbosity=info --color=always --prefix C:\Users\slayc\AppData\Local\Programs\DiskuvOCaml --staging-files C:\Users\slayc\AppData\Local\Temp\7z9F5C695C\sg dkml-package.bc: [INFO] Running: C:\Users\slayc\AppData\Local\Temp\7z9F5C695C\bin\dkml-install-user-runner.exe install-user-staging-withdkml --verbosity=info --color=always --prefix C:\Users\slayc\AppData\Local\Programs\DiskuvOCaml --staging-files C:\Users\slayc\AppData\Local\Temp\7z9F5C695C\sg dkml-package.bc: [INFO] Running: C:\Users\slayc\AppData\Local\Temp\7z9F5C695C\bin\dkml-install-user-runner.exe install-user-staging-dkmlconfdir --verbosity=info --color=always --prefix C:\Users\slayc\AppData\Local\Programs\DiskuvOCaml --staging-files C:\Users\slayc\AppData\Local\Temp\7z9F5C695C\sg dkml-package.bc: [INFO] Running: C:\Users\slayc\AppData\Local\Temp\7z9F5C695C\bin\dkml-install-user-runner.exe install-user-offline-opamshim --verbosity=info --color=always --prefix C:\Users\slayc\AppData\Local\Programs\DiskuvOCaml --staging-files C:\Users\slayc\AppData\Local\Temp\7z9F5C695C\sg dkml-install-user-runner.exe: [INFO] Running bytecode with: C:\Users\slayc\AppData\Local\Temp\7z9F5C695C\sg\staging-ocamlrun\windows_x86_64\bin\ocamlrun C:\Users\slayc\AppData\Local\Temp\7z9F5C695C\sg\offline-opamshim\generic\install_user.bc --verbosity=info --color=always --opam-exe C:\Users\slayc\AppData\Local\Temp\7z9F5C695C\sg\staging-opam64\windows_x86_64\bin\opam.exe --with-dkml-exe C:\Users\slayc\AppData\Local\Temp\7z9F5C695C\sg\staging-withdkml\windows_x86_64\bin\with-dkml.exe --target-dir C:\Users\slayc\AppData\Local\Programs\DiskuvOCaml FATAL [ebe9e0f2]. rename C:\Users\slayc\AppData\Local\Programs\DiskuvOCaml\bin\bos-808e45.tmp to C:\Users\slayc\AppData\Local\Programs\DiskuvOCaml\bin\opam-real.exe: Permission denied
dkml-package.bc: [ERROR] FATAL [5f927a8b]. A transient failure occurred.
                     Root cause: The command had exit code 20:
                                   C:\Users\slayc\AppData\Local\Temp\7z9F5C695C\bin\dkml-install-user-runner.exe
                                     install-user-offline-opamshim --verbosity=info --color=always
                                     --prefix C:\Users\slayc\AppData\Local\Programs\DiskuvOCaml
                                     --staging-files
                                     C:\Users\slayc\AppData\Local\Temp\7z9F5C695C\sg

                     >>> A transient failure occurred. <<<

and as a follow up
I found two issues. Pwsh did not exist in the target directory but did exist earlier in the path. I copied the pwsh.exe to the target directory and the installation proceeded further before reaching the could not copy issue. On investigation the relevant directory already contained the file that the .tmp file was trying to be renames to. It seems I have an earlier installtion of ocaml but have no recollection of trying to do so. I deleted the relevant ocaml directories and .\setup-diskuv-ocaml-windows_x86_64-1.2.0.exe ran to completion without errors.
I closed the administrator mode powershell window and opened a new powershell.
Utop is not a recognised command. Do I need to add some paths to the %PATH% environment variable.?

Maybe you should try the higher version:
https://github.com/diskuv/dkml-installer-ocaml/issues/63#issue-1860144086
I successfully installed

The observation that I might have a corrupt powershell installlation seems to have been the solution.
I can confirm that I now have a working Ocaml installation
I took the following steps

Deleted all installations of powershell using the windows installer.
Deleted the directory  ''C:\Users\slayc.dotnet\tools.store\powershell' this removed powershell 6.2.3
Deleted previous attempts at ocaml installation using windows installer
Deleted any ocaml related directories at ''C:\Users\slayc\AppData\Local\Programs'
Rebooted
Installed powershell via windows store - powershell 7.3.6
Rebooted
Installed ocaml using  .\setup-diskuv-ocaml-windows_x86_64-1.2.0.exe

The installation took much longer than previous install attempts and even fired up Visual Studio Installer to install 1.5gb worth of Visual Studia Tools 2019 amongst other things.

I had the same issue and I basically did what FullValueRider did but I also had to disable my Avast anti-virus for the download to proceed smoothly.

I did all of the above yet no luck

powershell path.txt
ocaml setup64un success question mark.txt
omal diskuv failure.txt

btw after all those steps when opening visual studio installer it wants to update "visual studio build tools 2019" from version  16.11.2 to 16.11.34

I found this video tutorial https://youtu.be/33niX94tn3U and it worked, but first I made sure to delete all previous installations.

authors: FullValueRider carljr123 jonahbeckford kauderk useada

repo: diskuv/dkml-installer-ocaml


text:
Export/import to/from scipy.stats.rv_discrete

Depending on what you're doing, it could be very useful to have access to scipy.stat's functions.
https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.rv_discrete.html#scipy.stats.rv_discrete

closed by e4d3deb46c36074e1172ab8b9d70fb7e68b489df

repo: dit/dit

license_source: bigquery


text:
Issue 2372 change to force-page-count to use $mirror-page-margins

First pull request. Hope I've got it right!

I'll admit I don't know this code well enough that the change has obvious meaning to me - can you explain why this change is warranted? What about the current output is wrong, and how does this change make the output better?

#2372
I suspect that $mirror-page-margins is a more recent addition, that is it wasn't part of the code when bookmap was added.
The original code states that if there is a bookmap, the page count should be even. Otherwise, for ditamap or no map, the page count should be whatever it is, auto.
An even page count ensures that the start of a new section is on an odd page. By section this would be a chapter, ToC, appendix, etc. in a bookmap, or a top level topic in a ditamap.
But, this is what $mirror-page-margins defines, If true, $mirror-page-margins introduces odd and even pages, and a start on an odd page.
So, the assumption in the code is that bookmap always has this style of pagination, and a ditamap not.
This is a poor assumption. There is no reason why ditamap should not also use $mirror-page-margins.
So, this change removes poor assumptions, and tests for $mirror-page-margins instead. This is a more appropriate test.

Thanks, that explanation is very helpful. [For what it's worth, that kind of description + the simple code change is great for a first pull request.]

Not sure this is correct either. While forcing even page count with mirror margins, it's not the same thing. One is about page margins and the other one is how many blank pages are generated and where do new sections start. This change would force bookmap users who don't use mirror margins to override the code to get chapters to start on odd pages. So it just shifts the functionality from one combination to another, and IMO this doesn't improve the code, it just changes it. As a default, this is not better or more right.
If we want to add easier configuration, this should be done as part of page sequence refactoring, that would also enable e.g. using a single page sequence for all chapers. There we could add a simple configuration option for "book-like page sequences", where every new section/chapter/part start on an odd page.

The way things are at the present leads to a bug: #2318.
It's also why I raised these issues: #2335, #2372, #2373, #2374, #2375, #2376, #2377, #2378.
The problem with PDF2 is that it makes assumptions based on map type, both about bookmap and also about ditamap. Those assumptions might be correct perhaps 80% of the time, but if the assumption is wrong, it can be awkward to figure out where the issue lies, and then over ride it in a customisation.
So, my next stage was to add the code for #2373.
IMO, $mirror-page-margins should definitely lead to "book-like page sequences". There's no need for two variables.
There's only two ways to layout a publication: plain pages or facing pages. That is $mirror-page-margins is either false or true. Everything else then follows from that.
BTW, are there any test documents anywhere, bookmap and ditamap?

I disagree with trying to force page sequence generation to follow page margin configuration. They are two different things, no point trying to force them together.

I agree with Jarno--mirroring page margins does not necessarily imply right-hand start for chapters. There definitely book designs that are mirrored pages with next-page start for chapters.
So there clearly need to be two controls: mirror pages yes/no, chapter start odd/even/any
But I also agree with David that the current behavior is wrong and making assumptions about what Bookmap users want is inappropriate.

chapter start odd/even/any

Chapter start on an even page - really? I can't recall seeing that.

There definitely book designs that are mirrored pages with next-page start for chapters.

Just to confirm: odd and even page designs, but a chapter start on 'any'?
Jarno mentioned odd page design only, but force a chapter start on 'odd'.

Closing as won't fix

authors: DJBHollis drmacro jelovirt robander

repo: dita-ot/dita-ot


text:
After undo/redo cms plugin related models are lost

My situation: I have a Slideshow-Plugin and a related Slide-Model. Everytime I used the undo/redo function all slides of the slideshow were lost. In the docs it is mentioned that relations could only be used if the copy_relations function is implemented. It should be added to the docs that one have to register the plugin in reversion with the follow attribute set and register the related plugin too. I'm wondering that no one has ever encountered this situation.
class Slideshow(CMSPlugin):
   ... fields ...

   def copy_relations(self, old_instance):
        for slide in old_instance.slides.all():
            slide.pk = slide.id = None
            slide.slideshow = self
            slide.save()

reversion.register(Slideshow, follow=['slides'])

class Slide(models.Model):
   slideshow = models.ForeignKey(Slideshow, related_name='slides')
   ... fields ...

reversion.register(Slide)

@o-zander could you check if this is still the case in latest 3.0.10?

@yakky I think this is just documentation that you have to use reversion to get it working. I think @mkoistinen added docs somewhere?

authors: FinalAngel o-zander yakky

repo: divio/django-cms


text:
🛑 Smith & Singer is down

In acc863e, Smith & Singer (https://www.smithandsinger.com.au/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Smith & Singer is back up in f21d764 after 4 minutes.

repo: divtiply/artupptime


text:
Add sudo to instructions for installing DK on MAC

Fixes #179

lgtm.
(Rationale: OS X ships with Python, and while you can correct your default easy_install/pip settings to not require sudo, or install Python through brew, either solution is generally discouraged and definitely not needed for DK)

@tcr3dr Great, feel free to merge then :-)

repo: diydrones/dronekit-python


text:
Next release?

Is there any ETA on the next release to Puppet Forge? It looks like 1.5.0 is the latest available.

Hi @JamieCressey
On the forge, you are able to download 1.6.0.
But, this weekend I'll try to create release 1.7.0, with the pull requests which I accepted the last few weeks...
Kind regards,
Werner

authors: JamieCressey dj-wasabi

repo: dj-wasabi/puppet-zabbix


text:
update shell_plus notebook to allow overriding kernelspec handling

hoists/refactors install_kernel_spec from being a closure to a method generate_kernel_specs, and splits out finding the base kernel spec into method load_base_kernel_spec so it is easier to override generate_kernel_specs with a new command and install one or more kernel specs.
fixes: #1026, fixes #1378, fixes #1422

Coverage decreased (-0.0005%) to 67.849% when pulling 9d9b1d2e82fc6ff6e741ba7b5b9c9cd2319fdcc6 on terencehonles:shell-plus-allow-kernelspec-override into dd1740815156518e96d4111969c4afa3f893f3e9 on django-extensions:master.

Thanks !

authors: coveralls terencehonles trbs

repo: django-extensions/django-extensions

license: mit


text:
Fixed reset_db in Django 1.8 and 1.9+ (fixes #699)

Purpose
This PR is a fix for Issue #699
'reset_db' fails with PostGIS: 'PostGISCreation' object has no attribute 'template_postgis'
Background
When using Django with PostGIS 1.5, the common practice was to create a spatial database template that could be reused (see Django docs).  PostGIS 2.0 includes an extension for Postgres 9.1+, so the database template is no longer necessary.  Django 1.8 and below still support PostGIS 1.5, but Django 1.9 and above do not.
In Django 1.8, the template_postgis property was moved from django.contrib.gis.db.backends.postgis.creation.PostGISCreation to django.contrib.gis.db.backends.postgis.base.DatabaseWrapper.
See: https://github.com/django/django/commit/bac7664f274be834a09e037331889959f04a75e7
In Django 1.9, the property was then removed altogether when support for PostGIS 1.5 was dropped.
See: https://github.com/django/django/commit/26996e2d55719deb0a0b85c642c88658c929106c
Changes
This PR checks the Django version before doing any work to look for a template name.  If it's 1.9+, we don't bother.  If it's 1.8, we create a DatabaseWrapper and get the template name from it.  Otherwise, we use the old behavior: create a PostGISCreation object and get the template name from it.
See Also
PR #754 does a subset of this work, but is incomplete (it leaves reset_db broken in Django 1.8 when PostGIS 1.5 is used).

@oblalex @trbs @artscoop @vlinhart

Thanks !

authors: hwkns trbs


text:
BooleanCastWidget: interpret arbitrary words as True/False for BooleanField

I've just rewritten BooleanWidget to support adding possible True/False values as arguments.
Maybe it'll be useful for someone else too. AFAIU you can [safely] replace BooleanWidget with this code, backward compatibility included. Moving ["1", 1] to the default value will also allow reverting 0/1 meaning.
class BooleanCastWidget(Widget):
    def __init__(
            self,
            true_values=[],
            false_value="0",
            case_sensitive=False,
            *args, **kwargs):
        if not case_sensitive:
            true_values = list(map(str.lower, true_values))
        self.true_values = true_values + ["1", 1]
        self.false_value = false_value
        self.case_sensitive = case_sensitive

    def render(self, value):
        if value is None:
            return ""
        return self.true_values[0] if value else self.false_value

    def clean(self, value):
        if value == "":
            return None
        if not self.case_sensitive:
            value = value.lower()
        return True if value in self.true_values else False

@int-ua please note that default arguments are evaluated at definition time in Python (see http://stackoverflow.com/questions/1651154/why-are-default-arguments-evaluated-at-definition-time-in-python).
maybe something like these would work better:
class BooleanCastWidget(Widget):
    TRUE_VALUES = ["1", 1]
    FALSE_VALUE = "0"

    def __init__(
            self,
            true_values=None,
            false_value=None,
            case_sensitive=False,
            *args, **kwargs):
        if not true_values:
            true_values = self.TRUE_VALUES
        if not false_value:
            false_value = self.FALSE_VALUE
        if not case_sensitive:
            true_values = list(map(str.lower, true_values))
        self.true_values = true_values
        self.false_value = false_value
        self.case_sensitive = case_sensitive

Yes, thanks a lot. Feel free to close this.

authors: bmihelac int-ua


text:
Export as xlsx returns 500 error

Hello,
Very nice project, only having one problem.
cell() missing 1 required positional argument: 'column'
I don't think the problem is on my end, seems related to #817
Any updates on this?

The latest release does not have the update yet :/

I also have the problem :'(

authors: Eliottiosdevs felocru fmatray


text:
Cannot configure SF_PK

I'm unable to get past this error while trying to execute a simple test to interact with my Salesforce instance. I have been able to successfully interact with SF objects (such as Account) through the shell, but I am not able to in my script.
Here is my test:

os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'cdp.settings')
django.setup()
...
SF_PK='id'
account1 = Account.objects.get(PersonEmail='kyle@vellaclean.com')
print(account1)

Could someone please help me understand what I'm doing incorrectly here? SF_PK is defined in my settings.py:
## Salesforce setting for primary key
SF_PK='id'

stacktrace:
`(cdp-J3b73aRa-py3.12) kylemassimilian@Kyles-MBP-2 klaviyo % poetry run python3 services.py
Traceback (most recent call last):
  File "/Users/kylemassimilian/Desktop/Vella/Software Engineering/Stack/Microservices/cdp/klaviyo/services.py", line 8, in <module>
    from models import Account, Opportunity
  File "/Users/kylemassimilian/Desktop/Vella/Software Engineering/Stack/Microservices/cdp/klaviyo/models.py", line 2, in <module>
    from salesforce import models as sf_models
  File "/Users/kylemassimilian/Library/Caches/pypoetry/virtualenvs/cdp-J3b73aRa-py3.12/lib/python3.12/site-packages/salesforce/models.py", line 29, in <module>
    from salesforce.fields import (  # pylint:disable=useless-import-alias
  File "/Users/kylemassimilian/Library/Caches/pypoetry/virtualenvs/cdp-J3b73aRa-py3.12/lib/python3.12/site-packages/salesforce/fields.py", line 33, in <module>
    SF_PK = getattr(settings, 'SF_PK', 'id')
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/kylemassimilian/Library/Caches/pypoetry/virtualenvs/cdp-J3b73aRa-py3.12/lib/python3.12/site-packages/django/conf/__init__.py", line 82, in __getattr__
    self._setup(name)
  File "/Users/kylemassimilian/Library/Caches/pypoetry/virtualenvs/cdp-J3b73aRa-py3.12/lib/python3.12/site-packages/django/conf/__init__.py", line 63, in _setup
    raise ImproperlyConfigured(
django.core.exceptions.ImproperlyConfigured: Requested setting SF_PK, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.`

Thank you

The stacktrace indicates that it was a general problem with missing Django settings path configuration, not related to django-salesforce. "SF_PK" happened to be the first value where settings were used.
The lowercase primary key "id" is a default value and not necessary to specify it. SF_PK is useful only you would  prefer capitalized primary keys "Id" in your code.

authors: hynekcer kylemassimilian

repo: django-salesforce/django-salesforce


text:
Fixed #33199 -- Made Signer use keyword-only arguments.

This change simply adds a * to the parameters of django.core.signing.Signer which forces the naming of all parameters passed to it.
ticket-33199

I do not think this is security sensitive enough that we can do this without going through a deprecation path.

I do not think this is security sensitive enough that we can do this without going through a deprecation path.

Agreed, we should go through a deprecation path, so in the first step raise a warning when a positional argument is passed.

@danielsamuels Do you have time to keep working on this?

Not at the moment, sorry.
On Thu, 9 Dec 2021, 08:33 Mariusz Felisiak, @.***>
wrote:

@danielsamuels https://github.com/danielsamuels Do you have time to
keep working on this?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/django/django/pull/14995#issuecomment-989625952, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AANS3OBM4KLPZEXWIIZZH6LUQBSVDANCNFSM5GBZUUUA
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

@danielsamuels That's perfectly fine :+1:  Feel-free to send a new patch when you have time.

authors: apollo13 danielsamuels felixxm

repo: django/django


text:
Fix #20223: Introduce keep_lazy as a replacement for allow_lazy.

The semantics stay the same but the new syntax allow the use of
keep_lazy as a decorator with the @-syntax.
It also makes sure that type parameters are passed to lazy,
which would result in an error otherwise.
The cleanups introduced in this change also incidentally fix #20222.

This is an updated version of @bmispelon's #1007

Please see https://docs.djangoproject.com/en/dev/internals/contributing/writing-code/submitting-patches/#deprecating-a-feature for everything needed for the deprecation.

@uruz, do you have time/interest in completing this soon? Was thinking we could offer it as a task for the DjangoconEU sprints if not.

@timgraham I know it's my debt, but I will have time to work on it not earlier than two weeks from now. I suppose DjangoconEU sprints will happen earlier, so I don't mind if this issue would be offered and hopefully resolved during Djangocon sprints.

Closing due to inactivity. Please send a new PR if you find time to return to it, thanks!

authors: timgraham uruz


text:
Fixed #27441 -- Removed CASCADE from MySQL's 'DROP COLUMN' SQL.

'CASCADE' is an documented no-op in MySQL, so to avoid confusion Django no longer outputs it.

It might be worth creating a ticket for this.

Okey doke https://code.djangoproject.com/ticket/27441

Do you think it's worth adding a comment so that someone doesn't accidentally remove it (given that no tests will fail)?

Added comment

Thanks for your patch Adam!

authors: adamchainz charettes timgraham


text:
375 Center Event and Session Detail View

closes #375

We should probably do this for some of the templates in indymeet/templates/registration too 👍

I agree, let me spend some more time on this branch with the sessions/events and try to clean up /standardize some of these templates a bit more.

All pages should adhere to the new styling:

repo: djangonaut-space/wagtail-indymeet


text:
Revise household propagation for hospitalised people

Hospitalised people should not propagate infections across their household as much as non-hospitalised people.

This is a funny one, because I just checked and this bug actually doesn't exit! ;)

repo: djgroen/facs


text:
Switch to GraphQL QPI

There are numerous issues involved in the GitHub API which would be resolved by switching over to the newer GraphQL API. However, it's quite complex, and I've never used it before. Pagination will be a challenge of its own.

I've done minimal testing so far, and it appears this will solve some existing issues, such as getting total branch count without fetching a list of all branches, and having access to more fields in general without being overwhelmed with fields I'll never need. However, it will also be a huge learning curve, as I've never used GraphQL before. Pagination, especially in the sense of nested arrays (such as branches of a repo) will be quite complex as well.
So far, I've experimented with the following query:
{
  rateLimit {
    cost
    remaining
    resetAt
  }
  repository(owner: "apple", name: "swift") {
    name
    diskUsage
    isPrivate
    pushedAt
    description
    owner {
      login
    }
    defaultBranchRef {
      name
    }
    primaryLanguage {
      name
    }
    refs(first: 100, refPrefix: "refs/heads/") {
      totalCount
      nodes {
        name
        target {
          id
        }
      }
    }
  }
}

However, that's just for one single repository by explicit reference I'll need to do similar for listing repositories.

This has its own dedicated project with its own issues to be taken care of.


text:
Resetting Azure configuration

I am curious if it would be possible reconfigure Azure client ID, secret and tenant ID. I had to recreate Azure AD but could not find a way to reconnect to new AD.

If it is running on a database (for example MongoLab or something) already it stores the configuration on there. Simply deleting this will prompt the app to ask for the credentials again. Let me know if this works!

You are Awesome! Thank you!

repo: djluck/accounts-azure-active-directory


text:
Backup job container restarting constantly

I use the default example docker compose to run backup, prune and check containers, the backup container creates a backup on startup, then exits when the backup is done, then restarts due to the "unless-stopped" restart policy. It creates backups in a loop.

backup-1  | Executing backup on startup ...
backup-1  |
backup-1  | Starting Backup at 2024-04-01 13:06:04
backup-1  | rclone: 2024/04/01 13:06:04 NOTICE: Chunks temporary upload directory: [...]
backup-1  | using parent snapshot 56875acc
check-1   | Load(<lock/907a512920>, 0, 0) returned error, retrying after 5.903144332s: <lock/907a512920> does not exist
backup-1  |
backup-1  | Files:           0 new,     7 changed, 16711 unmodified
backup-1  | Dirs:            0 new,    13 changed,   965 unmodified
backup-1  | Added to the repository: 5.189 MiB (213.669 KiB stored)
backup-1  |
backup-1  | processed 16718 files, 1.490 GiB in 0:04
backup-1  | snapshot f34c87a0 saved
backup-1  | Backup successful
backup-1  | Forget about old snapshots based on RESTIC_FORGET_ARGS = --keep-last 10 --keep-daily 7 --keep-weekly 5 --keep-monthly 12
backup-1  | rclone: 2024/04/01 13:06:10 NOTICE: Chunks temporary upload directory: [...]
backup-1  | repo already locked, waiting up to 0s for the lock
backup-1  | unable to create lock in backend: repository is already locked by PID 39 on docker by root (UID 0, GID 0)
backup-1  | lock was created at 2024-04-01 12:54:23 (11m48.604414721s ago)
backup-1  | storage ID 9884566f
backup-1  | the unlock command can be used to remove stale locks
backup-1  |
backup-1 exited with code 1
Here's container output when I attach, container exits due to an error, I am not sure how to solve that one.
Maybe the restart policy should be changed, as these errors can lead to a lot of data usage on the backupt server.

Hi, did you solve your issue?
I ran into a nearly identical problem with the default compose settings.
For me as a newbie it looks like there is some sort of lock between the backup-1 and check-1.
Maybe because both services are RUN_ON_STARTUP: "true".
My solution was to only set the RUN_ON_STARTUP: "true" for the backup service.
Makes no sense to me to start a backup and check of the repo at same time.
After that i fired up the compose and connected to each container and checkt with the "unlock" command that there is no lock left in the repo.
Runs smoothly for weeks since that modification in the compose file.

I did the same thing, forgot to comment here, I also set RUN_ON_STARTUP to false for the check container because otherwise there is a conflict with restic's container locks.
This issue is new, I have been using resticker for a few years now, it has to be due to an update to restic?
In any case, I will prepare a PR with additional documentation as a lot of things are still sparse or no documented at all like the RESTIC_PASSWORD_FILE flag that enables the use of secrets to specify the repository password.

I don't understand: RUN_ON_STARTUP is already false for the check container in the example configs.

I believe this is a duplicate of #171

I did the same thing, forgot to comment here, I also set RUN_ON_STARTUP to false for the check container because otherwise there is a conflict with restic's container locks.

This does not solve the problem for me. I have check and prune's RUN_ON_STARTUP: false in my docker-compose.yml and still get the error

@benjamin051000  Can you show an error log? How old is the reported lock? Unlocking does not solve the issue for you?

Maybe same problem here: https://github.com/djmaze/resticker/issues/221

repo: djmaze/resticker


text:
clarify what happens with overlarge shifts

Saying it is "illegal" implies it must always be diagnosed.

Superseded by https://github.com/dlang/dlang.org/pull/2578

authors: WalterBright dkorpel


text:
Condition → Conditional; IfCondition → Condition

Using IfCondition in the grammar is misleading. It can be used for if, but also for while and switch. On the other hand, Condition, which refers to conditional compilation constructs, isn’t the stuff in parentheses of a static if, debug or version, but the whole static if (…) / debug (…) / version (…); therefore, I replaced it with Conditional.

Condition and Conditional are easy to mix up. The dmd codebase calls IfCondition an AssignCondition, I suggest renaming it to that for consistency.
If there's still need to clarify Condition then, perhaps it can become StaticCondition.

Condition and Conditional are easy to mix up.

I don’t know how you’d mix those up. A condition is something that you evaluate to a boolean to test it.
An IfCondition should be a condition for an if statement specifically, and is immediately a misnomer if it can be used anywhere where no if is present. IMO, Condition is the perfect name, but I’m not married to Conditional. I chose it because it it wasn’t taken and immediately follows the ConditionalDeclaration and ConditionalStatement. Note that there’s also a ConditionalExpression which is unrelated to conditional compilation. (It should probably named ConditionExpression.)
ConditionalCompilationIntroducer instead for the static if/version/debug thing?

The dmd codebase calls IfCondition an AssignCondition, I suggest renaming it to that for consistency.

I’d really like to keep Condition for what’s in if/while/switch parentheses because it perfectly matches what it means to the average programmer.
Using AssignCondition makes sense for the compiler, I guess, as it spends (probably) much more effort on these:
    auto Identifier = Expression
    scope Identifier = Expression
    TypeCtors Identifier = Expression
    TypeCtors? BasicType Declarator = Expression

If you want AssignCondition in the grammar, that would be my suggestion:
-   IfCondition:
+   Condition:
        Expression
+       AssignCondition
+
+   AssignCondition:
        auto Identifier = Expression
        scope Identifier = Expression
        TypeCtors Identifier = Expression
        TypeCtorsopt BasicType Declarator = Expression

Using AssignCondition for the Expression case is weird.

If there's still need to clarify Condition then, perhaps it can become StaticCondition.

But Condition is simply wrong. It refers not the the boolean expression inside parentheses, but the whole “introducer” to the conditional compilation construct, e.g. static if ( AssignExpression ) is an example.

ConditionalCompilationIntroducer

That sounds like a Java name :slightly_smiling_face:

But Condition is simply wrong.

static if (xyz) debug(xyz) and version(xyz) are all different conditions to compile the following block, the condition isn't merely xyz.
But that's a bit besides the point. I think it's not worth bikeshedding over the best names for grammar production rules. They are mostly local. It's best to just pick something and be consistent with it. This PR changes them for marginally better clarity at best, so unless the names are made consistent with dmd (which is a nice property as they often need to be compared), I'd err on the side of keeping them as is.

I think it's not worth bikeshedding

Okay, the let’s not do it! 😁

This PR changes them for marginally better clarity at best, so unless the names are made consistent with dmd (which is a nice property as they often need to be compared), I'd err on the side of keeping them as is.

You’re letting the perfect be the enemy of good.
IIUC, we’re arguing over how much of an improvement the change is. To me, this improvement makes the spec a little more approachable. Most of my contributions are small, but I hope they add up.
The spec and the compiler are conceptually separate. I understand why the DMD devs want consistency, I even made DMD PRs to make grammar changes consistent after that was pointed out to me, and I’d be happy to file a DMD PR to adapt the names in the DMD source code after this PR is merged. Why I would waste time preparing a DMD PR before is beyond me. Just realize that this isn’t a standard all potential contributors to this repo can meet.

IIUC, we’re arguing over how much of an improvement the change is.

My point is: you think it's better, I think it's worse, so 0% improvement, and a PR should have at least positive improvement to get merged. 2 people is a low sample size, but it's not worth getting more people involved and discussing this at length.

Okay, the let’s not do it! 😁

Shall we just close this then?

authors: Bolpat dkorpel


text:
std.regex: Negation of character class is not applied to base class first

andrej.mitrovich (@AndrejMitrovic) reported this on 2013-12-18T11:37:06Z
Transfered from https://issues.dlang.org/show_bug.cgi?id=11765
CC List

dmitry.olsh (@DmitryOlshansky)

Description
-----
import std.regex;
import std.stdio;

void main()
{
    // expected: [["3"]] - but got: [["2"]]]
    writeln("123456789".match("[^1--[2]]"));

    // the above is *currently* equivalent to:
    writeln("123456789".match("[^[1--[2]]]"));

    // which means: subtract "1 - 2" (equals 1),
    // and then negate it (so "2" will match first in the string)

    // but I expect the first case to be equivalent to:
    writeln("123456789".match("[[^1]--[2]]"));

    // which means: negate 1 (for discussion assume 2-9 range),
    // subtract 2 and you get 3-9, which means "3" will match first.
}
-----

I'm not sure whether this is just how ECMAScript does it (since std.regex references it), but e.g. .NET does negation on the base class first (The "1" class above) and *then* it does subtraction with another class.

You can test this behavior here:

http://refiddle.com/

Using .net syntax:
[^01-[2]]
0123456789

It matches "3".

Either way if this report is invalid (e.g. expected behavior) then I think we should update the docs so they state the precedence of the negation.

andrej.mitrovich (@AndrejMitrovic) commented on 2013-12-19T04:55:48Z
Is the following sample caused by the same issue?

writeln("abcdefghijklmnopqrstuvwxyz".match("[a-z&&[^aeiuo]]"));

It writes [["a"]], I was expecting the first non-vowel [["b"]]. It returns "b" in Ruby, as for .NET I haven't found the syntax it uses.

andrej.mitrovich (@AndrejMitrovic) commented on 2013-12-20T00:51:17Z
(In reply to comment #5)
> (In reply to comment #3)
> > Is the following sample caused by the same issue?
> >
> > writeln("abcdefghijklmnopqrstuvwxyz".match("[a-z&&[^aeiuo]]"));
> >
> > It writes [["a"]], I was expecting the first non-vowel [["b"]]. It returns "b"
> > in Ruby, as for .NET I haven't found the syntax it uses.
>
> From the look of it - an unrelated bug in set intersection.
> Better split it off as a new issue.

Filed as Issue 11784.

repo: dlang/phobos


text:
Feature request for std.asscii => function isNewline

bioinfornatics (@bioinfornatics) reported this on 2012-11-18T16:48:50Z
Transfered from https://issues.dlang.org/show_bug.cgi?id=9045
CC List

araspik
bearophile_hugs
bugzilla (@WalterBright)
bus_dbugzilla
dlang-bugzilla (@CyberShadow)
dmitry.olsh (@DmitryOlshansky)
i6o34a+7y7j1p606trkc
issues.dlang (@jmdavis)
monarchdodra

Description
hi,

std.ascii provide some function to check ascii char, to get newline char from your OS but not a function to said if a char is a newline as does this function:

bool isNewline(dchar c) @safe pure nothrow {
    return ( c == 0x0A || c == 0x0D )? true : false;
}

is Possible to add it ?

regards

bearophile_hugs commented on 2012-11-18T16:59:06Z
See representation on various systems:

http://en.wikipedia.org/wiki/Newline

In particular:
On Unix, and Mac OS X: LF (1 char)
On Windows: CR+LF (2 chars)

issues.dlang (@jmdavis) commented on 2012-11-18T17:15:06Z
Just check whether it equals std.ascii.newline.

bioinfornatics commented on 2012-11-18T17:08:08Z
(In reply to comment #1)
> See representation on various systems:
>
> http://en.wikipedia.org/wiki/Newline
>
> In particular:
> On Unix, and Mac OS X: LF (1 char)
> On Windows: CR+LF (2 chars)

yes not easy or into string

bool isNewline(in dchar[] c) @safe pure nothrow {
    bool result = false;
    if( c[0] == 0x0A)
        result = true;
    else if( c.length >= 2 && c[0] == 0x0D && c[1] == 0x0A)
        result = true;
    ...
    ...
    return result;
}

monarchdodra commented on 2012-11-20T05:42:25Z
(In reply to comment #1)
> See representation on various systems:
>
> http://en.wikipedia.org/wiki/Newline
>
> In particular:
> On Unix, and Mac OS X: LF (1 char)
> On Windows: CR+LF (2 chars)

(In reply to comment #5)
> Technically speaking, if you don't know which type of line endings a file uses
>
> [SNIP]

Isn't the "line ending" a *file* totally irrelevant here? In the sense that it is a nothing more than the system's *storage* format?

On my windows machine, the *strings* I manipulate don't have "\r\n" as a newline, they have '\n'. That's the entire reason there is a "rb" and "r" option when reading a file.

If you *do* have an "\r\n" in your stream, then either:
* You have an actual a '\r' in your stream, which is then followed by a new line.
* You are actually erroneously manipulating a binary payload, which should be of type ubyte[], and should not be using the std.ascii functions with it.

Under these circumstance, and following the unicode definition, I'd say:

return 0x0A <= c && c <= 0x0D;

Is not only correct (for ascii), but any attempt to parse more than 1 character for this info would be incorrect...

PS: WTF is \u{D A}

dmitry.olsh (@DmitryOlshansky) commented on 2016-03-22T13:08:46Z
(In reply to Nick Sabalausky from comment #10)
> While an 'isNewline(dchar)' func wouldn't work for reasons already
> discussed, what *would* work and be very helpful IMO, is something similar
> to the 'std.conv.parse(...)' functions. Ie, just like this, but properly
> templated, range-ified and UTF8/16-ified:

skipNewLine taking string by ref that would return a bool indicating if there was a new line would indeed be useful.

bus_dbugzilla commented on 2013-03-26T10:04:56Z
While an 'isNewline(dchar)' func wouldn't work for reasons already discussed, what *would* work and be very helpful IMO, is something similar to the 'std.conv.parse(...)' functions. Ie, just like this, but properly templated, range-ified and UTF8/16-ified:

/// If 'str' starts with a Unix, Windows, Unicode or Mac9 newline, it is
/// removed from 'str' and returned. Otherwise, null is returned.
dstring parseNewline(ref dstring str)
{
    if(str.empty)
        return null;

    dstring ret;

    // Newlines are as defined in:
    // http://www.unicode.org/reports/tr18/#Line_Boundaries
    switch(str[0])
    {
    case '\r':
        if(str.length > 1 && str[1] == '\n')
        {
            ret = str[0..2];
            str = str[2..$];
            break;
        }
        goto case;

    case '\n':
    case '\f':
    case '\v':
    case '\x85':
    case paraSep:
    case lineSep:
        ret = str[0..1];
        str = str[1..$];
        break;

    default:
        ret = null;
        break;
    }

    return ret;
}

issues.dlang (@jmdavis) commented on 2012-11-20T12:29:09Z
Any code that only cares about \n or \r\n isn't going to work with a function  which returns true for both. And any code that doesn't care is going to be ill-served by a such a function, because the reality is that you need to watch for \r and \n as individual characters and properly handle the cases when they're separate as well as when they're apart. And the fact that one of them is multiple characters generally screws with trying to check for them with a single function in the middle of iterating. Rather, you have to watch for \r and \n individually and then figure out whether you're dealing with them singly or together and act appropriately. A function which returns true for a string is generally useless for the kind of situations where you'd be checking for newlines, so I'm highly skeptical that such a function is of any real value. Instead, you end up with stuff like

for(auto range = str.save; !range.empty; range.popFront())
{
    switch(range.front)
    {
        case '\r':
            auto temp = range.save;
            temp.popFront();
            if(temp.front == '\n')
            {
                range.popFront();
                goto case '\n';
            }
            goto default;
        case '\n':
            //do whatever you do for end of line
            break;
        default:
            //do whatever you do for individual characters
            break;
    }
}

And if you all you want to know is whether a particular string starts or ends with a newline, then it's easy enough to just do str.startsWith("\n", "\r\n") or str.endsWith("\n", "\r\n"). That gets uglier when you need to deal with unicode rather than just \n an \r\n, but then all I believe that you really need is to add [paraSep], and [lineSep] to the list.

I'm not sure that a function telling you whether a string designates the end of a line is completely useless, but in pretty much every case that I can see code caring, such a function wouldn't work very well.

bus_dbugzilla commented on 2013-03-28T17:35:23Z
*** Issue 8880 has been marked as a duplicate of this issue. ***

dmitry.olsh (@DmitryOlshansky) commented on 2012-11-19T10:49:39Z
Somewhat related.

Unicode new line sequence is defined as:
\u{A} | \u{B} | \u{C} | \u{D} | \u{85} | \u{2028} | \u{2029} | \u{D A}

Note that sequence '\r\n' counts as one line end.

See the note here for example:
http://www.unicode.org/reports/tr18/#Line_Boundaries

dmitry.olsh (@DmitryOlshansky) commented on 2012-11-20T12:13:48Z
(In reply to comment #7)
> (In reply to comment #1)
> > See representation on various systems:
> >
> > http://en.wikipedia.org/wiki/Newline
> >
> > In particular:
> > On Unix, and Mac OS X: LF (1 char)
> > On Windows: CR+LF (2 chars)
>
> (In reply to comment #5)
> > Technically speaking, if you don't know which type of line endings a file uses
> >
> > [SNIP]
>
> Isn't the "line ending" a *file* totally irrelevant here? In the sense that it
> is a nothing more than the system's *storage* format?
>

There is no system's encoding. It died and buried in the same toomb as FTP ASCII mode long time ago. After all files are transfered in many different ways expecting someone to transcode line-endings everywhere is plain impossible (you don't always know the target system). So by the end of day reasonable programs just deal with all the zoo of them.

> On my windows machine, the *strings* I manipulate don't have "\r\n" as a
> newline, they have '\n'. That's the entire reason there is a "rb" and "r"
> option when reading a file.

And I'd say rb option is a woefully broken thing. In fact putting \n does in fact store \r\n in this mode. You are far safer with binary mode at least it's WYSIWG.

> If you *do* have an "\r\n" in your stream, then either:
> * You have an actual a '\r' in your stream, which is then followed by a new
> line.

> Under these circumstance, and following the unicode definition, I'd say:
>
> return 0x0A <= c && c <= 0x0D;
>
> Is not only correct (for ascii), but any attempt to parse more than 1 character
> for this info would be incorrect...

No, no and no. It's the fact of life (or rather the standard) that \r\n is a single entity. And it can't be parsed other the by looking at two characters (or rather codepoints).

>
> PS: WTF is \u{D A}

It's 2 dchars : \r\n. That is 0x0D and 0x0A. They are being cute and use flexible width syntax not the old ones: \uXXXX and \UYYYYYYYY.

issues.dlang (@jmdavis) commented on 2012-11-18T23:28:15Z
Technically speaking, if you don't know which type of line endings a file uses, you can't possibly correctly determine when you've reached the end of a line. Best case, you have to assume that '\r\n' and '\n' both designate the end of the line, whereas it's perfectly legal to have a '\r' be the last character on a line (i.e. the one before the characters indicating the end of the line) in Linux, and it's perfectly valid to have '\n' be in the middle of line on Windows. So, parsing with the assumption that both '\r\n' and '\n' indicate the end of the line is actually incorrect no matter what OS you're on.

That doesn't mean that it's not entirely unreasonable to have such a function, but it does mean that it can't possibly be 100% correct.

On an unrelated note, I'd point out that

return ( c == 0x0A || c == 0x0D )? true : false;

is redundant. The ternary operator is completely unnecessary. It would be better if it were

return c == 0x0A || c == 0x0D;

dmitry.olsh (@DmitryOlshansky) commented on 2016-03-22T13:08:31Z
(In reply to Nick Sabalausky from comment #10)
> While an 'isNewline(dchar)' func wouldn't work for reasons already
> discussed, what *would* work and be very helpful IMO, is something similar
> to the 'std.conv.parse(...)' functions. Ie, just like this, but properly
> templated, range-ified and UTF8/16-ified:

skipNewLine taking string by ref that would return a bool indicating if there was a new line would indeed be useful.

bioinfornatics commented on 2012-11-18T23:19:27Z
(In reply to comment #3)
> Just check whether it equals std.ascii.newline.

yes but the problem is when you need to write a parser and detect end of line. You can get the given file from various operating system so you can"t use std.ascii.newline as is system specific.

bugzilla (@WalterBright) commented on 2019-11-20T07:30:23Z
Where has this been moved to?

araspik commented on 2018-10-22T20:45:10Z
Bump: When is this going to get implemented into Phobos? It makes my life much easier, mainly because 'newline' is a 'string' but since I'm using 'dstring' I require the usage of 'assumeWontThrow' everywhere. Example:

dstring str = "..."d;
str.findSkip(newline); // not nothrow
str.findSkip(newline).assumeWontThrow; // Ugh, long
str.findSkip!isNewline; // What would be nice _AND_ nothrow

dlang-bugzilla (@CyberShadow) commented on 2019-11-20T14:31:25Z
Undoing vandalism(?) by Parmigiano


text:
Fix booktable in std.traits

I just noticed that quite many traits aren't publicly documented, but listed in the booktable and on the other site, there are publicly documented ones, which aren't listed.
What's the story here? Were they maybe just accidentally set to public?
And what's the point behind SharedInoutOf?   What would be wrong with SharedOf!(InoutOf!int)?

Let's see if closing & reopening the PR will force Jenkins to re-run the pipeline.

authors: ZombineDev wilzbach


text:
Revert "Temporarily disable curl tests for FreeBSD 32-bit"

Reverts dlang/phobos#6232
Let's see whether https://github.com/dlang/phobos/pull/6234 fixed the issue for FreeBSD.

Nope, doesn't fix the problem. Sorry for the noise.


text:
Update README.md

add use cases in the readme

@harveer07 Could you please explain what is the purpose of this addition?

ping @harveer07 . Added the 72h no response -> close label.


text:
Не работает ajax навигация при catId=this

Описание ошибки:

При параметре catId=this ajax навигация при первом нажати подгружает все новости из всех категорий и перестает работать.
Версия DLE: 13.0
Версия PHP: 5.6

Строка подключения с включенным параметром showstat:
{include file="engine/modules/base/blockpro.php?template=blockpro/short_block&limit=2&sort=date&showNav=y&navStyle=punbb&day=1000&dayCount=989&catId=this&showstat=y"}

Статистика генерации:
Запрос(ы):
[1] SELECT p.id, p.autor, p.date, p.short_story, p.full_story, p.xfields, p.title, p.category, p.alt_name, p.allow_comm, p.comm_num, p.fixed, p.allow_main, p.symbol, p.tags, e.news_read, e.allow_rate, e.rating, e.vote_num, e.votes, e.related_ids, e.view_edit, e.editdate, e.editor, e.reason FROM `l2b_post` p LEFT JOIN `l2b_post_extras` e ON (p.id=e.news_id) WHERE approve AND category regexp "[[:<:]](9|10|11|12|13|14|15|16|17|18|19|20|44)[[:>:]]" AND (p.xfields LIKE '%vip|%vip_1%') AND p.date >= "2019-01-07 00:00:00" + INTERVAL -1000 DAY ORDER BY fixed DESC, e.rating DESC, p.comm_num DESC, e.news_read DESC LIMIT 0, 10
[1 время:] 0.00024604797363281
[2] SELECT p.id, p.autor, p.date, p.short_story, p.full_story, p.xfields, p.title, p.category, p.alt_name, p.allow_comm, p.comm_num, p.fixed, p.allow_main, p.symbol, p.tags, e.news_read, e.allow_rate, e.rating, e.vote_num, e.votes, e.related_ids, e.view_edit, e.editdate, e.editor, e.reason FROM `l2b_post` p LEFT JOIN `l2b_post_extras` e ON (p.id=e.news_id) WHERE approve AND category regexp "[[:<:]](9|10|11|12|13|14|15|16|17|18|19|20|44)[[:>:]]" AND (p.xfields LIKE '%vip|%vip_2%') AND p.date >= "2019-01-07 00:00:00" + INTERVAL -1000 DAY ORDER BY fixed DESC, e.rating DESC, p.comm_num DESC, e.news_read DESC LIMIT 0, 10
[2 время:] 0.00021910667419434
[3] SELECT p.id, p.autor, p.date, p.short_story, p.full_story, p.xfields, p.title, p.category, p.alt_name, p.allow_comm, p.comm_num, p.fixed, p.allow_main, p.symbol, p.tags, e.news_read, e.allow_rate, e.rating, e.vote_num, e.votes, e.related_ids, e.view_edit, e.editdate, e.editor, e.reason FROM `l2b_post` p LEFT JOIN `l2b_post_extras` e ON (p.id=e.news_id) WHERE approve AND category regexp "[[:<:]](9|10|11|12|13|14|15|16|17|18|19|20|44)[[:>:]]" AND (p.xfields LIKE '%vip|%vip_3%') AND p.date >= "2019-01-07 00:00:00" + INTERVAL -1000 DAY ORDER BY fixed DESC, e.rating DESC, p.comm_num DESC, e.news_read DESC LIMIT 0, 10
[3 время:] 0.00020194053649902
[4] SELECT p.id, p.autor, p.date, p.short_story, p.full_story, p.xfields, p.title, p.category, p.alt_name, p.allow_comm, p.comm_num, p.fixed, p.allow_main, p.symbol, p.tags, e.news_read, e.allow_rate, e.rating, e.vote_num, e.votes, e.related_ids, e.view_edit, e.editdate, e.editor, e.reason FROM `l2b_post` p LEFT JOIN `l2b_post_extras` e ON (p.id=e.news_id) WHERE approve AND category regexp "[[:<:]](9)[[:>:]]" AND (p.xfields LIKE '%vip|%vip_3%') AND p.date > "2019-01-06 03:21:57" ORDER BY fixed DESC, p.date ASC LIMIT 0, 50
[4 время:] 0.00072407722473145
[5] SELECT COUNT(*) as count FROM `l2b_post` as p LEFT JOIN `l2b_post_extras` e ON (p.id=e.news_id) WHERE approve AND category regexp "[[:<:]](9)[[:>:]]" AND (p.xfields LIKE '%vip|%vip_3%') AND p.date > "2019-01-06 03:21:57"
[5 время:] 0.0004119873046875
[6] SELECT p.id, p.autor, p.date, p.short_story, p.full_story, p.xfields, p.title, p.category, p.alt_name, p.allow_comm, p.comm_num, p.fixed, p.allow_main, p.symbol, p.tags, e.news_read, e.allow_rate, e.rating, e.vote_num, e.votes, e.related_ids, e.view_edit, e.editdate, e.editor, e.reason FROM `l2b_post` p LEFT JOIN `l2b_post_extras` e ON (p.id=e.news_id) WHERE approve AND category regexp "[[:<:]](9)[[:>:]]" AND (p.xfields LIKE '%vip|%vip_2%') AND p.date > "2019-01-06 03:21:57" ORDER BY fixed DESC, p.date ASC LIMIT 0, 50
[6 время:] 0.00076413154602051
[7] SELECT COUNT(*) as count FROM `l2b_post` as p LEFT JOIN `l2b_post_extras` e ON (p.id=e.news_id) WHERE approve AND category regexp "[[:<:]](9)[[:>:]]" AND (p.xfields LIKE '%vip|%vip_2%') AND p.date > "2019-01-06 03:21:57"
[7 время:] 0.00046610832214355
[8] SELECT p.id, p.autor, p.date, p.short_story, p.full_story, p.xfields, p.title, p.category, p.alt_name, p.allow_comm, p.comm_num, p.fixed, p.allow_main, p.symbol, p.tags, e.news_read, e.allow_rate, e.rating, e.vote_num, e.votes, e.related_ids, e.view_edit, e.editdate, e.editor, e.reason FROM `l2b_post` p LEFT JOIN `l2b_post_extras` e ON (p.id=e.news_id) WHERE approve AND category regexp "[[:<:]](9)[[:>:]]" AND p.date >= "2019-01-07 00:00:00" - INTERVAL 1 DAY AND p.date < "2019-01-07 00:00:00" ORDER BY fixed DESC, p.date DESC LIMIT 0, 50
[8 время:] 0.00018692016601562
[9] SELECT COUNT(*) as count FROM `l2b_post` as p LEFT JOIN `l2b_post_extras` e ON (p.id=e.news_id) WHERE approve AND category regexp "[[:<:]](9)[[:>:]]" AND p.date >= "2019-01-07 00:00:00" - INTERVAL 1 DAY AND p.date < "2019-01-07 00:00:00"
[9 время:] 0.00014090538024902
[10] SELECT p.id, p.autor, p.date, p.short_story, p.full_story, p.xfields, p.title, p.category, p.alt_name, p.allow_comm, p.comm_num, p.fixed, p.allow_main, p.symbol, p.tags, e.news_read, e.allow_rate, e.rating, e.vote_num, e.votes, e.related_ids, e.view_edit, e.editdate, e.editor, e.reason FROM `l2b_post` p LEFT JOIN `l2b_post_extras` e ON (p.id=e.news_id) WHERE approve AND category regexp "[[:<:]](9)[[:>:]]" AND p.date >= "2019-01-07 00:00:00" + INTERVAL 0 DAY AND p.date < "2019-01-07 00:00:00" + INTERVAL 1 DAY ORDER BY fixed DESC, p.date ASC LIMIT 0, 50
[10 время:] 0.00017094612121582
[11] SELECT COUNT(*) as count FROM `l2b_post` as p LEFT JOIN `l2b_post_extras` e ON (p.id=e.news_id) WHERE approve AND category regexp "[[:<:]](9)[[:>:]]" AND p.date >= "2019-01-07 00:00:00" + INTERVAL 0 DAY AND p.date < "2019-01-07 00:00:00" + INTERVAL 1 DAY
[11 время:] 9.4890594482422E-5
[12] SELECT p.id, p.autor, p.date, p.short_story, p.full_story, p.xfields, p.title, p.category, p.alt_name, p.allow_comm, p.comm_num, p.fixed, p.allow_main, p.symbol, p.tags, e.news_read, e.allow_rate, e.rating, e.vote_num, e.votes, e.related_ids, e.view_edit, e.editdate, e.editor, e.reason FROM `l2b_post` p LEFT JOIN `l2b_post_extras` e ON (p.id=e.news_id) WHERE approve AND category regexp "[[:<:]](9)[[:>:]]" AND p.date >= "2019-01-07 00:00:00" + INTERVAL 1 DAY AND p.date < "2019-01-07 00:00:00" + INTERVAL 11 DAY ORDER BY fixed DESC, p.date ASC LIMIT 0, 2
[12 время:] 0.00019407272338867
[13] SELECT COUNT(*) as count FROM `l2b_post` as p LEFT JOIN `l2b_post_extras` e ON (p.id=e.news_id) WHERE approve AND category regexp "[[:<:]](9)[[:>:]]" AND p.date >= "2019-01-07 00:00:00" + INTERVAL 1 DAY AND p.date < "2019-01-07 00:00:00" + INTERVAL 11 DAY
[13 время:] 0.00010299682617188
[14] SELECT p.id, p.autor, p.date, p.short_story, p.full_story, p.xfields, p.title, p.category, p.alt_name, p.allow_comm, p.comm_num, p.fixed, p.allow_main, p.symbol, p.tags, e.news_read, e.allow_rate, e.rating, e.vote_num, e.votes, e.related_ids, e.view_edit, e.editdate, e.editor, e.reason FROM `l2b_post` p LEFT JOIN `l2b_post_extras` e ON (p.id=e.news_id) WHERE approve AND category regexp "[[:<:]](9)[[:>:]]" AND p.date >= "2019-01-07 00:00:00" + INTERVAL 11 DAY AND p.date < "2019-01-07 00:00:00" + INTERVAL 1000 DAY ORDER BY fixed DESC, p.date ASC LIMIT 0, 50
[14 время:] 0.00018787384033203
[15] SELECT COUNT(*) as count FROM `l2b_post` as p LEFT JOIN `l2b_post_extras` e ON (p.id=e.news_id) WHERE approve AND category regexp "[[:<:]](9)[[:>:]]" AND p.date >= "2019-01-07 00:00:00" + INTERVAL 11 DAY AND p.date < "2019-01-07 00:00:00" + INTERVAL 1000 DAY
[15 время:] 0.00011396408081055
[16] SELECT p.id, p.autor, p.date, p.short_story, p.full_story, p.xfields, p.title, p.category, p.alt_name, p.allow_comm, p.comm_num, p.fixed, p.allow_main, p.symbol, p.tags, e.news_read, e.allow_rate, e.rating, e.vote_num, e.votes, e.related_ids, e.view_edit, e.editdate, e.editor, e.reason FROM `l2b_post` p LEFT JOIN `l2b_post_extras` e ON (p.id=e.news_id) WHERE approve AND category regexp "[[:<:]](9)[[:>:]]" AND (p.xfields LIKE '%vip|%vip_3%') AND p.date <= "2019-01-06 03:21:57" ORDER BY fixed DESC, p.date DESC LIMIT 0, 50
[16 время:] 0.00071120262145996
[17] SELECT COUNT(*) as count FROM `l2b_post` as p LEFT JOIN `l2b_post_extras` e ON (p.id=e.news_id) WHERE approve AND category regexp "[[:<:]](9)[[:>:]]" AND (p.xfields LIKE '%vip|%vip_3%') AND p.date <= "2019-01-06 03:21:57"
[17 время:] 0.00046706199645996
[18] SELECT p.id, p.autor, p.date, p.short_story, p.full_story, p.xfields, p.title, p.category, p.alt_name, p.allow_comm, p.comm_num, p.fixed, p.allow_main, p.symbol, p.tags, e.news_read, e.allow_rate, e.rating, e.vote_num, e.votes, e.related_ids, e.view_edit, e.editdate, e.editor, e.reason FROM `l2b_post` p LEFT JOIN `l2b_post_extras` e ON (p.id=e.news_id) WHERE approve AND category regexp "[[:<:]](9)[[:>:]]" AND (p.xfields LIKE '%vip|%vip_2%') AND p.date <= "2019-01-06 03:21:57" ORDER BY fixed DESC, p.date DESC LIMIT 0, 50
[18 время:] 0.00070905685424805
[19] SELECT COUNT(*) as count FROM `l2b_post` as p LEFT JOIN `l2b_post_extras` e ON (p.id=e.news_id) WHERE approve AND category regexp "[[:<:]](9)[[:>:]]" AND (p.xfields LIKE '%vip|%vip_2%') AND p.date <= "2019-01-06 03:21:57"
[19 время:] 0.00046086311340332
[20] SELECT p.id, p.autor, p.date, p.short_story, p.full_story, p.xfields, p.title, p.category, p.alt_name, p.allow_comm, p.comm_num, p.fixed, p.allow_main, p.symbol, p.tags, e.news_read, e.allow_rate, e.rating, e.vote_num, e.votes, e.related_ids, e.view_edit, e.editdate, e.editor, e.reason FROM `l2b_post` p LEFT JOIN `l2b_post_extras` e ON (p.id=e.news_id) WHERE approve AND category regexp "[[:<:]](9)[[:>:]]" AND p.date <= "2019-01-06 03:21:57" AND p.date >= "2019-01-07 00:00:00" - INTERVAL 2 DAY AND p.date < "2019-01-07 00:00:00" - INTERVAL 1 DAY ORDER BY fixed DESC, p.date DESC LIMIT 0, 50
[20 время:] 0.00047612190246582
[21] SELECT COUNT(*) as count FROM `l2b_post` as p LEFT JOIN `l2b_post_extras` e ON (p.id=e.news_id) WHERE approve AND category regexp "[[:<:]](9)[[:>:]]" AND p.date <= "2019-01-06 03:21:57" AND p.date >= "2019-01-07 00:00:00" - INTERVAL 2 DAY AND p.date < "2019-01-07 00:00:00" - INTERVAL 1 DAY
[21 время:] 0.00034284591674805
[22] SELECT p.id, p.autor, p.date, p.short_story, p.full_story, p.xfields, p.title, p.category, p.alt_name, p.allow_comm, p.comm_num, p.fixed, p.allow_main, p.symbol, p.tags, e.news_read, e.allow_rate, e.rating, e.vote_num, e.votes, e.related_ids, e.view_edit, e.editdate, e.editor, e.reason FROM `l2b_post` p LEFT JOIN `l2b_post_extras` e ON (p.id=e.news_id) WHERE approve AND category regexp "[[:<:]](9)[[:>:]]" AND p.date <= "2019-01-06 03:21:57" AND p.date >= "2019-01-07 00:00:00" - INTERVAL 12 DAY AND p.date < "2019-01-07 00:00:00" - INTERVAL 2 DAY ORDER BY fixed DESC, p.date DESC LIMIT 0, 50
[22 время:] 0.00091695785522461
[23] SELECT COUNT(*) as count FROM `l2b_post` as p LEFT JOIN `l2b_post_extras` e ON (p.id=e.news_id) WHERE approve AND category regexp "[[:<:]](9)[[:>:]]" AND p.date <= "2019-01-06 03:21:57" AND p.date >= "2019-01-07 00:00:00" - INTERVAL 12 DAY AND p.date < "2019-01-07 00:00:00" - INTERVAL 2 DAY
[23 время:] 0.0004580020904541
[24] SELECT p.id, p.autor, p.date, p.short_story, p.full_story, p.xfields, p.title, p.category, p.alt_name, p.allow_comm, p.comm_num, p.fixed, p.allow_main, p.symbol, p.tags, e.news_read, e.allow_rate, e.rating, e.vote_num, e.votes, e.related_ids, e.view_edit, e.editdate, e.editor, e.reason FROM `l2b_post` p LEFT JOIN `l2b_post_extras` e ON (p.id=e.news_id) WHERE approve AND category regexp "[[:<:]](9)[[:>:]]" AND p.date <= "2019-01-06 03:21:57" AND p.date >= "2019-01-07 00:00:00" - INTERVAL 1000 DAY AND p.date < "2019-01-07 00:00:00" - INTERVAL 11 DAY ORDER BY fixed DESC, p.date DESC LIMIT 0, 2
[24 время:] 0.0019428730010986
[25] SELECT COUNT(*) as count FROM `l2b_post` as p LEFT JOIN `l2b_post_extras` e ON (p.id=e.news_id) WHERE approve AND category regexp "[[:<:]](9)[[:>:]]" AND p.date <= "2019-01-06 03:21:57" AND p.date >= "2019-01-07 00:00:00" - INTERVAL 1000 DAY AND p.date < "2019-01-07 00:00:00" - INTERVAL 11 DAY
[25 время:] 0.0016579627990723
Время выполнения запросов: 0.01236891746521
Время выполнения скрипта: 0.005997 c.
Расход памяти: 5.41Мб

@get-web Проблема ещё актуальна?

Извиняюсь, что так долго пришлось ждать.
В общем поставил последнюю версию DLE 13.2 и последнюю версию blockpro актуальную на момент написания данного сообщения. Темы из других категорий не выводятся ( еще попробую поэкспериментировать ) с этим вроде все нормально, а вот ajax навигация после первого клика перестает работать, ошибок в консоли нет. Вот тестовая страница http://dle.l2banners.ru/o-skripte/

Обновил модуль на другом сайте, там проблема с категориями не пропала. Возможно этот как-то связано с настройками самой DLE буду теперь на чистом движке тестить

@get-web
Вот что получается при попытке перехода по страницам. При первом вызове возвращаются данные, в которых сформирован некорректный blockId и последующие выpовы идут уже с новым blockId.
Параметр blockId должен быть одинаков для всех страниц.

Скиньте сюда файл engine/data/config.php (или его содержимое) я попробую воспроизвести локально, возможно дело действительно в специфичных настройках DLE.

@pafnuty
config.zip

@get-web Ошибку удалось воспроизвести, буду пытаться устранить.

authors: get-web pafnuty

repo: dle-modules/DLE-BlockPro


text:
ValueError: need at least one array to concatenate

When I use my own dataset,it throws error as following,i am sure my dataset path is correct,but it still .Could you please help me?
E:\Anaconda3\envs\lpb\python.exe D:/ASIS-master/gen_h5.py
D:\ASIS-master\data\indoor3d_ins_seg_hdf5\Area_1_hallway_1.h5: (3, 4096, 9), (3, 4096), (3, 4096)
D:\ASIS-master\utils\data_prep_util.py:95: H5pyDeprecationWarning: The default file mode will change to 'r' (read-only) in h5py 3.0. To suppress this warning, pass the mode you need to h5py.File(), or set the global default h5.get_config().default_file_mode, or set the environment variable H5PY_DEFAULT_READONLY=1. Available modes are: 'r', 'r+', 'w', 'w-'/'x', 'a'. See the docs for details.
h5_fout = h5py.File(h5_filename)
Traceback (most recent call last):
File "D:/ASIS-master/gen_h5.py", line 37, in
random_sample=False, sample_num=None)
File "D:\ASIS-master\indoor3d_util.py", line 281, in room2blocks_wrapper_normalized
random_sample, sample_num, sample_aug)
File "D:\ASIS-master\indoor3d_util.py", line 257, in room2blocks_plus_normalized
random_sample, sample_num, sample_aug)
File "D:\ASIS-master\indoor3d_util.py", line 215, in room2blocks
return np.concatenate(block_data_list, 0),
File "<array_function internals>", line 6, in concatenate
ValueError: need at least one array to concatenate
Process finished with exit code 1

@PengboLi1998  You can check that the data is loaded correctly.

repo: dlinzhao/JSNet


text:
some questions

Hi, i'm interested in your excellent work, and i have some questions about it

what dataset did u use to train the model? I cannot find in the paper (arxiv version) or maybe i missed it
how do you get the three stages' ground truth match pairs
how long will it take to release the core source code(update)

thank you!

Hi, thanks for your interest :)
We put some training details in supplementary material due to space limitations. You can find the supplementary here

Hi, thanks for your interest!
We put some training details in supplementary material due to space limitations. You can find it here

thanks for your reply, and have you considered open source code for dataset?

authors: Cuistiano dltan7 miRemid


text:
Configuration Override

Is your feature request related to a problem? Please describe.
When configuring gh-dash, I realized there are a few different contexts I'd like to be able to set my dashboard for but I'm limited to a single configuration, which means I need to make a compromise to how I view work items.
Describe the solution you'd like
Ideally, I would be able to dynamically choose another configuration while already inside gh-dash by pressing a bound key to prompt me for an alternate config file (or presenting a selection of configs stored in the default location).
Secondarily, it would be useful to be able to specify a configuration override as a parameter; for example:
# pass as full path
gh dash --config /path/to/alt-config.yml
# pass as relative path
gh dash --config ../configs/alt.yml
# pass by name, requiring the `alt.yml` file to be in the same place as `config.yml`
gh dash --config alt

Describe alternatives you've considered
Workarounds right now for me seem to be:

Add more tabs to my views
Have more noise in each tab than is desirable
Write a shell script to set the config file to my preferences before calling gh dash.

Additional context
N/A

I really like this idea!

authors: dlvhdr michaeltlombardi

repo: dlvhdr/gh-dash


text:
Support linux-386

Is your feature request related to a problem? Please describe.
When I try to install the extension with the following command:
gh extension install dlvhdr/gh-dash

I get the following error:
gh-dash unsupported for linux-386. Open an issue: `gh issue create -R dlvhdr/gh-dash -t'Support linux-386'`

Here's my PC info:
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04.4 LTS
Release:	20.04
Codename:	focal

On neofetch:
           .-/+oossssoo+/-.               khushal@celeron
        `:+ssssssssssssssssss+:`           ---------------
      -+ssssssssssssssssssyyssss+-         OS: Ubuntu 20.04.4 LTS x86_64
    .ossssssssssssssssssdMMMNysssso.       Kernel: 5.13.0-44-generic
   /ssssssssssshdmmNNmmyNMMMMhssssss/      Uptime: 23 mins
  +ssssssssshmydMMMMMMMNddddyssssssss+     Packages: 2076 (dpkg), 14 (snap)
 /sssssssshNMMMyhhyyyyhmNMMMNhssssssss/    Shell: zsh 5.8
.ssssssssdMMMNhsssssssssshNMMMdssssssss.   Resolution: 1920x1080
+sssshhhyNMMNyssssssssssssyNMMMysssssss+   DE: GNOME
ossyNMMMNyMMhsssssssssssssshmmmhssssssso   WM: Mutter
ossyNMMMNyMMhsssssssssssssshmmmhssssssso   WM Theme: Adwaita
+sssshhhyNMMNyssssssssssssyNMMMysssssss+   Theme: Yaru-dark [GTK2/3]
.ssssssssdMMMNhsssssssssshNMMMdssssssss.   Icons: Yaru [GTK2/3]
 /sssssssshNMMMyhhyyyyhdNMMMNhssssssss/    Terminal: gnome-terminal
  +sssssssssdmydMMMMMMMMddddyssssssss+     CPU: Pentium E5700 (2) @ 2.991GHz
   /ssssssssssshdmNNNNmyNMMMMhssssss/      GPU: Intel 82G33/G31 Express
    .ossssssssssssssssssdMMMNysssso.       Memory: 2649MiB / 3916MiB
      -+sssssssssssssssssyyyssss+-
        `:+ssssssssssssssssss+:`
            .-/+oossssoo+/-.

Describe the solution you'd like
Please add support or provide any suaitable fix!

@luisdavim I want to use the https://github.com/cli/gh-extension-precompile action for this in the future.
Can you please open a PR on there as well?

Sure, I can do that.

authors: celeronCoder dlvhdr luisdavim


text:
[BUG] panic

Describe the bug
gh dash produced this error
Caught panic:

runtime error: invalid memory address or nil pointer dereference

Restoring terminal...

goroutine 1 [running]:
runtime/debug.Stack()
        /opt/hostedtoolcache/go/1.20.7/x64/src/runtime/debug/stack.go:24 +0x64
runtime/debug.PrintStack()
        /opt/hostedtoolcache/go/1.20.7/x64/src/runtime/debug/stack.go:16 +0x1c
github.com/charmbracelet/bubbletea.(*Program).Run.func1()
        /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea@v0.24.2/tea.go:440 +0x8c
panic({0x1036cf980, 0x103cc3f40})
        /opt/hostedtoolcache/go/1.20.7/x64/src/runtime/panic.go:890 +0x258
github.com/dlvhdr/gh-dash/ui/theme.ParseTheme(_)
        /home/runner/work/gh-dash/gh-dash/ui/theme/theme.go:40 +0x38
github.com/dlvhdr/gh-dash/ui.Model.Update({{{0x0, 0x0}, {{0x140003c2ba0, 0x2, 0x2}, {{...}, {...}}, 0x0}, {{0x140003c2bc0, 0x2, ...}, ...}, ...}, ...}, ...)
        /home/runner/work/gh-dash/gh-dash/ui/ui.go:323 +0x2b68
github.com/charmbracelet/bubbletea.(*Program).eventLoop(0x1400018a600, {0x103765d00?, 0x140001b9400?}, 0x102cf2858?)
        /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea@v0.24.2/tea.go:373 +0x5d8
github.com/charmbracelet/bubbletea.(*Program).Run(0x1400018a600)
        /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea@v0.24.2/tea.go:503 +0x74c
github.com/dlvhdr/gh-dash/cmd.init.0.func1(0x103ccef60?, {0x1033dc1bd?, 0x0?, 0x0?})
        /home/runner/work/gh-dash/gh-dash/cmd/root.go:131 +0x2b8
github.com/spf13/cobra.(*Command).execute(0x103ccef60, {0x1400001e240, 0x0, 0x0})
        /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:944 +0x5b0
github.com/spf13/cobra.(*Command).ExecuteC(0x103ccef60)
        /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:1068 +0x35c
github.com/spf13/cobra.(*Command).Execute(...)
        /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:992
github.com/dlvhdr/gh-dash/cmd.Execute()
        /home/runner/work/gh-dash/gh-dash/cmd/root.go:41 +0x28
main.main()
        /home/runner/work/gh-dash/gh-dash/gh-dash.go:8 +0x1c

To Reproduce
Worked fine on fresh install. After running gh dash -c /path/to/config.yml, kaput.
After removing and re-installing, the issue persists.
Expected behavior
It should work as expected...
Screenshots
N/A
Desktop (please complete the following information):
macOS 13.5.1

Can you paste your config?

Ok, so. If I remove the config all together gh dash loads up. (I was overlooking that the config was still there after re-installing.)
However, I'm simply clicking the "copy" button on the example config from the README and running pbpaste > ~/.config/gh-dash/config.yml. With that config in place, the above error occurs.
I wouldn't have expected these steps to be a cause for 🚨
Maybe not the most pressing issue.

Hmm I don't think you can copy paste the config from the readme. You should let the program run without a config for the first time and it will wrote out a default one.

authors: dlvhdr public-rant