User talk:Larry

do u know anything about bignum?? maybe vector is not a good idea and linked list is?

I still haven't have a clean implementation that I'm comfortable with, but as far as I know, fixed size arrays (or, fixed small size, with repeated doubling, amortized O(n log n) for the resizing) is the "best" way, but I'm not too sure about it, and I don't have anything that requires BigNum on a high ranklist.. so no clue.. Larry 22:23, 18 Jan 2005 (EST)

Hmm... well, arrays dont work well because i find it hard to manage (create/deallocation/passing as param). I mean, is there any advantage for accessing the middle of the array(vector) against a list? so far, all i am doing is looping from one end to another, so vectors provide no advantage... (it is disadvantaged right now because it could only push_back efficiently, there is no push_front : --Jack 23:06, 18 Jan 2005 (EST)

Just because you find it hard to manage doesn't mean it doesn't work well.. =P

I think it's perfectly fine, if you know what you're doing. It optimizes over vector. It shouldn't be too difficult.. but if you're only comparing vector vs linked list, there's probably not much difference, as most of the function you use will probably need the entire list anyhow.. it's up to you.

(Arrays also have the benefit of excellent locality...) Larry 23:28, 18 Jan 2005 (EST)

arrays
correct me if i am wrong, but you cant use a map/set or most other STL containers with an array of integers, but you could use a vector or list

why do you need STL in BigNum?

Also, I'm talking about wrapping the array in a class (or struct), so I don't mean a naked array, which you can still use STL on.. Larry 09:26, 19 Jan 2005 (EST)

I see... well, one of the points of this was to cut down the code, which the is doing nicely to me for trade offs in time. I dont really need STL, but a problem may be such that using STL will make things easier. --Jack 10:37, 19 Jan 2005 (EST)

qn 10831
Hello, can you make your gotcha part clearer? I have no idea what are you trying to say there.

This probably belongs on the problem (UVa 10831.. though I didn't write the writeup, so not sure. I only had a special case when a is 0. Larry 14:10, 15 Aug 2005 (EDT)

Oops I am so sorry. I was under the impression that the write up was done by you. Great site, btwroticv

TCO 2005
Nice job in the TCO. --Rrenaud 19:01, 25 Aug 2005 (EDT)

It's too early.. =P (but thanks)Larry 09:15, 26 Aug 2005 (EDT)

SPAM
Hi, is it possible to delete the accounts that the spam bots used and maybe add some simple algebra equation asking the user to solve before registration. The spam is kinda irritating. --Roticv 07:15, 13 Dec 2005 (EST)


 * In fact, the spam I saw today on Talk: Main Page was the worst ever, because it replaced the entire page with spam links. (The earlier ones weren't even visible). The spam bots probably register new accounts each time, so deleting the accounts will not help. Either the registration page must ask them to "type what you see in the image into the box below" or the algebra equation as you suggested. I also read somewhere that wiki admins can decide to block all bots unless specifically authorized; but I don't know if it applies here. How does Wikipedia deal with this problem?


 * Ok, I looked on the net, and found some promising approaches:


 * 1) From, this: "But the most effective is a relatively recent addition that relies on the greed of the cropduster: any page which contains more than ten additional external links is rejected. Only a handful of existing pages contain such a number of external links in total, so any attempt to add such a number of links all at once is very suspect"
 * 2) From a Slashdot Interview with the Wikipedia guy, this: Sure, I think it's pretty simple to solve problems like that. One of the first tricks I would try is to parse the wiki text that someone inputs to see if it contains an external link. If so, then only in those cases, require an answer to a captcha. Second step, keep editing wide open for everyone, but restrict the ability to post external links to people who are trusted by that community. Make it really easy for trusted users to extend the zone of trust, because you want to encourage participation.
 * 3) Lots of stuff at http://c2.com/cgi/wiki?WikiSpam    --Aboyner 06:39, 16 Dec 2005 (EST)


 * Ya, I've been doing some research too. I'll look into it.  By the way, use the "rollback" function, it's a lot easier.. =)
 * Larry 09:35, 16 Dec 2005 (EST)


 * The "rollback" function? What? Where? I must be blind. (Or maybe only you admins can see it?) Aboyner 14:23, 16 Dec 2005 (EST)

The spam is getting really severe; they're even creating new pages now.... Won't the spammers go away if you just add "rel=nofollow" (or whatever it is) to all the links automatically? Otherwise, you'll have to restrict external links, or disallow pages that have "Cialis" mentioned in them :) --Aboyner 04:48, 13 Feb 2006 (EST)

I'm looking into adding captcha.. I've been quite busy, and my familiarity with php (and how this system is implemented) is not as good right now..


 * I have a feeling that the spamming may be done by real people, not bots; so captcha may not really help. http://meta.wikimedia.org/wiki/Anti-spam_Features seems to lead to some helpful stuff.

Preventing Spam
Oh, come on! Setting the value of a variable '$wgSpamRegex' can't be that hard!

Give me the string and I'll add it.. I was thinking along the lines of upgrading the system, which is trivial.. unless you don't want any mistakes! The server houses some other stuff, so it can't afford to be down, and I have to minimize the risk of that happening! Larry 10:09, 21 Mar 2006 (EST)


 * Oh, I understand now that upgrading is risky... Anyway, here's a try (from this page) --

They also say that in older versions it was called $wgSpamBlacklist and that it should be placed in LocalSettings.php Of course, it will probably need to get more and more complex as spammers find new workarounds, but at least it's a start. --Aboyner 10:56, 21 Mar 2006 (EST)


 * This is done. Larry 19:17, 21 Mar 2006 (EST)


 * Did you test it, did it work? I see there is new spam this morning. --Rrenaud 08:30, 22 Mar 2006 (EST)


 * Well, I can't even edit this page without it telling me the spam filter is filtering it.. I'll have to find a better regex, but it seems to work, as it seems that the spammer had to keep trying new things to get it to work.. Larry 11:07, 22 Mar 2006 (EST)


 * Thanks! That was quick! --Aboyner 10:42, 23 Mar 2006 (EST)


 * I haven't been as active lately (many projects) but trivial things are trivial things, thank you for the regex! Larry 14:02, 24 Mar 2006 (EST)

A comment on Live Archive's pages
Hi, I think there's some ambiguity in the naming convention of pages, discussing Live Archive's problems.

A recently added page is titled just LA - The Euclidian Clock. But it's actually impossible to say from the page, which Live Archive's problem it discusses (and so it's impossible, without e.g. google, to decide how to submit one's solution to LA, get rankings, etc.)

Moreover, some problems may share the same title (like, I've already seen quite a few "Sudoku"'s in recent regionals ;) )

I suggest to use naming "LA problem_number", which is similar to already established "UVa problem_number". Also, a link of the form http://acmicpc-live-archive.uva.es/nuevoportal/data/problem.php?p=XXXX on the pages would be quite helpful.

By the way, why don't you like posting source code for LA's problems? (you've commented out solution on LA 3288)

Sweepline 17:26, 13 Dec 2005 (EST)

Only until I find a better way to present it - Larry 17:36, 13 Dec 2005 (EST)

Posting source code for problems allows (I might even say encourages) people to copy and paste the solution directly into the online judge. Implementing a solution, even from pseudocode, actually teaches something in the process. Hubert 07:21, 14 Dec 2005 (EST)

Well, people who wants to learn will learn, and people who doesn't want to learn won't learn.. it doesn't bother me either way, per se, which way.

Of course, we should decide this democratically, and it just happens that back when I was a newbie, reading actual code (for all the corner cases, and figuring out DP, and all that) from Topcoder was more helpful than the usual textbook pseudo-code. Then again, I know theory better than I can implement it most of the time, so seeing things done concisely was also very attractive.

And of course, that doesn't always work for everybody. Larry 07:52, 14 Dec 2005 (EST)

I suppose it really depends on your point of view, and what you see Algorithmist's mission as being. I see it as an educational tool, and I find that posting non-trivial code snippets -- especially those that work, verbatim -- is detrimental to that. Kind of the "give a man a fish" situation... I find that I learned more, especially as a beginner, by implementing stuff than by scanning others' code. But whatever works, I suppose :) Hubert 08:29, 14 Dec 2005 (EST)

I am also against posting code in problem writeups. If you want to post code for general algorithms pages, I think that's fine (though I'd still prefer psuedocode). In problem writeups, however, it just seems lazy. --Rrenaud 08:45, 14 Dec 2005 (EST)

I still learn from source code nowadays.. it's amazing how concise and precise people get their code to, and the type of shortcuts and tricks in implementation is insane!

That said, if there is going to be source code, at the very least, it'll require another click. Larry 08:54, 14 Dec 2005 (EST)

Well, my opinion is that posting accepted code can primarily help people, who are getting WA's at online judge. They could generate some I/O on their own, compare with WA output, find mistakes, etc. Right now, people just post code on UVa's forum, and hope that someday someone will debug it, (which happens quite rarely -- there are tons of unanswered posts like "I got WA, help...")

Also, write-ups may leave some details of the algorithm unclear, and providing source code should (at least partially) resolve this.

As for cheaters, -- well, the whole point of solving problems at OJ is to learn algorithms, develop problem-solving abilities, etc; by submit someone else's code, they don't learn anything, and are basically wasting their own time. Why should we care? Sweepline 11:13, 14 Dec 2005 (EST)

That's basically my philosophy..

I removed it (or commented it out) so that it'll be more systematic, and also more on the bookkeeping side, that we can have multiple solutions by multiple people..Larry 11:47, 14 Dec 2005 (EST)

By the way, I just realized I didn't answer one of Sweepline's questions.. but ya, I've been busy lately, but I intend to restructure the entire LA branch so that the naming and linking will be consistent. Larry 12:00, 14 Dec 2005 (EST)

But it's not always "they're wasting their own time, so whatever". From what I've seen on the UVA forums, some professors assign their students problems at acm.uva.es to solve for homework! In that sense, providing source code for the problems they need to solve is akin to writing a pre-done essay for SparkNotes or something. Hubert 12:54, 14 Dec 2005 (EST)

I had a russian fellow emailing me and requesting for my source to help him out. I was like feeling wth. If people chose computer science as their course, they should at least put in some effort and code and solve the problems their professor gave.--Roticv 14:00, 17 Dec 2005 (EST)