Skip to content

u/skoh

In this archive from Aug 2008 to Jan 2014

13
posts
72
comments
3
media
649
score

is it because I am copying it from an ext4 to an ntfs drive?

This is probably it. Read up on filesystem block sizes. Five files with a total size difference of 3656 bytes means you've got an average of 731.2 slack bytes per file, which is totally reasonable.

You can always check with

diff file_on_first_drive file_on_second_drive

I would bet that you're not losing any data, just noticing differences between filesystems.

2 points

you could objectively argue that the statement "if (foo() == 6)" still universally makes more sense

I don't think you could. I do agree that foo() == 6 makes more sense, and I also think that most people in the maths and computer science fields agree, but I think that trend is a learned one, not some all-encompassing truth of the universe. If someone was brought up typing 6 == foo() they probably have the opposite opinion, and that's fine. Maybe they've internalized it as "If 6 is what comes out of foo()" or something like that.

Don't get me wrong, standardization in programming is very important and if everyone agreed on one method we'd probably all have a better time. But I think it's important to recognize the difference between a standard and a universal law.

8 points

Things to check:

  • Does the command have to be run as root? If so, are you remembering to add it to root's crontab ('sudo crontab -e') instead of your user account's?

  • Does running the command outside of cron (exactly as it appears in cron) work? You can try killing X then starting the daemon, then starting X again (usually startx I think).

  • Is the process actually running? Use 'ps -e | grep gnome' to check.

2 points

Constant dereferencing will be nice for things like

$url = "http://google.com/";
$protocol = explode("://", $url)[0];

And it'll be even more fun when using regex matching with preg_match() and friends.

5 points

Ubuntu is a distribution of Linux. Software isn't typically written specifically for Ubuntu, or for Fedora, or for any one distribution. It's written for Linux. Even though Valve uses Ubuntu for testing and it's what they're aiming for perfect performance on, the same code will run on anything Linux.

So we don't really talk about software being developed for Ubuntu, and we don't really compare Ubuntu to Windows or Mac -- we use the more general term, Linux, because being more specific than that is only a matter of taste.

tldr: It means JAJAY797 should replace all instances of the word 'Ubuntu' with 'Linux'

3 points

The file is not actually from 1969.

Unix timestamps define a date/time as the number of seconds since 00:00:00 (midnight) on January 1, 1970 (UTC). It gives a value that's easy to store because it's just one number and not one for year, one for month, date, hour, etc.

When a file is corrupted or incorrect it can have a timestamp of simply 0, which then gets adjusted for your time zone and so can be thrown back an additional day to December 31, 1969.

33 points

I would just like to +1 exceptions. It's best to kind of just make the entire application with exceptions in mind, extending and throwing and catching them in all the right places. It's awesome to be able to fail so gracefully.

1 points

I do too, but I wouldn't be okay with it. It's misleading. I believe in high-level programming, but to me that's crossing a line.

Also, there's a lot of functionality missing here if you actually want to make people feel like they're being OO. We're talking subclassing, magic methods, new, overloading -- missing OO functionality that can't be implemented for "pretend objects".

I understand the appeal of what you're asking for in your original post, but the "full OOP" concept is way more than a bullet point in a minor release's patch notes. You have to build the language around this stuff, like Java, and that comes with a whole set of other problems.

2 points

Considering the current state of PHP, the most realistic (albeit messy) option to accomplish this sort of syntax would be to just alias arrow syntax on non-objects to the correct function call. It'd have to be on a per-function basis, because there's not much convention for argument order in PHP (e.g. "hello world"->substr(6) should alias to substr("hello world", 6) while "hello world"->str_replace("hello", "goodbye") should alias to str_replace("hello", "goodbye", "hello world")).

Really though, it's just syntactical at that point. And though, yes, the syntax is nice, what we really want is the OO design the syntax represents, and PHP is just too far along to turn around and implement that sort of thing with a single major release.

6 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.