« first day (652 days earlier)      last day (4295 days later) » 

5:00 PM
@RadekSlupik thats really sweat
 
sweat?
“Sweat” isn’t even an adverb.
 
Hi
Is there any way to retrieve audio data from the microphone using WinRT?
 
0
Q: How can I record voice from microphone in wave format in windows RT?

EmmaI was able to get the file in mp3 and wma format. But I need wave format.

Ask how he did it.
Or she. Whatever.
 
I put a bounty on it.
I know how to record in WMA format as well; but there's no way to get access to the underlying PCM data (apparently).
Although Microsoft would have to have idiots working for them to have no way to do it.
 
@IDWMaster That's really weird. Like they're trying to decide for you what format you will use. hand wave "These aren't the formats you're looking for."
 
5:07 PM
Is access to the raw PCM stream from a microphone REALLY too much to ask for?
 
@sehe got a Spirit question for you when you have a chance.
 
in PHP, 53 secs ago, by Radek Slupik
@AnPel Learn Haskell.
Hey Ell what’s up.
 
Ell
hey :)
just fell off my bike :L
 
Ell
how are you?
how is the bug tracker going?
 
5:22 PM
I started over.
I am good.
 
Ell
howcome you started over?
 
I was bored.
 
Ell
Ahh okay
fair enough xD
 
@LuchianGrigore is that meant to be on youtube?
 
@LuchianGrigore put another way how has that not been taken down yet?
 
Dunno
Just go with it
and don't flag it
 
Ell
o.O
 
5:52 PM
And now for some delicious pseudo-Lebanese food.
 
6:08 PM
well
I finally discovered something I approve of
 
Hi
I'm having a linker error with IActivateAudioInterfaceCompletionHandler.
Anyone know which lib to reference?
 
our idiotic government finally decided that our sunday trading laws were written by amoebas and relaxed them during the Olympics
for the next month, they're significantly better
 
@DeadMG every time I'm stuck in traffic I think to myself: "this could be 1/7th less bad if it wasn't for the bishops in the house of lords"
 
hi
 
6:24 PM
@Flexo It's 360p. Nobody cares.
 
woo, first gcc segfault.
 
ØMQ y u no compile.
 
@Node it won't be your last ;-)
 
@rubenvb been using it for ages, never come accross one before.
well "ages"
 
@Node Then you clearly didn't write any cool code before :P
 
6:32 PM
haha, touche
 
STDs!
0
Q: STD iterators to pointers; getting different types for code that should be equivilent?

ClairvoireI'm trying to get a regular pointer from an iterator, but a really peculiar thing is happening regarding the types I'm getting. I'll just post the code, I assume these two snippets are equal to eachother, but tell me if I'm wrong. The code leading up to the snippets is: CallbackTrigger trigger...

I don't want an STD iterator
unless it == STDs.end()
 
sbi
@Flexo Wow. Great. Now let's hope it's not closed as "won't do".
 
@Flexo It's crazy that you actually allow the parlement to partly consist of religious lunatics
 
@ManofOneWay yeah and they complain of being victimised if you suggest they should have to be elected like everyone else
 
Within living memory they actually did represent the will of the people, since most people attended church and put some trust in its leadership
 
6:43 PM
and then they claim they have majority support. if you really have support then being elected won't be a challenge
@TomW representing leadership of church != representing will of congregation of church
 
and how does a religious denomination expect to survive if they don't serve the needs of their congregation?
 
@TomW I'd love to know what the CofE answer to that is, but I suspect they're too far in denial to answer it.
 
sbi
@RadekSlupik As my kids know, those fists can be rather tender, if I want them to be.
 
well the main reason that it isn't surviving these days is that people simply don't believe, it tends to be pretty well thought of by the people who still attend though
I suppose that's fairly self-selecting
still, the reason there are clergy in the lords is that they DO hold a position of civic responsibility, however much you might like that they didn't
 
@TomW if I had a mandate for political form that would be on the top of my list of reforms :)
 
6:48 PM
@FredOverflow What if you overload the casting operators too?
 
evening all
 
Ohio
 
what's new?
 
Things that ain’t old.
 
what's RAII?
 
6:51 PM
Old.
 
lol
anyhow, I'm bored
 
Learn Haskell.
 
good idea
 
@Flexo Those guys are horrific.
 
6:53 PM
hi puppy
 
hihi
 
what you been doing?
watching YT vids?
 
went to the shop
 
breathing
 
6:55 PM
@RadekSlupik sometimes that forms a major problem for the puppy.
 
@rubenvb wut?
 
Does the puppy suffer asthma?
 
not that I know of
 
no
 
7:00 PM
I think bacon impedes the ability to breathe normally.
 
What the HELL is happening here? ideone.com/C8q5D
 
Bacon is good for everything.
 
never eat it
 
Why doesn't it work with vector<bool>?
 
7:01 PM
@ManofOneWay C++.
 
@ManofOneWay Specialization.
 
@ManofOneWay std::vector<bool> is a mutable std::bitset; it sucks.
Don’t use it.
 
basically, vector<bool> has an incredibly stupid specialization that everybody knows sucks
 
But I want to use a bitset :(
 
Use std::vector<char>.
 
7:01 PM
your only choice is to use std::deque<bool> or std::vector<char> or somesuch
 
There should be an override for specializations.
std::vector<bool!> or something.
I REALLY WANT BOOL!!
3
 
std::vector<!bool> - not bool?
give me any vector, just not bool!
 
just use std::vector<char> and stop whining. If you need a bitset, use std::bitset, or vector<bool> and know its limitations.
 
class ForceBool {
  bool b;
public:
  ForceBool(bool a) : b(a) {}
  operator bool() const { return b; }
  // DEFINE ALL THE OTHER OPERATORS
};
std::vector<ForceBool> foo;
 
@RadekSlupik don't forget all the operators.
Strong typedefs is all you need
 
7:05 PM
Woo! My SO profile turned 1 today.
 
C++ typedef --> alias (or using, but I like alias better). And then make typedef a strong typedef
 
What is alias?
 
Think bash.
It would be what using and typedef is now in C++.
it's just another name for the same thing.
A strong typedef is a new type. It would make the difference between char and int8_t overloadable.
so you could cout a uint8_t and get its numerical value.
/rant
 
Xeo
@rubenvb Err, you don't really need all the operators. implicit conversion to bool is enough
 
@RadekSlupik then use std::vector<BOOL>
 
7:09 PM
How difficult is AES-256 to crack if the password is a character or ten?
 
Xeo
the only place where it hinders is if you have an implicit conversion from bool somewhere, and pass the ForceBool
that can be circumvented with a templated conversion operator and some pretty SFINAE, though
 
oh
 
enum ForceBool : bool {
  True = true,
  False = false
}
 
Xeo
wrong order
pff
 
I think an enum (class) would be better suited
 
7:10 PM
@RadekSlupik You're missing a FileNotFound.
 
Oh wait that isn’t strong, it it?
 
badumtish!
@RadekSlupik make it enum class or class enum or whatever.
 
Xeo
@RadekSlupik "strong" in what sense?
 
4 mins ago, by rubenvb
A strong typedef is a new type. It would make the difference between char and int8_t overloadable.
 
Xeo
@rubenvb no implicit conversions and now you need ALL the operators
@rubenvb An enum is strong in that sense
 
7:12 PM
No we want enum, not enum class. We want implicit conversions between ForceBool and bool.
 
@Xeo I know. C++ is missing strong typedef. It sucks. I see it as a big failure.
 
This std::vector<bool> bitfield thingy, it's space efficient, but is it more cache friendly i.e. faster than a regular std::vector<char>?
 
Xeo
@ManofOneWay space for speed optimized, IIRC
 
Okey nice
 
If you need more memory, use vector<bool>. It reduces memory footprint by 8 for a 1D grid, by 64 for a 2D grid.
 
7:13 PM
No it’s not nice.
There should be std::bitvector and std::vector<bool> should be left alone.
 
im really enjoying haskell... its a nice break from what im used to haha
 
Haskell is greatest language.
 
its implementation is slow.
 
No, it’s not slow.
138
Q: Speed comparison with Project Euler: C vs Python vs Erlang vs Haskell

HyperboreusI have taken Problem #12 from Project Euler as a programming exercise and to compare my (surely not optimal) implementations in C, Python, Erlang and Haskell. In order to get some higher execution times, I search for the first triangle number with more than 1000 divisors instead of 500 as stated ...

 
One algorithm does not make speed.
Is there a Windows Haskell impl?
 
7:17 PM
ghc
 
why is it not part of GCC?
 
lol
ghc has gcc as its part
 
Xeo
@rubenvb The optimizer can go wild with Haskell
 
GHC isn’t even GNU software.
How could it possibly be part of GCC?
 
oh. Glasgow
 
7:18 PM
at least in Windows ghc has mingw inside
 
The G's are confusing.
GNU, GCC, GSL, GNOME...
 
Gangster
 
..., garbage
 
Officially it’s called The Glorious Glasgow Haskell Compilation System.
 
Is Haskell good for evey kind of thing?
like boring files and logic?
 
7:19 PM
Yes, except for sucking.
Okay I’ll stop trolling.
Haskell is pretty good at I/O.
You have pure-functional I/O.
 
It seems its library is TeX-style: a bunch of independent packages that do something but never work together.
 
You glue them together by making a program.
 
Well, TeX packages sucK.
 
I know.
I rarely use TeX anymore. I switched to Sphinx for documentation.
 
7:21 PM
I’d only use TeX for school if I cannot use Sphinx.
 
The Graphics library is only for Win32. WTF?
how's unicode support?
 
Char is a Unicode character, String is [Char] (list of Unicode characters).
Unicode is natively supported, AFAIK.
 
OK. How about cross-platformness? I see a lot of POSIX and Win32 parts on the page I linked.
Seems like you need seperate code just as much as C++.
 
I am unsure. I only use it on OS X and on Windows.
 
And? That's difference enough.
 
7:23 PM
There seems to be a bitset container as well en.cppreference.com/w/cpp/utility/bitset
 
Never had any problems.
 
@ManofOneWay you can't dynamically resize that one
 
You might need to glue some things yourself if you want cross-platform, say, pipes.
@ManofOneWay It has a static size.
 
@RadekSlupik can you list files in a directory with the same code on both platforms? Get the user's name? Create a file? Call an external app?
 
Sure but that's not an issue to me. I just want the fastest one
 
7:24 PM
std::bitset<42>.
@rubenvb let me see.
Creating a file is cross-platform.
Fork/exec is platform-dependend.
 
OK. That sounds pretty good. How about compiler friendliness?
 
The compiler is usually very descriptive.
src/Main.hs:13:5:
    Not in scope: `witshSocket'
    Perhaps you meant `withSocket' (imported from System.ZMQ)
 
thats my favorite part about haskell that im finding. the tracebacks :P
 
src/Main.hs:13:5:
    Couldn't match expected type `IO ()'
                with actual type `(Socket a0 -> IO b0) -> IO b0'
    In the return type of a call of `withSocket'
    Probable cause: `withSocket' is applied to too few arguments
    In a stmt of a 'do' block: withSocket ctx Pub
    In the expression: do { withSocket ctx Pub }
I get that error when I leave out an argument to withSocket.
 
Is it matlab-like interpreted or do you get an executable? (or both?)
 
7:29 PM
You get an executable from GHC, you can also compile to C.
There is an interpreter called GHCi which also has an interactive shell.
 
OK cool. Why is there no Haskell lounge? (or is there :P)
 

Haskell

concatMap = ((.).(.)) concat map
 
Hmmm. Got some learning to do I think.
 
lol :p
I’d start with tryhaskell.org. It shows you the very, very basics.
 
im loving learnyouahaskell
its very nice ^.^
 
(^.^) :: String
(^.^) = "nice"
 
@EtiennedeMartel I literally spit out my coffee at your comment about strtok being made of sadness and despair.
 
I hope your keyboard wasn't damaged.
 
Nah, but I'll have to print out those papers again.
 
@Chris link?
 
7:39 PM
Let me find it. Maybe Etienne can faster. It was a question I think I voted to close due to being too localized.
 
You do know that strtok is made with sadness and despair and that you should avoid using it in modern C++ code, right? — Etienne de Martel Jul 24 at 17:47
 
Beat me by 10 seconds.
 
@EtiennedeMartel That reminds me I want Cube World now. :<
 
There's no Win64 Haskell :(
And the Installer gave a crap error
Because my TMP is 500MB
 
7:42 PM
POS.
 
> and it is expected that from GHC 7.6 it will be a supported platform.
 
oh, cool
 
75% of Loungers are Haskell programmers now.
 
95% of all statistics are made up on the fly.
 
7:44 PM
@ChrisA. 99%
It's filling up my TMP again. Even for a portable install. GDMIT
 
@Chris not on the fly. I always use 75%.
What is TMP? Template Meta Partition?
 
@RadekSlupik 75% is "on the fly" too, just a constant function.
 
@RadekSlupik TEMP, temp, /tmp, TMP.
 
One does not simply install the Haskell platform temporarily.
 
But the friggin' isntaller wants to extract everything to TMP first.
which is really dumb
 
7:47 PM
Oh lolz.
Buy a better installer.
 
and clearly impossible on my setup. I created that ramdisk for GCC temp files to save my ssd
Thank the Flying Spaghetti Monster Imdisk can expand it's size on the fly :)
Let's see if 768MB is enough.
@CatPlusPlus MinGW-w64 is sooo important.
oh crap. I need even more space. How much can a 99MB installer be compressed?
Idea: extract using 7z.
check.
 
Xeo
Hm... it's not possible to make the compiler prefer one conversion operator over another, is it?
 
@Xeo static_cast.
 
Xeo
From inside the class with the conversion operators
 
Is that impossible?
 
Xeo
7:54 PM
That's what I want to know
 
Sorry, if I don’t see the class I can’t help.
 
Xeo
struct X{
  operator Y(){ ... } // prefer this if both viable
  operator Z(){ ... }
};
 
How does static_cast<Y> not work?
 
Xeo
Show me how it does from inside X ;)
 
static_cast<Y>(*this)
 
Xeo
7:56 PM
er
void f(Y){} // Y has conversion from Z
X x; f(x);
 
It won't pick up the other one.
Only one user-defined conversion happens.
 
Oooh. If you said that earlier. “From inside X” is vague. :P
 
0
Q: Which bitset implementation should I use for maximum performance?

Man of One WayI'm currently trying to implement various algorithms in a Just In Time (JIT) compiler. Many of the algorithms operates on bitmaps, more commonly known as bitsets. In C++ there are various ways of implementing a bitset. As a true C++ developer, I would prefer to use something from the STL. The mo...

Feel free to answer guys
 
Xeo
wait a sec
 
Maximum purrformance.
 
8:00 PM
;)
 
Xeo
Ugh, doesn't seem easy to make an sscce out of this...
 
Now only we wait till it gets flagged for linking to a page containing the word “fuck”.
 
That is cool.
 
Xeo
@rubenvb ^^ there's your strong typedef :)
 
Why the shadow?
 
Xeo
8:10 PM
Of course, now the only problem is, overloaded operators of class templates... no idea how to tackle those without overloading ALL the operators
 
Is that guy trying to view his code in 3D?
 
Xeo
@RadekSlupik ?
 
@Xeo The screenshot.
 
Looks like bad aliasing to me.
 
Xeo
I'd use inherited ctors if I could, but they don't work anywere yet, AFAIk
 
Xeo
@RadekSlupik I know that one
Don't think it's as cool as mine, though!
 
Mine is cooler.
newtype T = U
newtype V a = W a
 
Xeo
shaddup :(
 
:P
lol?
They probably like Haskell in Japan.
 
Xeo
right.
 
8:18 PM
5
Q: How C++ destructor works

Loki AstariI want a simple program to see how destructor works in C++? I basically do not understand when the destructor is called.

 
Xeo
I'm off for today, g'night
 
Später.
 
@RadekSlupik You are always missing the Bis
 
What?
Ohh.
yeah. :P
You know. Chat server with ØMQ is so trivial…
As long as you use two sockets. With one socket it’s less trivial.
 
@RadekSlupik The first one is invalid.
 
8:24 PM
Anyway, my protocol is designed around two sockets anyway.
@CatPlusPlus how?
 
newtype works only with types that have exactly one data constructor with exactly one argument. And possibly need exactly one argument for the type constructor as well.
For everything else you use data.
 
Ah.
I see.
Then why would you ever use newtype?
Clarity?
 
newtype is basically optimisation.
 
Ohh.
 
Hence the restrictions.
 
8:26 PM
slick
 
Yeah just read it. :)
 
Oh, type constructor doesn't need argument.
 
Hi
Error 1 error LNK2001: unresolved external symbol IID_IActivateAudioInterfaceCompletionHandler
What .lib file in Windows would this be located in?
Doesn't say in the docs
@RadekSlupik No; it just doesn't say in msdn which .lib file to reference
@RadekSlupik Doesn't work
@RadekSlupik Tried referencing that one; still get linker error
 
8:34 PM
See
Their docs must be wrong
 
I am in a bad mood. I might need some sleep.
Stupid Sundays.
 
@RadekSlupik I know the feeling; I felt ready to call Microsoft and yell !#%@$%^$%^ at them, but remembered they're closed on weekends.
Every doc I've read on reading PCM streams in Windows 8 seems to be broken.
All I'm trying to do is get a PCM stream from a microphone
 
Everybody says "Use WASAPI"! Doesn't work!
 
Your three problems: 1. Using COM. 2. Using MSVC. 3. Using Windows 8.
 
8:45 PM
@CatPlusPlus Solution when my company provides me a tablet and instructs me to use COM and Windows 8?
 
Change companies.
 
@CatPlusPlus I see you're not from the US. In this economy; it's easier said than done.
 
Change languages.
 
Netflix, Haskell, and lounge c++, i guess its not that bad of a sunday after all.
 
-3
Q: destructor checking in C++

ginniI want a simple program to see how destructor works in C++? I am not getting how destructor works because its outputting values even after calling destructor.

^ Needs one more reopen vote so it can be closed as duplicate of (later posted) FAQ.
 
8:54 PM
Change universe.
 
@RadekSlupik ??? WinRT APIs are the same in all languages.
Windows 8 Metro is BASED on COM!
 
@Cheersandhth.-Alf Fucking destructors..
 
why the emotion?
 
How do they work?
 
7
Q: How C++ destructor works

Loki AstariI want a simple program to see how destructor works in C++? I basically do not understand when the destructor is called.

 
FIXED THE LINKER ERROR!
 
By introducing compiler error? :p
 
isn't it fun how the person struggling with the problem has his question downvoted, while the person gathering points has his identical question upvoted.
 
Xeo
@IDWMaster Change country.
 
@Xeo Not good at foreign languages.
Anyways; it compiled.
 
8:58 PM
Change self.
 
Wow. Epic fail
ActivateAudioInterfaceAsync(devid->Data(),__uuidof(IAudioClient),NULL,(IActivateAudioInterfaceCompletionHandler*)co‌​mpletionHandler,&op);
Just to pass in a callback (current progress, not even done defining callback yet)
 
1 message moved to bin
 

« first day (652 days earlier)      last day (4295 days later) »