« first day (2967 days earlier)      last day (125 days later) » 

12:01 AM
Printing an Int (or Int to String) is a slow naive implementation. Did you miss the links at the bottom of How do I print an integer in Assembly Level Programming without printf from the c library?, notably Integer-to-ASCII algorithm (x86 assembly) which is optimized for speed. (Although I'm not sure about accumulating digits in a register.) And blog posts like pvk.ca/Blog/2017/12/22/… (alt — Peter Cordes 46 secs ago
RELOAD! There are 7653 unanswered questions (89.3978% answered)
12:49 AM
Q: FizzBuzz in arm64

war crimeI made a FizzBuzz program in arm64, but instead I printed out the values in hex instead of decimal. This was the first arm64 program I made and I'm looking for advice on how I can improve it. Also, the code to print out the registers was taken from the textbook: Programming with 64-Bit ARM Assemb...

Q: Ticketing program using Python 3

JeanIn this python program, I built a ticketing system with functionality such as keeping track of tickets sold and error handling in case there are any invalid inputs. I need advice on my code in terms of (architecture, risks, opportunities, design) so that I can learn how I can code better & grow m...

1:13 AM
Q: The cleanest way to print the max value and its key from a dictionary

Arnon De PaulaI'm getting the highest value and its respective from a dictionary and printing it out for the user. Even though it's working, I'm wondering if I'm doing it in the cleanest way. Here it is: People = {'Harry': 20, 'Ron': 19, 'Hermione': 21, 'Hagrid': 54} print(max(People, key=People.get), max(Peo...

2:19 AM
Just noticed this: "Where I work, they don't want us Commiting daily..." Can you clarify that? When you're working on your machine, "committing" is kind of like "saving" your work. You may wish to save your work 20 times in a day (which means 20 commits) on your machine, and just push out (share) the final version (which may be just 1 or 2 commits after you tidy them up or squash them down). And even after you "share" it, during code review you may want to make more changes and modify your commits (i.e. interactive rebase). — TTT 52 secs ago
3:15 AM
Q: React useState,useEffect - save variables to local storage

caner küncüI'm new in React and state hooks.I'm trying to make a website about creating booklist and save it to local storage. Also uploading image to cloudinary. My problem is ; when i trying to save cloudinary image url to the localstorage, it saves previous url. I think i have a problem about useState,us...

Q: Shopping list using Python 3

JeanIn this python program, I used lists and control flow to allow users to add items to a shopping list and display the list. I need advice on my code in terms of (architecture, risks, opportunities, design) so that I can learn how I can code better & grow my skills. shopping_list = [] # Add a func...

3:39 AM
Q: Equivalent partition sums

cgoatesI'm looking for feedback on my solution to the following prompt: Given an array of ints, return the index such that the sum of the elements to the right of that index equals the sum of the elements to the left of that index. If there is no such index, return Nothing. If there is more than one su...

1 hour later…
2 hours later…
7:19 AM
Q: Replacing type-check with Visitor in Immutable Event-Sourced Aggregate

ZymusIn my previous question, one of the answers mentioned that I shouldn't be changing behavior based on the Event class The whole point of classing is that you can get result without having to decide based on instance. I don't disagree with this sentiment, and figured it was more in the acceptable...

8:11 AM
With all due respect this code needs much refactoring. I suggest you post it to Code Review Stack Exchange: codereview.stackexchange.com - and get what you have cleaned up and, more importantly, help you learn how to refactor F# code, before resuming the question here at a later date (ideally as a new question) — Martin Freedman 20 secs ago
2 hours later…
10:36 AM
Q: Two dimensional bicubic interpolation implementation in C

JimmyHuThis is a follow-up question for Two dimensional bicubic interpolation implementation in Matlab and Two dimensional gaussian image generator in C. Besides the Matlab version code, I am attempting to make a C version two dimensional bicubic interpolation function BicubicInterpolation here. The exp...

11:24 AM
Q: Linked list based queue

codingwolf that's my code for the above problem and I would like to get it reviewed to check if it is correctly implemented We aim to implement a quality of service system in a network router so that it can differentiate the type of traffic traversing it, and it can give privilege to data belonging to a ...

1 hour later…
12:50 PM
umm... what have I done now?
@Mast @Peilonrayz I flagged a comment here codereview.stackexchange.com/a/235886/31562 but the comment seems to have been removed, which is not the reason for why I flagged it...
@SimonForsberg Are you hiding a diamond from us? Deleting comments out of the blue ;)
Looks like the automatic system has bugged out, will look into in a bit (unless Mast or Sam ninja me) thanks :)
@Peilonrayz Can you just undelete the comment so that I can reply to it?
Must be my control over @Duga that gives me these powers
Unfortunately I can't ):
@Peilonrayz Are you faking a diamond for us?
No, no, you've just temporarily stolen mine and the system is refusing to give me my diamond back! I blame caching ;)
@SimonForsberg Are you happy for me to ping Jo King in CGCC about the comment disappearing? We were talking about BF and LOLCODE
12:58 PM
@Peilonrayz feel free. But isn't the comment visible for moderators if you click "View deleted comments"?
or did I manage to move it to /dev/null ?
He mentioned that he lost control of his old account so flagging the comment and asking a moderator to look into the possibility of user merge or something seemed like a good idea
@SimonForsberg I can, but I can't undelete because (I'm guessing) a non-mod (you) 'deleted' the comment.
I did not!
What does it say on the comment? Does it say that it was deleted by me?
@SimonForsberg Yeah, the system is saying you deleted it. I'm thinking 2 bugs are at play here :/
Flagging something for "other" reason should not be an automatic request for deleting something!
But thanks for trusting me, system!
Stop trusting me that much!
@SimonForsberg Yeah, I'll try fix the issue but... my hands are largely tied :/
1:36 PM
It seems to me this question is more suited to be asked in the Code Review Forum. Code Review is a question and answer site for peer programmer code reviews. Please read the relevant guidance related to how to properly ask questions on this site before posting your question. — itprorh66 45 secs ago
1:47 PM
Is it alright to advertise a question here to get an answer on it?
@user AFAIK we don't have any rules against doing so
So yeah
Could someone who knows Scala/FP answer this question?
@user There is a promoting badge you might earn for it.
Didn't know you could earn that from a link in chat
@user Thought you were talking about Facebook or Twitter.
1:52 PM
I'm not sure I understand
@user You get the badge by people clicking on a 'share link' with your id. For example my CR ID is 42401, and so my share link for your question is https://codereview.stackexchange.com/q/262730/42401.
Oh, I see
@Peilonrayz Thanks.
Why are there 3 SO questions that have been removed that are starred?
@pacmaninbw People saying not to migrate to CR
I starred Hyper's because AFAIK it was hyper's first such comment
@SᴀᴍOnᴇᴌᴀ The question that I voted to close on CR and reviewed on SO got a +1 and accepted.
2:04 PM
If your code works but you just want to refactor/optimize it, I believe this question is more suited for CodereviewJeremy Thille 30 secs ago
Q: Optimising the code logic for a functionality

uday8486I have below code, which counts only adjacent letters in string and gives out count. const inputData = [ 'aabbc', 'xxxxvvhjh', 'PPPOM' ]; let output = []; inputData.forEach(str => { let strObj = {}; for (let i = 0; i < str.length; i++) { if (strObj[str[i]] && str[i] === str[i - 1]) ...

@user Scala? Maybe something for @Donald.McLean to take a look at. I'm more of a Kotlin guy myself :D
Also see this:
Q: How can I make my question get more attention?

Simon ForsbergI have written a question that hasn't gotten an answer in several days, and there's not much activity on my question (votes, views, comments). What can I do to draw more attention to my question?

@SimonForsberg Thanks!
3:04 PM
Q: Cumulative Sum until Threshold is Reached in R

graceI am trying to produce a code that sums the values in a column of a data frame. The sum cannot exceed 6 and should reset once the threshold is reached.However, there are some data where the value is greater than 6. Those values should be ignored since their max exceeds the threshold. Here is what...

@pacmaninbw The OP never replied to my question where I asked if they believed it worked to the best of their knowledge prior to Martin's comment...
If the OP had said that they believed it worked to the best of their knowledge, I would not have closed it, partially after ponding the close reason and reading this meta
And frankly for SO it seems a bit beyond the scope...
3:37 PM
On SO it was also observed that it didn't work for at least 2 of the test values in a comment.
Looking at the code it couldn't work for values greater than 255.
3:55 PM
Also though there's insufficient code to really give tips, you can't go wrong with separation of concerns, such as defining a class for the adventure state or "model" (you'd define functions or methods in their own module that let you change the state), then your UI (a REPL prompt, or event loop) would interpret the input as invocations of those state-changing methods. A separate module might have a .render() to stdout/curses/etc. Codereview stackexchange may be a nice resource as well for more open-ended questions. — ninjagecko 11 secs ago
@Duga If there is insufficient code to give tips, how is that a good fit for code review?
4:19 PM
@pacmaninbw But if the OP didn't know that when creating the post, and given Simon's answer here I'm inclined to believe it was on-topic on CR
The post even stated "In other words, it's a string of four numbers each between 0 and 255 inclusive"
@Peilonrayz that sounds like the stopword 1-flag deletion system that nukes comments containing a few select words. "Thanks" is among these words
and yes: it triggers on any flag, even on "other" flags
@ninjagecko Code Review Stack Exchange wants context, things like #code goes here makes this particular question not be a good candidate for CR SE. — Simon Forsberg 55 secs ago
so one of the rules described here could be at play
@Vogel612 Yes. Auto deleting a comment which is nearing max size when a user flags as other, because the comment contains one word is dumb.
4:29 PM
The other annoying part is I can't undelete the comment because Simon's not a moderator... Why not just assign the delete to community -.-
@pacmaninbw All code is broken, which can be verified by having other people use your code.
@Peilonrayz Not all code - look at this beautiful Hello World program
@Peilonrayz But are moderators not able to undelete all comments?
Or well, I assume it makes sense that you can't undelete comments that was deleted by the one who wrote it
@SimonForsberg No, not even ex-moderator ones. So any and all comments you have ever deleted can't be undeleted by the current moderator team, unless you get your diamond back
@Peilonrayz that sounds like that shouldn't be the case...
not that comments are important, but still ...
@Peilonrayz Oh, right.
4:42 PM
Q: Small generic helper library for working with recursive data structures

user3329719I've written a small rust library that solves rust's problems with using recursive data types (e.g, linked lists). using the library, you can use RecRef<'_, List>, and use it to travel up and down your list dynamically and safely at will. It uses unsafe primitives but uses a clever trick to prese...

Q: What piece of knowledge am I missing for this Tic Tac Toe code?

XiniteYesterday I wrote my first code: a rock, paper and scissors game. Today I went ahead and figured I might as well try to code Tic Tac Toe, but I underestimated how difficult it becomes when there are 255168 different combinations of moves instead of 9 different combinations of moves. So here is my...

@Vogel612 I'm not surprised given the rule "all comments are ephemeral"
@SimonForsberg We're looking into both the flag and the comment.
But basically:
Q: Can't undelete a comment which was automatically deleted by Community

WendiKiddEarlier today, a fellow moderator posted a comment. One "too chatty" flag was cast, and Community handled the flag and automatically deleted the comment. Some investigation turned up the fact that the reason only 1 flag was required to delete the comment was because it contained the word "accept"...

@pacmaninbw actually the promoter badge is for offering a bounty on our own question, and the Announcer, Booster and Publicist badges are for sharing a link later visited by X unique IP addresses
5:09 PM
@Peilonrayz I agree that it is difficult to find 100% of the bugs, but users have been using my code since 1984 and I got to a point that end user problems were generally rare. I've been unit testing and integration testing my code since at least 1986.
Note that most of my questions include unit tests.
@pacmaninbw Unfortunately all developers aren't like you :(
@Peilonrayz Experience helps.
5:26 PM
Dedication does too.
Q: Alter authorization on all non-system SQL Server databases

Igor SoloydenkoI am not very experienced with T-SQL and feel this can be done better. The script changes ownership of all "user" (non-system) databases to sa. Usage of a dynamic SQL expression seems unavoidable to me. Could I at least iterate the table names in a more elegant way — imperative code looks like a ...

@Mast cc @Vogel612
5:45 PM
This question probably belongs on codereview.stackexchange.com. Without seeing the models and the methods I suspect you could create a base class that defines this method and have your models inherit from this base class? Can you add an example to your question? — Iain Shelvington 27 secs ago
1 hour later…
6:56 PM
@Peilonrayz We need to have 6 upvotes to have Rubberduck as a community ad
7:34 PM
@SimonForsberg I'm more of an object guy than a functional guy. It's a whole different mindset.
8:00 PM
> Asked 7 years, 6 months ago
Okay. I'm no longer gonna flag comments for the "other" reason!
@Donald.McLean Totally understand.
8:14 PM
@SimonForsberg I don't think they've changed their minds much about it.
@SimonForsberg Update; Comment is back :)
@SimonForsberg It's probably safer to flag posts instead of comments for things like that.
@Mast If we decline the request we can also add a message on post flags. 'Tis the superior place to flag IMO
9:07 PM
If your code works then you should ask your question on codereview.stackexchange.com — barny 44 secs ago
9:43 PM
Hi mate. This forum is for non-working code. If you're looking for recommendations on improving functional code then you wanna check out Code Review. — Tim Hunter 33 secs ago
@SimonForsberg: My implication was that the user should review codereview's posting guidelines if they, in the future, have a more open-ended question with more code they've actually done rather than #code goes here, unlike this question, which is not a code review question but a less open-ended question. — ninjagecko 39 secs ago

« first day (2967 days earlier)      last day (125 days later) »