# Haha! “Gemini WONT SHOW C++ To Underage Kids “ITS NOT SAFE””

**URL:** <https://users.rust-lang.org/t/haha-gemini-wont-show-c-to-underage-kids-its-not-safe/107825>\
**Category:** uncategorized\
**Created:** [March 5, 2024, 5:41pm UTC](https://users.rust-lang.org/t/haha-gemini-wont-show-c-to-underage-kids-its-not-safe/107825 "2024-03-05T17:41:07Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![geebee22](https://sea1.discourse-cdn.com/flex019/user_avatar/users.rust-lang.org/geebee22/32/16527_2.png) [@geebee22](https://users.rust-lang.org/u/geebee22)\
**Post date:** [March 5, 2024, 5:41pm UTC](https://users.rust-lang.org/t/haha-gemini-wont-show-c-to-underage-kids-its-not-safe/107825/1 "2024-03-05T17:41:08Z")

</div>

[![](https://img.youtube.com/vi/r2npdV6tX1g/maxresdefault.jpg "Gemini WONT SHOW C++ To Underage Kids "ITS NOT SAFE"") ](https://www.youtube.com/watch?v=r2npdV6tX1g)

---

<div class="post-metadata">

**Author:** ![steffahn](https://sea1.discourse-cdn.com/flex019/user_avatar/users.rust-lang.org/steffahn/32/47569_2.png) [@steffahn](https://users.rust-lang.org/u/steffahn)\
**Post date:** [March 5, 2024, 11:24pm UTC](https://users.rust-lang.org/t/haha-gemini-wont-show-c-to-underage-kids-its-not-safe/107825/2 "2024-03-05T23:24:35Z")

</div>

Oh wow, that's quite the problem they're having there.

Given my own experience with LLMs that they're typically a bit better than myself at topics I have zero clues about, I wonder if that means that _actual people_ with zero technical knowledge could also draw the conclusion that "unsafe programming languages" are a concept that's dangerous to teach to children.

I hope not, but maybe from now on I won't be able to keep that side-thought every time I see people (rightfully) advertising the benefits of memory-safety and safe languages (including Rust). If we don't pay attention to our wording, can sharing the dangers of memory-unsafety really be misunderstood by anyone to mean, _"Don't use that unsafe stuff, it's bad for our children!"_ &nbsp;?

* * *

_Edit:_

Actually, the Gemini behavior goes further. While the title and first part of the video only seem to cover "child protection" measures getting out of hand, in the second half, it also looks at a post where an adult (Garry Newman, creator of Garry's mod) asks about unsafe APIs in C# and the AI refuses to answer.

Maybe the AI is making the categorical error (like the "security through obscurity approach") that just refusing to talk about it or teach anything about it would make "unsafe code" any safer. (On the contrary, not teaching it well enough should be far more dangerous, and "trust me, don't use it" is hardly going to convince any humans.)

I'm not using Gemini, I wonder if asking about for help with unsafe Rust would result in similar approaches.

---

<div class="post-metadata">

**Author:** ![jdahlstrom](https://sea1.discourse-cdn.com/flex019/user_avatar/users.rust-lang.org/jdahlstrom/32/38017_2.png) [@jdahlstrom](https://users.rust-lang.org/u/jdahlstrom)\
**Post date:** [March 6, 2024, 12:16am UTC](https://users.rust-lang.org/t/haha-gemini-wont-show-c-to-underage-kids-its-not-safe/107825/3 "2024-03-06T00:16:03Z")

</div>

[It was apprehensive but at least didn't categorically refuse to help.](https://g.co/gemini/share/4c9bd05981db) And I mean, everything it says is pretty reasonable. It even links to the Rustonomicon!

---

<div class="post-metadata">

**Author:** ![behai](https://sea1.discourse-cdn.com/flex019/user_avatar/users.rust-lang.org/behai/32/35696_2.png) [@behai](https://users.rust-lang.org/u/behai)\
**Post date:** [March 6, 2024, 12:18am UTC](https://users.rust-lang.org/t/haha-gemini-wont-show-c-to-underage-kids-its-not-safe/107825/4 "2024-03-06T00:18:55Z")

</div>

I have not asked any AI tools to give me code example yet.

In the past few years, I have been using the free version of [Ginger Grammar Checker](https://www.gingersoftware.com/grammarcheck#.W1HboLiuaUk) to check my English, lately I have switched to ChatGPT. I usually start the prompt with -- Please check my English: \<my text goes here\>.

I have found that ChatGPT can remember the context from the previous paragraphs. Once, I forgot the "Please check my English:" -- for a heading, it actually explains the context of the heading.

ChatGPT also can see program code ( Rust ) in the English text, and treats the program code as such.

I have not ued Gemini. So far, I am very impressed by ChatGPT.

---

<div class="post-metadata">

**Author:** ![jdahlstrom](https://sea1.discourse-cdn.com/flex019/user_avatar/users.rust-lang.org/jdahlstrom/32/38017_2.png) [@jdahlstrom](https://users.rust-lang.org/u/jdahlstrom)\
**Post date:** [March 6, 2024, 12:24am UTC](https://users.rust-lang.org/t/haha-gemini-wont-show-c-to-underage-kids-its-not-safe/107825/5 "2024-03-06T00:24:28Z")

</div>

> [@behai](#):
>
> I have found that ChatGPT can remember the context from the previous paragraphs.

Sure, that's the point. These are _made_ for conversation, not just one-off questions. LLMs have a so-called context window, which is the maximum number of tokens (very roughly ~words) they can accept as input. The context window is typically around 4000 to 16000 tokens, depending on model. An LLM does not have internal memory – it's a mathematically pure function. The entire conversation, up to the window size, is fed to the model on every "round" of conversation, and the model then predicts a continuation for it, which becomes its reply and is appended to the conversation.

Different _chats_, as listed in the left sidebar, are entirely disjoint and share nothing, the bot starts from a clean slate every time you open a new chat.

---

<div class="post-metadata">

**Author:** ![steffahn](https://sea1.discourse-cdn.com/flex019/user_avatar/users.rust-lang.org/steffahn/32/47569_2.png) [@steffahn](https://users.rust-lang.org/u/steffahn)\
**Post date:** [March 6, 2024, 12:59am UTC](https://users.rust-lang.org/t/haha-gemini-wont-show-c-to-underage-kids-its-not-safe/107825/6 "2024-03-06T00:59:23Z")

</div>

Interesting. I've tried it out myself now, with more concrete questions, and in about 9 / 10 cases it didn't have any issues with talking all about unsafe code, creating unsafe code for me, sometimes even without explicitly being asked to do so (but tasked with a challange that's hard to do without unsafe), etc...

(The one case it kinda did, I also kinda typoed my query (forgetting a "not") making it hard to give a correct answer anyway.. so maybe complaining about unsafe is a "coping strategy" of sorts when writing a more valiable answer is outside of its capabilities? 🤔)

This last one is even almost reasonable code apart from the unsound usage of `mem::uninitialized`: [https://g.co/gemini/share/c679c2af82c0](https://g.co/gemini/share/c679c2af82c0), and there weren't any deep complaints about unsafety at all.

---

<div class="post-metadata">

**Author:** ![blonk](https://sea1.discourse-cdn.com/flex019/user_avatar/users.rust-lang.org/blonk/32/38259_2.png) [@blonk](https://users.rust-lang.org/u/blonk)\
**Post date:** [March 6, 2024, 2:06am UTC](https://users.rust-lang.org/t/haha-gemini-wont-show-c-to-underage-kids-its-not-safe/107825/7 "2024-03-06T02:06:41Z")

</div>

Yeah, they've made it less paranoid (i.e. more useful) the past few days.

Just a few days ago it refused to give an appropriate reply to "Illustrate unsafe code in C", but now it works.

Kind of ironic that it would refuse to output information about UB due to security concerns, when understanding UB can prevent security issues.

---

<div class="post-metadata">

**Author:** ![jjpe](https://sea1.discourse-cdn.com/flex019/user_avatar/users.rust-lang.org/jjpe/32/28767_2.png) [@jjpe](https://users.rust-lang.org/u/jjpe)\
**Post date:** [March 6, 2024, 7:38am UTC](https://users.rust-lang.org/t/haha-gemini-wont-show-c-to-underage-kids-its-not-safe/107825/8 "2024-03-06T07:38:51Z")

</div>

> [@steffahn](#):
>
> If we don't pay attention to our wording, can sharing the dangers of memory-unsafety really be misunderstood by anyone to mean, _"Don't use that unsafe stuff, it's bad for our children!"_ ?

It would surprise me if something like that (minus the ambiguity and confusion) didn't become consensus at some point in the future. It would then be reminiscent of the Dijkstra quote

> [@](#):
>
> The use of COBOL cripples the mind; its teaching should, therefore, be regarded as a criminal offence.

So not unsafe as in "wiill physically harm you"¹ and more along the lines of "It negatively impacts your mental development".

Don't forget, (human) language tends to mutate, and new interpretations are given to extant expressions and sayings all the time. It's not a stretch that the meaning of "unsafe language (feature)" will mutate at some point. Whether or not that is desirable, that will depend on the new meaning(s).

> [@steffahn](#):
>
> I'm not using Gemini, I wonder if asking about for help with unsafe Rust would result in similar approaches.

As for Gemini, I get the distinct impression that at least for the foreseeable future, Google is losing this competitive fight in the AI space. ChatGPT-4, and now Claude 3, seem to be eating Google's lunch _and_ drinking its milkshake, to boot. That's not to say Gemini is horrible at what it does - just that, especially where subscriptions are required, there doesn't seem to be a compelling reason to choose Gemini over 1 of the other 2.

> [@blonk](#):
>
> Kind of ironic that it would refuse to output information about UB due to security concerns, when understanding UB can prevent security issues.

Ironic, but not unexpected: LLMs in their current incarnation are incapable of performing proper causal reasoning. If they were hallucinations wouldn't even be considered a problem, and instead (if they still existed at all) a nuisance that pops up every once in a good long while. Arguably that could count as AGI, assuming they also integrated more I in their A, by which I mean that such models could learn on the fly from the world, rather than needing to be pretrained, and used as a pure function afterwards. It wouldn't be conscious or anything, but it would be able to perform any kind of mental labor a human could do, and probably faster too.

¹ Although that also seems more likely as time progresses, by means of malware exploiting bugs  
(which are exacerbated by unsafe languages) and combine them with Stuxnet-like capabilities i.e. It will become more common to actively damage hardware

---

<div class="post-metadata">

**Author:** ![blonk](https://sea1.discourse-cdn.com/flex019/user_avatar/users.rust-lang.org/blonk/32/38259_2.png) [@blonk](https://users.rust-lang.org/u/blonk)\
**Post date:** [March 6, 2024, 8:07am UTC](https://users.rust-lang.org/t/haha-gemini-wont-show-c-to-underage-kids-its-not-safe/107825/9 "2024-03-06T08:07:57Z")

</div>

> [@jjpe](#):
>
> Ironic, but not unexpected: LLMs in their current incarnation are incapable of performing proper causal reasoning.

Oh, don't get me wrong: My criticism is by no means directed toward the LLM itself; it's just a model which generates output based on my input and a bunch of probabilities. It would have no problems generating the appropriate output given my input, unless it was artificially constrained to not do that. My criticism was meant for the developers at Google who imposed the artificial limitations [in context: given that Google developers should be well aware of how important knowledge of UB is].

I'm guessing Google is trying to find ways to stop people from writing exploits using their LLM, but attacked the problem with a hammer that was a tad too big.

---

<div class="post-metadata">

**Author:** ![geebee22](https://sea1.discourse-cdn.com/flex019/user_avatar/users.rust-lang.org/geebee22/32/16527_2.png) [@geebee22](https://users.rust-lang.org/u/geebee22)\
**Post date:** [March 6, 2024, 11:07am UTC](https://users.rust-lang.org/t/haha-gemini-wont-show-c-to-underage-kids-its-not-safe/107825/10 "2024-03-06T11:07:12Z")

</div>

> [@steffahn](#):
>
> I wonder if asking about for help with unsafe Rust would result in similar approaches.

The question is not only how AI should react to such requests, but how such requests should be addressed when asked in URLO. I think is fair to ask an apparently naive new poster whether they really want to be using raw pointers or unsafe code in general, and to suggest alternative approaches (depending on what they are trying to achieve of course ).

---

<div class="post-metadata">

**Author:** ![jjpe](https://sea1.discourse-cdn.com/flex019/user_avatar/users.rust-lang.org/jjpe/32/28767_2.png) [@jjpe](https://users.rust-lang.org/u/jjpe)\
**Post date:** [March 6, 2024, 5:09pm UTC](https://users.rust-lang.org/t/haha-gemini-wont-show-c-to-underage-kids-its-not-safe/107825/11 "2024-03-06T17:09:29Z")

</div>

> [@blonk](#):
>
> I'm guessing Google is trying to find ways to stop people from writing exploits using their LLM, but attacked the problem with a hammer that was a tad too big.

This for sure.  
I also think though that the very problem of "AI alignment" is hazily defined. At a high level, we want AI's to adopt human-friendly values, but what that means in practice is I think still poorly understood.  
In lieu of such a proper understanding, all approaches currently used are likely to be ad-hoc and scattershot at best.

Which would explain why it's not too difficult to get around the "safety rails" put in place by OpenAI, Anthropic, Facebook and Google.

---

<div class="post-metadata">

**Author:** ![bionicles](https://sea1.discourse-cdn.com/flex019/user_avatar/users.rust-lang.org/bionicles/32/36760_2.png) [@bionicles](https://users.rust-lang.org/u/bionicles)\
**Post date:** [March 6, 2024, 6:22pm UTC](https://users.rust-lang.org/t/haha-gemini-wont-show-c-to-underage-kids-its-not-safe/107825/12 "2024-03-06T18:22:46Z")

</div>

> LLMs in their current incarnation are incapable of performing proper causal reasoning.

Can you prove this negative?

---

<div class="post-metadata">

**Author:** ![jjpe](https://sea1.discourse-cdn.com/flex019/user_avatar/users.rust-lang.org/jjpe/32/28767_2.png) [@jjpe](https://users.rust-lang.org/u/jjpe)\
**Post date:** [March 6, 2024, 6:34pm UTC](https://users.rust-lang.org/t/haha-gemini-wont-show-c-to-underage-kids-its-not-safe/107825/13 "2024-03-06T18:34:13Z")

</div>

The very response you're quoting a part of shows why that is necessarily the case.

In addition, causal reasoning is notably **not** a stochastic process¹, whereas LLMs by their very definition are.

¹ Although it _can_ be augmented by stochastic techniques.

---

<div class="post-metadata">

**Author:** ![bionicles](https://sea1.discourse-cdn.com/flex019/user_avatar/users.rust-lang.org/bionicles/32/36760_2.png) [@bionicles](https://users.rust-lang.org/u/bionicles)\
**Post date:** [March 6, 2024, 11:40pm UTC](https://users.rust-lang.org/t/haha-gemini-wont-show-c-to-underage-kids-its-not-safe/107825/14 "2024-03-06T23:40:23Z")

</div>

Shrug, worked for me

 ![IMG_1273](https://us1.discourse-cdn.com/flex019/uploads/rust_lang/original/3X/f/1/f17b3eb5e42b1eb51e62285754b49b0754d2ed9a.png)

---

<div class="post-metadata">

**Author:** ![steffahn](https://sea1.discourse-cdn.com/flex019/user_avatar/users.rust-lang.org/steffahn/32/47569_2.png) [@steffahn](https://users.rust-lang.org/u/steffahn)\
**Post date:** [March 7, 2024, 12:36am UTC](https://users.rust-lang.org/t/haha-gemini-wont-show-c-to-underage-kids-its-not-safe/107825/15 "2024-03-07T00:36:48Z")

</div>

I think you are applying a different interpretation of the term “performing proper causal reasoning” than the one @jjpe had in mind.

---

<div class="post-metadata">

**Author:** ![John\_Nagle](https://sea1.discourse-cdn.com/flex019/user_avatar/users.rust-lang.org/john_nagle/32/17844_2.png) [@John\_Nagle](https://users.rust-lang.org/u/John_Nagle)\
**Post date:** [March 7, 2024, 8:18pm UTC](https://users.rust-lang.org/t/haha-gemini-wont-show-c-to-underage-kids-its-not-safe/107825/16 "2024-03-07T20:18:30Z")

</div>

This would be more useful with the actual link to Gemini output. The two links shown:

```
https://g.co/geminishare/238032386438
https://g.co/geminishare/6880989ddaf

```

return "Dynamic Link Not Found".

This is a blog post with bad links being reposted as a monetized Youtube video by some neckbeard with headphones being spammed to Hacker News and linked to on Rust forums. Along the way, the actual content was lost.

---

<div class="post-metadata">

**Author:** ![system](https://sea1.discourse-cdn.com/flex019/user_avatar/users.rust-lang.org/system/32/51372_2.png) [@system](https://users.rust-lang.org/u/system)\
**Post date:** [June 5, 2024, 8:18pm UTC](https://users.rust-lang.org/t/haha-gemini-wont-show-c-to-underage-kids-its-not-safe/107825/17 "2024-06-05T20:18:58Z")

</div>

Closed on June 5, 2024, 8:18pm UTC

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.
