Press J to jump to the feed. Press question mark to learn the rest of the keyboard shortcuts
OverviewPostsComments
chihiroaokii commented on
i.redd.it/xa8p1h...

This is sad. A person with self-love issues shouldn't be treated like this

You realise this didn't actually happen?

Of course I do. It's just that I find it sad that there are people who seriously find this attitude funny.

Load more comments

26
26
45 comments

どこの国出身?何歳?

Original Poster3 points · 12 hours ago

トルコ人18歳ガール✌️ついこの間高校卒業したんでJKブランド使えなくて悲しいです

13 points · 1 day ago

チンチンでかそう

Original Poster3 points · 12 hours ago

ゼロに等しいです。てか普通にゼロです。

Load more comments

chihiroaokii commented on

百合はいいぞ

chihiroaokii commented on
i.redd.it/ern83g...

Ok but this isn't the best post over this sub…

chihiroaokii commented on

Hobies help a lot!

chihiroaokii commented on

Money.

I'd never ever want to work in Japan, but I'm going to go there and live some fulfilling 4 years as a student. Now all I'm doing is saving up money and studying hard to get admitted.

chihiroaokii commented on

Splice is a good service that takes auto backups. I also do frequent manual backups to Google Drive

chihiroaokii commented on
reddit.com/r/GetM...

Ahh yes, the classical Japanese author 出口先生… My favorite

chihiroaokii commented on
316 points · 3 days ago · edited 3 days ago
Platinum

One reason I don't see mentioned in much detail here:

In C/C++, arrays are stored as contiguous blocks of memory, the size of which has to be provided at creation. So, you might see something like

int arr[5];

Which means "allocate space for 5 integers, and put the starting location in the variable arr"

Technically in this case it's happening on the stack so it's not "allocated" in the same way, so just don't think about that

Now, C/C++ has two special operators which do not exist in Python: & (address of) and * (dereference).

&foo, as the name suggests, gives you the memory address of the variable foo. Suppose it returns 12304568 - that means that foo's contents are located at the 12304568th byte in memory.

*foo gets the value at an address. *(12304568) would look at the 12304568th byte in memory and fetch whatever is there.

Not really, since we haven't specified a type, and that address is probably out of bounds and would cause a segmentation fault, so don't think about that either.

The code *(&foo) is equivalent to just foo, since we get the address of foo and then get whatever is at that address (the contents of foo).

We could also do something like *(&foo + 1). Here, we get the address of foo, then look one unit over, and find whatever's at that location. The unit depends on the type of foo, and scales so that there's no overlap. If foo is an int, then we look 4 bytes over to find the next int. If foo is a double, then we look 8 bytes over to find the next double.

So, remember that I said that arr contains the starting location of our block of memory. This means that if we use *arr, we can check whatever is at the first int in our array. We can also look one int over with *(arr + 1). We can do this all the way up until *(arr + 5), where we're no longer looking in our specially-allocated block of memory - we might cause a segmentation fault here.

So, what are the elements of our array?

*(arr + 0)
*(arr + 1)
*(arr + 2)
*(arr + 3)
*(arr + 4)

As you might have caught on, this operation is so common that C/C++ has a special syntax for it. arr[n] is (in most compilers) exactly equivalent to *(arr + n)

If arrays were 1-indexed in C, then we wouldn't have this symmetry - either arr[n] would be equivalent to *(arr + n - 1), or *arr might produce a segmentation fault. Yuck.


Now, I'm just using C for syntax, but the same thing happens under-the-hood in just about every modern programming language I've ever heard of (and the ones I haven't) - even in cases like Python where we don't have direct access to the pointer arithmetic which makes it work. Exceptions to the rule usually break the first rule of symmetry I mentioned - in those languages, arr[n] (or similar subscripting syntax) is equivalent to *(arr + n - 1) (or similar dereferencing syntax).


Now, something Python-specific, which is a natural extension of all this, is negative indexes. Did you know in Python that you can use arr[-1] to get the last element of a list? We really have 10 names for a 5-element list in Python:

arr[0]; arr[-5]
arr[1]; arr[-4]
arr[2]; arr[-3]
arr[3]; arr[-2]
arr[4]; arr[-1]

If you know anything about modular arithmetic, this should seem nice to you: each name is congruent mod the length of the list. That is:

-5 % 5 == 0
-4 % 5 == 1
-3 % 5 == 2
-2 % 5 == 3
-1 % 5 == 4

You could also think of it as sticking the elements of the list end-to-end, with 0 in the middle:

-5 -4 -3 -2 -1 [0  1  2  3  4]
 a  b  c  d  e [a  b  c  d  e]

This symmetry is also broken if we have 1-indexed arrays.

I wish I could give you an award. Until then, take this 🎖️

chihiroaokii commented on
i.redd.it/w2k74j...

Ngl as a girl I only kinda started wearing skirts last year and I indeed did the twirly thing and it was nice. But a windy day with a skirt?? Now that thing scares me

chihiroaokii commented on
i.redd.it/u2aqsk...

I can't understand why Stealth is considered a sexy name

chihiroaokii commented on
i.redd.it/pyfz8l...

Honestly this is so well done and adorable

chihiroaokii commented on
i.imgur.com/JmgdjG...

きっとそれが正解

2

[removed]

2
28 comments

What is it like to have a life so good that you’re upset about the race of a fictional character who is also a fictional creature?

see more
Original Poster1 point · 6 days ago

Actually I am not exactly upset over the thing and I do not have that much of a fulfilling life. I'm just sick from seeing this discussion over every social media I'm using.

So your solution is to discuss it more?

Original Poster1 point · 6 days ago

I just wanted to express my opinion. And maybe have some decent discussion rather than a series of ad hominem's.

Load more comments

chihiroaokii commented on
Moderator of r/unpopularopinion, speaking officiallyScore hidden · 6 days ago · Stickied comment · edited 5 days ago

Is this a Popular or Unpopular opinion? Please reply to this comment with either 'popular' or 'unpopular'

Please do not vote on your own submissions.

Current Votes:

PopularUnpopular
1848

unpopular

chihiroaokii commented on
3.9k points · 6 days ago · edited 6 days ago
Silver

Granted. You walk outside and there is your dad, holding a pack of cigarettes. "Dad!" you cry. "I missed you so much! Where were you all this time?"
With a deep sigh, he says "The line at the store was no joke!"
You say "wow, so you were waiting in line all these years?". He answers "the line at the store was no joke."
"ha, yeah dad", you say, "you said that. But I'm so happy to finally see you, you can say it again for all I care".
He dad-jokes like he used to do: "the line at the store was no joke". You laugh and roll your eyes.
"well dad, come in! Take a seat so we can catch up!" you say, as you go back inside. He follows you and sits awkwardly on a kitchen chair, still clutching his pack of cigarettes. "you want something to drink?"
He looks at the table. "The line at the store was no joke"
"y-yes dad. I believe you. No need to keep saying it. I've coffee in the pot, it's still warm I think, you want some?"
In a dry tone, he repeats "the line at the store was no joke".
You start getting worried. What's the matter with him? "Dad?" you say, "are you okay?". You kneel down next to his chair to take a better look at him. You notice the pack of cigarettes in his hand looks weird, as if it's part of his arm.
"the..." your father starts. You look at his face. He looks frightened. "the line. At the store. Was. No. JOKE!" and as he speaks, his eyes start glowing red...

see more

This is actually scary

chihiroaokii commented on

Yes!! After long weeks of obvious NTA posts, I can finally say that YTA with great joy.

29
29
7 comments
Comment removed by moderator6 days ago
Original Poster15 points · 6 days ago

Glad to hear that

3

Total beginner here. I've done no more than to print hello world and add up numbers on python. Recently I've began a desk job at a travel agency. My boss apparently has a problem with getting the data from the booking websites. They are using three different sites to get customers for their cruise tours and they get individual emails when a new customer books a tour but the proccess of adding every new customer manually to an Excel sheet is tiring and more importantly sometimes there are customers that get missed for whatever reason caused by this procedure. Essentially, what I want to achieve is something like this:

Program:

  1. Downloads the data automatically in Excel form from the online booking systems (the sites have the function)

  2. Gathers them in a single Excel file, with separate pages for websites

  3. Sends it to a specified email, at a specified time, everyday, automatically

This seems easy to do, but is it really? How can I, as an eager novice in programming, make this?

3
7 comments
3 points · 6 days ago

Figure out how to do each part independently and then glue them together. How do you download something in Python? How do you manipulate Excel files? How do you email something?

You did a good job breaking it down.

Check out Automate the Boring Stuff With Python.

see more
Original Poster1 point · 6 days ago

Thank you!

What I always do is break it up in pieces and look each piece up.

Like try to look up how to auto download a file

Then look up how to read excel files and just screw around with it till you understand it

Then find the best way to doe your calculations

Then find out how to write to an excel file mess around with it

And then find out how to mail a file

Afterwards you will need some kind of server or pc that is running all the time so you can run the program there

You might want to make a separate program for the timing with maybe a config file so other people don't have to go through your scripts and have that program run your excel program thing

Sorry that I wasn't able to directly help you but I hope this was close enough

P.S. might wanna see if there's something in excel to do this

P.S. 2 fun challenge I'm also pretty new with programming and stuff so I'm gonna try this but it will take a while so don't expect anything from me for a while unless you don't need it straight away

Original Poster1 point · 6 days ago

That actually helps a lot! I couldn't break my project down to smaller pieces due to my lack of knowledge, but this seems like a neater workflow. Thank you! (And I'm not expecting anything from you in any way, but I'd be really glad if you would share your method with me in case you make this)

Load more comments

77

Honestly, as an artist, I'm pretty much annoyed at people who share their artworks EVERYWHERE like 20 different Facebook groups and 5 subreddits and a dozen of Twitter art retweet accounts. But at the end those people seem to be gaining new followers and friends from this. I also want my art to be seen and recognized, but I want to do this without disturbing people. Any ideas about how to do this?

77
23 comments

weeb

u/chihiroaokii
Karma
2,986
Cake day
November 28, 2018

Trophy Case (1)

Verified Email