« first day (513 days earlier)      last day (4426 days later) » 

12:00 AM
Of course, why not.
 
Yes
 
So you're saying that x0 = 0?
 
correct
 
So you don't need 5 equations, no?
 
Take it out then. Work only with the other four unknowns.
 
12:00 AM
I am trying to solve the system in Python using numpy but it doesn't like me using just a plain zero
 
So the system of equations you really have is:
x1 = 1+(1/24)*(8*x1 + 2*x2 + 8*x3 + 4*x4)
x2 = 1+(1/24)*(4*x1 + 4*x2 + 8*x3 + 8*x4)
x3 = 1+(1/24)*(6*x1 + 3*x2 + 8*x3 + 6*x4)
x4 = 1+(1/24)*(4*x1 + 4*x2 + 8*x3 + 8*x4)
Which is not yet in canonical form
-1 = (16/24)*x1 + (2/24)*x2 + (8/24)*x3 + (4/24)*x4)
-1 = (4/24)*x1 - (20/24)*x2 + (8/24)*x3 + (8/24)*x4)
-1 = (6/24)*x1 + (3/24)*x2 - (16/24)*x3 + (6/24)*x4)
-1 = (4/24)*x1 + (4/24)*x2 + (8/24)*x3 - (16/24)*x4)
 
right
somehow my program is still giving me wrong values
even after making that adjustment
 
So the coefficient matrix sould be something like
 
Multiply the whole thing by 24, for humanity's sake.
 
12:09 AM
@RMartinhoFernandes: Well, it is in canonical form. :-)
 
I multiplied it all by 24
 
@JohnSmith: Have you double-checked your work?
 
Doing it now
Trying to see if I am screwing up some fundamental issue here
 
Solve the damn thing by hand, check with wolfram alpha
 
And the fastest way to solve it by hand is to reduce the A|b matrix!
 
12:18 AM
agh rage-inducing
Even by hand it's not making sense
I know it has a solution damn it
 
ask Wolfram Alpha
 
just did
 
Damn. Sole Google result for 'cabal "missing c libraries" ncursesw' is in this room.
 
oh dear God
I wrote some rendering code and it worked first time
 
... and then you woke up?
 
12:23 AM
nope
even the D3D Debug Runtime didn't find anything suspicious
 
AAGgghhh.
 
also, I guess you can hardware instance with a very liberal definition of "instance"
 
@DeadMG So you're still dreaming?
 
could be, could be
and I am kinda sleepy
mb hit the sack soon
 
its telling me solve {{12,0,8,0},{-16,2,8,4},{4,-20,8,8},{6,3,-16,6},{4,4,8,-16}}*{b,c,d,e}={-24,-24,-24,-24} has no solution
 
12:27 AM
Maybe it's {24,24,24,24}?
 
gee, what's with all the 24's?
 
sorry meant solve {{-16,2,8,4},{4,-20,8,8},{6,3,-16,6},{4,4,8,-16}}*{b,c,d,e}={-24,-24,-24,-24}
it's part of a problem i am working on
for fun
right now not so much fun
 
Let's see if PDCurses can work as a drop-in replacement for ncurses...
Seems not.
 
SNAP, that worked
thank god
 
it's OK, no need to thank me, you did the hard work
 
12:30 AM
still working on it but thanks yall
 
no probs
 
Gee, screw it. No Windows support.
 
lol
 
Cygwin?
 
Crappy Windows terminals probably don't support the features I'd need anyway.
 
12:34 AM
It has ncurses.
 
@CatPlusPlus Hmm, I could try that.
 
and they do support it
you can play DF on Windows all you like
 
@DeadMG DF uses OpenGL.
 
really?
 
YYYESSSSSSSSSS GOT IT
AAHAHAHAHA
 
12:34 AM
Lol.
 
It just happens to render text-looking pictures, but that's not text.
 
then why do they have such shitty ASCII graphics?
 
Why not?
 
Because 'they' is essentially one guy.
 
@DeadMG Because Toady doesn't want to bother with graphics.
 
12:35 AM
if you're gonna go to the effort of rendering with OGL, you could at least render something worth rendering
 
So think of all that as placeholders.
 
It supports tilesets and TrueType fonts even lately.
 
@DeadMG Other people can change the text-looking pictures into pretty things.
It's customizable.
 
And really, rendering bitmap fonts with OpenGL beats dealing with crappy terminals.
Besides, we like ASCII graphics.
(It also beats programmer art.)
 
Ok, installing Cygwin.
Oh, this thing has a package manager?
@ScottW What? @DeadMG managed to install it.
 
12:38 AM
That says a lot.
 
I don't expect it to be troublesome.
 
hey!
 
Because if it required the minimum amount of effort, the puppy would have just binned it.
 
excuse me for wanting to use my programs instead of develop them first and then use them
 
12:39 AM
@DeadMG Not implying inability, only... unwillingness to jump through any hoop.
 
I have standards
 
Rebasing? Isn't that something you do with git?
 
Cygwin rule #1: if you have more than one cygwin1.dll, don't.
 
the Windows dynamic linker can rebase DLLs as well
you have to explicitly turn it off in the PE header, I think
 
Nice, I capped yesterday. Only 7 to go!
So, are Cygwin packages native or emulated?
 
12:44 AM
POSIX calls go through cygwin1.dll.
 
So, can I ship cygwin1.dll and an exe and it works?
 
This thing takes forever to install.
 
Just a typical day in Cygwinville.
 
Ok, I should be writing code, not looking at Cygwin's progress bar.
 
12:47 AM
argh
you know what I hate?
 
You can worry about Windows on Friday.
@DeadMG Everything?
 
no retail games function properly with the Direct3D Debug Runtime
 
What did you expect?
 
@CatPlusPlus More specifically :P
 
You need to compile with some additional stuff for debug runtime, no?
 
12:49 AM
no
it's a DLL switch at run-time, with the value loaded from the registry
dumb system, of course, it should be a compiler switch
 
How do I access C: from Cygwin's shell?
And if I call non-Cygwin executables, can I pass them Cygwin paths?
Or do I need to work out the real paths?
 
cygpath converts back and forth.
Non-Cygwin executables won't translate on their own.
And Cygwin executables probably don't expect non-unix paths.
It's fun!
 
you can just access `C:\` directly
Cygwin will just cry but it'll work fine
 
ls C:\ disagrees
 
12:58 AM
too many slashes
besides, I usually went cd C:\` and then ls`, as it were
 
Oh.
Backslashes need to be escaped.
Windows allows both slashes.
Arrgh, still no worky.
I'm hacking ncursesw away from the list of dependencies of UI.Ncurses.
Then I drop the dll in the executable folder and it magically works! crosses fingers
 
Right.
 
Say, I've been itching to use a scoped enumeration lately, in the style of enum class op { foo, bar, baz, size };.
The size enumerator is the usual trick to allow T dispatch_table[op::size];.
 
Except of course that doesn't work because there's no implicit conversion here.
 
1:05 AM
It doesn't convert implicitly, though
 
So how abusive is it to define a unary operator+ to convert?
T dispatch_table[+op::size];
 
enum classes need member functions.
 
@RMartinhoFernandes lol
 
IMPLICIT CONVERSION OPERATOR!
 
1:06 AM
Make a dispatch table that isn't a native array.
 
Just checking to make sure that I only ever use that + for array sizes.
 
Then you add an operator[] that takes the enum.
 
@RMartinhoFernandes Wait. Wait. Wait.
Make?
 
Whatever you want to call it.
Write.
Frak notepad and not handling LF-only text.
 
template<typename T, op O> using dispatch_type = std::array<T, static_cast<int>(o)>;
 
1:08 AM
That won't work.
 
Oh wait, no operator[].
 
But yeah, basically a std::array look-alike with a smart operator[].
You can even template the enum type for reuse.
 
That's dumb.
 
I prefer that to abusing operator+.
 
I'm going with struct op { enum { foo, bar, baz }; }; again.
 
1:10 AM
That's better.
 
The number of times where I think I could use a scoped enumeration but end up using that instead is growing...
 
Yeah, scoped enums are not as good as they should.
 
Oh yeah, have to do struct op { enum type { /* ... */ and replace instances of op with op::type.
 
looks up tar man page, again
 
tar xf, tar cf, tar tf, what more do you want?
 
1:14 AM
@LucDanton Why?
 
eXtract Compress lisT
 
@LucDanton Order of input - output.
I always forget that.
 
Archive comes after f. Probably.
 
See, you don't know either.
Quick, what's the order of ln arguments?
 
Actually I wanted to make fun of the mnemonics: what the hell does t mean?
@RMartinhoFernandes Link then target.
What do you know, I got that wrong. Again.
 
1:17 AM
:P
Everyone gets that wrong.
 
Last time I read the manpage I finally figured out why it's that way: put last what is being created, like for cp or mv. Guess that lasted for what, 5 days?
 
Ok, fake ncurses-0.2.tar.gz is made. Now let's see if I can fool cabal with it.
 
@RMartinhoFernandes I map another type to enumerators so I have a lookup array of std::pair<T, op::type>.
 
Oh, right you can't use op as it's an empty type.
Woot! It worked!
It's building!
I win. Again.
 
And as usual, the end result looks just as neat as it could with a scoped enumeration with no need for tons of boilerplate, type safety be damned.
How can scoped enumerations lose to the silly integral conversions/promotions of C? Gah.
 
1:22 AM
Oops, lots of undefined references. I guess I need to provide a path to find the ncurses lib.
 
@RMartinhoFernandes Btw, I'm still on the lookout for possible abuses of range-for.
 
What have I unleashed?
 
Notably if there were std::begin/std::end support for std::pair as originally proposed you could do for(auto&& item: std::equal_range(foo, bar)) { ...
 
Link, dammit!
Frak.
 
Thought of that because I'm tired of typename foo::bar::baz<quux>::iterator it; if((it = std::find(c, val)) != c.end()) { ...
 
1:26 AM
I wonder if I can pass .a files directly to GHC.
> libcurses.a: file format not recognized; treating as linker script
Guess not.
Time for the docs
 
@LucDanton Can't you just do if (auto it = ...?
 
@DeadMG static_cast<bool>(it) is worthless.
Since I was using std::array (which uses T* as iterator here) it did in fact compile, too.
 
ah yes, I see what you mean
 
Have one of you guys, by any chance, ever tried using a boost::circular_buffer<Eigen::Vector3f>?
 
Hmm, maybe I can leave this as is and do just the linking with Cygwin's gcc...
 
1:31 AM
I'm looking up the docs for Boost.Range and apparently there's the possibility to get a range out of a call to e.g. boost::find but apparently never the range I need.
 
Eigen's statically-sized types are very alignment-sensitive.
 
@LucDanton Isn't it the range from the item to the end?
 
What do you need a circular buffer of vectors for, anyway?
 
That's what Andrei went with for his lib.
@CatPlusPlus Curved vectors.
Wait, Cygwin doesn't bring ld?
 
@RMartinhoFernandes It's always from one end to either the other end, or to the iterator, or to the next iterator. Never from iterator to next, unfortunately.
 
1:33 AM
@CatPlusPlus : FIR filter of a 3D geometry vector (motion analysis project)
 
@RMartinhoFernandes What would it be good for?
 
Linking.
GHC doesn't like .a libs.
 
Derp. I thought you're talking about ldd.
Stupid POSIX names.
 
I'm getting weird segfault problems and I'm thinking that circular_buffer's allocator is not playing nice with Vector3f
 
As I said, very alignment sensitive.
 
1:34 AM
AFAIK, normal allocators aren't intended to cope with SSE types
 
Use dynamically sized ones.
Or the allocator that comes with Eigen.
 
but misaligned access is not a failure on x86, as far as I'm aware, just bad performance
 
Eigen has a ... yeah that.
 
@DeadMG Even for SSE types?
 
Misaligned access to SSE types is a failure.
 
1:35 AM
ah
 
You need to specifically use unaligned access instructions.
 
The platform giving me grief is the iPhone 4S. Eigen tries to use NEON vectorization.
 
You can also disable vectorisation, but that's probably a silly option.
 
Not so silly, the linear algebra only uses tiny % of CPU
 
I can install MinGW gcc in Cygwin?
 
1:37 AM
I saw that doc, but it says it only applies to Vector2f, Vector4f, etc. And I'm using Vector3f.
 
And boost::equal_range still returns an std::pair, what a shame.
 
Ah, 3f is not vectorisable.
Then it's probably something else.
 
As much as I'd like to abuse range-for I'm not going to write a find to enable for(auto&& found: find(c, val)) { just now.
 
1:40 AM
@LucDanton But you will in the future, I suppose.
So, Iraq is still fucked up.
 
@RMartinhoFernandes Not so sure. Seems like a lot of hassle to save one line of code at each site.
 
Great job, America.
@LucDanton But, but, ... Ranged-for is so enticing.
 
Some people complained about circular_buffer's iterator validation. The crash logs always point to 'invalidate_iterators', an internal function of circular_buffer.
 
@RMartinhoFernandes It is! But find isn't.
 
@LucDanton You can write a wrapper over std::find that turns the pair into an optional...
 
1:43 AM
Anyways, I disabled both Eigen's vectorization and circular_buffer's iterator validation. I'll have to wait to hear from my beta tester with the iPhone 4S too see if the segfaults go away.
 
I'm gonna hit the sack guise
 
@RMartinhoFernandes Oh.
 
have fun
 
later
 
1:43 AM
Y u do dis to me.
 
Chrome is a liar.
 
@CatPlusPlus : Thanks for the tips.
 
I've set up this whole Google login thing, and it still asks me for a password every third day.
I am disappoint.
 
And now they have all your logins! Mwahahaha!
 
Right.
 
1:45 AM
Woot, I can invoke ld to manually link with ncurses. But now it's missing references to the Haskell runtime.
Frak.
 
How's "Be affably evil" for a motto?
 
Isn't a .a just a bunch of .os?
 
No F# support for MonoDevelop 2.8. :(
Yes. With index.
 
Maybe if I crack it open I can convince GHC to link them for me.
How would I open such a thing?
ar?
 
Isn't .os toolchain specific? GCC otherwise packs .o I think.
 
1:46 AM
Yes.
 
SCons and libtool both use .os IIRC.
 
It's just an extension.
 
True, true.
 
Well, GHC uses GCC as a backend.
 
Make it use Cygwin's GCC.
 
1:48 AM
What's the difference?
 
Object files might not be compatible.
 
Great.
> CreateProcess (null) : no error
 
2:13 AM
Anyone used Boost.Operators and knows some caveats e.g. regarding C++11?
 
2:24 AM
Cannot make GHC use Cygwin's GCC. Frakking paths.
 
IDEs. Are. Annoying.
 
wheredoiaskmyprogrammingquestion.stackexchange.com
 
3:05 AM
Oh, great, gDEBugger free license expired. Now I'd have to install broken AMD version.
Not cool.
 
Get a new one?
System.Console.ANSI works on Windows. I think I can use that.
Nah, no input.
 
It mentions some licence request dialog, but I can't really find it.
 
> The main object. At most one should be created. An alternative is to use unsafePerformIO to automatically create a singleton Vty instance when required.
Ewww.
 
And the stupid website just tells me to download it and "it'll ask on the first run". Except reinstalling doesn't help.
 
Is the license attached to the machine?
I thought it attached to e-mail.
 
3:13 AM
Hell knows, I don't know where the damn thing keeps it.
Oh, hey, found it.
 
Hey guys, i was wondering if anyone understood how to use a BFS on a puzzle where the purpose is to get a block from the left side to the right side (other pieces that have conditional movement may be blocking its path)
Anyone know any tutorial? etc? I just need a tip really cause i'm blanking
 
user406009
BFS is where you put the next item at the end of a queue.
 
Oh, it actually expired in December.
Guess I haven't worked with GL for a while.
And as I was creating a new project, I figured out why nothing was being drawn in my test program.
I forgot to swap buffers.
 
@EthanSteinberg It expands neighboring nodes prior to children, however i have no idea how to implement BFS on a puzzle
 
Dammit.
 
3:22 AM
@CatPlusPlus lol
 
user406009
queue aQueueOfStates;
aQueueOfStates.addState(startState);
while (!aQueueOfStates.empty())
{
state = aQueueOfStates.next();
if (state == win); printf("I won\n"); break;

foreach possible nextState in state
aQueueOfStates.add(nextState);
}
 
user406009
I don't even know what language I was trying to copy. Oh well.
 
Holy smokes, what a mess.
 
It builds so slowly.
Stupid GCC.
Ha, it works.
I'm a master of OpenGL (but not double buffering).
 
@EthanSteinberg Hum, so if i have multiple pieces i just add each possible move they can go to a que and then add each possible move from that move toa que and so forth until i reach a goal state?
 
user406009
3:28 AM
Yeah. If you want a path of previous moves you can store it in the state.
 
user406009
Guaranteed to be optimal if all move costs are equal.(Although probably slow)
 
user406009
You might need to watch memory, these things tend to balloon out of control with only a few possible moves.
 
@EthanSteinberg By watching memory what could i do to minimize memory use...?
 
user406009
Storing references to old states in some way rather than copying( if holding a list of all old states).
 
user406009
Probably don't need to worry about that though.
 
3:31 AM
@EthanSteinberg Okay
 
Also I break from inner loop and wonder why outer loop keeps going. Sigh.
 
Xeo
3:52 AM
goto-break is the only useful thing that Java added, imho.
 
@Xeo what is that?
 
Xeo
@Pubby Break to labels
 
How is that different from goto?
 
@Pubby Only jumps backward, and only into the beginning of a scope.
I think.
 
But how is that useful? Why not use goto?
 
3:56 AM
BECAUSE GOTO IS EVIL.
 
@Pubby Because it's restricted. There's no goto in Java.
 
What? I've used goto in Java before.
 
I'm sure you haven't.
 
Actually, my entire program was just one giant goto loop
 
goto is a keyword, but it has no associated semantics.
 
3:57 AM
Hmm, wonder what I did then
 
user406009
Well, with enough do...while loops and exceptions I am sure you could emulate gotos quite well.
 
That reminds me, some guy asked me for the source of that code a few days ago. Guess I'll go find it and see.
 
@Xeo It's only useful because you need nested loops all over the place.
 
4:11 AM
Damn, couldn't find it. I did stumble onto my first C and C++ programs though, surprisingly not as embarrassing as I thought.
Or I guess that could mean I haven't improved ;)
 
> if one of the variables is not a valid number (like 1, or 3000), (...)
 
4:26 AM
Yay, VBox installer killed my networking dead.
Apparently there was a dialog box that I couldn't see, and it just stood there, waiting for nothing.
<3 Windows Installer.
 
hi~
 
hello friend~
 
is someone stealing the rest of~
 
Not sure if this qualifies as off-topic. But let me ask anyway!
I'm playing with LLVM's lldb with a binary that compiled using clang++. lldb complains that the debugserver is not running when I run the binary using lldb. Anyone has any experience with lldb?
 
5:03 AM
what's particularly incorrect about ideone.com/0nZPW ? I guess the question really comes down to whether "template<template<typename...> class...> struct" is valid
 
HeadTypes isn't declared.
I can't recommend a particular fix because I don't understand what the specialization is supposed to match, sorry.
I think you want to flatten template specializations, let me write an example.
 
@LucDanton yeah, precisely. Sorry, it was clearer in the first few permutations
basically, join<a<b, c, d>, a<e, f, g>, ...>::type should be a<b, c, d, e, f, g, ...>
 
Right, that's a big clue on how you're supposed to declare the primary template: you operate on types, not templates.
Obviously those types will be template specializations but that's for the partial specialization to care about, not the primate template.
 
@LucDanton wow, that was a really trivial mistake
 
5:48 AM
actually, this looks like precisely what I want. it might be a bug in gcc-4.5.1: ideone.com/Km2ra (the extra class/typename identifiers on lines 14 and 16 are just there for clarity)
 

« first day (513 days earlier)      last day (4426 days later) »