« first day (345 days earlier)      last day (4829 days later) » 

19:00
Ok, so you're having trouble with your insertion sort, that it?
Well, its with the algorithm itself. I got the sort sorted out (lulz). But I'm having trouble with the base case in the recursive function
@CatPlusPlus Whats wrong with ObjC? (queue flame war)
At least, I think I'm having trouble with the base case. My output is completely different than the answer sheet the prof gave me.
Is your inSort function producing correct results?
Btw, what language is that?
@RMartinhoFernandes C++
19:05
Is there a reason not to use std::vector and friends?
@RMartinhoFernandes We haven't gotten to vectors, yet.
Ok.
So, have you tested inSort on its own?
I'm testing it now, Just a sec.
@CatPlusPlus Whats wrong with ObjC? (queue flame war)
@RMartinhoFernandes It looks to work with the exception of the very last element of the array.
19:09
It seems to blow up: ideone.com/eArKT
Let's see what's wrong with it.
You're probably going out of the bounds of the array.
So, you're testing for (i < length) && (x[i] < key).
And you're accessing x[i] and x[i+1].
@RMartinhoFernandes Oh, I updated the bounds per one of the answers. I will update my question to reflect.
So, what happens when i is length-1?
@OghmaOsiris Oh, please do.
user457812
@Moshe Probably not much of a flame war there.
@nil heh
@RMartinhoFernandes When length was length-1 it crashed. when it was length-2 it went through.
19:12
Ok, that fixes the out of bounds. But it's not producing correct results. ideone.com/1RmEi Let's see why.
Wait, my test there is wrong.
I should be comparing a with a known sorted vector, not the original. Duh-
user457812
Oh goody, I can buy ICO and Shadow of the Colossus for the PS3 soon
@nil SotC was way ahead of its time.
sbi
sbi
@RMartinhoFernandes That is actually fairly easy. I haven't really programmed in C++ for 2.5 years, and even when I hacked C++ for a living, I never read the standard.
@OghmaOsiris It's messing up things.
user457812
19:16
So I've heard. I never played it, though I've wanted to.
sbi
sbi
@OghmaOsiris Is it just me or is there something fundamentally wrong with this statement?
@nil You'll love it. (If you don't, I pity you.)
@sbi I've learned my lesson about going ahead of the class, lol... It's only gotten me in trouble. So I do what I'm told within the boundaries of what they assign.
"3 3 3 4" is indeed sorted, but in the reverse order and not with the original values.
So, what could be causing the code to overwrite everything with 3?
@RMartinhoFernandes Should I do a swap?
19:19
@OghmaOsiris Don't worry about the order. Let's focus on why the original values are being destroyed.
@RMartinhoFernandes x[i+1] = x[i], then when x gets to x[i+1] it will always be that 3.... I think
sbi
sbi
@OghmaOsiris No, it's not you who is wrong there, it's your teacher. When I taught C++, std::vector appeared in the 2nd or 3rd lesson, right after "Heloo, world!", std::string, and std::cin/std::cout. It's the Swiss Army Knife of containers in C++. When I was programming in C++, I hardly ever had a .cpp file where it wasn't used. It's plain stupid to not to teach this early on.
@OghmaOsiris Right. Curious why it doesn't get to overwrite the last one, huh?
@RMartinhoFernandes because it stops at the bounds of the array.
Ok, so the body of the loop is obviously the problem.
How should we fix it?
19:22
create a temp value to store what's currently in x[i+1] then assign x[i] to that?
That's similar to what you currently have. key = x[j]; is doing something like that.
@sbi You know how many times I hear this from programmers? lol. Everyone always says, "Why aren't they teaching [insert commonly used shortcut here] day 1?"
And the answer is, "I just do what they tell me like a good little student." lol
@RMartinhoFernandes Then if the temp value is currently stored, what is the problem?
Hiya boys and .... well boys
Think about it. Given my "3 4 1 6" example, you're storing 4. Then you proceed to copy 3 over that place "3 3 1 6". That's good so far, we didn't lose 4. But then what happens next? You copy that 3 over to the next "3 3 3 6". Ooops, we just lost the 1.
How can you avoid losing the 1?
How did you not lose 4?
19:27
@LewsTherin It's stored in key! We can get it back if we want.
Oh wait...I will read from the beginning
ok so 4 is stored in a temp variable?
I see :)
I did insert sort before..I can't remember how to do it until I see the algorithm again :(
@RMartinhoFernandes Would I put the 4 in the front then store the 3?
which would check against the 1, then store the 1 and it would check against the 6.
sbi
sbi
@OghmaOsiris No, I'm not debating about just another feature you could have learned before some other features. I'm debating the fundamental approach here. Basically, there's two didactic schools for teaching C++.
The old school teaches the old, C-style stuff first, and modern, C++-style stuff later, and never teaches to use anything unless its innards can be fully understood. Which means students will have to unlearn stuff later in order to use the "right", good, safe idioms once they understand them. The new school teaches the right idioms from day one, never mind how the stuff works under the hood. That is only explained later. You can probably guess that I'm a violent advocate of the modern approach.
19:33
@sbi I support the modern approach
C++ is just not C with classes, it's much much more than that
@OghmaOsiris That could probably be made to work, but you'd end up with bubble sort instead :)
@RMartinhoFernandes Which I know isn't efficient.
sbi
sbi
@vivek You rarely ever hear someone who has understood these two support the old approach. Sadly, that leads me to believe that the fact that it's still taught so much is based on teacher not having fully understood what they are teaching.
@OghmaOsiris Ok, so since you were wandering into bubble sort territory, let's recap how insertion is supposed to work.
@RMartinhoFernandes That would be helpful as I've never done it before, lol.
19:36
Ok, insertion sort works by always keeping the initial part of the array sorted.
Basically, each (outer) cycle you grab the next value, and put it in its place in that initial sorted portion (the part with the outlines in the picture).
Do you understand that?
@RMartinhoFernandes Yeah. I get that.
Ok. I think it's better if you rewrite the algorithm instead of working what you have into that.
Let's start with the inner loop, which is responsible for the "put it in its place in that initial sorted portion" part.
So, say you have elements 0 through i-1 (I'm going to use i for the outer loop and j for the inner loop) already sorted. As if you can see from the animation, the first thing the inner loop should do is store the element that we will be putting into place, which is at index i.
why do floats get padded with 0's as the numbers get bigger
So, we get something like int current = a[i];.
Now, after that, the elements in the sorted portion are shifted to the right until a suitable position is found for our current element.
How do we determine a suitable position?
@RMartinhoFernandes if current < previous?
19:45
Right, because we're sorting in decreasing order (I almost forgot that).
And the shifting part we already know how to do, x[j+1] = x[j];.
So, we'll have for(???; current < x[j]; ???) { x[j+1] = x[j]; }.
Now, look at that animation above and notice in what order the elements are shifted.
We shift the elements on the right first.
That's so we don't write over anything we will need later.
So, that means the inner loop will work backwards.
With me so far?
@RMartinhoFernandes A little...
See if you can fill in the blanks in the inner for loop.
for(int i = current; i < x[j]; i--)
?
Almost. current stores the value not the index. (And you swapped i and j:) It should be something like:
for(int j = i-1 /* start from the index before current */;
    j >= 0 /* don't go past the beginning */ && current < x[j];
    --j /* decrease */)
(Again I'm using i for the outer loop and j for the inner loop)
You get that?
Ok, I think I get it.
19:56
Neat. Now, what happens after the shifting?
on the inner loop I'm doing the x[i+1] = x[i]; right?
And the outer loop I'm storing the current value?
Right. You store current before starting the inner loop.
I don't see where my initial went wrong then.
The loop. It's backwards.
Ok. I see that now.
19:58
Yours was forwards.
How would I reverse the order then?
Swap the comparison. > instead of <.
on both?
for(int j = i-1 /* start from the index before current */;
j <= 0 /* don't go past the beginning */ && current > x[j];
--j /* decrease */)
?
No, just the current vs x[j] part.
You don't want j to be <= 0!
Ok, I switched just the one comparison, and its still in increasing order.
20:00
Show the code.
for(j = 1; j < length; j++) // Start with 1 (not 0)
{
key = x[j];
for(i = (j - 1); (i >= 0) && (key > x[j]); i++) // Smaller values move up
{
x[i+1] = x[i];
}
x[i+1] = key; //Put key into its proper location
}
@OghmaOsiris You forgot the -- instead of ++ :)
If you do that, it works fine: ideone.com/ooGm2
I honestly don't see the difference between your code and what I had, other than that one --
That ++ makes all the difference :)
What I meant was, i fixed the -- and it still wasn't working.
20:05
It just would be difficult for me to explain it without just giving it out :)
Can someone explain why a double when it is pow(2.0,1000.0) returns a number that loses precision? It gets padded with 0...setprecision doesn't work
@OghmaOsiris The sort or the whole isGraphical thing?
@LewsTherin Because you have a number with 4 digits?
@RMartinhoFernandes The sort.
@OghmaOsiris ?
@OghmaOsiris Oh, wait, you got a typo in the condition. You need to use key > x[i] (note i instead of j). Guess I should've gone with your loop variables :( Sorry about that.
20:07
@RMartinhoFernandes It works now, with your code lol.
But now I need to figure out the recursive algoritm.
@OghmaOsiris Ok, you need help to get it working or to understand it?
@RMartinhoFernandes A little from column a, a little from column b.
Ok. Gimme few secs to re-read the problem description.
I think I get the overall concept, but I'm guessing my base case is off, or what I do with the array after I test the base case is off.
  if (degrees[start] == 0){
      if(degrees[end] < 0)
         return false;
      else
         return true;
  }
This?
Let me see if I understand. Since the array is sorted, you're assuming that if the first value is 0, it's either all zeroes, or it ends with a negative number.
Did I get that right?
20:15
@RMartinhoFernandes Yeah
If it has a negative number at the end after being sorted, then the graph isn't graphable.
Ok, first problem is what end means. Note the loops you have all around. You're stopping those loops when i < end. And here you're accessing degrees[end]. Either end is not a valid index, and that's why you want i less than it but degrees[end] is wrong; or it is a valid index, meaning degrees[end] is right but the loops are not going through the whole array.
So echo $LINES outputs 26 - as expected - but getenv() returns null pointers for it. It works with every other environment variable. Any ideas?
The first option (end is actually the length, and thus not a valid index) is the simplest, I believe. Just change degrees[end] to degrees[end-1] and it's all valid now.
Bah, the GCC concept checks haven't been updated for C++11 :(
@RMartinhoFernandes That fixed it... lol
20:19
It works for all test inputs you have at hand?
Hmm, I think it's not completely correct yet :)
@RMartinhoFernandes Yeah. I was reading in a file and it worked for all the arrays in the file.
      isIt = isGraphical(degrees, start+1, end);
Only it's off by 1. It's outputting 1 extra at the end.
Why are you incrementing start?
Because I'm incrementing through the array.
20:20
As I understand it, the recursive call should still work on the whole sequence.
This is the prototype given to me in the assignment.
Wait, I understood it wrong.
;)
Here are a couple of hints. The easiest way to do the sorting for this problem is to use the insertion sort algorithm you learned in CS 191. For your recursive algorithm, you’ll need three parameters: the address of the array, the starting index, and the ending index. Suppose your function has the prototype
bool isGraphical(int degrees[], int start, int end);
For the recursive call, the address of the array and the ending index don’t change, but you drop the first array element by increasing the starting index by one. Therefore, the recursive call looks like this: isGraphical(degrees, start
That's the rest of the assignment, lol
Yeah, that's right. I was confused.
@RMartinhoFernandes Believe me, you're not the only one, lol
But now to figure out the off by 1 error... Let me update my question so you have my current code.
20:23
Paste it somewhere instead (like ideone.com). It's a bit weird to make existing answers meaningless.
Yet another "I have a reinterpret_cast and I'm not afraid to use it" question:
0
Q: char* to double and back to char* again ( 64 bit application)

user965772I am trying to convert a char* to double and back to char* again. the following code works fine if the application you created is 32-bit but doesn't work for 64-bit application. The problem occurs when you try to convert back to char* from int. for example if the hello = 0x000000013fcf7888 then c...

@OghmaOsiris hope your lecturer doesn't find this :P
@LewsTherin Doesn't find what?
This transcript or whatever, from what I know they have a way to check assignments and stuff... My college is really against it...try not give him the answer but explanation should be ok
There's something very wrong with the educational system when you're punished for seeking help.
3
5
A: In C++11, what is the point of a thread which "does not represent a thread of execution"?

Howard HinnantNot just guessing: "thread object" refers to a std::thread. "thread of execution" refers to the OS's collection of hardware registers that represent a thread. C++11 is doing nothing but papering over the OS's API for access to OS threads in order to make C++ threading portable across all OS's....

20:27
@RMartinhoFernandes The answers are still correct. And all the edits are saved in the question history.
i like the sarcasm with "not just guessing" :)
3
A: In C++11, what is the point of a thread which "does not represent a thread of execution"?

davmacJust guessing, but it simply means that the thread is not started. In other words, it is just an object like any other - there's not necessarily an actual OS thread behind it. To put it another way, if threads were implemented on top of pthreads, creating a C++11 thread object doesn't necessarily...

@RMartinhoFernandes Well, since I'm writing the code and figuring all this out, it's like going to the comp sci rescource center here at UMKC. Only you guys know how to help me, lol
@RMartinhoFernandes Also, I updated my code for your viewing pleasure, lol
@RMartinhoFernandes well yeah I think it is to encourage or force students to do it themselves... I believe what they don't like is to copy and paste code from a website
Ok, remind me what was going wrong now?
I included main, because I think the off-by-one is there.
20:30
Oh, bad while(!in.eof).
Did you teacher teach you that?
Xeo
Xeo
@RMartinhoFernandes Oh oh
No, lol.
@RMartinhoFernandes What would be better?
Oh, good. Because that's a very common wrong way to read until the end.
Xeo
Xeo
while(in >> var) { /*do stuff with var*/ }
What @Xeo said is the canonical way to do it.
20:31
@Xeo I'm reading to 2 separate vars, tho
@OghmaOsiris You can outsource all the reading into a function and do something like while(read_one(in, graph)).
Xeo
Xeo
@OghmaOsiris while(in >> var1 >> var2) { ... }
@Xeo It's a length prefixed series of values. It must be read in a loop somewhere.
@Xeo I just did while(in >> size) and then the rest of the loop.
it fixed it. :)
@OghmaOsiris That should work as long as the input is wellformed.
I guess that treating ill-formed input is not important here.
20:34
@RMartinhoFernandes The input was given to me by the prof. If it's not well formed, it's not my problem, lol.
Right.
So, everything works now?
@RMartinhoFernandes Yep! :D Thanks so much!
Xeo
Xeo
@RMartinhoFernandes Oh, sorry, didn't pay attention to what you talked about before :)
@OghmaOsiris nice
Can someone explain why a double when it is pow(2.0,1000.0) returns a number that loses precision? It gets padded with 0...setprecision doesn't work
lol
@OghmaOsiris You're welcome.
@LewsTherin Right-padded, I assume.
20:36
?
The zeroes, are on the right. Trailing.
yeah
and they get bigger with each result
It's not really my question..someone posted it on another site..and was just curious
Xeo
Xeo
@OghmaOsiris Btw, this should explain why your previous condition check was wrong n stuff
@LewsTherin ideone.com/45zdo
Bad compiler?
Oh wait, 2^1000 is probably infinite.
I want to see the full precision
Xeo
Xeo
20:39
Oh, I just noticed that I'm just 7 answers short of 500
that worked on my compiler as well...infinite?
@Xeo You recieve a gold star for that :)
> On the default floating-point notation, the precision field specifies the maximum number of meaningful digits to display in total counting both those before and those after the decimal point. Notice that it is not a minimum and therefore it does not pad the displayed number with trailing zeros if the number can be displayed with less digits than the precision.
@RMartinhoFernandes It's not.
Since you can write it down, lol.
@LewsTherin I checked, it's pretty close to infinite, but not really infinite, yeah.
@OghmaOsiris Try calculating 2^1025.
20:40
@RMartinhoFernandes Lol, no number is pretty close to infinite. there's an infinite set of numbers greater than 2^1000
Just being technical.
Xeo
Xeo
Ah, what should I do, what should I do... go to sleep early for once or play another game~
Xeo
Xeo
@OghmaOsiris In this room, it's called pedantic
@Xeo play another game
@OghmaOsiris No, really, I am being technical.
20:41
@RMartinhoFernandes so it is impossible?
It has to pad it?
@OghmaOsiris Not that infinite, one of the other ones.
@Xeo I'm used to math.SE.
Near the limits of double precision, it'll stop being able to accurately represent it.
They are completely technical about number theory like this.
Xeo
Xeo
Well, Math != Programming
20:42
@OghmaOsiris We're completely technical about IEEE 754 here.
@OghmaOsiris But this is floating point arithmetic. You're puny number theory is powerless against that.
Xeo
Xeo
Both have different views of "infinity" ;)
Except math is incredibly relevant to floating point o.O bounding error in calculations and what not
@Xeo Which is the point of my argument, lol
Xeo
Xeo
20:43
@LewsTherin No, I think I'll go to sleep for today. g'night @everyone.
@RMartinhoFernandes What to do about my question tho. If you were to somehow put all you taught me in an answer, I'd award you 15 internets.
@Xeo shakes head
@OghmaOsiris If you want I can make a summary and post a link to the chat conversation.
Xeo
Xeo
@LewsTherin I already played till morning yesterday, I can't shouldn't better not do that again!
@RMartinhoFernandes That would be best. I just don't want you to not get the credit you deserve.
20:45
@Xeo xD smart man...I lack such self control
Xeo
Xeo
Also, right now is a good moment to stop. I just finished one game and haven't decided on another one yet
I only play one game...I'm not much of a gamer really
@LewsTherin I thought Xeo was a girl
@0A0D oh ok my bad...he/she never corrected me lol
Xeo
Xeo
@0A0D Is it that GOM again, spreading such rumors?
20:47
@Xeo sbi said you were a girl, last I heard
@Xeo The Ape has been pretty quiet about that matter lately.
Xeo
Xeo
@0A0D that's the GOM I meant
What game are you guys talking about?
Xeo
Xeo
@RMartinhoFernandes Well, raising the suspicion once is enough to leave it afloat for years
@Xeo pics or gtfo
Xeo
Xeo
20:49
@0A0D Isn't that usually "tits or gtfo"?
@0A0D gtfo? Extreme much? lol
@Xeo I am a family friendly chatter
@JohannesSchaublitb Sire?
@LewsTherin word
Xeo
Xeo
@OghmaOsiris None specifically.
20:50
i will flag you
@0A0D sorry dude can't read/understand your cryptic mind
Xeo
Xeo
For me it's a japanese game, so I doubt many, if anyone at all, knows it
Sep 19 at 9:21, by Tim Post
Nonsensical flags will ensure that you are banned from chat for a protracted amount of time. They are disruptive to everyone in the room, and they needlessly eat moderator time.
Japanese people (>100M)?
Xeo
Xeo
:P
@JohannesSchaublitb for what nonsensical thing now? you know you'll be banned
Johannes Schaub was the mysterious flagger all along anyways
i flagged you for moderators attention
no you didn't
Xeo
Xeo
@0A0D Maybe @Johannes can be our FLAGship?
Because I have 10K+ rep and I didn't see it
20:52
you don't see moderator attention flags...
(char)int; -> what happens behind the scene in casting?
@JohannesSchaublitb yes yo udo
I do because I flagged
Xeo
Xeo
@MrAnubis search SO, there were some questions about it on the frontpage today
20:54
@JohannesSchaublitb well you might as well flag everything for the past hr because its all nonsensical and thats all that really gets flagged anyways
already did @xeo , no good results , just some talks of standard
@MrAnubis hate it when that happens
7
Q: Double to int conversion behind the scene?

yesraajI am just curious to know what happens behind the scene to convert a double to int, say int(5666.1) ? Is that going to be more expensive than a static_cast of a child class to parent? Since the representation of the int and double are fundamentally different is there going to be temporaries creat...

I know its not char to int, but maybe there's something in there
Xeo
Xeo
@MrAnubis Ok, specifically int -> char conversion is easy
Why does getting console size have to be so circuitous?
20:56
does that includes bit twidding?
Xeo
Xeo
Just cut off the excessive bytes
lol these flag fights ( seeing frequently these days )
@RMartinhoFernandes chat transcending to answer -> mindblown
20:57
@Maxpm It doesn't have to be, but C started out on Unix, and from the Unix viewpoint there is no console, just a rather strange file. C++ hasn't even attempted to change that basic viewpoint...
13 mins ago, by OghmaOsiris
@RMartinhoFernandes What to do about my question tho. If you were to somehow put all you taught me in an answer, I'd award you 15 internets.
Normally, I wouldn't write such an answer, but I was asked politely to do so.
@JerryCoffin Hrmm.
@RMartinhoFernandes I know, it is the first time I have seen that
its great man
You got 25 internets
I mean, it's a little ridiculous. I could either use ncurses or something - which is overkill - or do some low-level coding with ioctl().
Xeo
Xeo
Ok guys, you kept me awake long enough. :| G'night for real.. now.. hopefully! closes the laptop in a fast motion
20:59
(For which the documentation is lacking, by the way.)
@Xeo OMG it's night outside. Thanks for reminding me.
Xeo
Xeo
@RMartinhoFernandes pushes laptop open I probably should disable the sound before closing it...
@Maxpm On Windows, for example, you just use GetConsoleScreenBufferInfo, and then look at the dwSize member of the structure you passed. I suppose it could be made a bit simpler than that, but not a whole lot.
I'm trying to decipher an example I found somewhere. What the heck are TIOCGWINSZ and TIOCGSIZE?!
@Xeo G'night.
21:01
@Maxpm "Terminal IO something something WINdow SiZe" and "Terminal IO something something SIZE"?
After so many years since that idea, we are not interested in squeezing more
from that interesting (but outdated) idea of simulating concept checks in the
library. Long term, we want proper concept checks in the language. Thus, please
just build your translation unit without defining _GLIBCXX_CONCEPT_CHECKS (or
do not build the entire library with --enable-concept-checks and enable the
checks only on a case by case basis)
So no concept checks in libstdc++ because they'd rather have proper concepts.
@LucDanton WTF.
That's from december 2009 btw.
#include <unistd.h>
#include <sys/ioctl.h>
#include <iostream>

int main (void)
{
    struct winsize Size;
    ioctl(STDIN_FILENO, TIOCGWINSZ, &Size);
    unsigned short int Columns = Size.ws_col;
    unsigned short int Rows = Size.ws_row;

    std::cout << Columns << " columns, " << Rows << " rows." << std::endl;
}
@LucDanton Screwing users as revenge on the committee?
21:03
@RMartinhoFernandes Well that might be reading too much into it.
@LewsTherin Expulso!!
There's my working code. Now if I only knew how it works.
Xeo
Xeo
@Maxpm Omg you used std::endl!!
@LucDanton Likely, but I really like reading. So I read a lot ;)
@Xeo Yep. Because I do want to end the line and flush the buffer.
I'm not outputting anything else, after all.
21:04
std::endl breaks SRP.
Xeo
Xeo
I wish all C++ coder would think before using that manip
SRP?
lol @MrAnubis Impedimenta!
@Maxpm Single Responsibility Principle.
@RMartinhoFernandes What is that, in a nutshell, and how does endl break it?
21:05
@LewsTherin ouch..
Xeo
Xeo
@Maxpm One function / class == one responsibility
endl outputs a linebreak and flushes the stream
@Maxpm Similar to separation of concerns (on a smaller level).
@MrAnubis I can't remember a deflection spell :(
@Maxpm It says a single object should have only one responsibility (in this case it should theoretically write a new-line or flush the buffer, but not both). In your case, the stream will be flushed immediately afterward anyway.
@MrAnubis oh Protego!
I can't believe I forgot that..
21:07
@LewsTherin lol i was searching for this spell on google to hit you on our first spell first
Composition breaks SRP.
Not really.
Composition is not a function or a class.
@LewsTherin dakshin mann nazar
So SRP doesn't apply.
I'll worry about that after I figure out what the hell TIOCGWINSZ is.
Google isn't helping much.
21:09
@MrAnubis lol what! That is no spell I've ever seen CRUCIO! lol
Are you guys throwing Harry Potter spell names at each other or something?
4
@LewsTherin you got me lol
@Maxpm It's just the name of a constant you pass to get the size of a window (which will be the whole console as long as you haven't defined anything else in the way of windows).
@LewsTherin dakshin mann nazar hindi version of -> avada kedavra
@MrAnubis ahhh lol
shit you killed me
21:11
@JerryCoffin Right, the "request," but I'm not finding documentation for it anywhere. I feel like using it will only work on my machine.
@LewsTherin repairo!
Xeo
Xeo
@Maxpm Reminds me of refuctoring. Whoever invented all those C abbrevations must've been a master at that.
@RMartinhoFernandes yeah lol
@MrAnubis lol I'd be a zombie! :(
Heh.
@LewsTherin : i can't kill you , whom i will fight here then? :P
21:12
@Maxpm One of the shortcomings of the old Unix manual sections is that this ends up in section 7 (system administration) instead of 3, where is probably belongs. Pretty sure it's standard though.
@JerryCoffin Can't find it on POSIX. Unless the standard is another standard.
I'm typing it up on my Mac to see if it at least works on that.
It compiles, but it doesn't work.
Strike that, it works in a "real" terminal, as opposed to Xcode's built-in one.
Can't find a POSIX-compliant method to obtain the size of the console.
Hmm, what's this termios thing?
It's the POSIX terminal interface.
21:19
And that doesn't have size information?
Nope.
@JerryCoffin In fact, I found it on section 4, which makes some sense because it's the section on special files.
I guess this would be a good time to test D's compatibility with C.
@MrAnubis fair point but casting that spell in hindu was sneaky
I thought I would like to flag just for the lulz
@RMartinhoFernandes Why wouldn't you? It seems like it's the right thing to do. In case others get the same problem.
21:31
Uuuugh, the "environment variable" method is working on OS X.
Is there really no way to do this but use ncurses or something?
21:58
@RMartinhoFernandes I think I know what a fixed point is (an x for which f(x) = x), but I don't get that fix function at all :(
I don't even know where to start.
Better start with a fixed point definition then. It's math.
Ugh. So after everything, I can't find a stable solution for getting the dimensions of a console window. Asinine.
hi @FredOverflow @LucDanton

« first day (345 days earlier)      last day (4829 days later) »