« first day (933 days earlier)      last day (3076 days later) » 

7:03 PM
@SimonForsberg @Phrancis @skiwi is CardShifter turing-complete?
> Magic is a card game. Apparently, the rules are complex enough to reach Turing-completeness.
 
The thing I hate most about XQuery is you can never tell with good certainty whether the query is borked, or if it works but there's just no data, when you're not getting results back.
 
@Mat'sMug Well... with effects you can create...
........WHY?
 
You should try Code ReviewJose M 59 secs ago
 
@skiwi That's pretty cool!
 
@chris85, yes this was causing my issue. Thanks for acting as a Code Reviewer (even though that isn't the point of this site, necessarily...apologies). I am aware of the issues with sql injections, and will be able to work through that. Thanks again — kmancusi 22 secs ago
@JoseM when their code gets to work as expected, yes. Otherwise it's "broken code" and is off-topic / not ready for code review. — Mat's Mug 34 secs ago
 
7:08 PM
@Phrancis That's pretty sick
 
I'm using a "hill climbing" approach, which doesn't have anything to do with the algorithms listed there. @Joran — ajfbiw.s 47 secs ago
lol, and it didn't occur to you that perhaps using one of the known-to-work approaches might solve your problem?
Hill climbing is not guaranteed to find the global maximum, so it getting stuck somewhere is not surprising. — interjay 40 secs ago
SO is funny
 
@Mat'sMug Why use something that already works when you can roll your own...?
 
Why.... ...nevermind. ;-)
 
Hmm, this big effing mess I was dealing with last week... we found the issue finally today... anyone take a wild guess?
 
@Phrancis DBA guy has a flask of whiskey in their drawer?
 
7:16 PM
If only, lol. It's worse than that... END-USER ERROR!
 
@Mat'sMug maybe not yet, but hopefully it will be one day. (and yes, I have read that article about Magic being turing complete)
 
41
A: Is there anything that can be done with recursion that can't be done with loops?

MichaelTNo. Getting down to the very basics of the necessary minimums in order to compute, you just need to be able to loop. It doesn't matter how. Any programming language that can implement a Turing Machine, is called Turing complete. And there are lots of languages that are turing complete. My fav...

Did you just read that...?
 
yup
 
@Mat'sMug Did you see the latest edit on that question?
 
which question?
 
7:29 PM
0
Q: N-Queen in Python

ajfbiw.sN-Queen Code removed by OP. Thanks.

 
wow, bravo
 
Yep. He probably doesn't realize that edits track history.
 
lol
 
kinda reminds me of a tweet I just did:
There is one thing that is more fun than writing code: Removing it. #refactoring #programming
 
I would not have rolled that back @Mat'sMug. It's going to end up in the queue now.
 
7:31 PM
@Duga didn't pick that one up, or did I miss that?
 
@EBrown it was already in the queue
 
Oh, nevermind then.
(I never check the queue's.)
 
me neither
but OP edited it after it was closed
If you want to delete your post, delete it, don't vandalize it. — Mat's Mug 1 min ago
 
@skiwi That answer is golden
0
A: Is there anything that can be done with recursion that can't be done with loops?

sixtyfootersdudeYes. You cannot generate StackOverflowErrors (in Java) or StackOverflowExceptions (in .Net) using loops. Try to write this method using a loop instead of recursion: public void createStackOverflow(){ createStackOverflow(); }

 
for (;;) { throw new StackOverFlowException(); }
2
 
7:34 PM
Hm. I'm not proud of this, but I need to perform full text search on an XML column. :|
 
while (true) { /* do nothing */ } Done! — Simon Forsberg 13 secs ago
 
@SimonForsberg that won't throw a SOE, would it?
 
@Mat'sMug nope... won't..
iterative
 
I thought @SimonForsberg would have known better...
lol
@SimonForsberg - See the method name. — sixtyfootersdude 49 secs ago
 
StackOverflowExceptions can't be caused by loops...
 
7:37 PM
So many bad answers on that Q
 
I don¨t consider "throw a Stack Overflow Error" as "a task that can be done". I only consider meaningful tasks, something that you actually want to accomplish. — Simon Forsberg 24 secs ago
 
@SimonForsberg Agreed ^^
 
completely
upcoming CR: is this the most idiomatic way to throw a StackOverflowException in C#?
3
 
My first downvote on a Programmers answer, there's a first time for everything I see.
@Mat'sMug Can we UWYA nuke it if it ever comes up? That's just plain silly.
 
7:40 PM
@Mast I don't see why it would come up
 
@Mast But it wouldn't be UWYA.
 
UWYA?
 
@EBrown In some way, it is.
 
It would, by definition, be very CWYA.
@Mat'sMug Unclear What Your Asking
 
There is no reason why you'd want it, so lack of context by definition.
 
7:41 PM
ah, duh
 
@Mast Not at all. It would be broken code, though.
 
for (int i = 0; i < 999999999; i++)
{
	unsafe
	{
		int* block = stackalloc int[100];
	}
}
COME
AGAIN
 
@JeroenVannevel clever
 
@EBrown No, it's doing exactly what it's supposed to ^^
 
Are you using netty (or NIO directly?) Can't really say much about the code front without having some idea of what it looks like - may be you can post on codereview to see if there can be some improvements. This kind of scaling doesn't really work well with tcp - like I said, after a point, you have to look at hardware messaging brokers. — Nim 57 secs ago
 
7:42 PM
@Mast Well what it's doing is a stupid task, so perhaps we would need a custom close reason for it.
 
@EBrown fizzbuzz is also stupid, should we have a custom close reason for it?
(not really asking)
 
@Mat'sMug FizzBuzz is not stupid. It has a defined purpose.
But the "most effective way to throw a StackOverflowException" is stupid.
 
yeah, being an excuse to write some LOLCODE
 
I love how we can argue about something that's not even an issue yet ^^
3
Premature close reasoning?
 
@skiwi It's called proactive closing.
 
7:43 PM
@skiwi It seems to be a recurrent problem here.
 
that ^^
 
Can you VTC your own question?
 
@EBrown Yup I think
It's weird but eh, why not :p
 
I could even hammer my own question.
5
 
7:45 PM
@SimonForsberg Lol
 
Can you hammer one of mine, that is ever so clearly broken?
 
250 view close votes View and cast close/reopen votes on your own questions
it's even a lower priv-level to close your own questions
 
@SimonForsberg "With lower powers come lower responsibilities"
2
 
@EBrown If it deserves to be hammered, I think I'll be able to nail it.
3
 
@EBrown This could be a great meta, but I'm not sure how the rest would think about it.
 
7:47 PM
@SimonForsberg Well I discovered that one of my questions contained really broken code a couple days ago, and the question is quite old.
 
@EBrown show me
 
@SimonForsberg That's badge worthy IMO
 
It's 2 months old.
 
or flag it
 
8
Q: Replacement string Base64 (and a Base32) conversion

EBrownThis provides (my own) implementation of ToBase64String and FromBase64String (since the .NET implementations suck), and a ToBase32String (since .NET hasn't one). /// <summary> /// Provides extensions to convert certain objects to certain other objects. /// </summary> public static class StringHe...

That code is really broken.
And no one noticed.
 
7:47 PM
@Mast or at least hat-worthy
@EBrown Not even you. Therefore, it's not off-topic.
 
Oh, alright then.
 
post a self-answer and point out the brokeness instead perhaps?
 
I can definitely do that. Fixed it a few days ago (when I noticed it).
 
our help center asks:
> To the best of my knowledge, does the code work as intended?
not this:
 
The problem is I never tested it...lol
 
7:49 PM
> Are you absolutely bloody sure that your code works?
@EBrown not even a little bit?
 
No...which is why I thought it was close-worthy.
The logic was sound, so I assumed it worked.
 
Congratulations, you just earned yourself a down-vote.
3
 
As it turned out, it did not.
LOL
 
I won't personally hammer it, but if you ask nicely, maybe @Mat'sMug will.
2
 
I submitted a custom close reason on it.
 
7:52 PM
-1
Q: filter the column of html table

shobhaI am also trying to create the table like yours and it is working nicely , but now I am trying to filter the column for example: filter the column surname="Sharma" . so could you please help me hpw to do that, as I am just the beginner for javascript and jquery. Any help would be appreciated. Th...

 
Now it's time for me to post the working code.
 
@EBrown am I sensing a follow-up?
 
@SimonForsberg Yes. With Unit Tests!
 
@EBrown ok then, hammered.
 
Thank you, sir. :)
 
7:56 PM
Always test your code before putting it up for review.
 
Yeah, that one's my bad. I do apologize for it.
It was well before I was comfortable with Unit Tests.
 
Well, I guess you did test in practice?
 
I tested it a few days ago with my AES encryptor/decryptor, and the encoding and decoding of the Base64 was completely broken.
 
this is better suited for codereview.stackexchange.comOMGtechy 6 secs ago
 
New question (with working code) posted.
 
Zak
8:04 PM
 
1 hour ago, by Mat's Mug
@SimonForsberg @Phrancis @skiwi is CardShifter turing-complete?
 
codereview.stackexchange.com is maybe a better place to ask — JFPicard 27 secs ago
 
Zak
Pokemon Yellow is Turing-complete? Yet another reason why it's my favourite pokemon game ever.
 
0
Q: Checking if a user can withdraw money

Tiernan WatsonThis is purely testing my skills; I am not actually coding for a bank. This is part of a bank account class. public void withDraw(double amount) { if(balance - amount >= odLimit) { balance -= amount; } else { Console.WriteLine(...

0
Q: Another Base64 conversion

EBrownAfter finding out that my code in this question was severely broken (my apologies to all involved), I fixed it up and would like to get a review of the (now working) code. (With unit tests!) Essentially, it's supposed to be an alternative to the basic Base64 encoding in .NET. It supports multipl...

 
0
Q: Should we have an [encoding] tag?

EBrownI was writing up a question and I found there is no encoding. Upon further investigation, there are 486 questions at the time of this writing with the term "encoding" within them, and I'm sure more than one of them would be applicable to the tag. Should we create the tag, and if so, who should g...

 
8:15 PM
lol, look at the OP and the editor here: stackoverflow.com/q/33879655/1188513
 
Lol
 
0
Q: Using contents of an integer array to print a String

t.h.hI have written this code that takes input from a file and creates an output file that reports each person's name, percentage of 'B' answers, and personality. However, the my computePersonality method, which takes the contents of an integer array and converts it into a string of 4 letters based on...

 
Zak
'night people
 
Bye @Zak
 
0
Q: Stack implementation (Move semantics)

DeiDeiI have implemented a basic stack just for fun. I've just started learning about move constructors and assignment and move semantics as a whole, so I would really appreciate some feedback as to whether I've done it right, and if not, some tips as to how I should do it would be most welcome! I'm ...

 
8:30 PM
Maybe go to the Code Review side of SO? codereview.stackexchange.comVictor Nitu 37 secs ago
 
Zak
@Duga Oh, so we're a sub-division of SO now? </sarcasm>
 
@Zak The Elite Task Force
 
Zak
@Duga Also pretty sure that's example/hypothetical
Anyway, to bed, for real this time.
 
hacking away at streams with beginner level programming assignments is fun
count the number of words and print them to console
 
Why are you doing beginner-level assignments, @Vogel612?
 
8:45 PM
@EBrown university stuff
 
Ah, you are taking a class then, I take it?
 
I'm currently an undergrad CS major
since september that is
 
Can't you test out of the beginner level classes?
 
nope I got mandatory hand-ins
 
That's a bummer.
 
8:47 PM
but 12 lines for a whole assignment of that scale is funny
 
That's laughable.
 
that includes: Opening and reading a file, counting the words and placing them in a Map and then outputting, as well as Exception "handling"
 
Does "handling" mean "swallowing" in this case?
 
default-catch block as in ex.printStackTrace
 
Ah.
 
8:51 PM
0
Q: Does the [converting] tag provide any value?

200_successThere are 269 questions tagged with converting. Some of the recent ones include base64 datetime formats roman-numerals and numbers-to-words (basically redundant) number bases temperature and other measurement unit scales hex string to byte array to/from HTML transliterating Japanese brainfuck ...

 
@EBrown Thanks for prodding me to ask a related question.
 
@200_success No problem, though I feel as though the answer to your question is the same as mine.
 
This question belongs on codereview.stackexchange.com because it is about how to write working code differently. — Mathletics 45 secs ago
 
@StackExchange grab the pitchforks and torches, we're hunting a tag
especially the torches I'd say
 
> brainfuck transpiler
That just sounds horrible.
 
8:54 PM
I faintly remember that thing... transpiling brainfuck to java...
 
codereview.stackexchange.com/questions/51664/… <- I had just written a nicer title to that, but maybe it is off-topic as the author states: "None of the code is relevant"
@Vogel612 to C is more efficient
 
@Vogel612 I wrote a BF transpiler to C#.
 
5
Q: Brainfuck to Java converter

TheCoffeeCupSimilar to the previous post Brainfuck Interpreter: Slower than a Snail?, it runs BF in java. The only difference is that the converter will convert the BF code into a compilable and fairly readable Java code, and run it. Example: BF code: ++++++++++[>++++++++++<-]> Initialize 100 (number of ...

 
@Vogel612 "the converter will convert the BF code into a compilable and fairly readable Java code" -> proceeds to generate a 1124 line program for Fizz-Buzz, readable is a big word....
3
 
@Caridorc I wrote one that does similar things.
11
Q: Interpreting Brainfuck code to C#, then compiling to a .exe

EBrownThis is a C# programme to convert Brainfuck to C#, then convert that C# to a .exe. So basically, it's a Brainfuck to Windows exe file converter/compiler. This requires any of: .NET 2.0 in C:\Windows\Microsoft.NET\Framework\v2.0.50727 .NET 3.5 in C:\Windows\Microsoft.NET\Framework\v3.5 .NET 4.0...

 
9:05 PM
I feel like you should try to incorporate some AOP in there for the logging statements
 
AOP?
 
All these intermediate steps follow the 'start comment'-action-'end comment' pattern
Aspect Oriented Programming
 
I will have to research that.
 
it's a form of programming that basically allows you to intercept method calls, amongst others
I've only got experience with it in Java
 
@EBrown I wrote one for C, but it was too easy to be posted for review.
 
9:07 PM
aaand flags somewhere...
 
but basically you would define a cutting point (was that the term?) on all methods corresponding to some query you define and then it would execute your aspect when that method was called
 
@JeroenVannevel intercept method calls <- what does that mean?
 
@JeroenVannevel It's pointcut.
 
I'm pretty sure you can set an aspect on method enter and method leave and as such, remove the logging statements from the actual code and to the aspect
 
@Caridorc it's basically a query-driven method decorator
 
9:08 PM
@Caridorc You can compare it to an event. Your aspect method (plain old java method) would get called when a certain method you're subscribing to is executed
@EBrown right, that's it
it's an interesting paradigm
 
@Vogel612 @JeroenVannevel sooo

def intercept(function, second_function):
def wrapped(*args):
second_function()
return function(*args)
return wrapped

But probably I am not
 
Yeah, I have no idea how to do this in C#.
Oh wait.
Yes I do.
 
somewhat... more like
 
@SimonForsberg Where's that FizzBuzz Brainfuck question?
 
@Caridorc you should place the code in a separate message... markdown borks on multiline chat messages
 
9:12 PM
46
Q: FizzBuzz in Brainfuck

Simon ForsbergInspired a bit by a previous Brainfuck question and the recent fizzbuzz invasion, I decided to make FizzBuzz in Brainfuck. The code is entirely my own, except for the inclusion of the Printing a number algorithm that I found on StackOverflow. My code is divided into several parts. Setup Const...

 
Thank you, sir.
 
@Vogel612 yeah, sadly I cannot delete my message, too old
 
whoops, wrong reply...
 
@JeroenVannevel Good read for AOP on C# it seems: msdn.microsoft.com/en-us/magazine/dn574804.aspx
@SimonForsberg Can I have your permission to add this as a test case to my GitHub repo?
If so, please let me know how you would like it attributed.
If not, I understand.
 
9:15 PM
what I meant to say to @Caridorc was that if C would be faster or not probably depends on how you make it. I think it's possible to improve the speed of such a brainfuck'd C/Java/C# program
 
@SimonForsberg sure. Why do memory[x]++; 100 time when you can do memory[x] += 100 ?
 
@Caridorc That's what I'm working on now.
Reducing operation count.
 
@EBrown "FizzBuzz by Simon Forsberg. <insert code review question link here>"
@EBrown I consider that FizzBuzz to pretty much be the ultimate test of Brainfuck interpreters, so sure!
 
@EBrown have you found some other optimization for it? I am kind of out of idea about how code is optimized
 
Why write code in a programming language when you could make a FPGA instead? ;-)
Yes... A FPGA dedicated to solving FizzBuzz in BrainFuck
 
9:20 PM
@Caridorc my point exactly
@skiwi FPGA?
 
A field-programmable gate array (FPGA) is an integrated circuit designed to be configured by a customer or a designer after manufacturing – hence "field-programmable". The FPGA configuration is generally specified using a hardware description language (HDL), similar to that used for an application-specific integrated circuit (ASIC). (Circuit diagrams were previously used to specify the configuration, as they were for ASICs, but this is increasingly rare.) FPGAs contain an array of programmable logic blocks, and a hierarchy of reconfigurable interconnects that allow the blocks to be "wired together...
good old wiki command
 
@Caridorc Well sequential > operations, sequential < operations, sequential + operations and sequential - operations are obvious.
Empty loop bodies are less so.
Though I'm adding all these as compiler options. :)
@Vogel612 FPGA's were the best.
 
@SimonForsberg The prime checker is
 
@Caridorc give!
 
@SimonForsberg I do too. It demonstrates sufficient complexity for it to be a good test of the compiler.
 
9:25 PM
The most noble martial art. Not to kill nor to defend, but to acquire knowledge at inbelievable speeds, that my friend is Google-Fu: google.it/…
 
I have some ideas about making a faster Brainfuck interpreter/transpiler in my Brainduck project
TTGTB
 
Well I'm going to be optimizing out certain things, like loops.
 
0
Q: Java conversion of base 16 to base 64

NenookaasiI wrote a solution (below) in Java to solve the problem here. I use BigInteger to convert first from base 16 to base 10, then base 10 to base 64. This seems quite inefficient to me, and I would have no idea how to do this if I couldn't use BigInteger. I'm sure there's a nice and clever way to...

0
Q: ATM program with loan section

Lost BamI have spent a few days coding an ATM. What I'm looking for is some critique of my work. Is there anything I can do better here? The entire project has 7 files and one class, a checking account and savings accounts. It also has a section for loans (thought it was different). Any advice, or inpu...

 
Anyone see GitHub's new design yet?
 
yea, I like it
 
9:28 PM
I think it's an improvement.
Oh wow
GitHub recognizes the .bf extension as Brainfuck.
 
Yea, I found it quite a big chance in a sense if you're used to it for a long time, but I think I like it too
@EBrown It also marks your repositories as insane if it finds that the most used language is Brainfuck
 
@skiwi That's awesome.
Transpiler.cs it's getting serious now.
 
9:44 PM
Check incoming:
Main theme? ^^^^ >>> ?????
1
Q: New design & branding for Code Review

LudwikMy name is Paweł, I’m a product designer at Stack Exchange. As all of you know, you’ve already undergone the first phase of graduation. I’m pleased to announce that we’re just about ready for you to undergo the second phase—the design! It took us a while to make a special design for you, but we’r...

3
 
@rolfl You better post a "hell yes" answer!
 
I mean, at least it's a design.
:o
I actually kind of like it.
 
It looks nice.
I almost thought it was a joke, at first.
Someone should post a "no" answer.
 
If the code works, maybe try Code Review. — Peter Wood 36 secs ago
 
I guess the hype is truly real now.
 
9:51 PM
YES!
 
Apologies for the gif, but this is how I feel right now:
 
I like the design, but those dapples look quite strange.
 
@EthanBierlein Thanks.
I'm trying to phrase an answer expressing my thoughts on the dapples. I like the variation of color in the upper background, but I don't like those dapples.
 
Part of me is a little curious as to why it took them that long to make a design like that though...
 
9:56 PM
@Hosch250 Dapples?
 
Those dapples/square things at the top.
 
In the background?
 
Personally, I feel they are lazy.
 
@EthanBierlein Yeah.
Hmm, those badges are nice.
 
I wonder if the magnifying glass will be used as the site icon on SE.
 
9:58 PM
@EthanBierlein Probably
It looks neat
 
Agreed
@rolfl Can that be pinned?
 
0
Q: C# Parser of strings with list of assignments

MajakI have implemented class which manages communication with measuring device, which sends list of assignments, like variableName=value. These assignments are always separated by space. There are two options, the first is simple assignment variableName=value (without space around equal sign), the se...

0
Q: Python code to encrypt and email PDF file using PyPDF2

AlliDeaconThis is my first programming project with real world application. It's purpose is to take a file from a directory, encrypt it with a predetermined password, and email to appropriate recipient. ID Email and Password are found in a CSV file that I created EmailDict from. ID and Filename are parse...

0
Q: Mastermind: Evaluating the guess (Python)

blackenedThe evaluate_guess function below returns the evaluation of a guess with respect to Mastermind game rules: # sample secret code and guess secret_code = ["a", "a", "c", "a"] guess = ["c", "a", "a", "b"] def evaluate_guess(secret_code, guess): score = [] temp_list = secret_code.copy() ...

 
12
Q: New design & branding for Code Review

LudwikMy name is Paweł, I’m a product designer at Stack Exchange. As all of you know, you’ve already undergone the first phase of graduation. I’m pleased to announce that we’re just about ready for you to undergo the second phase—the design! It took us a while to make a special design for you, but we’r...

 
Oh snap, I got an HNQ question on World Building
 
@StackExchange Or that.
 
9:58 PM
5
Q: Making skeletons a challenging fight

TopinFrassiIn my world, skeletons are a thing. They're raised from existing corpses under the control of their "master". Obviously, there's magic involved. But I don't want magic to be part of the whole process. Let's say the magician behind the skeletons control is simply acting as a puppet master, pullin...

 
0
A: New design & branding for Code Review

Hosch250Very, very nice. However, would it be possible to remove the dapples and use a more solid tone for the background?

Feel free to vote on the dapples.
 

« first day (933 days earlier)      last day (3076 days later) »