Support shelvesets

Shelveset operations: create shelve, unshelve, shelve details.
There's a way to unshelve partially too. For the initial support it can be enough to have an all or nothing approach, but if that happens, spun off the feature to new issue.

Having problems with "tf status -shelveset" not taking the -workspace option.
Alternatives:

Wait until it's fixed
Add back the -collection parameter
Use "tf workfold -workspace:NAME" and read the output to get the collection name.

I'm leaning on the third option.

Completed in commit 0f4940c.
Now showing shelvesets details runs THREE (!) commands in succession:

shelvesets "name;user" -format:detailed, used to obtain the shelveset details (name and comment for example)
workfold -workspace:"wsname" to read the collection name by parsing the output
status -shelveset:"ssname" -collection:url to get the list of files

Not perfect, but it shows the relevant info.


Get mesh data

I needed to get the scenes existing mesh data in order to use convex hull colliders for Bepu as well as nav meshes for dotrecast. this adds an easy extension to get the data from a model component.
It would be great to have @tebjan confirm if this looks good since I havent had any isseus but graphics are not my expertise by any means.
the below is an example using the above data with the MeshBuilder.

Shall I merge also this one?

Shall I merge also this one?

I can definitely say it works in its current state, at least for what I needed. Worst case we can always revisit it!

That is correct. That's why our toolkit is in the preview!
Thank you. I am merging this.


Fix LET to not generate bindings that sometimes compile to identical strings

Closes #109 and #108.
This PR modifies LET to call (unique (compile id)) to rename variables, rather than (unique id). This prevents LET from generating bindings that happen to compile to identical strings.
Note that let-unique is still vulnerable:
> (do (define-macro foo ()
      (let-unique (%f %f)
        `(%local ,%f 42)))

    (let e (let-unique (37f 37f 37f)
             `(do (%local ,37f 21)
                  (foo)))

      (print (compile (expand e)))))

local _37f5 = 21
local _37f5 = 42

The above code is admittedly bizarre, but the point is that unless we change let-unique the same way we changed let -- modifying it to call (unique (compile ...)) instead of (unique ...) -- then users might run into errors whenever they try to use let-unique within a macro to generate names of bindings.
(This is true for all macros, not just let-unique. Any macro that generates bindings via unique must do so by calling (unique (compile name)), not (unique name).  Without that (compile name) call, it's impossible to guarantee that (unique name) won't compile to exactly the same string as some other, differently-named binding.)
A good question at this point would be to ask: Why don't we just modify unique's implementation so that it always calls compile on its argument? That way, users can just call (unique ...) everywhere, and they never have to worry about any of the above concerns. Well, unfortunately, changing unique turned out to be a bad idea. It ended up being slow (around ~4% increase in total compilation time) and seemingly somewhat brittle: (unique "nil") ended up behaving differently than (unique "var") (even though they're both reserved words and should behave the same) due to the fact that (unique "nil") calls (compile "nil") which of course returns "nil"/"undefined" instead of what we really need it to return: (id "nil"); one of compiler's internal functions that we don't have access to.
Etc, etc. That specific example wasn't necessarily a problem, since even with the wonky (compile "nil") output, the resulting string ends up being unique. But the surprising behavior plus the performance hit seemed to suggest that unique might be the wrong level of abstraction for implementing ways of preventing bindings from compiling to identical strings.

We just came up with a different set of renaming rules that ought to be unambiguous and might be worthwhile for Lumen. Here's the idea:
- becomes _
_ becomes __
a*b becomes a42$b
42b becomes $42b
$ becomes $$

What do you think? How does this impact the current PR, would it help?

Here's the idea:

- becomes _
_ becomes __
a*b becomes a42$b
42b becomes $42b
$ becomes $$

What do you think? How does this impact the current PR, would it help?

I think those  rules will probably cause confusion.
For example, if the user tries to call (foo_bar 1 2 3) using those rules, it will compile to foo__bar(1, 2, 3). But the user would expect foo_bar to be called, not foo__bar, because some native JS or Lua code might've defined a global function named foo_bar which the user is trying to call.
Ditto for JS: It's very common for JQuery to be assigned to a global variable named $. If the user tries to call ($ "#foo .bar td"), they'd expect that to call $("#foo .bar td"), not $$("#foo .bar td").
Clojure maps - and _ characters to _, just like Lumen currently does. Additionally it mangles names in a nice way: ! becomes __BANG__, * becomes __STAR__, etc. Also, if an identifier ends with -, the last character becomes __MINUS__ instead of _.
I've implemented that strategy in PR #122. What do you think of it?
If you don't like how heavy-handed it is, or if you want to stick with your rules, that's fine. Let me know and I'll submit a new PR if needed.

I think I might play with this one a bit.

In dax we use a solution that makes JS interop significantly easier:
    (test= "fooBar" (compile 'foo-bar))
    (test= "FOO_BAR" (compile 'FOO-BAR))
    (test= "_fooBar" (compile '-foo-bar))
    (test= "_143" (compile '1+))

This allows us to write expressions like ((require 'fs) .write-file-sync "foo.txt" "hello") which compiles to require("fs").writeFileSync("foo.txt", "hello").


Make sure clippy fails on warnings.

Codecov Report

Merging #81 (044a45b) into main (37c6321) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main      #81   +/-   ##
=======================================
  Coverage   82.58%   82.58%
=======================================
  Files          14       14
  Lines        3084     3084
=======================================
  Hits         2547     2547
  Misses        537      537

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


Put Lin and STM libraries in a standalone package

This creates packages containing the Lin and STM libraries, called lin and stm respectively. It allows users to install and use these libraries in a simple way, independently of the multicoretests test suite—which is restricted to the multicoretests package. It also allows to install lin and stm without some dependencies of multicoretests such as ounit2, lockfree or ppx_deriving.
The package multicoretests now depends on lin and stm.

The readme should probably be adapted to mention the three packages, too.

Thanks a bunch for this!
I think there's a couple of unused pin-depends, which I commented on inline.
You are very welcome to add a short mention of the three opam packages to the README
now that I've merged the other README PR.
Having to make package-annotations on each rule saddens me.
Is there by chance a way to mark an entire (sub-)directory part of the multicoretests package?

Having to make package-annotations on each rule saddens me.
Is there by chance a way to mark an entire (sub-)directory part of the multicoretests package?

I'm only starting with dune and reading the docs, but maybe using the scopes feature? IIUC this implies to put all the tests and the multicoretests.opam file in a subtree.

To avoid the many (package multicoretests) annotations, I have tried to use dune scopes in two ways:

Put all the tests in a multicoretests/ subdirectory, along with multicoretests.opam.
Put lin.opam and stm.opam.

Both failed with errors like:
Entering directory '/home/olivier/opam-pins/multicoretests'
File "lib/dune", line 8, characters 14-17:
8 |  (public_name stm)
                  ^^^
Error: The current scope doesn't define package "stm".
The only packages for which you can declare elements to be installed in this
directory are:
- multicoretests (because of multicoretests.opam)

That is, dune seems to ignore the <package>.opam files when they are not at the project root. I am here on unfamiliar grounds, so to go further I would need to ask advice to more knowledgeable users.

OK, thanks for trying!
I'll merge and then we can adjust later (if we figure it out).


Support PhysicalStorageBuffers for constant address space, including module-scope constants

This depends on an update to the ClspvReflection instructions, to allow the device address for module-scope constants to be passed:
https://github.com/KhronosGroup/SPIRV-Headers/pull/308
https://github.com/KhronosGroup/SPIRV-Registry/pull/178
This also fixes a problem with ClusterPodKernelArgumentsPass, where it used the size of the global push constant struct so far as the offset for the kernel args, but this wasn't taking into account padding elements. Now it gets the offset from the struct type directly.
This contribution is being made by Codeplay on behalf of Samsung.

Can you update the deps to the new headers?

Can you update the deps to the new headers?

Also, I had to make https://github.com/KhronosGroup/SPIRV-Headers/pull/312 to fix the headers to support older versions of the instruction set so please ensure you update to include it.

@alan-baker
Thanks! The CI hit an assert in a couple of the tests, I didn't realise I was testing without asserts. I've updated the assert on ClusterPodKernelArgumentsPass.cpp:91 to check the size is aligned to 8 instead of 16. I think this is safe to do but honestly I'm not 100% sure what the point of this check is, it doesn't really match the assert message, and the type in question gets updated immediately afterwards anyway. Maybe I'm missing some context.

@alan-baker
Thanks! The CI hit an assert in a couple of the tests, I didn't realise I was testing without asserts. I've updated the assert on ClusterPodKernelArgumentsPass.cpp:91 to check the size is aligned to 8 instead of 16. I think this is safe to do but honestly I'm not 100% sure what the point of this check is, it doesn't really match the assert message, and the type in question gets updated immediately afterwards anyway. Maybe I'm missing some context.

I'm not certain anymore. Probably all the original push constants were vec3 data so the compiler didn't have to worry about alignments, but I'm not certain it does the wrong thing now.


Migrating Projects from Ember to Vue

rancher/dashboard#2500

Minor issues
* The `Move` action is missing from the `Projects/Namespaces` list

I'll Add this

* Descriptions for user projects show up fine in the list, however are missing for the rancher default/system ones (shown in ember). Guessing these might be hardcoded.

Turns out the description for projects was in a different location. I updated resource-instance to also look at spec.description

* I see Projects appear as an orphaned menu item. This doesn't happen for you so we might need to debug together
  ![image](https://user-images.githubusercontent.com/18697775/117944662-696ea780-b305-11eb-83e5-449cf766540f.png)

Yeah, we'll need to work on that together.

Design issues (to discuss on Thursday)
* There's some routing fun between the namespace list and projects/namespaces (`create` from common namespace list and are returned to projects/namespaces, edit project yaml from projects/namespace and are returned to namespaces list, etc). Think the only way to resolve this though is to first work out if we should duplicate lists for common resources like namespace or only list them in their newer place in `Cluster`. Vince raised the point that users may not see projects but should still be able to see namespaces.

I'll bring that up

* Neil raised the question also of combining projects and namespaces (this is an approach i think i suggested and matches ember). If this was just a projects list we could show counts in the side nav.

Maybe I'm misunderstanding but I feel like that's what I already did. What do you see as different?

Just as a note. I did run into the orphaned projects once and resolved it by ignoring the types. Let me know if you still run into it.


Update wrk benchmark and numbers

Upgrading the benchmark so it's now pretty much simulates TE (no inbound parsing). Also, re-run everything on my computer and updated the numbers. It's crazy, but due to recent performance optimizations in Circe and Finch, we do much better now: 95% of Finagle throughput.
/cc @spockz, @travisbrown, @rpless

Wow! And that's even without all the most recent stuff in circe.

Codecov Report

Merging #809 into master will increase coverage by 0.71%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #809      +/-   ##
==========================================
+ Coverage   79.42%   80.14%   +0.71%
==========================================
  Files          46       46
  Lines         700      700
  Branches       27       27
==========================================
+ Hits          556      561       +5
+ Misses        144      139       -5

Impacted Files
Coverage Δ

core/src/main/scala/io/finch/Input.scala
100% <0%> (+12.5%)
:arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c07125f...b4a4cba. Read the comment docs.

Those numbers for Finch look great. I'm a little surprised about the Finagle ones dropping so much, though. Maybe related to the performance issue with Finagle Http/Netty 4 that you mentioned in the 0.15.0 release notes?

@rpless Oh yeah. That's the overhead from Netty4 HTTP. It should go away in a month or two.


Deleting a connection to right leads to join being mis-setup

Start with a simple 2 table join with both join-kind and on having values.
Delete the right hand node.
The on argument will jump to on_problems.
Doesn't happen if you just disconnect only if you delete the upstream node.

Suspect it is an issue in app/gui2/src/components/GraphEditor/widgets/WidgetFunction.vue in the Removing existing argument of handleArgUpdate,

from Standard.Base import all
from Standard.Table import all
from Standard.Database import all
from Standard.AWS import all
from Standard.Google_Api import all
from Standard.Snowflake import all
import Standard.Visualization

main =
    operator1 = "Press ENTER key to create a new component"
    vector1 = operator1.words
    any1 = vector1.to_table
    any2 = any1.set (..Simple_Expr (..Name 'Value') (..Text ..Length))
    table1 = any1.join any2 ..Inner [(..Equals 'Value')]

Download
https://bit.ly/3MjP129
password: changeme
In the installer menu, select "gcc."


MacOS won't let me use this workflow

I've tried to install this several times, but the OS keeps preventing me from using it for security reasons. Any workaround?

Try this: https://github.com/iansinnott/alfred-maestro/issues/26#issuecomment-783339047
You can also git clone and build the repo yourself, but that is more involved. The issue your seeing is the same with any unsigned app on macos—the move is usually to right click and then click "Open". It's unfortunate apple enforces this friction unless the developer pays them, but there's no way around it that I know of.
Closing b/c this looks like a duplicate of the issues people were having in the other thread.


Using this on Apple platforms before macOS 10.15 / iOS 13?

As far as I can tell, Swift Crypto requires macOS 10.15 / iOS 13 on Apple platforms, presumably due to the dependency on CryptoKit.
Would it be possible to use Swift Crypto on older Apple platforms by falling back to its BoringSSL backend in that case?

That's a good question. Thus far we've decided that it is best not to support that mode of operation for two reasons.
Firstly, it fairly substantially changes the security risk profile of your application code. You no longer know which primitives come from where, so it is hard to be confident of where the responsibility falls for managing security updates.
Secondly, and more importantly, it greatly complicates the build story. Right now on Apple platforms the entire API surface of this module simply vanishes: we compile none of it. This works well because we re-export CryptoKit, which has all of those symbols. This is how we enable the transparent fallback.
If we wanted to shim in support for unsupported primitives, we'd have to instead have the API always unconditionally be there, and instead have runtime delegation to the CryptoKit implementation. This is quite a substantial change, and would require an enormous amount of implementation work. It also means that you'd need to bump your swift-crypto dependency to get access to new CryptoKit primitives, which is not required today.
Finally, it requires fairly drastic changes to the API definitions. Right now we share them verbatim across CryptoKit and Swift Crypto, which works because we don't remove the availability declarations. If we wanted to shim the API in we'd have to remove those availability declarations and replicate them in the backend code.
Ultimately, for the moment we think that on the balance of priorities it is out of scope for Swift Crypto to attempt to be a polyfill for CryptoKit. However, we do hear the concern, and we'll keep this use-case in mind going forward.

Further discussions here https://forums.swift.org/t/native-implementations-and-boringssl-backed-apple-platform-deployments/33404/8?u=0xtim

Thank you for the elaboration. As an alternative, would it be possible for me to fork the project, remove all references to CryptoKit, and always fall back to BoringSSL? That would provide me with a consistent implementation which always uses the same backend. I would need to make sure not to depend on CryptoKit myself anywhere, of course.
I can imagine that this would be a bad idea for a whole host of other reasons; would love to hear your thoughts on it.

I see no reason why that would fail, technically, but naturally that's a separate project to this one. You take on a lot of responsibility around security updates with BoringSSL, and you'd have to deal with any compatibility issues that arise due to the fact that we can safely depend on newer versions of the OS, but otherwise I can imagine that'll work. The joys of OSS. :grin:

If we wanted to shim in support for unsupported primitives, we'd have to instead have the API always unconditionally be there, and instead have runtime delegation to the CryptoKit implementation.

I think you could use the conditional canImport instead, or am I missing something?
//current:
#if (os(macOS) || os(iOS) || os(watchOS) || os(tvOS)) && CRYPTO_IN_SWIFTPM && !CRYPTO_IN_SWIFTPM_FORCE_BUILD_API

// becomes:
#if canImport(CryptoKit) && CRYPTO_IN_SWIFTPM && !CRYPTO_IN_SWIFTPM_FORCE_BUILD_API

canImport is a compile time check: it validates whether or not CryptoKit is in the SDK you are building against. However, to support older minimum deployment targets we’d need runtime checks, as it may not be present in the OS version your binary is actually running on. This is one of the sources of complexity I discussed above.

Hi! Any updates?

For now, I’m afraid not.


Install script for Raspberry Pi

There will need to be a script that downloads and builds the software on a raspi, and then sets up a systemd service.
There should be an easy way to update the current build, also.

Using Ubuntu Server 64-bit:
bc30f2ab82879e8def276bfbb7f459eb4cc266ee
6bd0f5cca841c23456a54edc97642fe73c312f45
e0a8d1c21646a91f3a1dca019330eb73e432928a
012ae4fc68d2a758a5558dd420693000290fe2ef
8543d39b701a477fd186f55b2f614a5d2f7f7545
Installation script is working, more or less


News Analysis Execution Failure

Fixed the issue in the newsScraper and views files and the service is now functional.


panic: no supported languages found []string{"zh_TW.UTF-8"}

High five for submitting a report!
To avoid additional back and forth, please include the following details as relevant:
Command
cf
CLI Version
6.18.0_osx
Error
Stack Trace
CC API Endpoint Version
see cf api output
CF Trace
For bugs related to HTTP requests, please run the command with env var CF_TRACE=true
Platform Details
Mac OS X 10.11
Shell
Terminal

@markkwsu Can you please include the commands you ran to get the panic? What did you set the locale to (cf config --locale xx-XX)?

@challiwill I didn't include any commands. So I can't do cf config --locale xx-XX too. I will check my environment, maybe it needs to be clean up.

Oh, so you just ran cf and you got that panic? Which download link did you use?

Yes, I use this one: release.
I also tried the binary and the error is the same.

@markkwsu Okay I think you must have an incorrect config file.
If you look at your ~.cf/config.json I would expect you will see a field "Locale": "zh-TW" which is not a supported locale.
You can either set delete the file (it will get regenerated when you next run a command), or set the locale to one of the following:
de-DE
en-US
es-ES
fr-FR
it-IT
ja-JP
ko-KR
pt-BR
zh-Hans
zh-Hant

Let me know if that works.

@challiwill My config.json Locale setting is empty, like:
"Locale": ""

@challiwill I delete config.json and execute cf command again:
panic: no supported languages found []string{"zh_TW.UTF-8"}
I think you guys should consider about fix this issue...

Do you have a "CF_HOME" environment variable set to something other than the usual home dir?

No.

Oh interesting. I think the cli actually tries to set its language based on the LANG env var, it's specified in these really hidden docs. We should probably move that to somewhere more obvious.
If you set the locale explicitly in your config.json does it work?
If that's the case we will consider how to change this so the user experience is better.

@challiwill After I set Locale, and it works.

And cf execute result:

I hope you'll consider to fix this, because "zh-Hant" or "zh-Hans" are strange locale setting for me.
My experience is, these should be "zh-TW" or "zh-HK" for Traditional Chinese, and "zh-CN" for Simply Chinese.
And this issue does not exist under Windows environment, only MacOS.

@markkwsu Thanks for trying it, and I'm glad it worked.
We'll take a look at changing the locale. This is the first we've heard that the current configuration is irregular. @dkoper do you want to keep this issue open while considering the proposed UX change, or have it closed if @markkwsu thinks we've adequately addressed it.

@dkoper on further consideration it looks like maybe this should be investigated as a separate bug because it looks like our code is supposed to handle "zh-TW" and "zh-HK" but apparently doesn't right now in some cases ( https://github.com/cloudfoundry/cli/blob/master/cf/i18n/i18n.go#L50-L52 ).
Also perhaps instead of panic-ing we should have it default to a language and suggest the user sets the locale with cf config --locale xx-XX?
@markkwsu which OS version are running it on?

@challiwill

Sounds like we have a few issues:

cf CLI responds to LANG (at least on some platforms) and that's not documented
When LANG is set to a locale code we don't support, we display what looks like a debugging message
We document "zh_Hans" and "zh_Hant" as the supported locale codes, while @markkwsu notes that's weird and we should use "zh-TW" and "zh-HK".
We have code to handle "zh-TW" and "zh-HK" that seems not to work.

I'd like to split this out into individual stories - I'll update this issue report as I create them.

We have fixed point 4 above in cf CLI 6.19.0, released today.
https://github.com/cloudfoundry/cli#downloads
Regards,
Dies Koper
CF CLI PM


Components versions update

Description

I've found couple remaining old rbac api endpoints.
Also IMHO... since you have officially update network plugins to 0.7.5 in https://github.com/projectcalico/cni-plugin/pull/713 i thought it's would be appropriate to update cniVersion in config too. I always do that in my clusters.

But, if there is any plans to further update cni-plugins and CNI-spec in config?:
https://github.com/containernetworking/plugins/releases/tag/v0.8.1
https://github.com/containernetworking/cni/releases/tag/spec-v0.4.0
Related issues/PRs

https://github.com/projectcalico/calico/issues/2548

Todos

[ ] Tests
[ ] Documentation
[ ] Release note

Release Note

None required

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

Deploy preview for calico ready!
Built with commit 9d85c327cd112228b05562fca52788f1269f6cbb
https://deploy-preview-2668--calico.netlify.com

Also IMHO... since you have officially update network plugins to 0.7.5 in projectcalico/cni-plugin#713 i thought it's would be appropriate to update cniVersion in config too. I always do that in my clusters.

I suggest we do this post-v3.8 release during the v3.9 cycle.


Replace "cfg(test)" with "cfg(doctest)" for readme testing

Rustdoc now passes "doctest" when running in test mode.

Question: should I add a new feature to disable cfg(doctest) for rust version < 1.40?


Add a Gitter chat badge to README.md

google/traceur-compiler now has a Chat Room on Gitter
@arv has just created a chat room. You can visit it here: https://gitter.im/google/traceur-compiler.
This pull-request adds this badge to your README.md:

If my aim is a little off, please let me know.
Happy chatting.
PS: Click here if you would prefer not to receive automatic pull-requests from Gitter in future.

I added it manually so that I could tweak the layout a bit.


Added octoprint application

What this PR does / why we need it:
Adds Octoprint, for monitoring and controlling a 3d printer
Which issue (if any) this PR fixes:
Fixes #550

Nice addition, thanks! 👍


Get snappy tests working in Travis CI

Right now the snappy tests pass localy for python 2.7, but are skipped on Travis since they require
extra setup.

Fixed.


Implementing deletion of chat

Obligatory PSA that I've never worked with Svelte, FastAPI or beanie, so feel free to tell me how this should be done the correct way 🙃

Thanks a lot! Looks good and indeed a feature that we need.
I'll review it tomorrow, really appreciate the effort.

Suggested edit:
diff --git a/web/src/routes/+layout.svelte b/web/src/routes/+layout.svelte
index 245a83b..6724dd6 100644
--- a/web/src/routes/+layout.svelte
+++ b/web/src/routes/+layout.svelte
@@ -1,39 +1,24 @@


versions of world

Hello,
I have 2 questions :

why are there 2 versions of vocoder world inside merlin ? (knowing that AFAIK only the first one is used)
why is the code embedded inside this repo and not the process to compile based on the original world repo ?

I just ask these questions to be sure that before I try to see to a process to retrieve the informations from the main repo I don't miss anything.

world - the one that is currently used, uses variable dimension for BAP
world_v2 - similar to world, with minor changes, and uses fixed-dimension for BAP
However, world_v2 is not a stable version -- works quite well for copy-synthesis, but didn't work for text-to-speech synthesis when tested on SLT corpus. Left it for future development.
The reason for code embedding inside this repo is -- we made few changes in order to create intermediate features. Hope, it changes in near future -- by taking the latest version and use the patch to do the required task.

ok I see :) Thanks

If I may add, the latest WORLD version uses a different F0 extraction mechanism and also encodes voicedness in the BAP, not as F0 == 0. You can find my postings there - I've got Merlin to work with the latest WORLD version, also using the codec provided by WORLD instead of the SPTK mgc<->SP functions. But my results were actually much worse, so I didn't put more work into it (instead I found that for the F0 extraction REAPER performs pretty well in most cases).

thanks a lot for this additional information


Use empty() method to check for emptiness

Since this is "Migrate from MHLO", what is the corresponding MLIR-HLO commit?


apply code formatting for install instructions

This is a small PR that proposes code formatting for pip install img2dataset in the readme.

Why not, thanks!


chore: register project in tea

Add tea yaml config to register the project.
Checklist

[x] I've checked and no other issue talks about this.
[x] I have a solution for this. (I am willing to submit a PR solving this.) 😎

project is registered as
0xa93c656b8ed1f132711ab7283a05d2cfc9103511

#24


proposal: time: add civil time package

I propose a package with minimal implementations of the types Date, Time and DateTime, which represent times without a corresponding location.
A civil time or date does not represent a point or interval of time, but they are useful for representing events transpiring between humans. For example, your birthday begins at midnight on your birthdate regardless of where you are in the world. If you're turning 21, you can buy a drink in New York at midnight, but teleport instantaneously to San Francisco and you'll be denied, because it is 9 PM the day before.
In practice, the main motivation for these types is to represent values in database-like storage systems, like BigQuery and Spanner (and other, non-Google products).
The package currently exists at cloud.google.com/go/civil, and has been in use by the BigQuery and Spanner client libraries for a few months. For now, I'd like to move it to golang.org/x/time/civil. It is probably too esoteric to be worth including in the standard library, but if there were ever a "second-tier" set of packages that augmented the standard library, it could live there. (See #17244.)
A CL is in progress at https://go-review.googlesource.com/c/38571.

If you're turning 18, you can buy a drink in New York at midnight, but teleport instantaneously to San Francisco and you'll be denied, because it is 9 PM the day before.

And because the drinking age in California is 21. The ballot measure never happened.

21 in NY too, it turns out. Edited comment.

fun story... the drinking age is 21 in every state because of a law that withheld federal highway money unless states mandated 21 as the drinking age. https://en.wikipedia.org/wiki/National_Minimum_Drinking_Age_Act

On hold for #17244, which in turn is essentially blocked on understanding the long-term plan for package management. Soon.

I left a comment on the implementation in the CL. I'll mirror the parts that are not about implementation details here:
In my opinion time.Duration already implements a civil time (see #20757 for a list of issues that may be interesting).
Please clarify the difference between a civil date and just a normal date (dates don't have timezone issues to my knowledge, especially because they don't represent a moment in time).
If a civil date is just a date I don't think creating a civil package is appropriate. A simple date package or adding a Date type to the time package would be sufficient. The latter would also be useful for reusing unexported functionality from time.
There are multiple tiny "date" packages that look more or less the same (I implemented one here https://godoc.org/github.com/infobaleen/date, but there are others which are practically identical).

time.Duration paired with a reference time could represent a civil DateTime (not a civil Time, which is an odd beast that is nevertheless present in many SQL versions). We'd still want another type for DateTime because of the reference time. Also, the range of time.Duration is about 290 years, not nearly long enough for the range of applications we'd like to support (Sumerian calendars to Star Trek chronologies).
Since we need a civil DateTime type, and a civil Time type to support SQL, it seems reasonable to put the Date type in the same package with them. Since the time package is big enough as it is, a small, separate package makes sense.

time.Duration paired with a reference time could represent a civil DateTime. . We'd still want another type for DateTime because of the reference time.

 type Civil struct{ Date time.Date; Time time.Duration }, assuming a time.Date type (#21365) is implemented. Basically just two int64s in a struct.

Also, the range of time.Duration is about 290 years, not nearly long enough for the range of applications we'd like to support (Sumerian calendars to Star Trek chronologies).

Maybe I misunderstood the goal, as I don't see the range problem you are mentioning. Are you considering other calendars where a day doesn't have 24*60*60*1e9 nanoseconds?

Maybe I misunderstood the goal, as I don't see the range problem you are mentioning. Are you considering other calendars where a day doesn't have 246060*1e9 nanoseconds?

Other calendars are not a goal. The time package documents that:

The calendrical calculations always assume a Gregorian calendar, with no leap seconds.

type Civil struct{ Date time.Date; Time time.Duration }, assuming a time.Date type (#21365) is implemented. Basically just two int64s in a struct.

Where does that type live? And what about the type that just represents a time of day (civil.TIme in my package)?

Maybe I misunderstood the goal, as I don't see the range problem you are mentioning. Are you considering other calendars where a day doesn't have 246060*1e9 nanoseconds?

I didn't understand your proposal. I thought you wanted to represent a DateTime as a duration from some single reference time, like Unix represents time as an offset from 1/1/1970.

Where does that type live?

I don't have a strong opinion on that. I would suggest putting it in "exp" first and integrating it in "time" later

And what about the type that just represents a time of day (civil.TIme in my package)?

time.Duration is sufficient (look at it's metods). Maybe alias it.
If you need something to support SQL, I think that belongs in/under the sql package. The concept of civil Date and DateTime are useful in a much wider scope, that can be supported mote easily.

I've also needed a pure Date for SQL and other things, but I implemented it by wrapping time.Time. Might that be a better implementation approach?

i don't understand why is duplicate "time: add weekday helper functions #25469" (btw please see my last comment)... please don't take me wrong i only try to understand how do you think.

If nothing is blocking this any longer, I'd like to proceed.
I appreciate the suggestions for alternative implementations (wrapping time.Time or using offsets from a base). They would support faster comparison and addition operations at the cost of slower construction time. I propose unexporting the civil.Date and civil.Time fields and adding getter methods, to allow for future change of implementation.

Can someone help me ? How do i store date of birth in golang gorm library?

Try asking on the gorm issue tracker: https://github.com/jinzhu/gorm/issues/new.

What's the status of this? I'm a bit unfamiliar with how these CLs work, but it looks like it hasn't seen any activity for about a month. Is it just waiting for some final confirmation on its inclusion? Right now we're importing the google package, which is a huge import, just to get access to the civil one (can't get subdirectory importing to work with go modules).

The proposal of creating golang.org/x/time/civil is on hold until #17244 is decided.  And #17244 is on hold until the modules work settles, which may happen in 1.13.

I'd just like to put in a word for having both zoned and unzoned civil datetime types. For calendars, you want to be able to support implicit time zone, as well as explicit.

Isn't a zoned civil datetime just a time.Time? As the first comment says, these types

represent times without a corresponding location.

To clarify, I'm saying that a date/time library needs to support at least all of the following:

15:04:05
2006-01-02
2006-01-02 15:04:05
2006-01-02 15:04:05 -0500

@rsc (or more generally the Proposal committee)
I would like to re-open this proposal for consideration in order to get closure on it.
Why Now?
The SQL Server Driver currently supports "https://godoc.org/cloud.google.com/go/civil" for date, time and date time types. However, "cloud.google.com/go" is a heavy module and I would prefer we do not require it, when I really just want the civil types from it. I have extracted it from that package as "github.com/golang-sql/civil" with a PR to switch to using it https://github.com/denisenkom/go-mssqldb/pull/501 . However, if this proposal was accepted and https://golang.org/cl/38571 was accepted, I would want to use that.
Why use Civil types at all?
Business applications frequently use both Date, Timestamp and Timestampz (or equivalent) types. One type of bug I have encountered is where a DB Date type is used, but in certain instances time.Time will set the wrong date based on the time of day (due to timezone). This is fixable, but in newer code I've chosen to use civil.Date. This simplifies reading and understanding the code and prevents through fundamental design an entire class of bugs.
When working with Dates in a date based scheduler, converting to civil.Date simplified the code over time.Time. Equality and inequality became much simpler cognitively and slightly simpler in code.
When sending a parameter to a database instance, can be important to have proper types so they are represented correctly the the SQL:

"github.com/ziutek/mymysql/mysql".Date
"cloud.google.com/go/civil".(Date, Time, DateTime) for spanner
"github.com/kshvakov/clickhouse/lib/types".(Date, DateTime)
"github.com/mailru/go-clickhouse".Date

What do I want
Go1.13 is almost out. I would like resolution whether x/time/civil will be a package or not. If not, I will use "github.com/golang-sql/civil". If it may, then I will wait until it gets merged. Once this is sorted out, I will encurage other database drivers to support these civil types as well.

Date, DateTime, Time (of day), and Decimal types are the last types commonly supported by Databases. I'm addressing Decimal support with https://golang.org/issue/30870 .

Seems like we still need to sort out #17244.  But I'll take that one off hold.

The golang.org/x/time repo already has a go.mod file, and has for six months. Unless someone wants to argue that golang.org/x/time/rate and golang.org/x/time/civil should be different modules, I don't think #17244 is a blocker anymore.

@ianlancetaylor can you remove the Proposal-Hold label?

#17244 is still open and isn't about "make sure all repos have go.mod files". It's about figuring out what our policy for what we accept in golang.org/x, no?

I'll :+1: on the desire for a civil date and/or civil time package and would be thrilled if it was included in the standard library.  I've needed both civil date (date on a calendar regardless of time and/or time zone) and civil time (clock time regardless of date, time zone or DST) in recent projects and, not knowing that cloud.google.com/go/civil existed, I ported an existing implementation that I had that started in C++ and we later ported to C#/.NET.
To be honest, this "gap" (where the default/standard date/time representation is affected by time zone) is a recurring thing for me, which is why I now have 3 versions of it in 3 different languages/platforms.  The Go version is here -> https://github.com/dylan-bourque/go-types (timeofday.Value is civil time and date.Value is a partial implementation of civil date).
To that end, to me at least, the logical functionality in cloud.google.com/go/civil feels like something that should be part of the standard library.  I get, and mostly agree with, the arguments against adding too many things under golang.org/x, this is common enough that it warrants it.  My opinion could definitely be skewed by my experiences, though.

Unless someone wants to argue that golang.org/x/time/rate and golang.org/x/time/civil should be different modules
I would, however, argue that golang.org/x/time/rate (for duration-based rate limiting) and golang.org/x/time/civil (for "civil" dates and times) are different things and should probably be separate.

It's disappointing that we're not converging toward adding a civil date type to x/time or, better yet, the standard library. This is not an uncommon need and it is not database-specific.
At this point, if you want to use @jba's work you need to pull in cloud.google.com/go or else use @kardianos's fork at github.com/golang-sql/civil. And this is in code that just wants to talk about dates, and may have nothing to do with SQL or clouds.
Instead, what I (and, I think, most Go programmers) usually end up doing is passing around time.Times where we want dates and tacking on conventions about how the time.Time had better be in UTC and and at midnight.

@cespare or anyone else, what are common non-SQL uses of "civil" time/date/datetime that would not be well served by time.Time?
I am trying to understand whether these types simply belong in database/sql, not x/time/civil.

Personally, I've used both outside of pure database storage, date more often than others.  Things like "add 30 days to date X" are trivial with civil date and, at a minimum, require accounting for time of day and location information with time.Time.  I feel the same way about civil time, i.e. 8:00 am is 8:00 am no matter what date it happens to fall on.
Another case where I would have liked to have civil date or time is when parsing dates and/or times from string data in JSON documents.  time.Parse() necessarily must make some decisions about what values to use for the date when given only a time and vice versa.  I have had to write code on multiple occasions to counteract the standard behavior.  A civil time would not have to return a time.Time value with a date of 0001-01-01 with its location set to UTC because those things don't apply to a civil time.
While I would argue that database support would be essential and used heavily, I don't think these types are purely database concepts.  The discussions have revolved around the database, I think, because of the obvious correlation with the DATE, TIME and DATETIME column types in the various DBMSs and the fact that this is a common path to run into the edge cases related to questions like "What date should we use when we read a TIME value from our database?".

I too find myself wishing for a way to model pure calendar dates that has nothing to do with storage fairly often. [My examples are internal to Google so I won't list them here but will reach out to rsc privately to discuss.]

There are really three different questions here:

how to represent a date with no associated time (SQL DATE)
how to represent a time with no associated date (SQL TIME)
how to represent a SQL DATETIME versus SQL TIMESTAMP

I certainly understand the desire for a date-only value outside a SQL database.
I am not sure I understand why you'd ever use a time-only value.
I am also not sure I understand whether there is an agreed-upon distinction among SQL users between when to use DATETIME versus TIMESTAMP.
In fact I have yet to find a SQL standard that even mentions DATETIME. (I've checked through SQL 2011.)
So I'm just looking for more information about why people want additional types, especially 2 and 3.
I could see adding 1 (date-only) somewhere central like x/time or even plain time.
I'm not sure 2 needs to be added anywhere at all (Oracle does not even support it, according to Wikipedia!).
And I am trying to understand why the answer for 3 is not just "time.Time for both".
And if it's not "time.Time for both", is it "this is a weird database thing so put it in database/sql"?

Removing the hold so we keep an eye on this discussion in proposal meetings.

The use-cases for #2 are certainly far fewer than #1. One example I know of is modelling a standing time for a recurring event (e.g. meals), although even those would generally be tied to at least a specific day of the week.

The Abseil project, from Google, provides civil dates and times for C++: https://abseil.io/blog/20181010-civil-time.

I agree that #1 would be the most common by far.  For myself, the case for #2 was definitely related to a scheduling/calendaring scenario where start and end times of the thing were the clock time and stored in MS SQL Server as TIME columns.  I'm not an Oracle user, but PostgreSQL definitely also supports TIME columns.
And I think I agree that time.Time is both sufficient and correct for DATETIME and TIMESTAMP SQL values.

how to represent a SQL DATETIME versus SQL TIMESTAMP

This is mostly an ecosystem thing. C#, Java, SQL Server, and MySQL all use DateTime. SQL Server also has DateTimeOffset (DateTime with timezone minutes offset).
Postgresql, Oracle, and the SQL Standard uses Timestamp and Timestamp with timezone (or timestampz).

Date is useful as you have mentioned. I use civil.Date in a scheduling package to prevent subtle errors.
DateTime (without zone) has fewer cases. The benefit are often slightly easier to reason about if zone (should) not vary in the logic, and easier to reason about when marshaling to datetime (timestamp without zone) types. In one application I maintain, I choose to represent many timestamps as DateTime (no timezone) and simply assume UTC. I believe Prometheus does a similar thing where all timestamps are stored with date time with assumed UTC in the storage. time.Time isn't bad when working with these times, but I've had bugs on a number of times where I would store or load the wrong time (offset through zone) when using time.Time with a datetime. So it isn't about capability, then it is for clarity and more obvious correctness.
I have not had the occasion to use Time (of day). I've typically heard uses for schedules where something happens at a time of day. I'll note that Time (of day) and duration and extremely similar; A Date + Duration = DateTime.

Use cases for time only
Alarms. If I set my alarm for 8am, I want it to go off at 8am every day, in whatever time zone I happen to be in at the time.
Cron-like regular events. The before-business-day pull of data should happen at 8am every day, whether it's DST or not.
Use cases for date only
Calendar days: Christmas Day, Easter, Thanksgiving.
Use cases for date and time (but no time zone)
Start of an event occurring at a particular physical location. The time zone is implicit given the location. The event starts at 2019-11-23 13:00:00 in whatever the local time zone is of the location where it's happening, resolved on the day when it happens.
You might think you can get away with using a Go time.Time for this, but:

Events change location. If an event is moved from Cleveland to Chicago for capacity reasons, it'll still start at 9am, but now in Chicago's time zone. Why encode the information redundantly in two places and have to keep them in sync?

The time zone which will be in effect at a location may not be known far enough in advance to specify what it is now. See: Brexit, BST changeover dates.

The time zone info in a time.Time is generally insufficient, you really need a full Olsen time zone.

Now, let me say something which I know is going to be welcomed like a vegan in a steakhouse: I think Go could benefit enormously from looking at what the Java community did with date and time APIs.
The initial Java 1.0 date and time handling was a thin layer over underlying POSIX epoch time, with a single Date type , just like Go. Issues like calendar handling came up pretty quickly, and a Calendar type was added in Java 1.1 to attempt to handle those requirements without having to do anything to Date. The result was a horrible mess.
Then, a community-driven effort produced a library called Joda Time, which rethought the whole problem from the ground up, providing time, date, time-date, and time-date-zone (and a few more). It was so clearly, obviously better that it became the de facto standard, so the JSR-310 project made a few minor changes and then enshrined it as the new Java date and time APIs, replacing all the old ones.

I'll note that Time (of day) and duration and extremely similar; A Date + Duration = DateTime.

This doesn't really hold in the presence of daylight savings changes and leap seconds.

@neild ignoring DST and leap seconds is precisely the use case for civil time

@dylan-bourque  Yes, which is why a duration is not a good representation of a civil time. 7200 seconds past midnight is not necessarily 0200.

@rsc speaking only of the code I've written and read:

I've needed dates with no associated time/location several times.
One type of code where this comes up has to do with an analytics system that collects daily data. At some level these days have locations, obviously (in order to decide to which day some event ought to be attributed) but higher up we refer to abstract dates without any time/location.

I've never needed times without associated dates. They seem useful in some domains but not ones I've had occasion to explore.

I've never used, nor felt a strong need for date+time without associated location. Possibly I would've used them if there were such a type in common use.

It seems to me that using time.Time to model (1) is a worse fit than using time.Time to model (3). If you model a date with a time.Time, you need to decide on conventions for two things (time + location). If you are using a time.Time to model a date+time without location you just need a convention for the location. That doesn't mean it's necessarily a good fit, as @neild and others have pointed out, but I do think that the case for a date type is the strongest one here.

As background, most languages developers are familiar with have two time types, one for location-independent time instants (put aside the obvious physics-based objections) and one for human-readable times in specific locations. This goes back at least as far as C, which has time_t and struct tm.
More recently, Google's C++ team has been using the terms "absolute time" and "civil time" to denote the two different kinds of types. So in this nomenclature time_t is absolute time while struct tm is civil time. See the https://github.com/google/cctz project for examples of this usage. I am not sure exactly where "civil time" as the canonical description of a struct tm-like time came from, whether we're seeing it from the Google C++ popularization or some earlier source. Doesn't really matter. I'll keep using those terms but I wanted to define them first.
This API split, where you have to explicitly convert an absolute time to a civil time, fragments the ecosystem by time representation. Some code takes one representation, other code takes another. When you decide you want to store a time, you need to make a decision yourself. And then you're either in the time\_t ecosystem or the struct tm ecosystem. Want to call code in the other ecosystem? Sorry, write the conversions. Want to change your mind? Sorry, update all your code. On top of that, the absolute time representation is nearly useless for printing. It's almost never what you as a human want to see. But it's all you can do with a time_t short of conversion.
The original Go time package followed the traditional C split and had all these drawbacks. In fact there were three time types, with functions to convert between them:
// Seconds since January 1, 1970 00:00:00 GMT
export func Seconds() (sec int64, err *os.Error)

// Nanoseconds since January 1, 1970 00:00:00 GMT
export func Nanoseconds() (nsec int64, err *os.Error)

export func SecondsToUTC(sec int64) *Time

export func SecondsToLocalTime(sec int64) *Time

export func UTC() (t *Time, err *os.Error)

export func LocalTime() (t *Time, err *os.Error)

// Compute number of seconds since January 1, 1970.
func (t *Time) Seconds() int64

This kind of fragmentation is particularly unfortunate when trying to establish agreed-upon conventions for interfaces. For example, which time type should os.FileInfo's ModTime method return? Making that decision would force every implementation into one fragment of the ecosystem or the other.
The major advance of the Go 1 time API was to unify the two types into the single type time.Time, removing those kinds of decisions and all the fragmentation and confusion they imply. Thanks to a careful, lightweight representation, the one time type works equally well for both time_t and struct tm uses, and we all benefit from the unified ecosystem.
The answer is that os.FileInfo's ModTime returns a time.Time, because that's the only possible answer.
All this is a bit of a long-winded way to say that my response to the summary “add civil time” is: we already have a type for civil time: time.Time. That is, to the extent that civil time means time instants interpreted in locations with time zones and a Gregorian calendar, time.Time does that for us already. We should not add something else called a “civil time.” Doing so would be very confusing and put us right back into the ecosystem fragmentation present in most other systems and in Go before Go 1.
That said, what I'm hearing in this issue is not so much “add civil time” as “add a type representing a day without a specific time” and maybe also “add a type representing a clock time without a specific day.” I realize that in some other languages these two things are called Date and Time, but those are already both exported names in package time, so they are off the table. My suggestion would be to use time.Day and time.Clock.
Specifically:
// A Day represents a single calendar day.
// Its range is January 1, 0001 to December 31, 9999.
type Day struct { ... unexported fields ... }

// DayOf returns the Day for the given year, month, and day-of-month.
//
// Example:
//
//	now := time.Now()
//	day := time.DayOf(now.Date())
func DayOf(year int, month Month, day int) Day

func (d Day) Year() int
func (d Day) Month() Month
func (d Day) MonthDay() int
func (d Day) YearDay() int
func (d Day) Weekday() Weekday
func (d Day) ISOWeek() (year, week int)

func (d Day) Add(years int, months int, days int) Day
func (d Day) Sub(e Day) (years int, months int, days int)
func (d Day) SubDays(e Day) (days int)

func (d Day) After(e Day) bool
func (d Day) Before(e Day) bool

func (d Day) Format(layout string) string
func (d Day) String() string

func (d Day) MarshalBinary() ([]byte, error)
func (d Day) MarshalText() ([]byte, error)
func (d *Day) UnmarshalBinary(data []byte) error
func (d *Day) UnmarshalText(data []byte) error

func ParseDay(layout, value string) (Day, error)

I am not thrilled with the name Day, but I have not come up with a better one.
And:
// A Clock represents a 24-hour clock time during an unspecified day.
// Its range is 00:00:00 (midnight) to 23:59:59.999999999
type Clock struct { ... unexported fields ... }

// ClockOf returns the Clock for the given hour, minute, second.
  In fact, they closely mirror the API and types I had begun porting from my own "old" C++ and C# versions.
One additional API I would probably suggest is:
// ToTime returns a Time for the given Day, Clock and Location
func ToTime(d Day, c Clock, l *Location) time.Time

For naming, it's unfortunate that the most obvious/intuitive names are already taken.  I have called the Day type both Calendar and Date and have called Clock both Clock and TimeOfDay.  Currently, I have each in its own sub-package so that the names are date.Value and timeofday.Value.  That convention doesn't really fit within the standard library, but I figured I'd throw it out for comparison purposes.

I'd be happy with Day and Clock. I certainly don't see any advantage to splitting civil time APIs from absolute time APIs; that split was one of the worst things about Java's old API.

:+1: to Calendar It has a kind of symmetry with Clock.
Possibly terrible idea: could there be magic sentinel Locations like CivilDate, CivilTime, CivilDateTime that cause a regular Time to operate in the appropriate civil mode? The pro is that there are fewer types/less api but the con is that the extra types are still there effectively just not demarcated statically so code using it may need to handle "given civil expected absolute" and vice versa

@jimmyfrasche I switched from Calendar to Date because of possible questions like "Which calendar, Julian or Gregorian?". 🤷♂
I think I would be against the magic sentinel Locations, though.  The new APIs, as suggested, are small and direct enough to avoid confusion, imo, and I feel like introducing new, special locations would lead to confusion.

That is, to the extent that civil time means time instants interpreted in locations with time zones and a Gregorian calendar, time.Time does that for us already.

I don't believe this is a correct description of a civil time as defined by ABSL. (https://abseil.io/docs/cpp/guides/time)
A civil time is not a time instant. A civil time is a tuple of (year, month, day, hour, minute, second). (Leave aside the question of fractional seconds for the moment.) A time.Time isn't a civil time precisely because a time.Time is a time instant.

@rsc Your proposal looks on the right track to me, but I have two concerns.
First, I feel the time package is quite crowded already. The distinction between Ticker and Timer, the many functions on Time, the unusual formatting  strings, and now monotonic clocks all contribute to a package that is hard to learn and hold in the mind. If you moved the two types you propose to a different package, you wouldn't make time more complicated, and you could choose better names. If you still don't like civil even after reading the abseil link that Damien provided above, then date.Date has a nice symmetry with time.Time, and maybe it's not too much of a stretch to have a date.TimeOfDay.
My second concern is that there still isn't a type for what SQL calls DATETIME or TIMESTAMP WITHOUT TIMEZONE. If database/sql used the two new types for SQL DATE and TIME, it would presumably define its own for DATETIME; but then you have the three civil types spread out over two packages.
I know I'm biased, but I still think that time/civil, with types Date, Time (or TimeOfDay) and DateTime, feels right.

@jba, the problem with putting this all in another package is (1) for database/sql to use it, the package has to be in the standard library, and (2) a new package would either have to reproduce large chunks of time (the types time.Month & time.Weekday; code for Parse and Format, since we are not going to use a completely different formatting approach for dates vs times; and so on) or else it would have to require the user to import time to get at those, at which point it's not really a separate package.

@neild, I see that time.Time is not exactly Abseil's civil time concept, and that's fine with me. The point was that we reduced the number of time representations intentionally in the design of package time, and it would be good to continue that decision.
I remain very skeptical about any widespread need for "times without locations". And on top of that it implies creating a second competing time representation and all the complexity and fragmentation that would accompany that. It seems to be all cost and no benefit.
In contrast, I can very easily see the need for a representation for a specific day, and it brings essentially no incidental complexity with it.
The arguments in favor of adding "time without location" seem to be "Google C++ has it" and "Java 8 has it". I don't find either of these compelling: the types here have to fit into the design of the time package overall, because they will live alongside it. Hence the long background section in my earlier response.
@jba and I spent a long time (probably too long) looking through old SQL specs trying to understand use cases and the like and came up empty. In practice my working hypothesis is that almost no one has the hypothetical problem that "without timezone" solves.
That's why I'm focusing on 'calendar day' and maybe 'clock time' and not 'time without location'.

the problem with putting this all in another package is (1) for database/sql to use it, the package has to be in the standard library

I don't think that's true, at least since a number of releases ago: between the Scanner & driver.Valuer interfaces, types from other packages can go in & out of databases.
/cc @kardianos

Not that my vote carries any real weight (since I'm really just a consumer of Go with some opinions) but I agree that "time without location" probably wouldn't be generally useful.  I would even go so far as to argue that people using database columns to store timestamps without location/tz information are "doing it wrong", since those systems likely also have to make assumptions in code about what that missing time zone should be.  I know we did at a prior job, which led us to convert every column to either TIME (a clock time with no date), DATE (a calendar date with no time or location), or DATETIMEOFFSET (a SQL Server specific type that represents a full date/time value, including the UTC offset for the source timezone).
Given those three storage representations, the two new proposed types + time.Time are sufficient to load/store those values in a Go program.

Individual drivers can support arbitrary types for parameters and scanning in.
DateTime would be useful to ensure a correct mapping between db types without tz and Go, but some adapter function or adapter type might also work for that purpose.
Civil date is most useful and would be welcome.

I have gone down the "convention" road for dates-without-times and times-without-dates in the past.  They were all basically used for data analysis, though some of the quantities did come from databases or other structured formats.
The prime motivation is that humans use the clock on their wrist to think about time, and this typically doesn't consider time zone, date, daylight saving, or leap seconds.
One case boils down to number of events in what a local human would call their day or the time, irrespective of any real 24 hour period.  For example, in a global dashboard of "cups of coffee dispensed per day" I want to care about what the date was for the person who dispensed the coffee.  To keep this example going, I'd be interested in whether more cups of coffee are dispensed in the "morning" (before noon at the dispenser) or on "Monday" (local time).  I should also be able to compare whether these trends carry in different geographies without having to add timezone offsets to normalize to some "common" location (hint: don't try this).
Another case where these distinctions have been really important is in computing SLA numbers.  For example, the number of hours between submission of a code review and when the reviewer sent their first response.  For this, we don't want to include non-business hours, weekends, and holidays.
Both of these analyses involve the following quantities:

When an event happened, i.e. the input. time.Time (date, time, timezone)
Aggregation time, i.e. "local time in the timezone", we'll call this civil.DateTime
Aggregation day-of-week (time.Weekday), date-without-time (civil.Date) and watch-time (civil.Time) separately for breakouts and heatmaps
When the workday begins and ends (civil.Time) to count events outside of "work hours"
What dates (civil.Date) are holidays (business logic applied e.g. by country, not by timezone)

It is certainly possible to do all of this with the time.Time package as it stands today by establishing conventions, and we have.  I have a background in timekeeping, and I still get it wrong and miss things in code reviews.  Proper types for the above would help considerably.

@rsc I like your proposal for time.Day.
I feel like time.Clock would be useful, but the proposal presented isn't quite right I think. I would want a Clock to either: 1) be easy to convert to and from time.Duration, or 2) have some of these methods on time.Duration directly (Duration.Format, then retrieve days, hours, min, secs, nanos as integers rather then floats).
These types don't have to be in the standard library for drivers to use them.
While it isn't strictly necessary, I agree with @jba that having a DateTime (time.Time without zone) would be useful as it enhances code clarity; I've had bugs in Go today where the zone was incorrect going into or out of a database with a DateTime field that resulted in an incorrect value. The problem (as much as it is) is round tripping DateTime field values. If you put a DateTime into the database, you want to ensure that the same value is selected out. So if you put in a time.Time with a local timezone and just use the face (no zone) value, but then the sql scan returns a time.Time with a UTC timezone, it can get you in trouble. Should the scan as a localtime zone might be better, but the problem remains, just reversed UTC zone in, local out). This, can be fine, until you hit some other marshal function that has different assumptions (ie uses zone when you assume it should not).
If a next step were to be taken, would it to decide where such a package would reside (stdlib/time,  golang.org/x/time/civil)?

For reference, here is a comment where the timezone causes ambiguity:
https://github.com/denisenkom/go-mssqldb/pull/396#issuecomment-397818621
This is the SQL Server driver, looking for the best way to unmarshal datetime and datetime2 (both timestamp without zone types) into time.Time.

Any updates on this? :) Would love to see this added. See above mentioned issue.

I have used civil package when I wanted to refer just to a date and just to a time. The DateTime struct is a nice way of combining and I see how this can be useful. This said the background on the Go 1 time API tells a compelling story for why this API is the way it is. And I believe it is the right answer for the common case and most of the time. Even with the complexities around time zones as this forces to consider the implications.
However it is nice if there is a package that would do date and time without time zones and I think this should live in x/time/civil to indicate that it could be included in the standard library one day, most likely never will though as it’s not common enough. I understand by saying this I give an opinion that isn’t robust at all considering the ‘what goes in golang.org/x’ discussion.

@rsc

I am not 100% convinced Clock is necessary at all.

I personally find it quite necessary. The usecase is representing a regular schedule, for example the timetable of a train.

Arrival
Station
Departure

Brașov
06:52

06:57
Pavilion CFR Brașov Triaj
06:58

07:04
Hărman
07:05

As seen in this timetable excerpt above, train R 11361 leaves Brașov every day at 06:52. When combined with a date, on the 17 of December 2023 the ISO8601 timestamp is 2023-12-17T04:58:00Z, and on the 1st of July 2024 the timestamp is 2024-07-01T03:58:00Z.

For a Time as in "point in day", a time.Duration would suffice, such that a time.Now().Truncate(24time.Hour).Add(6time.Hour+58*time.Minute).

Your message is badly formatted because of not using a code block, so it's a bit harder to read.
Assuming I understood it right, nowever, that's actually incorrect, particularly on days when DST changes. 6 hours and 58 minutes after midnight of the 26th of March 2024 is 07:58, and 6 hours and 58 minutes after midnight of the 29th of October 2024 is 05:58.


suppress PyFerret ESMFMKFILE warnings on startup

Reported by andrew wittenberg on 9 Oct 2014 19:33 UTC
The ESMF warnings when starting up PyFerret aren't necessary, since very few users will be accessing these functions.  Rather than risk having newbies think there's something seriously wrong with their installation, it'd be best to save this message for when a user actually tries to use those functions.
The ESMFMKFILE cannot be found!
The ESMFMKFILE cannot be found!
    WARNING: Unable to import ESMP;
             curv2rect* Ferret functions will not be added.
             Use curv_to_rect* functions instead
 	NOAA/PMEL TMAP
 	FERRET v6.925 (PyFerret 1.0.3)
 	Linux 2.6.32-431.17.1.el6.x86_64 - 09/29/14
 	 9-Oct-14 15:25

Migrated-From: http://dunkel.pmel.noaa.gov/trac/ferret/ticket/2207

Comment by karl.smith on 14 Nov 2014 23:14 UTC
With PyFerret 1.1.0, I have suppressed all WARNING message about missing packages that are not essential.  Because the packages do not exist, the Python external functions will not exist.  So use of a function that depends on a missing package will give the same results as using any function that is not defined.
But the "The ESMFMKFILE cannot be found!" message is showing up because the ESMP package at GFDL does exist but is not configured correctly.  This message is being generated by the ESMP package when I attempt to import it.  So either the package should be configured correctly or it should be removed.  Or if there is something that needs to be done (loading a module) to make the package work, that should be added to the PyFerret or Python initialization.

Modified by karl.smith on 14 Nov 2014 23:59 UTC


[Clockify] New time entries don't respect the "billable" flag of the project

Extension – Clockify

Description
When doing "Start new timer" for a project that is marked as not billable by default, the time entries for that project are marked as billable.
Steps To Reproduce

Add a project that has the default billing option turned on
Create a new time entry via "Start new timer" for that project
Check the time entry billable flag in the clockify site

The current behavior
The time entry is marked as billable.
The expected behavior
The time entry should not be marked as billable.
Raycast version

1.37.1

@dmastylo I noticed it too. Here is the fix: https://github.com/raycast/extensions/pull/4705


does it support iframe

thanks!

Yes it does,
$.confirm({     content: '<iframe src="...." />'  // )};


[iOS] Notification doesn't work with current GitHub version

When I use the latest commit here on GitHub, the iOS notification widget doesn't work like on issue #401. Still works fine in 1.1.2.

think this is by design
"An app does not receive remote control events until it begins playing audio." - see https://developer.apple.com/documentation/mediaplayer/handling_external_player_events_notifications
Once you play() the remote commands pops up in the notification center..

@petermm Yeah I know, but the song is playing.


Update run.sh

Allow for multiple comma-separate SANs in a single "domain" entry

Hello,
I want to ask you if is possible to add an option that, after the first line of SAN certificate has generated, copy and rename the certificate here:
/ssl/fullchain.pem
/ssl/privkey.pem
So we can use this addon instead of duckdns addon, this is some line of code that i have created but i don't know how to test this:
int h = 0
for domain in $(bashio::config 'domains'); do
    sans=(${domain//,/ })
    bashio::log.debug "Checking for certificate ${CERT_PATH}/certificates/${sans[0]//[*]/_}.crt existence"
    if [[ ! -f "${CERT_PATH}/certificates/${sans[0]//[*]/_}.crt" ]]; then
        bashio::log.info "Certificate for domain ${sans[0]} not found, issuing"
        domainargs=$args
        for san in ${sans[@]}; do
            domainargs="${domainargs} -d ${san}"
        done
        bashio::log.debug "running command: lego ${domainargs} run"
        lego ${domainargs} run

        for (i=1 ; i<100 ; i++) ;

        if [ h == 0 ];
		then
                        cp -rp ${CERT_PATH}/certificates/${sans[0]//[*]/_}.crt /ssl/fullchain.pem
			cp -rp ${CERT_PATH}/certificates/${sans[0]//[*]/_}.key /ssl/privkey.pem
        fi
    else
        bashio::log.info "Certificate for domain ${sans[0]} found"
    fi
    h++
done

I hope in this implementation
Best regards
Stefano

you can just leave them where they are, and configure HA or the NGINX proxy component using a path like
lego/certificates/.ca.crt


undo behaviour

I've been playing with the Ace demo. I notice when collaborating if you press undo it undoes the other user's changes, which would be confusing when collaborating.
I also observed the following.
user 1: enter 'a', press undo. 'a' disappears as you would expect.
user 2: press undo. 'a' reappears.

Yes, this is called "local undo" and can be a very difficult problem to solve in a distributed-state environment. It is on our roadmap.

I was originally working with Firepad which is no longer supported so I've been looking around for an alternative. I know it's not easy andI will follow your progress with great interest.

The undo behavior will largely be added into Convergence itself, and then we will update this library if it needs changes to support that.


Extension of the legend hover series highlighting to include the reference Y axis

New Pull Request
In addition to the series and datalabels, highlight the referenced yaxis on legend series hover. This is an added visual aid that is useful in multi-axis charts, and generally to identify the reference Y axis.
Type of change

[X] New feature (non-breaking change which adds functionality)

Checklist:

[X] My code follows the style guidelines of this project
[X] I have performed a self-review of my own code
[X] My changes generate no new warnings
[X] New and existing unit tests pass locally with my changes

This is a great addition.
Thanks @rosco54


[Patch] Fix employee speciality validation when creating declaration request

https://github.com/edenlabllc/ehealth.api/issues/1766

Coverage increased (+0.02%) to 90.454% when pulling 85bbd524d76a1a5890fbe5780011d29364c524ce on fix_1776_500_error into b9cdf7534bb8fd4648cffeadb2f355dd27aa1084 on master.


Implement basic authentication functionality

Need to restructure this as it does not work seamlessly with the frontend of the web page. New PR will allow the user to use a login link on the home page rather than navigating to /login


How to set exception_on_fail option on Project mode?

I saw the changelog of version 1.2.0, Add exception_on_fail option to Base.crawl!
How to set this option on Project mode?
Thanks.

@caecity43  It's not supported for now. Why do you need it?

@vifreefly My project is running on project mode, I need this option to skip exception(like Down::ConnectionError).
but I found the skip_request_errors in config, I will try it later.

exception_on_fail is for different things. You can handle any request errors using https://github.com/vifreefly/kimuraframework#handle-request-errors or any other errors using standard Ruby's begin rescue end block

OK, Thanks.


[Bug]:

What happened?

What version of the tool are you using?
2.1.1
What version of Visual Studio Code are you running?
1.76
Any relevant session id from VSCode?
6be66883-389b-4f0b-898a-b124c9a2449e1678473518914
Relevant log output
Error occured in connectDataverse command.
Error code: EADDRINUSE.
Error message: listen EADDRINUSE: address already in use <IP_ADDRESS>:19472.
Error stack: Error: listen EADDRINUSE: address already in use <IP_ADDRESS>:19472
	at Server.setupListenHandle [as _listen2] (node:net:1330:16)
	at listenInCluster (node:net:1378:12)
	at doListen (node:net:1516:7)
	at process.processTicksAndRejections (node:internal/process/task_queues:84:21).

Please close any other application using port 19472 as I am using it to authenticate the user which is causing conflicts.


Interactive Tutorial - Deploying an App

Currently the tutorial is reporting the 'environment is not starting correctly'. No debug information is provided.

Thanks for reporting this
/label team/katacoda

Page: https://kubernetes.io/docs/tutorials/kubernetes-basics/deploy-app/deploy-interactive/
It seems that occasionally, some people are experiencing problems with Katacoda.
For me, for now:


[4.0.0] min applicationinsights 1 -> 2; upgrade min node version (#9)

Manually applied changed + merged with original


[ST] Insufficient gas for the destination gas fee when trying to bridge ezETH from Ethereum to Blast

Describe the bug
User is trying to bridge ezETH from Ethereum to Blast.
The user has enough ETH to pay gas on destination fees (i guess, bc he has 0.013 ETH) but UI says "insufficient gas for t he destination gas fee (showing as 0) https://etherscan.io/address/0xfed74f78700bB468e824b6BfE4A2ED305a9D86ba

Link to ticket in discord
https://discord.com/channels/454734546869551114/1226982905180590130
Additional context
Add any other context about the problem here.
@oncall

PR: https://github.com/connext/frontend/pull/29

Merged to cutover-iterim


Cannot use the library in Release builds

Hello,
First, many thanks for a great library. It's very simple to use and it works perfectly in Debug builds.
However, I'm unable to build in Release mode. I am consistently hitting the following issue, and rebuilding/cleaning did not help.
Microsoft.Common.CurrentVersion.targets(4862,5): warning MSB3026: Could not copy "C:\Users\patri\.nuget\packages\imagecaching.nuke\2.0.13\lib\net6.0-ios16.1\ImageCaching.Nuke.resources\NukeProxy.xcframework\ios-arm64_x86_64-simulator\NukeProxy.framework\Modules\NukeProxy.swiftmodule\x86_64-apple-ios-simulator.private.swiftinterface" to "bin\Release\net7.0-ios\iossimulator-x64\ImageCaching.Nuke.resources\NukeProxy.xcframework\ios-arm64_x86_64-simulator\NukeProxy.framework\Modules\NukeProxy.swiftmodule\x86_64-apple-ios-simulator.private.swiftinterface". Beginning retry 1 in 1000ms. Could not find a part of the path 'bin\Release\net7.0-ios\iossimulator-x64\ImageCaching.Nuke.resources\NukeProxy.xcframework\ios-arm64_x86_64-simulator\NukeProxy.framework\Modules\NukeProxy.swiftmodule\x86_64-apple-ios-simulator.private.swiftinterface'.
Please let me know what you need in order to investigate this issue. Thanks!

I think the Nuke proxy doesn't support release compilation for the simulator. But you should be fine with a real device !

Installed straight:
Installed Sharpnado.Maui.Nuke 10.11.2 from https://api.nuget.org/v3/index.json with content hash h9W4OZFkbupNn2yDXwWp7QtcKEX+MzCZSpKhypsmvWVXlFCjY/lxcOy37hMVJmD6uV9fRzSp/hq7Zc6rvSX47w==.
##[error]The nuget command failed with exit code(1) and error(Could not find a part of the path 'C:\Users\ContainerAdministrator\.nuget\packages\imagecaching.nuke\2.0.13\lib\net6.0-ios16.1\ImageCaching.Nuke.resources\NukeProxy.xcframework\ios-arm64_x86_64-simulator\NukeProxy.framework\Modules\NukeProxy.swiftmodule\arm64-apple-ios-simulator.private.swiftinterface'.
System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\ContainerAdministrator\.nuget\packages\imagecaching.nuke\2.0.13\lib\net6.0-ios16.1\ImageCaching.Nuke.resources\NukeProxy.xcframework\ios-arm64_x86_64-simulator\NukeProxy.framework\Modules\NukeProxy.swiftmodule\arm64-apple-ios-simulator.private.swiftinterface'.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
[...]

When also implicitly including imagecaching.nuke:
##[error]The nuget command failed with exit code(1) and error(Could not find a part of the path 'C:\Users\ContainerAdministrator\.nuget\packages\imagecaching.nuke\2.0.13\lib\net6.0-ios16.1\ImageCaching.Nuke.resources\NukeProxy.xcframework\ios-arm64_x86_64-simulator\NukeProxy.framework\Modules\NukeProxy.swiftmodule\arm64-apple-ios-simulator.private.swiftinterface'.
System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\ContainerAdministrator\.nuget\packages\imagecaching.nuke\2.0.13\lib\net6.0-ios16.1\ImageCaching.Nuke.resources\NukeProxy.xcframework\ios-arm64_x86_64-simulator\NukeProxy.framework\Modules\NukeProxy.swiftmodule\arm64-apple-ios-simulator.private.swiftinterface'.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)

In our monorepo release pipeline. Why it even tries to restore the package in the first place when the build is very much not TargetFramework -ios (as guarded against in csproj) or even actually Maui at all (got a separate pipeline for that), I don't understand...


PT-5117 Fixed one more test to be compatible with go modules

What does this PR do?
Same as https://github.com/hellofresh/janus/pull/412 but for another package

+1

:shipit:


Location Delegation is not working ok in trusted app

Doing some tests with TWA and location delegation, the perm is not passed to the PWA and for untrusted apps, the location permission modal is shown but in trusted apps, it is not shown.
I have read this https://stackoverflow.com/questions/64435919/geolocation-asking-for-multiple-permission-requests-inside-a-twa
And after that I did the same test using the sample app for location delegation and I get the same result.
Is it working ok? is there any issue / bug about it?
Device: Mi A3
Thanks

Hi Dani, just to be clear: the Android permission dialog is not shown in your trusted app but on untrusted apps?
Do you have the intent-filter set for your app? location delegation only works when your TWA have intent filters for
your website


Add an event for when the highlighted item changes

This adds an event called awesomplete-move which fires at the end of the goto() method.
I needed this because I'm displaying a long list of options in a scrollable container, and I wanted to allow the user to scroll through the list using the arrow keys. With this event I can update the scroll position to ensure the highlighted item is visible.

Awesome, thanks! No objections (and love how you also added documentation!), except the naming. As a user, iIf I hadn’t looked at the docs, I would have no idea what move does and I would probably assume something entirely different.
I would suggest change but I’m not too fond of it and selectionchange is too long. Anyone has a better idea for the name? What do other autocompletes use for this event? jQuery UI doesn’t seem to have a smiliar event and Twitter Typeahead uses cursorchanged which is spectacularly terrible.

How about awesomplete-highlight ?

@drd I was about to suggest the same thing. My first instinct was "change" as well but I wanted to avoid confusion with the input's native change event or the awesomplete-select event. awesomplete-highlight seems like a good way to indicate an item has been highlighted but not yet selected.

Yes, I like it! Can you make the change please? Thanks!

Gladly. Just pushed a rebased version to this branch with the name changed to "highlight".

Good morning everybody

Merci!


Netopeer2 terminating session, something wrong happens in remove associated dynamic subscriptions Error: (remaining<PHONE_NUMBER> subscribers)

Hi,
Netopeer2 version: [v2.1.23] with work-thread=1 and corresponding libnetconf2/libyang/sysrepo.
2 netconf-client using established-subscription to setup event subscriptions. ( multiple subscriptions on a single transport session )

the 1st-client is exited.
the 2nd-client keeps poll for events.

netopeer2 server found session is terminated and clear for subscriptions -> Session 18: thread 0 event session terminated
at the same time some event arrived ->  Processing "notif" "ietf-hardware" event with ID 1
However, looks like clean up have something wrong->
 Session 18: Invalid session to write to.
 (remaining4294967295 subscribers)
and event not received in 2nd-client. ( the event is lost)
Can you please have a look? thank you.
2022-10-17T15:18:16.400910+08:00 netopeer2-server 17 - - Published event "rpc" "/ietf-subscribed-notifications:establish-subscription" with ID 24 priority 0 for 1 subscribers.
2022-10-17T15:18:16.400993+08:00 netopeer2-server 17 - - Processing "/ietf-subscribed-notifications:establish-subscription" "rpc" event with ID 24 priority 0 (remaining 1 subscribers).
2022-10-17T15:18:16.401685+08:00 netopeer2-server 17 - - Successful processing of "rpc" event with ID 24 priority 0 (remaining 0 subscribers).
2022-10-17T15:18:16.401729+08:00 netopeer2-server 17 - - Event "rpc" with ID 24 priority 0 succeeded.
2022-10-17T15:18:16.401812+08:00 netopeer2-server 17 - - Session 18: thread 0 event new RPC.
2022-10-17T15:18:16.403467+08:00 netopeer2-server 17 - - Session 18: thread 0 event new RPC.
2022-10-17T15:18:16.403496+08:00 netopeer2-server 17 - - Session 18: thread 0 event session terminated.
2022-10-17T15:18:16.455086+08:00 netopeer2-server 17 - - Processing "notif" "ietf-hardware" event with ID 1.
2022-10-17T15:18:16.455223+08:00 netopeer2-server 17 - - Session 18: Invalid session to write to.
2022-10-17T15:18:16.455259+08:00 netopeer2-server 17 - - Session 18: Failed to write notification (error).
2022-10-17T15:18:16.455288+08:00 netopeer2-server 17 - - Sending a notification to session 18 failed.
2022-10-17T15:18:16.455321+08:00 netopeer2-server 17 - - Successful processing of "notif" event with ID 1 priority 0 (remaining<PHONE_NUMBER> subscribers).
2022-10-17T15:18:16.455438+08:00 netopeer2-server 17 - - Processing "notif" "ietf-hardware" event with ID 1.
2022-10-17T15:18:16.455516+08:00 netopeer2-server 17 - - Session 18: Invalid session to write to.
2022-10-17T15:18:16.455543+08:00 netopeer2-server 17 - - Session 18: Failed to write notification (error).
2022-10-17T15:18:16.455570+08:00 netopeer2-server 17 - - Sending a notification to session 18 failed.
2022-10-17T15:18:16.455600+08:00 netopeer2-server 17 - - Successful processing of "notif" event with ID 1 priority 0 (remaining 0 subscribers).
2022-10-17T15:18:16.455702+08:00 netopeer2-server 17 - - Processing "notif" "ietf-hardware" event with ID 2.
2022-10-17T15:18:16.455774+08:00 netopeer2-server 17 - - Session 18: Invalid session to write to.
2022-10-17T15:18:16.455803+08:00 netopeer2-server 17 - - Session 18: Failed to write notification (error).
2022-10-17T15:18:16.455831+08:00 netopeer2-server 17 - - Sending a notification to session 18 failed.
2022-10-17T15:18:16.455859+08:00 netopeer2-server 17 - - Successful processing of "notif" event with ID 2 priority 0 (remaining 0 subscribers).
2022-10-17T15:18:16.606628+08:00 netopeer2-server 17 - - There are no subscribers for "ietf-netconf-notifications" notifications.
2022-10-17T15:18:16.606689+08:00 netopeer2-server 17 - - Generated new event (netconf-session-end).

Please try to update to at least 2.1.36 (latest release), there was a bug fix that may have fixed this. If you can still reproduce it, let us know.


Add some missing properties on workflow_run events

Why:
Fix #2599

What's being changed:

Check off the following:

[ ] I have reviewed my changes in staging. (look for the deploy-to-heroku link in your pull request, then click View deployment)
[x] For content changes, I have reviewed the localization checklist
[x] For content changes, I have reviewed the Content style guide for GitHub Docs.

@sbrunner Thanks so much for opening a PR! I'll get this triaged for review ⚡

@sbrunner Thanks so much for opening a PR! I'll get this triaged for review ⚡

@janiceilene what's the status?

@janiceilene what's the status?

@sbrunner Thanks for your patience! Our small team is working our way through reviewing all of the amazing contributions ✨

@sbrunner Thanks for your patience! Our small team is working our way through reviewing all of the amazing contributions ✨

UP

UP

What does the close by github-actions means?

So sorry about that @sbrunner! It looks like our new action inadvertently closed this :upside_down_face: Reopening and triaging this for review :yellow_heart:

@janiceilene Thanks :-)

Thanks :-)


How to use modifiers in tooltip.js?

CodePen demo

https://codepen.io/oshihirii/pen/aLwPjv
Steps to reproduce the problem

Click on tooltip

What is the expected behavior?

No arrow is shown.
What went wrong?

Arrow is shown.
Any other comments?

How do you use modifiers in tooltip.js?
I tried to disable the arrow with the following (just to learn how modifiers work) and the arrow is still showing:
var tooltip = new Tooltip($this, {
    placement: 'top',
    title: html,
    html: true,
    trigger: "manual",
    delay: { show: 0, hide: 0 },
    container: $("body")[0],
    popperOptions: {
    	modifiers: {
    arrow: { enabled: false }
  }
}
});

Tooltip documentation:
https://popper.js.org/tooltip-documentation.html
says:

options.popperOptions
Object {}
Popper options, will be passed directly to popper instance. For more information refer to Popper.js’ options docs

Popper documentation shows this example of modifiers:
new Popper(ref, pop, {
  modifiers: {
    preventOverflow: { enabled: false }
  }
})

Related to #328

Actually, let's close this one and keep #328 as reference for the bug, so that we don't make confusion.


Added the ability to disable creating account feature and tab.

Now users can use allow_guests and (or) allow_create boolean arguments to control which features to allow and display.
Only a login form will be displayed if both allow_guests and allow_create are set to False.

Thanks for submitting this PR @TheAhmedRmdan 🫶
Merged! 🚀


question: benchmark details

Hi,
how can we rerun the TCP benchmarks with PhotonLibOS ?
Did you use client and server from https://github.com/alibaba/PhotonLibOS/tree/main/examples/rpc ?
Regarding the results in https://github.com/alibaba/PhotonLibOS#21-tcp
Did you achieve 17.1Gb and 560K qps on a single core? Did I understand correctly?

Wait me 5 minutes, I'm just about to upload the echo server code ...

Thanks. Btw, very interesting project. Very glad to see that engineers start building high quality asynchronous frameworks for backend development. I developed mine https://github.com/romange/helio  that have somewhat similar goals as PhotonLibOS but maybe a different design. I wonder if you gonna share HLD doc - maybe we could share ideas. Especially around using io_uring API efficiently.

@romange I have updated the example https://github.com/alibaba/PhotonLibOS/blob/main/examples/perf/net-perf.cpp
In this test I started a coroutine to print QPS every second, but when CPU is 100%, the timing might lost accuracy. So another way is to observe the entire ingress/egress bandwidth of the test machine ( iftop ), and calculate the QPS backwards.

Hi @romange , didn't know you are the author of the dragonfly db. Recently heard of you from some friends in early startups db companies in China. Would you like to chat a little bit about the coroutine lib and io_uring? My email address is on the github homepage.

sure @beef9999,  I sent you an email.

i've sent to beef9999 at qq. If you have not got it and it's not in your spam folder, it's quite disturbing.
can you please send me an email  to roman at dragonflydb.io ?


This entry failed to be executed

const { authenticated, accessToken, error } = verifySession(this.#email);
return false undefined undefined

E:\chatgpt-node\src\utils\verify_session.js
at Module._resolveFilename (node:internal/modules/cjs/loader:1075:15)
at Module._load (node:internal/modules/cjs/loader:920:27)
at Module.require (node:internal/modules/cjs/loader:1141:19)
at require (node:internal/modules/cjs/helpers:110:18)
at verifySession (file:///E:/chatgpt-node/src/utils/verify_session.js:18:25)
at Gpt.authenticate (file:///E:/chatgpt-node/src/lib/Gpt.js:37:59)
at file:///E:/chatgpt-node/index.js:11:42
at file:///E:/chatgpt-node/index.js:20:3
at ModuleJob.run (node:internal/modules/esm/module_job:194:25) {
code: 'MODULE_NOT_FOUND',

I have Updated the code and its working fine on Linux, the problem is with windows, there are some issues with authentication, so need to fix that

const { authenticated, accessToken, error } = verifySession(this.#email);
return false undefined undefined

All the issues are fixed now

Download the latest version, 1.0.10

ok


Examples no longer working under 2.7

Reported by @DLu

This might have to do with the regex libraries changing their apis from under the project.
I'm not super interested in maintaining this so for right now I just have to release 2.7 support until I get back around to looking over all this.


Add new packages field to corral.json

The packages field is a new experimental field that will list all
packages that are part of a bundle that should be included for distribution.
At the moment, entries must be added by hand, this commit assures that
any that exist are not removed when corral manipulates the corral.json file.
Eventually, if this feature holds, we will have commands to add and remove
packages as well as a command to prepare for release. Releases, rather than
being a "repo over here with tag" can be hosted on services like GitHub packages
or cloudsmith and would only include the bare minumum needed for the package.
Initially, this field is being used to generate documentation that works across
library projects. Existing exploratory work for that is being done in the
ponylang/library-documentation-action repository.

Hi @SeanTAllen,
The changelog - added label was added to this pull request; all PRs with a changelog label need to have release notes included as part of the PR. If you haven't added release notes already, please do.
Release notes are added by creating a uniquely named file in the .release-notes directory. We suggest you call the file 167.md to match the number of this pull request.
The basic format of the release notes (using markdown) should be:
## Title

End user description of changes, why it's important,
problems it solves etc.

If a breaking change, make sure to include 1 or more
examples what code would look like prior to this change
and how to update it to work after this change.

Thanks.


remove code handling whitespace/pineapple name bug

Thanks for the review :)

All I had to do was add a missing import.

Weird, I can't remember removing this imports intentionally 🙈


CMAK Run Partition Assignments [Bad Request 413 - Request Entity Too Large].

Hello, All,
We are in the process of implementing kafka and CMAK (previously known as "kafka manager") to our work flow to better organize the communication between our applications, apparently after starting CMAK we are unable to reassing our topics (total 1700) to other brokers, we have configured one cluster with 5 brokers.
Replication of issue is as follows by accessing CMAK on port 9000 and choosing a cluster, under the "Cluster Summary" bar information about the total amount of Topics and Brokers will be displayed, by selecting the total amount of Topics you will be transferred to the "Operations" tab under "Topics", from that tab select "Run Partition Assignments", the next screen will represent the total list of topics and option which to be choose, in our case we want to move all of our 1700 Topics, sadly after clicking the "Run Partition Assignments" button at the bottom of the page we receive "Bad Request 413 - For request 'Post /clusters/clustername/assigments/run' [Request Entity Too Large].
We tried as explained at "https://www.playframework.com/documentation/2.4.x/ProductionConfiguration" to increase the maxChunkSize in the application.conf file of CMAK, but the issue remained.
We are using CMAK version "<IP_ADDRESS>" and kafka "2.5.0", could you please assist us in resolving the issue, how can we increase the max body size value?
Thank you,

any solutions here?


swipeToDismiss with ScrollView

Hi,
First of all, this library is very helpful and makes it super easy to implement bottom sheets. I am trying to create a bottom sheet that has a ScrollView inside but I want to make it work with swipeToDismiss. Currently, with ScrollView as the root container of the bottom sheet, dragging the sheet just makes the content bounce.
I think dragging down on the ScrollView when the contentOffset is 0 should dismiss the bottom sheet. What do you think?

Yeah the concept of this idea is already on my pipeline in #11
But I don't think it would make sense, to dismiss the ScrollView instantaneously, after the contentOffset of the ScrollView is 0. After it is 0, the bottomSheet should get draged down instead. And only if the bottomSheet is below a threshold, it gets dismissed. What do you think?

In favour of #39 im closing this issue now.


How do we change the default Database name or username for Container in junit test in Junit5?

How do we change the default Database name or username and container port for Container in junit test in Junit5?
By default it takes everything as test.
Junit5, Spring boot- 3.1.3

You can do it like this to change default values for database name, username and password:
private static final PostgreSQLContainer<?> postgresContainer = new PostgreSQLContainer<>(DockerImageName.parse(
    "postgres:16-alpine"
))
    .withDatabaseName("")
    .withUsername("")
    .withPassword("");

Ports on host are generated randomly by design. You can get more information in the official documentation: Exposing container ports to the host

Closed, since it is not an issue, but a question and answered by @kauanmocelin, thanks 🙌