« first day (1219 days earlier)      last day (556 days later) » 

06:55
@user rot13/isalpha/isalphanumeric/is vowel?
Or sentence case/title case?
Which ones of those have you got already
(cc @lyxαl)
So it looks like you don't have isalphanumeric and sentence case
So maybe one of those?
 
2 hours later…
09:15
@TheThonnu is-alphanumeric would be better for vectorisation purposes
Theoretically, if you ever needed to apply it to every item in a list, there's a high chance you're in a decision problem context
Meaning you're already using it in a map or a filter context
Meaning it's already vectorised in that case
Sentence case I think I've vectorised a few times, and generally speaking things that transform things should be vectorised automatically where possible
(when I say should, I of course mean in theory. I don't mean a hard ruling)
"should probably" would be a better phrase
 
2 hours later…
10:50
@lyxαl yeah that's what I was thinking as well
nayakrujul pushed a commit to Vyxal/v3-fix-join-nothing: Change string overload of join nothing
nayakrujul pushed a commit to Vyxal/v3-fix-join-nothing: Update tests.yaml
@lyxαl I implemented isalphanumeric, is that what you wanted?
11:07
nayakrujul pushed a commit to Vyxal/v3-fix-join-nothing: Probably have to update this as well
github-actions[bot] pushed a commit to Vyxal/v3-fix-join-nothing: Refresh element and/or trigraph docs from recent commit
@TheThonnu one second I'll take a look
I left a little review comment
nayakrujul pushed a commit to Vyxal/v3-fix-join-nothing: Move to StringHelpers
nayakrujul pushed a commit to Vyxal/v3-fix-join-nothing: And update MiscHelpers
Lyxal approved #1873 (Change string overload of "join nothing"): "👍"
 
2 hours later…
12:57
Lyxal created branch v3-fix-a-lambda-parameters-bug in Vyxal/Vyxal
Lyxal pushed a commit to Vyxal/v3-fix-a-lambda-parameters-bug: Make it so that lambda parameters don't cause an error
Lyxal opened pull request #1876 (Make it so that lambda parameters don't cause an error) in Vyxal/Vyxal
@Ginger An error occured while processing event fe6aed90-3e8f-11ee-901f-adb1e9296dca!
!!/status boring
Bot status: Online
Uptime: 57 days, 13:56:30.044894
Running since: 2023-06-22T23:01:47.465663
Errors since startup: 41
nayakrujul approved #1876 (Make it so that lambda parameters don't cause an error): ":+1:"
!!/status tingly
Bot status: O-o-o-onwinye
Uptime: 57 days, 1-1-1-14:01:04.688980
Wunnying since: 2-2-2023-06-22T23:01:47.465663
Ewwows (˘ε˘) s-s-since s-s-stawtup: 4-4-41
13:12
@lyxαl @user do you want me to implement Unique Prime Factors?
go ahead and implement what you see fit :p
:+1:
ẠḄḌḤỊḶṂṆỌṚṢṬ haven't been implemented yet, right?
@lyxαl just one question: does VList have all the methods that a standard List has?
Like .distinct
@TheThonnu correct
@TheThonnu in a sense
it may not have them directly, but .lst will always have all the methods
13:26
so VList.from(myVList.lst.distinct)?
ah no
not because it's wrong method wise
but because vnums don't compare nicely
dw I'll write my own distinct function
the hashcode of VNum(1) != the hashcode of VNum(1)
iirc there's already a unquify
13:28
couldn't find it
    addFull(
      Monad,
      "u",
      "Uniquify",
      List("uniquify"),
      false,
      "a: lst -> a with duplicates removed"
    ) { a =>
      val iter = ListHelpers.makeIterable(a)
      val uniq: LazyList[Option[VAny]] =
        LazyList.unfold(Seq[VAny]() -> 0) { state =>
          if !iter.hasIndex(state._2) then None
          else if state._1.contains(iter.index(state._2)) then
            Some(None, state._1 -> (state._2 + 1))
          else
            Some(
              Some(iter.index(state._2)),
that should probably be extracted
If I know it's finite, is this ok?
def uniquify(it: VList): VList =
    var ret = it.toList
    for (i <- it)
      if !ret.contains(i) then ret += i
    VList.from(ret)
(Because it's coming from prime factors, so it won't be infinite)
generally speaking it'd be good to have an infinite compatible helper
you can make an infinite-compatible one later
def uniquify(it: VList): VList =
      val uniq: LazyList[Option[VAny]] =
        LazyList.unfold(Seq[VAny]() -> 0) { state =>
          if !iter.hasIndex(state._2) then None
          else if state._1.contains(iter.index(state._2)) then
            Some(None, state._1 -> (state._2 + 1))
          else
            Some(
              Some(iter.index(state._2)),
              (state._1 :+ iter.index(state._2)) -> (state._2 + 1)
            )
        }

       VList.from(uniq.flatten)
13:34
ok or you could do it now lol
it's just a copy-paste of the existing unqiuify element :p
*uniquify
you have full mod privs and you still don't edit your own messages?
it's easier to just send the * message than click the dropdown menu and then click edit and then wonder if chat will double send the edit
13:36
lol
So for are you ok to have unique prime factors / case of a string vectorised?
# python equivalent
def uniquify(it):
    seen = []
    index = 0
    while hasIndex(it):
        if it[index] in seen:
            yield it[index]
            seen.append(it[index])
        index += 1
@TheThonnu that's the intention :p
@lyxαl finally, some code I actually understand :p
LazyList.unfold is basically a python generator except you need to pass the state between calls
the state tuple can be nasty at times (I had a Tuple5 with fun types like Option[BigInt] once) but it kinda makes sense
Aug 10 at 13:46, by lyxal
  def cartesianProduct(left: VAny, right: VAny)(using ctx: Context): VList =
    val leftList = makeIterable(left)
    val rightList = makeIterable(right)

    val result = LazyList.unfold(
      BigInt(0),
      Option[BigInt](null),
      Option[BigInt](null),
      BigInt(0),
      BigInt(0)
    )(state =>
      var (
        diagNum,
        lhsMax,
        rhsMax,
        lhsStart,
        lhsEnd
      ) = state

      lhsStart =
        if rhsMax.isDefined then BigInt(0).max(diagNum - rhsMax.get)
and now back to code I don't understand lol
@lyxαl do you mind letting my alt into the org
I'm signed in on that acc on Github Desktop, and it would be easier if I don't switch accounts
One second gotta find the button that does the thing about inviting
13:47
thanks
Button clicked
Not-Thonnu created branch v3-add-Ạ in Vyxal/Vyxal
Not-Thonnu pushed a commit to Vyxal/v3-add-Ạ: Add Ạ
nayakrujul opened pull request #1877 (Add Ạ) in Vyxal/Vyxal
@Ginger An error occured while processing event 352bf0c0-3e97-11ee-9ebc-64d493d29aec!
hopefully I did that right
13:51
ok something went wrong :(
Not-Thonnu pushed a commit to Vyxal/v3-add-Ạ: one thing fixed
I found one of the problems
Don't know about the other one
Why are you uisng a for yield?
Just map over the string
def caseof(s: String): VList =
  VList.from(
    s.map(
      if _.toString.matches("[A-Z]") then 1    // Uppercase
      else
        if _.toString.matches("[a-z]") then 0  // Lowercase
        else -1                                // Non-alphabet
    )
  )
Like that?
13:55
Yeah
Not-Thonnu pushed a commit to Vyxal/v3-add-Ạ: Hopefully fixed the other thing
it didn't work :(
ysthakur closed issue #1869 (Make one of the cartesian product elements a digraph) in Vyxal/Vyxal
Not-Thonnu pushed a commit to Vyxal/v3-add-Ạ: Update ListHelpers.scala
Not-Thonnu pushed a commit to Vyxal/v3-add-Ạ: Update ListHelpers.scala
oh wait it's the indentation
Not-Thonnu pushed a commit to Vyxal/v3-add-Ạ: how did I manage to do that lol
pre-commit-ci[bot] pushed a commit to Vyxal/v3-add-Ạ: [pre-commit.ci] auto fixes from pre-commit.com hooks
14:02
I put the caseof function in the middle of the compressDictionary function lol
Ah
That'll definitely do it
Um it's still saying the types are mismatched
> map() returns a new collection of the same type as the source collection.
We can't use map because it's expecting a list of chars back
not a list of ints
Lyxal pushed a commit to Vyxal/v3-add-Ạ: Update StringHelpers.scala
Yeah that should work
Lyxal pushed a commit to Vyxal/v3-add-Ạ: Update StringHelpers.scala
Lyxal requested changes on #1877 (Add Ạ): "Whenever you call make iterable, it needs context. "
14:11
(using ctx: Context) like before
Anyhow I'll be going to bed now
o/
nayakrujul pushed a commit to Vyxal/v3-add-Ạ: Update NumberHelpers.scala
nayakrujul pushed a commit to Vyxal/v3-add-Ạ: Update StringHelpers.scala
github-actions[bot] pushed a commit to Vyxal/v3-add-Ạ: Scalafix changes
Bye
At least it's just the tests that's failing now
oh it passed
nice
14:28
nayakrujul pushed a commit to Vyxal/v3-add-Ạ: Update tests.yaml
Not-Thonnu pushed a commit to Vyxal/v3-fix-join-nothing: rename
Not-Thonnu pushed a commit to Vyxal/v3-fix-join-nothing: update
github-actions[bot] pushed a commit to Vyxal/v3-add-Ạ: Refresh element and/or trigraph docs from recent commit
nayakrujul pushed a commit to Vyxal/v3-fix-join-nothing: ...
nayakrujul pushed a commit to Vyxal/v3-add-Ạ: oof
15:32
ysthakur merged pull request #1876 (Make it so that lambda parameters don't cause an error) in Vyxal/Vyxal
ysthakur pushed a commit to Vyxal/version-3: Make it so that lambda parameters don't cause an error
ysthakur pushed a commit to Vyxal/version-3: Merge pull request #1876 from Vyxal/v3-fix-a-lambda-parameters-bug
ysthakur deleted branch v3-fix-a-lambda-parameters-bug in Vyxal/Vyxal
15:51
@TheThonnu That's not what it means
It means that you can only map a list of Foos to a list of Bars, but not to, say, a Set of Bars
You can map a VList to a Seq of ints or a Seq of chars to a Seq of ints if you like
(VList extends Seq[VAny])
@TheThonnu Oh hey you'd already found this
I thought you did all that work for nothing
Oh dang lyxal is right
Dang it
Fricking numbers
ysthakur approved #1877 (Add Ạ): "Could you also rewrite the uniquify element to make use of the new uniquify helper?"
ysthakur approved #1877 (Add Ạ): "Sorry accidentally hit approve. Instead of having `uniquify` be a separate helper, could you instead overload `distinct` inside `VList`? Then we'd be able to use `vlist.distinct` everywhere"
ysthakur requested changes on #1877 (Add Ạ): "I keep hitting approve"
16:08
Btw @TheThonnu sorry for the nitpicking, you're doing great, I'm just trying to help you get used to Scala/working on the Vyxal codebase
ysthakur force-pushed a commit to Vyxal/v3-add-Ạ: Add Ạ
ysthakur force-pushed a commit to Vyxal/v3-add-Ạ: one thing fixed
ysthakur force-pushed a commit to Vyxal/v3-add-Ạ: Hopefully fixed the other thing
ysthakur force-pushed a commit to Vyxal/v3-add-Ạ: Update ListHelpers.scala
ysthakur force-pushed a commit to Vyxal/v3-add-Ạ: Update ListHelpers.scala
ysthakur force-pushed a commit to Vyxal/v3-add-Ạ: how did I manage to do that lol
Uh
ysthakur force-pushed a commit to Vyxal/v3-add-Ạ: [pre-commit.ci] auto fixes from pre-commit.com hooks
ysthakur force-pushed a commit to Vyxal/v3-add-Ạ: Update StringHelpers.scala
Rebases are weird
ysthakur force-pushed a commit to Vyxal/v3-add-Ạ: Update StringHelpers.scala
ysthakur force-pushed a commit to Vyxal/v3-add-Ạ: Update NumberHelpers.scala
ysthakur force-pushed a commit to Vyxal/v3-add-Ạ: Update StringHelpers.scala
ysthakur force-pushed a commit to Vyxal/v3-add-Ạ: Scalafix changes
ysthakur force-pushed a commit to Vyxal/v3-add-Ạ: Update tests.yaml
ysthakur force-pushed a commit to Vyxal/v3-add-Ạ: Refresh element and/or trigraph docs from recent commit
ysthakur force-pushed a commit to Vyxal/v3-add-Ạ: oof
17:01
!!/status
@Ginger I am on a date with someone I found on Tinder. Hopefully she likes beans and crappy code-golf in-jokes.
 
1 hour later…
18:13
nayakrujul pushed a commit to Vyxal/v3-fix-join-nothing: User's suggestion
nayakrujul pushed a commit to Vyxal/v3-fix-join-nothing: Update MiscHelpers.scala
nayakrujul pushed a commit to Vyxal/v3-fix-join-nothing: Update tests.yaml
@user yeah, that's fine. Thanks for all the help :)
nayakrujul pushed a commit to Vyxal/v3-add-Ạ: Update shared/src/vyxal/NumberHelpers.scala
nayakrujul pushed a commit to Vyxal/v3-add-Ạ: Update Elements.scala
nayakrujul pushed a commit to Vyxal/v3-add-Ạ: let's try this
18:39
Not-Thonnu pushed a commit to Vyxal/v3-add-Ạ: hopefully this works...
Not-Thonnu pushed a commit to Vyxal/v3-add-Ạ: I'm just guessing here lol
Not-Thonnu pushed a commit to Vyxal/v3-add-Ạ: maybe?
@lyxαl @user I've got to go, but could one of you try fixing #1877?
19:42
Not-Thonnu pushed a commit to Vyxal/v3-add-Ạ: Update VList.scala
19:53
It's giving me this:
[error] 201 |        if !this.hasIndex(state._2) then None
[error]     |            ^^^^^^^^^^^^^
[error]     |value hasIndex is not a member of object vyxal.VList$package, but could be made available as an extension method.
But hasIndex is definitely defined in VList
  def hasIndex(ind: BigInt): Boolean =
20:21
!!/status
@TheThonnu I am doing criminal activities and framing you for them. Have fun in jail lol.
 
2 hours later…
22:35
scala-steward opened pull request #1878 (Minor updates) in Vyxal/Vyxal
@Ginger An error occured while processing event a39aed60-3ee0-11ee-8670-de9abdace244!
 
1 hour later…
23:37
Lyxal pushed a commit to Vyxal/v3-add-Ạ: Move distinct into the class definition
github-actions[bot] pushed a commit to Vyxal/v3-add-Ạ: Scalafix changes
Lyxal merged pull request #1878 (Minor updates) in Vyxal/Vyxal
Lyxal pushed a commit to Vyxal/version-3: Update mill-main to 0.11.1 in version-3
Lyxal pushed a commit to Vyxal/version-3: Merge pull request #1878 from scala-steward/update/version-3/minor
@TheThonnu so what was happening is that you had the distinct method in the Object definition of VList instead of the class definition
the class definition is analogous to members and methods that apply to individual instances of VList
the object definition is analogous to static members and methods that can be accessed from the VList namespace
The object definition can't access individual methods from the class definition
because that wouldn't make sense
how can you determine a property of an individual instance when you're in a static context?
(the answer, of course, is that you can't, because that's the whole point of declaring things as static)

« first day (1219 days earlier)      last day (556 days later) »