« first day (2797 days earlier)      last day (2048 days later) » 

1:00 AM
hmmmm
anyone know if there's a way to call execv in C with a char** as argv?
VLA?
 
@ASCII-only Does execv not already take a char**
 
no, it takes a char*[]
 
Is that not the same thing
 
nope
char*[] can be converted to char** but not vice versa
 
1:25 AM
@ASCII-only For function parameters, yes.
 
@user202729 hmm?
 
For function arguments * and [] are equivalent
 
Anonymous
@ASCII-only Memory leak, shame on you
 
oops :/
 
Anonymous
 
@Mego If the memory stops being useful at the same time as the memory is cleaned up by the program exiting, is it really a memory leak?
 
Anonymous
@Pavel It's a memory leak because you allocate the memory from the OS but never give it back
 
Anonymous
@ASCII-only Yep
 
@Mego Doesn't the OS free all memory used by a process on exit?
 
1:29 AM
hmm. do I free the argv directly after the execv call?
 
Anonymous
@Pavel Only stack memory is guaranteed to be freed. Heap memory is up to the OS to decide
 
@ASCII-only Your program doesn't continue after the execv call
 
Anonymous
@ASCII-only You can't, because you're no longer in your code at that point
 
oh. yeah >_> <_<
ignore me
 
@Mego But in practice, no OS is actuallly going to let a process permananetly allocate memory like that, no?
 
1:31 AM
well, generally no OS except for possibly toy/minimal OSes. probably
 
Anonymous
@Pavel Not for e.g. modern Linux, OS X, or Windows, but it could potentially take a while for them to reclaim it
 
1:57 AM
Memory is reclaimed immediately on process exit
On the other hand, it is not guaranteed a block will be reclaimed by the system if freed
The conclusion is obvious
 
2:09 AM
Ahh, I love using fork/exit instead of malloc/free
All my C is so much better now, thanks TNB!
 
post answer to a kolmogorov-complexity challenge, realize it would have been shorter to just encode the entire output as a single string. Do'h.
 
speaking of malloc— how does one do dynamic memory allocation when OS does not have a malloc/mmap function
 
Anonymous
@Downgoat It's not really possible
 
Anonymous
Unless the OS has a ridiculously high stack limit, you'll always run into the maximum
 
2:25 AM
@Draco18s If you've got a console app for Runic, you can go to the TIO chatroom and ask Dennis to add it. Just give him the repository, how to run code from a file and a Hello, World! program.
 
2:39 AM
@JoKing thanks for that, didn't even know there WAS a TIO chatroom (but I'm not surprised...)
 
 
1 hour later…
3:59 AM
@Downgoat Implement it yourself?
 
4:45 AM
"Well, it doesn't look like anyone's using this address range here, so..."
 
5:04 AM
@user202729 I'm still running on top of an OS
 
 
1 hour later…
6:26 AM
0
Q: Javascript output

Sm SrikanthThe output for below piece of code prints 0 1 2 3 4 (each number in new line) for(var i=0;i<5;i++){ setTimeout(console.log(i),i*1000); } The output for below piece of code prints 5 5 5 5 5 (each number in new line) for(var i=0;i<5;i++){ setTimeout(function(){console.log(i)},i*1000)...

 
 
2 hours later…
8:20 AM
0
Q: Rubik-sorting a matrix

CharlieThe idea for this code-challenge is simple: given a matrix of integers, let's sort it by applying Rubik-style movements. This means that you can select a single row or column and rotate its elements in any direction: [1, 3, 2, 4] => [3, 2, 4, 1] (rotate left for rows/up for columns) [1, 3, 2, 4...

 
8:30 AM
0
A: Sandbox for Proposed Challenges

Vedant KandoiTrilateration Similar to Trilaterate your position with a small twist. In a n x m array, You will be given a list of (x,y,d) as input, The twist in this problem is that d is not the exact distance from x,y but the maximum distance. It should be in the format(a function): f(list,n,m): #you...

 
 
1 hour later…
9:52 AM
0
A: Sandbox for Proposed Challenges

Vedant KandoiCut-off the Determinant Challenge: Given is a square matrix of any dimension and any integer n. The input will be given in any array format. The code should be a function which returns the output. Objective: Remove m columns and m rows such that the determinant of the resulting matrix becom...

 
 
4 hours later…
1:47 PM
0
Q: Track an object in 2d space

J. SalléDescription The task of this challenge is to devise a program or function that tracks a given object in an \$n×n\$ space. I/O Your program will be given 3 inputs, which may be taken in any sensible way: n will be the size of the plane's side. (so, for \$n=5\$, your plane will be \$5×5\$). You...

 
2:45 PM
0
A: Sandbox for Proposed Challenges

souldeuxIs The Date Alphabetical? (This is my first attempt at a golf challenge - I'd welcome feedback & revision help before posting the real thing) Write a function or program that accepts a date as input and returns a truthy value if a given date is alphabetical, and a falsey value if it isn't. An...

 
3:03 PM
@NewMainPosts @J.Sallé looks like I'm not the only one :P
 
The previous 10h of chat were nothing but feeds. I wonder what the longest feed-only streak has been.
 
@dzaima yeah lol I even tried to make it even more clear but well, sometimes people don't notice some things. It's a pretty big wall of text, so...
@AdmBorkBork smells like a CMC
 
@AdmBorkBork Does no post count as feed only?
 
3:28 PM
@user202729 No, because I know there were some times early on when the chat was in danger of being frozen due to lack of all activity.
I'm wondering about like the above, where that 10h block was only feeds.
 
@AdmBorkBork I'd think a more interesting question would be the biggest sequential feed message amount, with no messages in between (that's what I read the question as initially too)
 
@AdmBorkBork in TNB? I know I made a room that was a bunch of feeds
 
@NathanMerrill Yes, TNB. Too easy to game the challenge otherwise.
 
yeah. I made a room once that simply had all of the moderation actions as a feed
 
@J.Sallé Smells like a TNBDE query
 
3:32 PM
greetings mortals programs people!
 
I don't remember why: I wasn't upset or anything
I also think it got permanently deleted
 
Greetings other fellow human.
 
I can't find it anymore
@DJMcMayhem that sounds like something a computer would say
 
How goes the end of days things, @DJMcMayhem? :P
 
> I am a perfectly normal human worm baby.
 
3:33 PM
@NathanMerrill It should show up under my rooms if you click on your own profile.
 
it doesn't
 
@DJMcMayhem i think if the room was deleted only mods can see it
but don't quote me on that
 
Really? It does for me, even if I'm not logged in
 
@DJMcMayhem you're pulling the transcript directly though doing that
 
oh, apparently the "mine" tab shows starred rooms
not created rooms
 
3:35 PM
huh, so I can see it :P
 
@ThomasWard No, I mean it shows up on the list of rooms that nathan owns
 
@NathanMerrill yeah you have to go to your main details page first :P
 
@DJMcMayhem yes I see that now ;)
is tired
 
Kind of a meta-question to the mods here, would it be okay if I created a room for me and a friend I invited to the site? He's new to the code-golfing ways and I'd like to talk to him in a room where it wouldn't bother anyone else (also it'd be probably not in English)
 
3:39 PM
you can create a room for pretty much anything
assuming it isn't abusive or anything
 
@J.Sallé Yeah, nothing wrong with that. It wouldn't be private though
 
I've created several rooms where we just play games
 
Great! Not being private is not a problem, we won't be talking much about stuff other than codegolfing and probably college
 
@J.Sallé Just don't get into a fight, us diamonds will rain down like fire and brimstone from the heavens if that happens. evil grin
 
@ThomasWard also not a problem (unless you understand Portuguese than it might be a problem) shrugs
 
3:43 PM
are there any tools to detect that outside of flags?
 
Would it be feasible to require the code to run within 20 minutes on Ideone? Is that linked to my computer's abilities? — kaine Sep 20 at 13:39
 
@NathanMerrill sits on your head instead of answering
 
@ThomasWard Mod abuse!
 
sits on @AdmBorkBork's head as well thanks to his shadowclone
aaanyways, just thought I'd stop in and say hi :P
 
Hi \o/
 
4:44 PM
Diamond friends, can anyone give this user write permission for this room, please? Cc @Dennis @Doorknob @ThomasWard
 
@J.Sallé should be good. That'll be $10
cc @DJMcMayhem ^
 
@ThomasWard rofl that's actually almost 50 Brazilian moneys D:
 
better than my standard rate of fifty million rubles though.
which is far more
 
Indeed it is
 
 
2 hours later…
6:28 PM
The "Send" button in the latest build of Outlook isn't quite centered and now I can't unsee it.
 
@AdmBorkBork IIRC, Code Review's room is almost 95% feeds
 
@cairdcoinheringaahing OK, but why, though.
 
6:46 PM
@AdmBorkBork well the envelope isn't quite centered but the whole image looks centered to me
 
6:59 PM
@J.Sallé The "Send" is 12 pixels in from the left and 16 pixels in from the right, so it's shifted left by a handful.
 
@AdmBorkBork aaaaaah, I hadn't noticed the actual text was offcentered
 
Yah, and it's just enough to be annoying.
 
Yeah, I just keep staring at it hoping it's gonna fix itself
 
0
Q: Is the date alphabetical?

souldeuxWrite a function or program that accepts a date as input and returns a truthy value if a given date is alphabetical, and a falsey value if it isn't. An alphabetical date is a date whose month, day and year are in alphabetical order when expressed as a string (and when considered specifically in...

 
 
3 hours later…
10:19 PM
@MildlyMilquetoast Flobnar is on TIO now if you're interested
I don't even know if that pinged them
 
For like, two months
@JoKing It did not. Mods can "superping" anyone, though.
 
Anonymous
11:06 PM
@Pavel We don't unless it's necessary, though
 
11:17 PM
Ah, I just read in their profile that they would like to code in Flobnar if their was an online interpreter and there is now. I guess there isn't a way of pinging them except commenting on an answer?
 

« first day (2797 days earlier)      last day (2048 days later) »