Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>

gucci void main posted:

crossposting

Hacker News was down all last night. The problem was not due to the new server. In fact the cause was embarrassingly stupid.

On a comment thread, a new user had posted some replies as siblings instead of children. I posted a comment explaining how HN worked. But then I decided to just fix it for him by doing some surgery in the repl. Unfortunately I used the wrong id for one of the comments and created a loop in the comment tree; I caused an item to be its own grandchild. After which, when anyone tried to view the thread, the server would try to generate an infinitely long page. The story in question was on the frontpage, so this happened a lot.

For some reason I didn't check the comments after the surgery to see if they were in the right place. I must have been distracted by something. So I didn't notice anything was wrong till a bit later when the server seemed to be swamped.

When I tailed the logs to see what was going on, the pattern looked a lot like what happens when HN runs short of memory and starts GCing too much. Whether it was that or something else, such problems can usually be fixed by restarting HN. So that's what I did. But first, since I had been writing code that day, I pushed the latest version to the server. As long as I was going to have to restart HN, I might as well get a fresh version.

After I restarted HN, the problem was still there. So I guessed the problem must be due to something in the code I'd written that day, and tried reverting to the previous version, and restarting the server again. But the problem was still there. Then we (because by this point I'd managed to get hold of Nick Sivo, YC's hacker in residence) tried reverting to the version of HN that was on the old server, and that didn't work either. We knew that code had worked fine, so we figured the problem must be with the new server. So we tried to switch back to the old server. I don't know if Nick succeeded, because in the middle of this I gave up and went to bed.

When I woke up this morning, Rtm had HN running on the new server. The bad thread was still there, but it had been pushed off the frontpage by newer stuff. So HN as a whole wasn't dying, but there were still signs something was amiss, e.g. that /threads?id=pg didn't work, because of the comment I made on the thread with the loop in it.

Eventually Rtm noticed that the problem seemed to be related to a certain item id. When I looked at the item on disk I realized what must have happened.

So I did some more surgery in the repl, this time more carefully, and everything seems fine now.

Sorry about that.

Lmao at this Mickey Mouse bullshit

Adbot
ADBOT LOVES YOU

Nomnom Cookie
Aug 30, 2009



The guy wrote viaweb in like 1996 when there were 10 people on the internet, sold it, and retired to a life of talking about how great he is and throwing pennies at geeks. At what point would you expect pg to learn about being careful with production servers? This is a man who thinks that running a repl inside a live server process is a good thing

MononcQc
May 29, 2007

I actually run production REPLs (or their equivalent) from time to time and it can be pretty useful to diagnose poo poo or restart subsystems.

Catalyst-proof
May 11, 2011

better waste some time with you

ultramiraculous posted:

http://forums.laravel.io/viewtopic.php?pid=28718#p28718

I'm now tempted to find out how many levels of Iterators of Iterators you can recursively iterate, but I feel that looking any deeper at this framework will be like looking into the abyss :stare:

quote:

You can create your macros and all your extra ad-hoc library under the application/library folder.
I for instance keep a macros/ folder under library (application/library/macros) and there I save my macros.php file which is not a class.
Since it's not a class you can't autoload it using spl_autoload_register or by adding it to the Autoloader::map(array()); array in your start.php file so you can include your extra library files programmatically by implementing something like this in your start.php file:

In application/start.php I put this:

PHP code:
$path = path('app') . '/library';

$libObjects = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path), RecursiveIteratorIterator::SELF_FIRST);
foreach($libObjects as $file) {
    if ( $file->isFile() )
    {
        require ($file);
    }
}
This way you wont need to include each file manually. Which comes in handy if your library grows steadily as you application grows.

Test it out in a simple test application to get you going. Like f.ex. making a folder containing an index.php file, a lib/ folder and some files unders there, and perhaps yet another folder under lib/ and more files under tat folder. Put this code into your index.php file and try echoing out the filenames by instead of doing require ($file) like in the code example above, you do echo $file, '<br>';

Enjoy.

i'm dead

Notorious b.s.d.
Jan 25, 2003

by Reene

Toady posted:

i thought netbsd was the clean and proper bsd or some poo poo

netbsd is the clean and proper bsd in that it is trapped in 1995, yes. mandatory access control? who needs it

freebsd is unclean and un-bsd because they make a (half-assed, under-funded) attempt to be modern

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
what about porcupoofer bsd

Notorious b.s.d.
Jan 25, 2003

by Reene
i love having a circa-2001 operating system on my circa-1995 sparc though that is awesome



oh wait that is called solaris 8
netbsd is still useless whoops

Notorious b.s.d.
Jan 25, 2003

by Reene

Suspicious Dish posted:

what about porcupoofer bsd

openbsd was founded by people who were not as business-focused or tolerant of change as netbsd core dev team. they fantasize about perfectly secure code because it passes valgrind. in other words it is netbsd minus years of effort


nobody's code is so perfect that it doesn't need mandatory access control. MAC is hard to implement, and unsexy, so they magically don't need it. never mind that every "trusted" unix for govt use and linux and freebsd and nsa poo poo all have it




edit: the openbsd project has produced some cool stuff: openssh, openbgp, pf

it is only their os product that is pure poo poo, mostly because goals/direction/funding are hosed

Notorious b.s.d. fucked around with this message at 06:15 on Feb 19, 2013

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
thanks mr. bsd all i know is that they complained that other people wrote unportable code relying on custom wacko nonsense interfaces saying that we should instead port to their custom wacko nonsense interfaces.

seriously why is strlcpy a thing "yes let's truncate data by default"

less secure than my butthole (which is actually v. secure)

tef
May 30, 2004

-> some l-system crap ->

Notorious b.s.d. posted:

openbsd was founded by people who were not as business-focused or tolerant of change as netbsd core dev team. they fantasize about perfectly secure code because it passes valgrind. in other words it is netbsd minus years of effort

legends tell of openbsd breaking because of a #ifdef NETBSD. don't forget openbsd started because theo didn't play nicely with others.

openbsd sucks because they're too big to admit that they've shipped bugs, and blame their users for having an os that does more than boot.

quote:

edit: the openbsd project has produced some cool stuff: openssh, openbgp, pf

it is only their os product that is pure poo poo, mostly because goals/direction/funding are hosed

the open bsd devs also introduced me to humppa.

tef
May 30, 2004

-> some l-system crap ->

Suspicious Dish posted:

thanks mr. bsd all i know is that they complained that other people wrote unportable code relying on custom wacko nonsense interfaces saying that we should instead port to their custom wacko nonsense interfaces.

they also complained that people were using software under an open source license and not paying for it.

i should did out that defaced openbsd poster again

Toady
Jan 12, 2009

super portable netbsd's installer won't even boot on my leftover dell, but freebsd does

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>
freebsd does what nintendont

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

vapid cutlery posted:

freebsd does what nintendont

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
disclaimer: the opinions expressed in these empty quotes are my own and are not endorsed my employer(s)

cowboy beepboop
Feb 24, 2001

Toady posted:

super portable netbsd's installer won't even boot on my leftover dell, but freebsd does

freebsd owns. can't wait until they sort out pkgng

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord
so I was looking at openbsd's website

http://www.openbsd.org/lyrics.html

w-what is this

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
kill all animes

Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope
one gnu song was not retarded enough! obenbsd will set the world on fire by making a dozen songs about some stupid nerd poo poo nobody cares about.

Progressive JPEG
Feb 19, 2003

those images are the best

Janitor Prime
Jan 22, 2004

PC LOAD LETTER

What da fuck does that mean

Fun Shoe

Progressive JPEG posted:

those images are the best

gangnam reference
Dec 26, 2010

shut up idiot shut up idiot shut up idiot shut up idiot
Join us now and share the software;
You'll be free, hackers, you'll be free.
Join us now and share the software;
You'll be free, hackers, you'll be free.
Hoarders can get piles of money,
That is true, hackers, that is true.
But they cannot help their neighbors;
That's not good, hackers, that's not good.
When we have enough free software
At our call, hackers, at our call,
We'll kick out those dirty licenses
Ever more, hackers, ever more.
Join us now and share the software;
You'll be free, hackers, you'll be free.
Join us now and share the software;
You'll be free, hackers, you'll be free.

Shaggar
Apr 26, 2006
turns out python users are as immature as their language: http://www.theregister.co.uk/2013/02/19/python_versus_veber_trademark/

skeevy achievements
Feb 25, 2008

by merry exmarx

Shaggar posted:

turns out python users are as immature as their language: http://www.theregister.co.uk/2013/02/19/python_versus_veber_trademark/

doesnt all that girl coder drama come mostly from python land

shame, seems like a p good p language

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>

Internaut! posted:

doesnt all that girl coder drama come mostly from python land

shame, seems like a p good p language

How broken are you if it affects whether or not you'll use the language

Opinion Haver
Apr 9, 2007

Progressive JPEG posted:

those images are the best

GameCube
Nov 21, 2006


what the gently caress is going on here

GameCube
Nov 21, 2006

woah never seen imgur gently caress up colors like that
http://www.openbsd.org/images/52song.jpg

Catalyst-proof
May 11, 2011

better waste some time with you

tef posted:

they also complained that people were using software under an open source license and not paying for it.

i should did out that defaced openbsd poster again

did it out

edit: plz

skeevy achievements
Feb 25, 2008

by merry exmarx

vapid cutlery posted:

How broken are you if it affects whether or not you'll use the language

it would be a factor if I were staffing a project

I don't like to be near horrible people, ymmv

vapid cutlery
Apr 17, 2007

php:
<?
"it's george costanza" ?>

Internaut! posted:

it would be a factor if I were staffing a project

I don't like to be near horrible people, ymmv

you staff projects directly from the people who work on python? i really have no idea what point you're trying to make

tef
May 30, 2004

-> some l-system crap ->

Internaut! posted:

doesnt all that girl coder drama come mostly from python land

shame, seems like a p good p language

drama in the sense:

psf/pycon adopted a 'no haters pls' policy. some big name person famous for ruby got butthurt when they thought they would be asked to behave like a human being with respect for other people.

that one?

skeevy achievements
Feb 25, 2008

by merry exmarx
I don't remember the drama details, I kinda gloss over that

just a whole lot of blog posts about girls and (I think) python community

it's not worth rehashing

tef
May 30, 2004

-> some l-system crap ->
my experience of python has been that it has been quite boring for most of the time i've been following the gossip and development. there is python-ideas but you'd have to be a total idiot to go there.

python has a grounding in things outside making web applications, and is used for a couple of things like distributed processing, bioinformatics and numerical simulation, and even cas systems. it has a grounding in academia, with a bunch of stuff trying to do science in it. perl similarly has a grounding in the unix shell, but python has been slowly eating away at the monopoly it once had for gluing larger poo poo together.

now they're old and boring, the communities are older and considerably more dull. i do remember when perl 5 had a lot of zealotry when it was still fashionable, and python was 'disruptive' at one point too.

on the other hand, some languages are less fortunate and suffer more from celebrities and fashion.

hi ruby!

hepatizon
Oct 27, 2010

tef posted:

on the other hand, some languages are less fortunate and suffer more from celebrities and fashion.

hi ruby!

ruby drama is dumb but to what degree does it actually matter?

Jonny 290
May 5, 2005



[ASK] me about OS/2 Warp

hepatizon posted:

ruby drama is dumb but to what degree does it actually matter?

Ruby? not so much

tef
May 30, 2004

-> some l-system crap ->
edit


ruby dramas rarely mean poo poo, occasionally real world issues get thrown in

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde

Werthog 95 posted:


what the gently caress is going on here
if openbsd had gun, linux adoption not happen

Janitor Prime
Jan 22, 2004

PC LOAD LETTER

What da fuck does that mean

Fun Shoe
something went wrong around 9:45 a.m. EST Tuesday during a computer software update on the station. The outpost abruptly lost all communication, voice and command from Houston.

loving software updates

Adbot
ADBOT LOVES YOU

FamDav
Mar 29, 2008
is that the actual openbsd mascot? he looks like he'd unironically say "pull trim" outside of a high school

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply