|
Cybernetic Vermin posted:the funny part about Haskell is that normal people quickly get the gut feel that the monad poo poo is a stupid spergy invention, but are then shown that category theory is a real mathematical field and are persuaded that there is something to it Your mistake is assuming Haskell has anything more to do with category theory than any other language. Haskell programmers just feel smug that they noticed that one of their constructs can be described with category theory. Everything can be described with category theory.
|
# ? Feb 18, 2013 12:27 |
|
|
# ? Jun 8, 2024 07:38 |
|
Zombywuf posted:Your mistake is assuming Haskell has anything more to do with category theory than any other language. Haskell programmers just feel smug that they noticed that one of their constructs can be described with category theory. Everything can be described with category theory. you are just restating what I was saying, category theory is stupid, among other things because it is overly general to the point where it doesn't allow anything of interest to be gainfully expressed haskell suffers from a similar problem of similar origins, with complex language features to enable things to be expressed in a weird way for no appreciable gain
|
# ? Feb 18, 2013 12:43 |
|
Cybernetic Vermin posted:you are just restating what I was saying, category theory is stupid, among other things because it is overly general to the point where it doesn't allow anything of interest to be gainfully expressed Natural transformations. Not interesting. Got it.
|
# ? Feb 18, 2013 14:18 |
|
Zombywuf posted:Natural transformations. Not interesting. Got it. right, happy you have learned something.
|
# ? Feb 18, 2013 14:30 |
|
my dilz + your mouth = suck it got your natural transformation right here bitch
|
# ? Feb 18, 2013 15:56 |
|
Nomnom Cookie posted:my dilz + your mouth = suck it You're gonna transform into an anime fox and run right out of this thread.
|
# ? Feb 18, 2013 16:21 |
|
amine aminal
|
# ? Feb 18, 2013 18:10 |
|
Cybernetic Vermin posted:you are just restating what I was saying, category theory is stupid, among other things because it is overly general to the point where it doesn't allow anything of interest to be gainfully expressed lol
|
# ? Feb 18, 2013 18:13 |
|
Cybernetic Vermin posted:you are just restating what I was saying, category theory is stupid, among other things because it is overly general to the point where it doesn't allow anything of interest to be gainfully expressed man i hate how this mathematical framework is so generic and abstract
|
# ? Feb 18, 2013 19:21 |
|
graph theory??? when the hell am i going to need this stuff, it's just things connected to things
|
# ? Feb 18, 2013 19:31 |
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.
|
|
# ? Feb 18, 2013 19:33 |
|
quote:Sorry about that. web 2.0.
|
# ? Feb 18, 2013 19:34 |
|
gucci void main posted:crossposting gahahaha
|
# ? Feb 18, 2013 19:36 |
|
gucci void main posted: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. As a perfect programmer who has never done something like this to prod I hereby mock hacker news for this.
|
# ? Feb 18, 2013 19:38 |
quote:I use assertions to protect against things like this. quote:Happens to a lot of us. Great reason to always write tested cleanup scripts for this stuff instead of editing directly on the server. The only time I brought down my product last year was from a similar screwup, I was removing users by hand and somehow managed to end up with a 0 in my list of user ids, thus deleting the anonymous user, and causing havoc to my server, which took a long time to track down. quote:I'm not sure whether it's terrifying or relieving to realize that if all I dream of comes to pass and I achieve something akin to the legendary status of pg in the hacker community that I will still be susceptible to the inevitable facepalm moments that come with direct database access.
|
|
# ? Feb 18, 2013 19:41 |
|
Zombywuf posted:As a perfect programmer who has never done something like this to prod I hereby mock hacker news for this. maybe they should just have a max comment depth once you get to 5 layers deep or so its just some retarded flamewar at that point anyway
|
# ? Feb 18, 2013 19:46 |
|
Progressive JPEG posted:a p interesting problem tbh Or use a db tree schema that can't create loops.
|
# ? Feb 18, 2013 19:46 |
|
store the depth in the comment, ensure that the parent of each comment has depth n-1, if this is ever untrue then bail seems pretty simple to me
|
# ? Feb 18, 2013 19:53 |
|
yaoi prophet posted:graph theory??? when the hell am i going to need this stuff, it's just things connected to things this is the stupidest comparison ever on the internet
|
# ? Feb 18, 2013 19:53 |
|
Just make a tree algorithm specification macro library.
|
# ? Feb 18, 2013 19:54 |
|
comment trees are horrific.
|
# ? Feb 18, 2013 19:56 |
Shaggar posted:comment trees are horrific. shaggar was right
|
|
# ? Feb 18, 2013 19:58 |
|
Zombywuf posted:As a perfect programmer who has never done something like this to prod I hereby mock hacker news for this. THINGS ZOMBYWUF ACTUALLY BELIEVES
|
# ? Feb 18, 2013 21:39 |
|
oh we're making fun of it here?gucci void main posted:On a comment thread, a new user had posted some replies as siblings instead of children. I posted a comment explaining how HN worked. Our commenting is so broken we need to mentor users to understand how to use it. quote: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 thread was on the frontpage, so this happened a lot. To make up for our bad interface, I edited the database in production. quote: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. I didn't check to see if what I did fixed it. quote: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. When HN started breaking after my edits, I decided to replace it with a new untested copy, instead of finding out what was wrong. Most of the time when it breaks I just restart it manually. quote: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 an old 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. At this point, none of us looked at the page in question which was generating a lot of cpu usage. What we did do was just try and make the problem go away by trying different earlier versions. The ones that usually just eat up cpu and hang on gc, so nothing changed. I gave up and went to bed. It never occurred to us that if the comment store was corrupt, all the code we had would break. quote: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, the problem went away on its own. People stopped reading the broken page, but when I finally looked at HN, I could see something was wrong. quote: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. Someone else eventually put 2+2 together, either through inspecting logging, or tracing code, or debugging, rather than throwing a bunch of versions against deployment until one of them worked, and told me what the problem was. quote:So I did some more surgery in the repl, this time more carefully, and everything seems fine now. After finding out that my code didn't handle loops, I edited the database to eliminate the loops. I don't think having a hard thread depth, or checking for loops in code would be worth my effort. quote:Sorry about that. I have learned nothing from this experience.
|
# ? Feb 18, 2013 21:40 |
|
a prime example of why you shouldn't edit things in production if you are a huge scrub
|
# ? Feb 18, 2013 22:10 |
|
every couple of months i decide i'm going to learn some poo poo-rear end fancy php framework and then i become completely disgusted with it within two hours this month it's laravel, which, like every other goddamn php framework, insists you use routing to break how urls work. instead of having a one to one correspondence between urls and scripts, you should totally use this ugly-rear end bundle of mod_rewrite rules. and you can pass in data that way too instead of that mean old query string! nobody ever needs to pass more than two or three parameters! other laravel features include, like every other goddamn php framework, a templating language that provides no advantages over PHP other than being probably about 10x slower
|
# ? Feb 18, 2013 22:16 |
|
why the gently caress does everyone want to write a templating language in a templating language
|
# ? Feb 18, 2013 22:17 |
|
this framework has a terrible case of the rails. even in its comments it describes itself as "beautiful" and "wonderful" every other sentence
|
# ? Feb 18, 2013 22:19 |
|
poo poo laravel might be pretty awesome then
|
# ? Feb 18, 2013 22:20 |
|
the tagline is "a framework for web artisans"
|
# ? Feb 18, 2013 22:22 |
|
one of the most active threads on their "best practices" subforum is how to set a navigation element to an "active" state when you're on a certain page. is this what web frameworks are for? taking really simple poo poo like that and using 200 mb of architecture to turn it into an enormous clusterfuck? the most recently posted solution involves a thing called a RecursiveIteratorIterator. three of them actually
|
# ? Feb 18, 2013 22:24 |
|
Tiny Bug Child posted:every couple of months i decide i'm going to learn some poo poo-rear end fancy php framework and then i become completely disgusted with it within two hours it's called "laravel" because eventually larval programmers will grow up and change forms into someone mature that doesn't use php
|
# ? Feb 18, 2013 22:26 |
|
Cocoa Crispies posted:it's called "laravel" because eventually larval programmers will grow up and change forms into someone mature that doesn't use php
|
# ? Feb 18, 2013 22:27 |
|
Tiny Bug Child posted:one of the most active threads on their "best practices" subforum is how to set a navigation element to an "active" state when you're on a certain page. is this what web frameworks are for? taking really simple poo poo like that and using 200 mb of architecture to turn it into an enormous clusterfuck? link
|
# ? Feb 18, 2013 22:32 |
|
had a week-long period where I had to get up every morning to insert a replacement stored procedure into a production database by pasting a specially crafted url into an internet explorer instance before business open. couldn't just log in and patch it properly since there was a release procedure to comply with first.
|
# ? Feb 18, 2013 22:37 |
|
Tiny Bug Child posted:why the gently caress does everyone want to write a templating language in a templating language i ask myself this a lot
|
# ? Feb 19, 2013 00:58 |
|
Cybernetic Vermin posted:had a week-long period where I had to get up every morning to insert a replacement stored procedure into a production database by pasting a specially crafted url into an internet explorer instance before business open.
|
# ? Feb 19, 2013 01:02 |
|
Cybernetic Vermin posted:had a week-long period where I had to get up every morning to insert a replacement stored procedure into a production database by pasting a specially crafted url into an internet explorer instance before business open. i.e subverting release practices happens when it's easier than following them
|
# ? Feb 19, 2013 01:04 |
|
tef posted:i.e subverting release practices happens when it's easier than following them i love it when my "clients" view me as an obstacle at best
|
# ? Feb 19, 2013 01:21 |
|
|
# ? Jun 8, 2024 07:38 |
|
horse mans posted:link 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
|
# ? Feb 19, 2013 02:54 |