# DeepSeek and Xojo... interesting

**URL:** <https://forum.xojo.com/t/deepseek-and-xojo-interesting/84063>\
**Category:** AI\
**Created:** [January 27, 2025, 11:38pm UTC](https://forum.xojo.com/t/deepseek-and-xojo-interesting/84063 "2025-01-27T23:38:55Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sveinn\_Runar\_Sigurdsson](https://forum.xojo.com/user_avatar/forum.xojo.com/sveinn_runar_sigurdsson/32/23640_2.png) [@Sveinn\_Runar\_Sigurdsson](https://forum.xojo.com/u/Sveinn_Runar_Sigurdsson)\
**Post date:** [January 27, 2025, 11:38pm UTC](https://forum.xojo.com/t/deepseek-and-xojo-interesting/84063/1 "2025-01-27T23:38:56Z")

</div>

Took **DeepSeek** - the chinese AI company which you probably heard off, which is crashing the big AI tech stock at the moment - for a spin using questions on and classic AI tests, for Xojo.

- I made it write a nice tetris game in one go
- Snake game
- Custom control using a canvas.
- and provide a few solutions using external methods on Mac OS and Windows.

Everything ran in first go… really impressive and the story behind the model is very interesting.

---

<div class="post-metadata">

**Author:** ![Henry\_F\_Gibson](https://forum.xojo.com/user_avatar/forum.xojo.com/henry_f_gibson/32/686_2.png) [@Henry\_F\_Gibson](https://forum.xojo.com/u/Henry_F_Gibson)\
**Post date:** [January 28, 2025, 12:27am UTC](https://forum.xojo.com/t/deepseek-and-xojo-interesting/84063/2 "2025-01-28T00:27:17Z")

</div>

Ask if xojo has an array reverse sort.

---

<div class="post-metadata">

**Author:** ![MarkusR](https://forum.xojo.com/user_avatar/forum.xojo.com/markusr/32/685_2.png) [@MarkusR](https://forum.xojo.com/u/MarkusR)\
**Post date:** [January 28, 2025, 12:02pm UTC](https://forum.xojo.com/t/deepseek-and-xojo-interesting/84063/3 "2025-01-28T12:02:47Z")

</div>

Ask sort a point array by point distance.

how about add a hi-score to the tetris game visible in web.

---

<div class="post-metadata">

**Author:** ![David\_Cox](https://forum.xojo.com/user_avatar/forum.xojo.com/david_cox/32/227_2.png) [@David\_Cox](https://forum.xojo.com/u/David_Cox)\
**Post date:** [January 30, 2025, 10:33am UTC](https://forum.xojo.com/t/deepseek-and-xojo-interesting/84063/5 "2025-01-30T10:33:59Z")

</div>

From DeepSeek:

As of my knowledge cutoff in July 2024, **Xojo does not have a built-in method to reverse an array**. You would need to implement your own method, such as the one I provided earlier, to reverse an array.

However, Xojo does provide some array manipulation methods, such as `Sort`, `Insert`, `Remove`, and `Append`, but reversing an array is not one of the built-in functionalities. If this has changed in a newer version of Xojo, I recommend checking the official [Xojo documentation](https://docs.xojo.com) for updates.

If you frequently need to reverse arrays, you could encapsulate the logic into a reusable method or extend the array functionality using a module or class. Here’s an example of how you could create a reusable method in a module:

### Module: ArrayUtilities

```xojo
Module ArrayUtilities
  Sub ReverseArray(Array() As Variant)
    Dim lowIndex As Integer = 0
    Dim highIndex As Integer = Array.Ubound
    
    While lowIndex < highIndex
      ' Swap the elements
      Dim temp As Variant = Array(lowIndex)
      Array(lowIndex) = Array(highIndex)
      Array(highIndex) = temp
      
      ' Move towards the center
      lowIndex = lowIndex + 1
      highIndex = highIndex - 1
    Wend
  End Sub
End Module

```

### Usage:

```xojo
Dim myArray() As String = ["Apple", "Banana", "Cherry", "Date"]
ArrayUtilities.ReverseArray(myArray)

' myArray will now be ["Date", "Cherry", "Banana", "Apple"]

```

This approach keeps your code clean and reusable. If Xojo adds a built-in method for reversing arrays in the future, you can easily update your code to use the native functionality.

---

<div class="post-metadata">

**Author:** ![Thom\_McGrath](https://forum.xojo.com/user_avatar/forum.xojo.com/thom_mcgrath/32/192_2.png) [@Thom\_McGrath](https://forum.xojo.com/u/Thom_McGrath)\
**Post date:** [January 30, 2025, 11:47am UTC](https://forum.xojo.com/t/deepseek-and-xojo-interesting/84063/6 "2025-01-30T11:47:05Z")

</div>

It’s factually correct about not having a reverse, but that code won’t work, and even if corrected, would only work for the very specific array of variants and not for other array types.

---

<div class="post-metadata">

**Author:** ![MarkusR](https://forum.xojo.com/user_avatar/forum.xojo.com/markusr/32/685_2.png) [@MarkusR](https://forum.xojo.com/u/MarkusR)\
**Post date:** [January 30, 2025, 12:00pm UTC](https://forum.xojo.com/t/deepseek-and-xojo-interesting/84063/7 "2025-01-30T12:00:09Z")

</div>

instead of reverse an array i would iterate backwards, no need to swap data.

```auto
For i As Integer = data.LastIndex DownTo data.FirstIndex 
Next

```

Xojo can use a compare method **Sort** ([AddressOf](https://documentation.xojo.com/api/language/addressof.html) methodName)  
basically for the content but could also be a class with few properties.

---

<div class="post-metadata">

**Author:** ![Tim\_Parnell](https://forum.xojo.com/user_avatar/forum.xojo.com/tim_parnell/32/161_2.png) [@Tim\_Parnell](https://forum.xojo.com/u/Tim_Parnell)\
**Post date:** [January 30, 2025, 5:35pm UTC](https://forum.xojo.com/t/deepseek-and-xojo-interesting/84063/8 "2025-01-30T17:35:27Z")

</div>

lol I read this plagiarism machine is being investigated for plagiarizing the existing plagiarism machines, and the existing plagiarism machines are all boohoo about having their work stolen.

---

<div class="post-metadata">

**Author:** ![Chris\_Verberne](https://forum.xojo.com/user_avatar/forum.xojo.com/chris_verberne/32/453_2.png) [@Chris\_Verberne](https://forum.xojo.com/u/Chris_Verberne)\
**Post date:** [February 9, 2025, 2:57pm UTC](https://forum.xojo.com/t/deepseek-and-xojo-interesting/84063/9 "2025-02-09T14:57:53Z")

</div>

This is the Quicksort routine which is slow. You should better use Shellsort which is much faster.

---

<div class="post-metadata">

**Author:** ![Paul\_Chance](https://forum.xojo.com/user_avatar/forum.xojo.com/paul_chance/32/22072_2.png) [@Paul\_Chance](https://forum.xojo.com/u/Paul_Chance)\
**Post date:** [February 9, 2025, 5:24pm UTC](https://forum.xojo.com/t/deepseek-and-xojo-interesting/84063/10 "2025-02-09T17:24:17Z")

</div>

It’s worthwhile to read about different sort techniques (Wikipedia) to see which one most closely matches the initial state and number of elements you expect to have.

Here’s bit on using the best Gap in the Shell Sort:

* * *

Regarding the best gap sequence, the choice of gap sequence is crucial to shell sort’s performance. A gap sequence determines how far elements are sorted apart from each other and directly affects the efficiency of the sorting process.

Some popular gap sequences include:

1. **Shell’s Original Sequence** : Halving the number of elements each time (`N/2, N/4, ..., 1`). This sequence is easy to implement but not the most efficient.

2. **Hibbard’s Sequence** : Powers of two minus one (`1, 3, 7, 15, ...`). This tends to perform better than Shell’s original sequence.

3. **Knuth’s Sequence** : Formula is `1, 4, 13, 40, ...` which is `h = 3h + 1`. It often performs better in practical use.

4. **Sedgewick’s Sequences** : These are more complex sequences designed for superior performance in practice, especially for larger arrays.

5. **Ciura’s Sequence** : An empirically derived sequence (`1, 4, 10, 23, 57, 132, 301, 701, 1750`). This sequence has been shown to produce efficient results for practical problems.

---

<div class="post-metadata">

**Author:** ![Nicholas\_Loveday](https://forum.xojo.com/letter_avatar_proxy/v4/letter/n/f1d935/32.png) [@Nicholas\_Loveday](https://forum.xojo.com/u/Nicholas_Loveday)\
**Post date:** [February 13, 2025, 12:07am UTC](https://forum.xojo.com/t/deepseek-and-xojo-interesting/84063/11 "2025-02-13T00:07:32Z")

</div>

Be careful what you choose to reveal publicly.  
10:1 AI of some sort is scraping the Xojo forum.

---

<div class="post-metadata">

**Author:** ![Paul\_Rodman](https://forum.xojo.com/user_avatar/forum.xojo.com/paul_rodman/32/349_2.png) [@Paul\_Rodman](https://forum.xojo.com/u/Paul_Rodman)\
**Post date:** [February 13, 2025, 12:19am UTC](https://forum.xojo.com/t/deepseek-and-xojo-interesting/84063/12 "2025-02-13T00:19:38Z")

</div>

No it’s not.

---

<div class="post-metadata">

**Author:** ![Robert\_Livingston](https://forum.xojo.com/user_avatar/forum.xojo.com/robert_livingston/32/255_2.png) [@Robert\_Livingston](https://forum.xojo.com/u/Robert_Livingston)\
**Post date:** [February 13, 2025, 1:22am UTC](https://forum.xojo.com/t/deepseek-and-xojo-interesting/84063/13 "2025-02-13T01:22:29Z")

</div>

How do you know that the AI’s do not scrape the Forum? Is it just not possible this Forum or what?

I would think that this Forum would be the richest source of Xojo code and comments for AI’s. There is the Documentation but not that much else out there.

---

<div class="post-metadata">

**Author:** ![Nicholas\_Loveday](https://forum.xojo.com/letter_avatar_proxy/v4/letter/n/f1d935/32.png) [@Nicholas\_Loveday](https://forum.xojo.com/u/Nicholas_Loveday)\
**Post date:** [February 13, 2025, 1:28am UTC](https://forum.xojo.com/t/deepseek-and-xojo-interesting/84063/14 "2025-02-13T01:28:36Z")

</div>

A couple of other (quite specialized, not social media) forums I belong to have already proven they have been scraped by both Google, and DeepSeek.

They posed specific questions where a very specific unique answer is on the forum and DeepSeek regurgitated it, although somewhat verbosely. But good enough to prove it scraped the forum. Google simply coughed up a direct link to the relevant thread in that forum, as usual.

---

<div class="post-metadata">

**Author:** ![Peter\_Stys](https://forum.xojo.com/letter_avatar_proxy/v4/letter/p/e0b2c6/32.png) [@Peter\_Stys](https://forum.xojo.com/u/Peter_Stys)\
**Post date:** [April 3, 2025, 3:46am UTC](https://forum.xojo.com/t/deepseek-and-xojo-interesting/84063/15 "2025-04-03T03:46:22Z")

</div>

so long as ur careful not to post certain info publicly (for humans or LLMs to see) I for one welcome such scraping. Why not have an LLM read 2 decades of posts and synthesize an organized response for you? That said, as concerns Xojo, the LLMs frequently come back with bogus code using functions that sound good but don’t exist. They’re much better with C and python (in fact their python ability is scary good e.g Perplexity)

---

<div class="post-metadata">

**Author:** ![Sascha\_S](https://forum.xojo.com/user_avatar/forum.xojo.com/sascha_s/32/22328_2.png) [@Sascha\_S](https://forum.xojo.com/u/Sascha_S)\
**Post date:** [April 3, 2025, 5:17am UTC](https://forum.xojo.com/t/deepseek-and-xojo-interesting/84063/16 "2025-04-03T05:17:52Z")

</div>

It’s pointless to ponder whether one should publish source code on GitHub, in the forum, or anywhere else.

The fact is that current development can no longer be stopped, and Xojo can only lose the less source code is available for processing and thus for training the LLMs.

In my opinion, the knowledge that my source code could be used by LLMs should not influence my willingness to share my knowledge with the community. Otherwise, not only the Xojo language but also the entire Xojo community will lose out. And that cannot be our goal.

Just my 2c …
