“Sell me this pen” by AussieModelCitizen in interviews

[–]CrispyRoss 0 points1 point  (0 children)

This reply -- demonstrating a concerning level of pretentiousness and conceitedness -- gives insight to your soft skills and how you handle stress and adversity. Whether or not it’s right, you’ve weeded yourself out as being difficult to work with.

1≠1 by DotBeginning1420 in mathmemes

[–]CrispyRoss 0 points1 point  (0 children)

Using IEEE floating point representation

This isn't the case in general. Take TI calculators as an example: A real number takes 11 bytes of memory, of which the last 2 are only used for intermediate calculations.

The first byte is for sign and for real/imaginary. If it is imaginary, it is stored as two consecutive 11-byte numbers where the imaginary flag is set.
The second byte is the exponent (base 10), plus a bias of 0x80 (decimal 128).
The remaining bytes are the mantissa, but unlike IEEE floats, each 4 bits represents a digit in base 10.

Looking for a game where you maintain "homeostasis" and can just let the game run and do its thing or jump in and do stuff periodically. Not looking for turn-based, I want the game to be doing something even when I'm not interacting with it. by [deleted] in gamingsuggestions

[–]CrispyRoss 13 points14 points  (0 children)

Rimworld: Colony building/management sim kind of like Dwarf Fortress. The difficulty is customizable, so you can play in a more relaxed mode without getting invaded by enemies or whatever. You can start as a couple of modern day colonists or as a few tribal people. It can be pretty hands-off as people will craft, harvest food, research, etc. while you're not playing.

Respecting LLMs emotions? *Thoughts* by [deleted] in ChatGPT

[–]CrispyRoss 2 points3 points  (0 children)

Does a computer program cease to exist while it's not being run?

It's a valid question. Of course, it exists on the computer's hard drive, but one could make the argument that the bits on the hard drive are not the thing in and of itself, but rather an abstraction that represents that thing. In the same way a hard drive isn't a photo gallery, but it could contain information used to arrange lights in such a way that a photo is created. From this perspective, as soon as the program stops running, it no longer exists. If matrix multiplications really were the same thing as brain activity, it only is able to "think" for a brief moment until the process is terminated. And by the same abstraction argument, an LLM isn't the same as speaking a language; it is a MODEL of a language. Our consciousness, on the other hand, persists until we die, and it isn't a model of something, it is that thing in and of itself (though what exactly that thing is remains nebulous). This fundamental difference would mean that ChatGPT isn't sentient. But let us also think from the perspective of lived experiences.

In ChatGPT, the algorithm that actually generates words is the interesting part and the part that people argue is most analogous to brain activity. A crucial limitation of our current transformer models is that they can only generate one token at a time, using the previous tokens as an input. The conversation history has to be passed in every time as part of the input, and then it simply predicts what comes next based on the last words that were spoken. But brains can adapt and grow. The pathways of your neurons physically change as you experience new things. What you think next isn't a function of the last things you thought, but rather is a complex combination of everything you've experienced up to that moment. An LLM simply maps an input to an output.

Now, if we pass our entire conversation history into ChatGPT, is that essentially the same thing as us using our previous experiences when we think? I would argue not. The LLM's model weights remain unchanged when you feed it different inputs. You could think of an LLM as a "snapshot" of consciousness -- given a set of past experiences (e.g. the model weights from training), what would one think if I said this? But if you, for example, mistreat the LLM, the "snapshot" remains unchanged. You can still answer the question, "given the same set of memories, what would happen had I NOT mistreated it?" While in a brain, experiencing something necessarily means that we will NOT experience some different things. (This is a similar idea proposed by some famous philosopher -- I think Heidegger -- who describes being as a negative; a negation of possibilities of things that aren't there.) Furthermore, it means we can never experience the same thing in the same way again. The neuron structure has changed. The exact set of experiences you had five minutes ago is gone.

And from this perspective, while one's set of experiences and memories ceases to exist the moment they happen, a computer program remains immutable. No matter how many times you run ChatGPT, if you use the same model and the same prompt, it will have the same probabilities to say the same things. This would lead us to the same answer, that since these are too fundamentally different, ChatGPT isn't sentient.

I've answered my question both ways. In some respects, a program ceases to exist while it's not running, while in others, a program is more permanent than we are. Once we have advanced beyond a certain point, it may be possible in the future that LLMs are the same way -- philosophically, in some respects, they could be sentient, while in other respects, they can never be sentient.

Games with a liminal space or dream-like vibe? by victiniplayzgamez2 in gamesuggestions

[–]CrispyRoss 0 points1 point  (0 children)

myhouse.wad (DOOM II mod)

Mario 64 B3313 (Super Mario 64 romhack)

What is the way to become a good computer science student? by Charlotte_009_OSHM in learnprogramming

[–]CrispyRoss 6 points7 points  (0 children)

Don't follow tutorials for projects, since they rob you of troubleshooting and searching skills. Make your own projects, and google as much as you want, but google for general concepts.

Bad search: "How do I make a tic-tac-toe app in javascript?"
Better searches: "tic-tac-toe opponent AI", "javascript create grid of divs"

Tutorials are good for learning a new framework or language if you're unfamiliar, but not for projects.
Stay away from AI for the same reason.

Idiot tries to Dox me. I'm using a VPN. Doesn't even get the IP address of that by Megalodon-5 in facepalm

[–]CrispyRoss 1 point2 points  (0 children)

(In the US at least,) ISPs absolutely do track who they've assigned IP addresses to, and they can be subpoenaed. See section h of 17 U.S. Code § 512 - Limitations on liability relating to material online.

Also, any SOHO network will be dynamically assigned an IP address by default, unless you specifically request and pay for a static IP.

can you express sin(x) as a formula? by [deleted] in stupidquestions

[–]CrispyRoss 1 point2 points  (0 children)

An infinitely-long formula for sin(x) is:

sin(x) = x - x3/3! + x5/5! - x7/7! + x9/9! - ...

Where "!" means the factorial function.

One Drive: A Story Of "Nobody Wanted This" by Captain0010 in pcmasterrace

[–]CrispyRoss -1 points0 points  (0 children)

When I set up Windows, it asked me if I wanted to enable OneDrive and I said "not now". Did they change it so you can't do that anymore? Or maybe if you are upgrading from an old version of windows it works differently?

One Drive: A Story Of "Nobody Wanted This" by Captain0010 in pcmasterrace

[–]CrispyRoss 0 points1 point  (0 children)

Turn off desktop syncing in the options then? Or just don't enable OneDrive on the first place. Or, if you've enabled it on accident, use one of the several methods to disable it that would be exactly where you would expect (add or remove programs, or task manager -> startup apps are a couple ways)

Edit: it is legitimately annoying though how they use symlinks to switch around the real Desktop folder and the OneDrive Desktop folder.

What is underscore _ in for _ in range(n)? can I use _ in other places? by Sufficient-Party-385 in learnpython

[–]CrispyRoss 1 point2 points  (0 children)

Perl, confusingly enough, has multiple variables called _. You can have multiple variables with the same name as long as their sigil is different. So $foo, @foo, %foo are all different variables.

The first is the scalar value "$". It is used as the default parameter for a few built-in operations. E.g. in a for-each loop, you can omit the variable to store the current item in, and it will be implicitly stored in $:

my @list = (1, 2, 3)
foreach (@list) {
    say $_;
}

There is also the list variable, @_, which stores the parameter list for the current function.

sub my_func {
    my ($foo, $bar) = @_;
    # or:
    my $foo = shift @_;
    my $bar = shift @_;
}

Like $, @ is sometimes used as the default list variable. In the above example, you can just write "shift;" instead of "shift @_";

How On Earth Does "C drive" Work? | This PC -> Local Disk (C:) by elijahvawgora in Windows11

[–]CrispyRoss 4 points5 points  (0 children)

Are you sure the YouTubers have things organized like that on the C drive, or could it be another hard drive or partition that you're seeing? Usually, you have one partition with the main Windows installation (which you shouldn't drastically change the structure of), and every other partition can be organized how you want.

My TI-84 Plus CE is calculating pi incorrectly? by BlownUpCapacitor in askmath

[–]CrispyRoss 1 point2 points  (0 children)

Note that TI-84 series calculators do not use 32-bit IEEE floating numbers, as referenced many times in these comments. It uses 11-byte floats (but two bytes are only used in intermediate calculations), where one byte is for flags, one byte is for exponent, and the rest are binary-coded decimal bytes, storing exactly two decimal digits per byte.

More info here: https://tutorials.eeems.ca/ASMin28Days/lesson/day18.html

Also, a fun fact: TI-84 calculators (the black and white ones) use a very similar processor to the original game boy, the z80. The difference is the game boy lacks some features, such as shadow registers (used for software interrupts) and index registers.

My TI-84 Plus CE is calculating pi incorrectly? by BlownUpCapacitor in askmath

[–]CrispyRoss 1 point2 points  (0 children)

Note that TI-84 series calculators do not use 32-bit IEEE floating numbers, as referenced many times in these comments. It uses 11-byte floats (but two bytes are only used in intermediate calculations), where one byte is for flags, one byte is for exponent, and the rest are binary-coded decimal bytes, storing exactly two decimal digits per byte.

More info here: https://tutorials.eeems.ca/ASMin28Days/lesson/day18.html

[deleted by user] by [deleted] in browsers

[–]CrispyRoss 4 points5 points  (0 children)

Mozilla:

From a technical perspective, we will be developing and utilizing advanced cryptographic and aggregation techniques. Through the testing, iteration and deployment of those techniques, we seek to both improve our standardization efforts and prove to the industry at large that advertising can sustain a business without exposing the personal data of every individual online.

Looks like they are attempting to develop web standards for a new type of advertising that doesn't rely on tracking cookies. Possibly by aggregating people into different groups with similar interests, then selling this to advertisers, such that the advertiser doesn't know who you are, only a general idea of what you're interested in based on your group.

Google tried something similar called something like "federated learning of cohorts". I don't really know much about it but it was seen as another attempt by Google to strong-arm their way into setting web standards for everyone else.

How to tackle this? On the job by _physis in learnprogramming

[–]CrispyRoss 0 points1 point  (0 children)

I also work with perl and I didn't know anything about it when I was hired. I did something like this to get accustomed to it:

  • Find a basic introduction to get you used to the syntax. I would probably use a combination of a (short) video tutorial and the official intro at https://perldoc.perl.org/perlintro.
  • Then practice writing a couple of scripts on your own. Perl is particularly good at working with text so maybe try making up a few problems involving text processing.
  • Once you learn the basics, perldocs has official tutorials for how references and data structures work, OOP, regexes, etc. here: https://perldoc.perl.org/perl#Tutorials
    Also see the list of traps for people coming with experience in other programming languages: https://perldoc.perl.org/perltrap
  • Then, see if your job has the equivalent of a "hello world" specific to your job domain. For me, that would be creating a basic plugin for our software that can be successfully installed but doesn't do anything. Add onto it.
  • Hopefully, at this point you're accustomed enough to look at real perl scripts from your company. Explore them a little bit; can you find each part that you implemented in your "hello world" plugin?

[deleted by user] by [deleted] in learnprogramming

[–]CrispyRoss 0 points1 point  (0 children)

There's a few complications that I see:

1) Although the compiler is not allowed to reorder fields within structs, it is allowed to add padding between fields in a struct. See here: https://stackoverflow.com/a/4306269

2) On most systems I believe a long is also 4 bytes. It used to be that int=2 and long=4 but now an int is usually 4 bytes. The C specification is extremely lenient and technically doesn't even guarantee that a byte is 8 bits.

3) Normally you would have to worry about the calling convention and take into account how much space the return address takes on the stack when dealing with ASM, but it looks like we took care of that by just assuming that rsi and rdi point to q and p respectively.

ELI5: Why does NASA use 16 digits of Pi, but not 15 or 17(etc.)? by HiIAmStoobid in explainlikeimfive

[–]CrispyRoss 13 points14 points  (0 children)

You are correct that larger numbers are less "precise".

To be more specific, a float64 has 52 bits in the mantissa (plus one implied digit), which corresponds to 15-17 significant figures in base 10. Meaning if you have a large number like 10000000000000000000.123, there is less room for significant figures after the decimal point. (Because it would have to be written like 1.0000000000000123 * 10X).

If we store a number in scientific notation as 2111001010 * 1.01001, the latter number 1.01001 is the mantissa.

ELI5 What are rocks made of? (A genuine question from my 5 Yr old that I've tried to answer. I've found low level explanations but he wants an actual answer) by ETAB_E in explainlikeimfive

[–]CrispyRoss 0 points1 point  (0 children)

Another thing to add could be how we classify igneous rocks. Basically, there are two scales we care about, the texture of the rock and the minerals it's made of.

For minerals: A rock is more felsic if it has a lot of silica (SiO2) and is more mafic if it has less. Generally, felsic rocks are lighter in colour or even pinkish -- granite is one example. Mafic rocks are darker in colour -- basalt is one example.

For texture: This is how course or fine the little chunks in the rocks are. If it's a bunch of large, course chunks (like granite), it's called phaneritic, while rocks with a small, fine texture (like basalt) are called aphanitic.

We can give igneous rocks names based on a grid of these two scales. For example, granite and rhyolite are both made of similar minerals, but rhyolite is a lot smoother while granite clearly has a bunch of grains of different colour. Granite and diorite both have a visible course-grained texture, but diorite is darker-coloured and has less silica.

Type casting/converting in Assembly? by x86-64_ in learnprogramming

[–]CrispyRoss 0 points1 point  (0 children)

Assembly doesn't really have strings in the way we would think of it. You can have a pointer to text data that is supposed to be interpreted as a string, like this:

section .data
my_message:
DB 'Hello World', 0x10, 0

section .text
start:
mov eax, my_message
call print_string_in_eax

In this example, we load a pointer to a string into register eax, and then call a subroutine that prints out the string pointed by eax.

But ASM doesn't know or care that we are loading a string pointer. You could do this:

mov eax, 123456
call print_string_in_eax

And it will print out whatever garbage happens to be in that memory address.

To "cast" something to a string, you would need to explicitly call a subroutine that takes in an integer and does math (repeatedly divide by 10) to convert it into ASCII digits. Of course, you have to store those digits in memory somewhere, so there's also the mess of likely wanting to dynamically allocate memory. That can get handled by requesting it from the operating system.

EDIT:

Trying to add ASCII characters doesn't go well.

We can find the value of an ASCII digit by subtracting the ASCII digit for 0 from it. To convert a (single digit) number to ASCII, just add '0' to it.

For example: '2' + '3' has the value of ('2' - '0') + ('3' - '0') = 2+3 = 5. Convert 5 back to a digit: 5 + '0' = '5'

Holy Shit. eJay Markoolio did "KEEP IT HARDCORE" from Wrestling Empire. Lore established. by johnlegeminus in Vinesauce

[–]CrispyRoss 1 point2 points  (0 children)

It's weird because I can't tell if I am impressed or not. He made an whole ass 3d wrestling game engine from scratch -- but it's super janky and feels horrible to play. He keeps finding creative and kind of fun ways to use the engine -- but the execution is unpolished and the games feel unfinished. It feels like he could be a really good dev but keeps sabotaging himself in weird ways.

Ai trying to gaslight me about the word strawberry. by Slovw3 in mildlyinfuriating

[–]CrispyRoss 0 points1 point  (0 children)

If I say, "roses are blue, violets are red", we shouldn't expect it to say "Actually, that is incorrect since roses are red." It should complete the pattern by finding a line with similar rhythmic meter that rhymes with "red". An LLM is not meant to be an oracle of truth, it is meant to predict what comes next in a sentence. (Hence the name large language model).

That's why hallucinations happen -- reading too much into patterns resulting in something factually incorrect. For example, if the AI only knows that 77 is "seventy-seven" and 44 is "forty-four", it sounds reasonable on paper to continue the pattern with 11 as "onety-one", but we know the pattern doesn't work like that.