« first day (785 days earlier)      last day (3225 days later) » 

3:01 AM
This is driving me nuts.
 
@maaartinus nah, you're missing context - that block is inside anIdentifierReferenceResolver class, letting it bubble up further than FindLocalScopeDeclaration would cause more harm than silencing it, because then the entire module onward stops resolving. That said I'm only trapping it that way so I can fix the actual issue ;-)
            try
            {
                var parent = matches.SingleOrDefault(item =>
                    item.ParentScope == localScope.Scope
                    && !_moduleTypes.Contains(item.DeclarationType));

                return parent;
            }
 
And now my neighbors are shooting off fireworks again.
 
the actual issue is that Property Let and Property Get members both have the same Scope string, and in the case that's blowing up I'm resolving an index parameter that's in both.
 
@Mat'sMug Sure, if you really can handle it, then do it. I'm very careful with "preliminary" code... it never must do silently anything wrong.
 
thing is, I'm not sure that the "right" thing to do is here
say I fix the issue with parameterized properties
 
3:07 AM
I'm rather lost.
 
and then I parse/resolve this HUGE VBA project I have, and it all works
oh
> I need a rubber duck
lol
I need to actually brew that coffee, bbl
 
I guess, I'm leaving. Have fun....
 
@Mat'sMug According to my new SQL query, you have 91 posts qualifying for the Socratic badge!
JD has 141.
I have 46.
 
Hmm, I feel the temptation to write a lexical preprocesser.
 
@Hosch250 your query is accurate :)
 
3:18 AM
@QPaysTaxes That's exactly what I thought.
 
Apparently, @200 has 19 questions, and 18 qualifying.
 
@QPaysTaxes What about Ruby to Python?
:D
 
It took me a ridonculous amount of time to write it.
 
@QPaysTaxes Whoops, that's not a preprocesser. Nevermind
 
At the end, I realized I didn't need to do a join or anything, and just use Count(*).
I'm working on writing a set of SQL queries for various helpful things.
@QPaysTaxes Just 190 here.
Nice going.
 
3:23 AM
@QPaysTaxes your glass is half-full!
 
BBL.
 
sounds feasible
4-5 answers/day and you should even beat that
 
@QPaysTaxes Seems doable
@QPaysTaxes You could probably beat me by the end of this week.
Well, it's only ~1.2K
 
@EthanBierlein took me about 6 months to close that much of a gap with Simon.. and most of it is due to his slowing down, not my speeding up
 
True
Hmm, now I have an issue. What language should I write a preprocesser for?
 
3:28 AM
 
what's the purpose of the preprocessing?
 
@Mat'sMug To make the language easier to write, I guess.
 
lol totally
 
3:40 AM
Good thing I decided to run monkeys codeless query again, otherwise I would've missed a self-vandalism for quite a while.
 
2
Q: Mergesort using map-reduce, multithreads, buffers and condition variables

user4751640I wrote a map reduce program which uses multi threads, bounded buffers, condition variables. It works perfectly for some types of inputs. In the program there are N mappers, R reducers, 1 merger. mappers get data from input files, put each string in files to corresponding buffer-X-Y. reducers r...

Same behavior on SO, too. I've alerted those mods.
 
Seems like there's an edit war going on there.
brb, gonna go get a drink
 
I've sent the user a warning for now.
 
wtf
I read "removed!" as "KTHXBYE!"
 
3:44 AM
Looks like a question for codereview.stackexchange.com . — DanielKO 35 secs ago
 
@QPaysTaxes One zombie has code removed, and another question has a large block of code removed.
 
Ooh! 11 more rep and I have the privilege to protect questions!
 
If someone is good with Rails, this could use a good answer. The current one is just a code dump and has a downvote, so the system treats it as a zombie.
Whatever. :-P
Fixed
And when it gets a good answer, the current one can be removed. That user was seen two days ago, and the post notice went up last year.
 
4:19 AM
OMG, IT WORKS!!
 
I think I've decided. I'm writing a JS preprocesser.
And here's what a factorial would look like, before it's converted to JS.
 
in VBA Rubberducking, 2 mins ago, by Mat's Mug
ladies and gentlemen, we have a resolver!
 
# Calculate the factorial of an integer
let factorial(n)
begin
    return n * factorial(n - 1)
end
There we go.
Any ideas, anyone?
 
wouldn't a library do the same?
 
4:24 AM
Hmm, good idea.
 
lol, that's actually pretty neat
 
@Mat'sMug Wait, are you talking about my idea, or @Phrancis's picture?
 
your idea
 
Ah, okay. Thx :)
 
although it could be extended to..
 
4:26 AM
I rarely bother going on Facebook, but I figured I might piss off a few people :)
 
let there be factorial(n)
   ...
and there was factorial
2
 
Lol
but no
 
let there be light
   ...
and there was light
 
@QPaysTaxes Do it
 
so let it be written
so let it be done
♪ I'm creeping deeaaaath ♪
shouldn't end up too far from
 
4:28 AM
Okay, here's another example
 
For theNumber is 1
  Let There Be theNumber increased by one
Until theNumber Reacheth The Maximum
 
let object Person be
    obj.name = name
end

let classmethod Person.saySomething(message) be
    print "Person " + obj.name + " says: " + message
end
 
s/end/sobeit
 
How about that?
 
s/sobeit/amen/
 
4:30 AM
lol
2
 
Lol. You guys are talking about creating the Programming language of the Bible, and I'm just talking about another JS preprocesser.
 
if you can make a spec, I can make a grammar for it
 
Someone needs to make a God++ language
3
 
Although, I'd rather use begin over be. While be is interesting, begin just seems clearer.
You still doing ?
Guys, could become a legit community project.
 
Thou shalt not exceed the number one hundred
  And for the number three times fives modulus zero
    Thou Sayeth "FizzBuzz"
  And for the number three modulus zero
    Thou Sayeth "Fizz"
  And for the number five modulus zero
    Thou Sayeth "Buzz"
  Else
    Thou Sayeth the number
 
4:35 AM
0
Q: Calculating sum of smallest prime factors for 2 < n < 10**12

NemoI am trying to calculate the sum of the smallest prime factors of n, where 2 < n < 10**12, and get the remainder of this sum when divided by 10**9: require 'prime' puts "Started at #{Time.now}." num = 10**12 sum = 0 (2..num).each { |n| sum += n.prime_division[0][0]; p sum } sum = sum % 10**9 put...

 
Just one more day until elections. D:
 
@QPaysTaxes Edited accordingly
Except it's "speaketh" I think
King James English FTL
> Job 8:2King James Version (KJV)

2 How long wilt thou speak these things? and how long shall the words of thy mouth be like a strong wind?
 
Since I have answered it, I've flagged it for other moderator attention.
 
Guess we're both wrong, as far as is concerned
Ah.
In any case, as long as it reads at least as good as I'm OK with either conjugation
 
Okay, here's my final example:
function ackermann(m, n) begin
	if (m == 0) begin
		return n + 1;
	end
	elif (m > 0 and n == 0) begin
		return ackermann(m - 1, 1)
	end
	elif (m > 0 and n > 0) begin
		return ackermann(m - 1, ackermann(m, n - 1))
	end
end
Any tips/suggestions?
 
4:44 AM
What language is that again?
Ew
 
My version of JS, before it's preprocessed into JS code.
Aww.
@Phrancis Why eww?
 
44 secs ago, by QPaysTaxes
Javascript
 
@Phrancis I have to start somewhere.
Besides, I think it'll be an interesting side project anyways.
 
Where is your "use strict;" ?
 
Automatically inserted by the preprocesser itself.
 
4:46 AM
OK
if (m == 0) needs an extra equal sign
 
Welcome to Code Review! While this somewhat answers OP's question "why could the solution have been disliked by the recruiters", the implicit question in any and all on-topic question on this site is "please review my code" - as it stands, this answer is more of a comment than a review of OP's code. Feel free to edit your post to add content that addresses any facet of OP's code, not just an opinion on what may or may not have happened in OP's specific situation. Cheers! — Mat's Mug 17 secs ago
 
Same for all your other == unless you specifically want JS to act wonky
 
@Phrancis Nope, preprocesser takes care of that as well.
The example I gave would return the resulting JS code.
"use strict";
function ackermann(m, n) {
	if (m === 0) {
		return n + 1
	}
	else if (m > 0 && n === 0) {
		return ackermann(m - 1, n)
	}
	else if (m > 0 && n > 0) {
		return ackermann(m - 1, ackermann(m, n - 1))
	}
}
 
@EthanBierlein Then, why are you asking us?
 
@Phrancis I'm just asking for opinions on the syntax of my version.
 
4:50 AM
that's the flag I used
 
@EthanBierlein If your pre-processor fixes your syntax, there's no point in asking
 
Ah, never mind.
 
Not meant to be offensive or anything
 
I know.
Hmm, lemme see if I can rephrase that.
What are your general opinions on the style/syntax design of the code before it's preprocessed by the preprocesser?
 
why elif?
 
4:54 AM
@Mat'sMug because it's shorter than else if, and I come from a Python world.
 
@EthanBierlein My opinion is that, pre-preprocessing, it's pretty bad JS.
 
It's good that you have a decent preprocessor, but IMHO, I'd like for the preprocessor to look at my code and be like, "Nope, nothing to see here!"
 
Hi guys, I wonder what's the policy concerning Project Euler hints. Maybe I said too much here.
0
A: Calculating sum of smallest prime factors for 2 < n < 10**12

maaartinusSorry, too long for a comment (this isn't a real review, but it isn't a CR what you need). This is Project Euler 521 and providing a full answer here would spoil the fun. If you really want to cheat, google it out. Is there any way to shorten the runtime of this program? There are many way...

@Jamal Could you look at it?
 
0
Q: Java program for Creating a Binary Search Tree

Bagesh SharmaI am here for reviewing my code with programming techies. Please give me some feedback on how I could make it better or simpler. public class BinarySearchTree { private static TreeNode root; public static void main(String args[]) { BinarySearchTree bst = new BinarySearchTree(); root = ...

 
5:00 AM
@maaartinus you could use some >! spoiler markdown to summarize the hint that's on page 5
 
Yes, spoiler markdown can be used in such cases. Otherwise, it doesn't look too bad since you haven't dumped a bunch of code.
 
@Phrancis So... ?
 
The actual spoiler is the hint about the problem 10 forum. Anything else still means hours of work and many minutes of CPU time. ;)
 
10 mins ago, by Ethan Bierlein
What are your general opinions on the style/syntax design of the code before it's preprocessed by the preprocesser?
^ It's be easier to write in proper JS to begin with
 
5:03 AM
Okay, thank you.
Aargh. Can someone explain interfaces to me?
 
What language?
 
Object-Oriented languages, like C# or Java
 
picture a contract
ICanDoX
 
it's just an abstraction that says "whoever implements this interface must satisfy this contract"
 
5:06 AM
Running out of binary search tree titles. Thanks, JDQ. :-P
2
 
@Mat'sMug Hmm, okay. I sort of understand. Is there a simple example?
 
@Jamal Title it "JavaDeveloper has already used all the good tree titles"
 
I have 28 question flags.
 
so if you have an ISomething interface with an int DoSomething(string), you're saying that any class Something : ISomething is required to have a method called DoSomething that takes a string and returns an int
 
5:07 AM
What do I use them on?
I'm out of comment flags.
 
@Hosch250 ....questions
 
@Mat'sMug Ooh! That makes sense now!
 
@Mat'sMug Thanks, Captain Obvious.
I guess I was asking for it, though :)
 
@QPaysTaxes Yeah, and what are you, a unicorn with hooves?
 
Interfaces are love.
 
5:09 AM
Anyways, night.
 
Same here, night.
 
the implementation is irrelevant, so long as the DoSomething method takes a string and returns an int, so by depending on ISomething abstraction instead of Something concrete class, .... oh well, good night!
 
> Let Me Love You (Until You Learn To Love Interfaces)
 
Me? :D Just kidding.
 
5:14 AM
@QPaysTaxes No, it's the best answer so far.
 
0
Q: Class/Event Schedule Calendar

MikeiLLThis is a calendar to layout an array of events/classes (from an API) in calendar format: Monday | Tuesday | Wednesday | Thursday | Friday | Saturday | Sunday time event | event | event | event | event | event | event time event | event | event | event | even...

 
That's no contradiction.
 
# TODO: refactor this bullshit
 
Maybe, but that also means that my question is far from perfect.
 
@QPaysTaxes if you feel guilty for earning bounty rep, just earn it, and then pay it back!
(i.e. offer a bounty on a good question)
 
5:17 AM
i think i gave away like 4 or 500 in rep within the last week
 
And uncommented and what else. You're perfectly right.
 
@QPaysTaxes writing answers that feel like they deserve a bounty, too ;-)
nice one!
 
netflix makes programming difficult
 
0
Q: Fractal rendering fun time

Motoko KusanagiI wrote up a script a while back to let me play around with fractals. The idea was to have direct access to the script that creates the fractal. None of that close, edit, then run hassle; just edit then run. renderscript.py contains the gui: import tkinter as tk from tkinter.filedialog import a...

 
5:32 AM
monking
 
@CaptainObvious oh wow
lack of sleep makes programming difficult
TTGTB
@janos hi!
 
night @Mat :)
 
0
Q: C++ Merge Sort Using Iterators: Making Code Cleaner and Robust

Matthew Hoggan#include <algorithm> #include <iostream> #include <iterator> #include <vector> template<typename Container> void Merge(Container &out, typename Container::iterator begin1, typename Container::iterator end1, typename Container::iterator begin2, typename Container::iterator end2) { whi...

 
5:49 AM
@QPaysTaxes what's wrong with asserts?
 
Wife has American Horror Story going, if course sleeping through it
Not sure which is worse of it or trying to get Groovy+Swing to work
Though I think I'm making progress, just seems the syntax is a bit arcane
Is all programming this cryptic or is it just Java?
 
6:22 AM
On that note, TTGTB.
 
'night @Phrancis
glad you got it working ;-)
 
6:50 AM
hello
 
hello
 
7:36 AM
0
Q: Commute the day of the year

TheProgrammerI am new to programming. I saw this Java code with a lot of if-else statements that is copied below. People say that such a code is called 'smelly code'. So I wrote my own version of the code below. Can anyone guide me with any improvements to the program (related to style, programming, formattin...

 
8:31 AM
Thank you, this helped clarify the concept for me; it is the underlying language of the framework that is used to create data structures, not the framework itself. It seems like JS is what I was looking for: codereview.stackexchange.com/questions/31513/… ; nczonline.net/blog/2009/06/09/…62696e617279 56 secs ago
 
9:11 AM
thank jésus for free wifi in BA airport
I've got a 1h delay and no cell service
and calls are 6€/min or 13€/MB
yes, that's MB
or is it cents? they don't specify it
 
9:35 AM
Should this not be on codereview.stackexchange.com? — JackWhiteIII 55 secs ago
 
10:10 AM
If that's expensive, you could use VOIP with Skype
 
got it all fixed through email
all good
and I've still got fast, unlimited wifi
once an email, thats all they asked
 
@Ethan guess who is the last in the weekly rep race ;-)
 
10:38 AM
0
Q: How to ask for a review of the same item after making an update?

BROYSuppose, I submit a code for review, and, some reviewers suggest some corrections. Suppose, then, I want to update my code and show it to the same reviewers. How should I do it? Should I edit my previous question, or, should I ask a new question?

 
0
A: How to ask for a review of the same item after making an update?

QuillWhen you've asked a question, had feedback, made changes, and are ready for another review, You should post a new question with the updated code, but, link the original review, just for clarity. For example, user @QPaysTaxes, has a trilogy of questions relating to a BF to Ruby converter, And f...

 
0
Q: Editing a VBA code: how to use loop appropriately

Abdul ShiyasI tried to use loop in this program to reduce it. But error: "byref argument type mismatch" is occur. How can we rectify it? My converts converts all csv files in the subfolders of folders 1,2,3. As of now I am converting using codes for each folders. I tried to club those into one using for loo...

 
> I tried to use loop in this program to reduce it. But error: "byref argument type mismatch" is occur. How can we rectify it?
VTC for broken code
 
11:07 AM
Never mind
 
codereview.stackexchange.com is the more approapriate place. — Yu Hao 24 secs ago
@YuHao, OP is asking for a feature implementation which is strictly off-topic on Code Review. — Quill 31 secs ago
 
0
A: Virtual machine management with decorated selfies

QuillYour code looks really nice, and as I am unfamiliar with the framework you are coding for, my review is somewhat limited, nonetheless, I'll try my best. When you are going over items in a dictionary or array, you should put the comma on the next line, so that: it's easier to comment out, easie...

 
11:46 AM
@Quill do you know PEP8 well ?
 
@janos Not really, did I screw something up?
 
it's the official coding style guide for Python: python.org/dev/peps/pep-0008
if you want to give coding style advice, it's good to know this through and through
your recommendation for spaces around the = go against PEP8
 
vertical aligning?
 
PEP8 states that there should not be spaces = in keyword arguments
that practically implies no vertical aligning too
 
Ah, I see, will fix
 
11:50 AM
the commas at start of next line, is a convention in some SQL dialects (or maybe all)
although you have a point about easy to comment out, it's just not a common practice
you can propose things that see logical as a suggestion, but saying "you should ..." might not be received well
 
this belongs on codereview.stackexchange.com — Tristan Burnside 15 secs ago
 
@janos, improved
 
0
Q: Runtime error on test 1 (Codeforces)

Arpit Joshihttp://codeforces.com/problemset/problem/556/B This is the problem I am working on! *NOTE - THIS IS NOT A COMPETITION IT IS JUST A PROBLEM SET. So this is my code. The compiler i am using is GNU C++11 This code runs fine with all the test cases provided. I dont know what to do. Any help would b...

 

« first day (785 days earlier)      last day (3225 days later) »