« first day (709 days earlier)      last day (4248 days later) » 

6:00 PM
Linear programming (LP, or linear optimization) is a mathematical method for determining a way to achieve the best outcome (such as maximum profit or lowest cost) in a given mathematical model for some list of requirements represented as linear relationships. Linear programming is a specific case of mathematical programming (mathematical optimization). More formally, linear programming is a technique for the optimization of a linear objective function, subject to linear equality and linear inequality constraints. Its feasible region is a convex polyhedron, which is a set defined as the i...
 
wait
in C or C++?
 
does not matter. Maybe C would be better.
 
I'd say to learn any of LP, C, and C++ separate from the others.
 
@JaakkoSeppälä Of course it matters.
 
0
A: Qt, Color Picker Dialog?

LpcnewYeah man, I've been looking and looking too ... But I did find ... Check the documentation of the class: QColorDialog I hope I have helped you! Hugs. Sincerely, Lucas Pereira Caixeta

Best answer. Ever.
 
6:02 PM
if you're programming in C then a C++ book won't help you for shit, and vice versa.
 
Then grab something like the GLPK if you want to use LP from C or C++ gnu.org/software/glpk.
 
and it seems to me that LP is a fairly random mathematical technique- why wouldn't you just learn LP, learn C++, and put the two together yourself?
 
@DeadMG Well, I was trying to solve one problem. I'm more familiar with C.
 
Also, lpsolve is quite cool.
 
@JaakkoSeppälä Then a C++ book won't be of any value to you.
 
6:03 PM
Y'all want to see an interesting problem? Maybe one of you has experienced this weirdness before?
0
Q: Floating point exception ( SIGFPE ) on minimal program

ChimeraI am trying to build a simple C program for two different Linux environments. On one device the program runs fine, on the other device the program generates a floating point exception. The program does nothing but return 0 from main which leads me to believe there is some incompatibility with the...

Greetings @Drise
 
That's quite weird.
 
@DeadMG I have also read basics of C++ but just basics.
 
@Chimera Can you test with different compilers?
 
@R.MartinhoFernandes With an older compiler the problem doesn't appear
 
In that case, I'd check the bug tracker.
 
6:05 PM
@Chimera Even older than 3.2.2?
why not try a newer compiler?
 
@DeadMG Lemme check....
 
You should be shot for using GCC 3.
You should be shot for using Linux 2.4.
 
@rubenvb Well, it's a legacy embedded device with millions of them out there using the old environment... so not easy to upgrade.
@rubenvb And hence the push now to get this stuff to work on our devices with newer build tools etc.
 
@Chimera I'd also try different optimization levels.
 
@DeadMG The oldest we use is 3.2.2
 
6:10 PM
so
 
Xeo
@Chimera Maybe some problem with any statically linked lib?
 
how mature do we want to bet the LLVM linker is?
 
NOt.
@Xeo In a nop program? Only the stdlib.
 
yeah.. I figured that
 
@DeadMG I'm betting on the "still not able to hold its own baby bottle" level of maturity.
 
6:11 PM
I want to go back to working on Wide
I had a few design insights
but I'm not really feeling like it's possible to make a "compiler" when you can't link.
 
Xeo
lld is pretty new, though.
 
@DeadMG Spit out C++ code?
 
Xeo
And I find it really sad that they didn't abbreviate it as lold in the end. :(
 
At least so you can test it and derive some dopamine from it.
 
@R.MartinhoFernandes Who would link that? Certainly not me, since I don't have a linker. :P
 
6:13 PM
@Chimera my money is on libc trying to use some extension/instruction that doesn't exist on celeron
 
Well the problem happens with only the shared std c library.

int main()
{
return(0)
}

Boom.. floating point exception... weird.
@Flexo Yeah, I'm guessing it is something with the startup code in libc.
 
@DeadMG You spit out C++ code and then run it through a regular C++ compiler. I'm not talking about some end product, but about a setup you can use to make progress in other areas.
 
as well
 
Xeo
@DeadMG Can't you use MinGW and GCC?
 
@Chimera your other option is to dissasemble around the instruction pointer when you get the signal
 
Xeo
6:14 PM
(Assuming you want it to compile on Windows. On Linux, I don't see your problem.)
 
@Flexo Ah that's a good idea
 
should be fairly obvious if it's a funky modern instruction
 
that wouldn't really produce a new standalone compiler
 
Hello guys.
 
Xeo
@R.MartinhoFernandes Wouldn't that be round-about? Wide -> IR -> C++ -> IR -> Link?
 
6:14 PM
@DeadMG use either VS link.exe or binutils ld.
 
@Xeo Gosh, it's better than Wide -> IR -> what now?
 
the VS case isn't standalone, the binutils one is fine
 
Xeo
@DeadMG I guess you'll have to depend on a system linker until lld is mature enough
@R.MartinhoFernandes How? IR links the same from any source, I take it.
 
Or link at an IR level
 
Xeo
@DeadMG's problem is the dependency on a system linker
 
6:15 PM
and then just spit out an exe
 
@Xeo Oh.
But that's not a showstopper.
 
@Chimera I've found biew (now beye I think) to be good for that in the past
 
@Xeo Right. I don't want to depend on MSVC or GCC. If I make a compiler, then I want it to be a compiler in it's own right.
else kinda defies the point
 
Xeo
I can understand that.
 
Well, you keep working on it until lld is ready.
 
Xeo
6:16 PM
But why not rely on either of the two until lld is working?
 
@Flexo Ok I will look into it.
 
I could do that, I guess.
 
@DeadMG binutils isn't part of GCC. And on Mac you'd be completely lost without the system linker.
 
I don't see why it prevents you from working on Wide right now.
 
Xeo
@rubenvb Does that actually work for linking system libraries?
 
6:18 PM
@rubenvb As far as I'm concerned, if it's not possible to link for Mac without depending on an Apple external program, then Mac support can just wait until it is. Or burn.
 
anyone know if netbeans master password has a max length? :S
 
Xeo
You know, since every other program out there, that compiles on Mac, relies on the system linker, I don't see a problem for you to rely on it aswell
 
Why the heck does NetBeans need a password?
 
Xeo
It's the same for C++ through Clang/LLVM on Linux and Windows
 
@Xeo No, that would be part of the "spitting out an exe" part..
 
Xeo
6:19 PM
It relies on having a system linker ready.
 
@R.MartinhoFernandes I don't know. Public PC maybe?
 
Xeo
And I really don't see a problem with that, honestly.
Btw, how does Haskell link its stuff?
I remember reading it can be compiled down to assembly or something?
 
@Xeo What, Haskell isn't compiled down to assembly?
 
sbi
> I've reached a point in my physical fitness where a 15 minute stand-up meeting counts as exercise. — Bill the Lizard
 
@R.MartinhoFernandes I like to be safe. for encrypting svn passwords
 
6:21 PM
I thought there were a few backends for ghc
 
Oh. svn passwords.
I forgot those things existed.
 
GHC on Windows uses MinGW.
 
I just use SSH
 
@DeadMG It is.
 
Xeo
6:22 PM
Ah, right, GHC does compile it down.
 
man
I so should not have eaten those pasties
 
Xeo
You so should just rely on a system linker.
 
And keep it simple and use ld.
 
Good evening!
 
@rubenvb ld doesn't seem to have an api :(
 
6:28 PM
@rubenvb So which did you really want? "Keep it simple" or "use ld"?
 
@DeadMG no system linker has an API.
the API is exec or CreateProcess.
 
@rubenvb So what you're saying is "Pointlessly serialize everything to disk so I can depend on an external program to deserialize it, process it, and write it back out to disk"?
and this could never cause any problems with, like, filename conflicts, or anything like that
 
I take it you have an infinite amount of ram?
because if you ever want a large project to be compilable, I'd write stuff to disk.
 
@rubenvb I think that "Pointlessly copy the data into the address space of another process" probably increases the RAM requirements.
 
There's always tempfiles
 
6:30 PM
oh
not to mention the complete lack of, say, type or compiler safety
 
Be my guest to use a nonexisting tool for the job and keep a shitload of info in memory.
 
@DeadMG Hmm, everything is a file, remember?
 
void* all the types!
 
@R.MartinhoFernandes Argh, not that again ^^
 
6:32 PM
And since when is linking not typesafe?
 
mmap a file, write stuff there, dup that file descriptor into stdin or something, fork, exec ld. (Disclaimer: I'm totally not thinking this through)
 
Types are already gone at link time.
@R.MartinhoFernandes windows has no mmap nor fork but probably some roughly useful equivalents
 
@rubenvb Since you had to pass all the arguments as magic strings.
 
Xeo
@rubenvb CreateFileView and CreateProcess should do, though
 
@rubenvb Not of fork.
 
6:33 PM
@R.MartinhoFernandes you'll need fork+exec anyways, so CreateProcess.
 
@rubenvb MapViewOfFile, I believe.
 
@Xeo CreateProcess is nothing like fork+exec.
 
Xeo
@R.MartinhoFernandes Why fork anyways?
 
@Chimera Oh hey.
 
@Xeo To keep the file descriptors.
 
6:34 PM
@DeadMG so, hardcoded magic strings or hardcoded calls to a nonexistent API. I think I understand your issue much better now.
 
@Drise How goes it man?
 
It is doable with CreateProcess, but needs a completely different approach.
 
Xeo
@R.MartinhoFernandes I don't follow.
 
@R.MartinhoFernandes huh? In this case the difference is negligible.
You call an external program, keep file descriptors.
That's CreateProcess.
 
@Chimera Been better. Had a few setbacks last night with you know what. The problem with being a data hoarder is that I have a lot of old documents, one being the conversation Catherine and I had saying that would we be plenty happy growing old together. It came off an old backup of her computer that I did for her when she got a virus.
 
6:36 PM
Somebody downvoted this answer. Think it was because I took a given comment and provided an answer using a complete code example just to show how to implement the comment in code. Was this bad?
0
A: What's the best way to toggle the MSB?

ChimeraAnd to just put it all together in some sample code for GCC: #include <stdio.h> #define clz(x) __builtin_clz(x) int main() { int i = 411; /* 110011011 */ if( i != 0 ) i ^= (1 << (sizeof(i)*8 - clz(i)-1)); /* i is now 10011011 */ printf("i = %d\n", i); ...

 
@rubenvb lld has an API.
 
@Drise Oh shit man... sorry to hear that.... wound re-opened.... :-(
 
@DeadMG then use lld.
 
@Chimera Yea.
 
If that answer of mine is really bad, maybe I should just remove it?
@Drise Well, I feel your pain. I hope things get better as time goes on.
 
6:39 PM
@Chimera I'm trying to move on. It's just tough. Especially that I constantly feel so alone now. I have n idea where to meet new people, and it doesn't help being a programmer, since I'm usually behind my computer almost all the time.
 
@rubenvb Oh, you make the handles inheritable. Well that should work then.
 
@rubenvb Actually wouldn't the closest thing to CreateProcess be posix_spawn?
 
@Drise Yeah, it is hard to move on... especially when it just happened and you guys had gone so far...
 
@Xeo exec replaces the current process. It only returns on error.
 
@jornak I started the other way around. I currently use CreateProcess on Win32 and fork+execlp on POSIX. I'll need to rewrite my command generation though, cause I can't just hand execlp a huge command, but it needs to be split up in program and an array of arguments :(
 
6:41 PM
@rubenvb Ah, okay.
 
@Chimera I honestly wonder how she's handling it, if she's struggling just as much as I am. Maybe it would be better if I didn't know.
 
sbi
> What kind of mom gets her son fossilized pterodactyl teeth for his birthday? — Matthew Inman aka The Oatmeal
 
Ell
@Drise Yeah, put her out of mind :)
 
@Ell Trying. It doesn't help when I dream almost constantly about her.
 
@Drise Well if she is struggling with it, maybe you can patch things up? Or is that not even on the table?
@sbi A mom with a geek for a son?
 
sbi
6:44 PM
@Drise Usually it's easier for the party that actively did the separation.
 
@Chimera No. You don't break anyone's heart like this and patch things up. The pieces are never the same.
 
sbi
@Chimera Looks around. Is here anyone who does not have a mom with a geek as a son?
 
@Drise ok... :-(
@sbi LOL!
 
Ell
Do you think "geek" means socially awkward/inadequate?
 
@sbi turn off that privacy scandalizing interwebz vizion!
 
6:48 PM
@Chimera Not only that, but she explicitly stated "There's no turning back".
 
@Drise Man, yeah... that sounds final.
 
suppresses inappropriate joke
2
 
sbi
@Drise If I might be so bold as to make a suggestion: 1. Try to find out why you two failed — but only later! You need some distance first. 2. Don't try to replace her. You will eventually find something else later, but you'll never find a replacement that works out. 3. It's time you patch up that web of friends, which you (hopefully) once had. Happy people are those who have a tight net of friendly relationships around them.
 
Ok, leaving now. See you later.
 
@TonyTheLion the answer fixes the problem. so, asking for the point, i think you must be temporarily dumb.
 
6:49 PM
@sbi I don't have but more than a few friends. Like. 3.
 
sbi
@Cheersandhth.-Alf Really, the way you type makes my toenails curl. Please have at least the decency to correct the worst typos before you hit enter.
 
@sbi I know why we failed. Our careers would have kept us and hour and apart till we were about 28, and likely even longer.
 
@Cheersandhth.-Alf Does not solve the OP's problem at all. His question clearly relates to pointers and ownership.
 
sbi
@Drise Time to amend that, no?
 
6:51 PM
@sbi Ha! I'm a heavy introvert. I can't just magically make friends like other people.
 
@Drise Three is better than none. If they're good friends, they'll want to help you when things are rough and may even feel somewhat insulted/miffed if you don't turn to them. I know a lot of men really have a tough time with that, but it's true anyway.
 
@Drise Get slightly drunk. You'd be amazed what it'll do.
 
@JerryCoffin They are helping me. But I feel like a leech.
 
Ell
having a small group of 3 close friends is good
 
sbi
@Drise Ah, just like my daughter and her boyfriend then, being thousands of km apart, stretching the connection until it broke.
 
Ell
6:52 PM
and then more, less close friends
 
@Drise Show me a person here who isn't an introvert, and I'll show you somebody who ended up here by accident.
 
@sbi Sounds quite familiar.
 
@Drise I'm one of those guys who sits for 14+ hours a day on a computer; but when I actually go out to a social occasion (which is really uncomfortable at first), I find a little tequila goes a long way to make friends.
Which probably sounds alcoholic-ish, but I rarely drink <_<
 
@sbi How old is your daughter?
 
Ell
I meet friends at a minimum once per week, on the weekend but during the week i feel incredibly frustrated for lack of human contact
 
6:54 PM
@JerryCoffin I used to much more of an introvert. I pretty had to be to be so into computers etc when I was young. But as I got older, I've become far less of an introvert.
 
(9am to 5pm - working on a computer at work) (5pm to 1am - work/play on a computer at home)
Mind you, I may or may not be slightly autistic o_O
 
sbi
@Drise Don't. If you feel like you can never pay them back, resolve to pay forward the debt. That's what I ended up doing, and it feels good to do that now. (When my second wife moved out a few days before Xmas, for 3.5 days I always had some friend or another here, helping me to keep it up, feed the kids, buy and wrap presents for them, and prepare a Xmas they would enjoy. To have friends around 16hrs/day for such a long time a week before Xmas, I will never be able to pay back.)
@Rapptz She's going to be 16 next month. It was her first real relationship. They had just spent the whole summer (7 weeks) together.
 
@Drise The main thing to keep in mind is that socializing is a skill, and like almost any skill it can be learned. There's probably nobody here to whom it comes/came really naturally. But, do like any nerd: study. In this case, go out to a bar/club/whatever, and pay real attention to what people are doing, how they do it, etc. With a little work (and it will be some work at first) you can learn to do it.
5
 
@sbi Oh god, don't reveal the fact you have a 16 year old daughter to a bunch of introverted 20-30 year old men on the internet :P
 
@sbi Ah.. Not bad I guess.
 
6:57 PM
You guys are awesome. Maybe I underestimated my number of friends. :D
 
sbi
@jornak I have mentioned her age again and again here, so it's not really news,
 
@sbi It's a joke in respect to most young adults being somewhat ephebophile-ish.
 
Wow, it's almost as if they're attracted to someone around their age. Who would have thought?
 
Xeo
lol
 
@jornak From what I've seen, he really is pretty careful about things like that. He's mentioned her age before, but I'm pretty sure never said (for example) exactly how many other children he even has.
 
6:58 PM
@JerryCoffin Goddamnit it was a joke.
@Rapptz 20-30 attracted to 16?
 
I think 30 is a stretch.
 
Xeo
@jornak 4 years is nothing, really.
 
Also.. 46 attracted to a 32 year old?
 
@Xeo Eh, I guess. I mean I can't really talk. I was 22 and had a 16 year old girlfriend >_>
 

« first day (709 days earlier)      last day (4248 days later) »