« first day (1309 days earlier)      last day (3638 days later) » 

2:00 PM
This question includes an odd bit of code enum{ N = 1000* 1 }; Anybody here use that idiom?
If so, why?
 
user3010322
Probably a result of fiddling.
 
old TMP.
 
@Edward It's to have a compile time constant or something like that.
 
enumerator values like that were used because compilers didn't support static const int N = ...;.
 
A bit odd in a C++11 question
 
2:02 PM
Wait, when was the room frozen?
 
user3010322
Never.
 
early this morning.
Shog froze it briefly.
 
Xeo
@Edward Meh, that question. std::accumulate should just move the accumulator :/
 
@Xeo It's some ugly test code.
by the time I got it to compile, I lost interest in answering the question
 
just realised I can now offer mega massive bounties on MSO for free
 
user3010322
2:07 PM
Ain't it kinky?
 
Xeo
@LightnessRacesinOrbit Can you actually?
Bounties don't exist on metas
No "bounty" tab, or "start a bounty" below questions
 
bah
stop being right
 
Xeo
You are a good guy.
There, done.
 
:(
Technically, your "there, done" would also be incorrect, then, meaning your "you are a good guy" is in fact correct
You've got a "one of these statements if false" situation going on
 
Xeo
*your
 
2:12 PM
fuck
I'm just gonna go ;P
 
user3010322
Buahaha.
 
user3010322
Go home, Tomalak, you're tired.
 
I really am
I'm gonna go out and buy a strimmer
later
I leave you with this Twitter profile, of a C++ developer who somehow manages to be lesbian, gay, bisexual, transsexual AND Christian. All at the same time. Impressive.
@annajayne, Bournemouth, UK
C++ Software Engineer, LGBT Christian and (somehow) the brains behind Riverblade Ltd. Also available at http://t.co/9sHrYaYB2V. #girlslikeus
16.5k tweets, 631 followers, following 658 users
 
It takes all of her (his? its? ) time
 
user1804599
lol
 
user1804599
@LightnessRacesinOrbit I read that as Methcafe.
 
some people take their polymorphism seriously
 
hahahahahaha
 
welp
only 66 undefined references
I thought it would be more
 
2:27 PM
error: undefined reference to room_ownership
 
user1804599
@sehe do you happen to use Apache Commons and Maven?
 
Xeo
@Edward Polymorphism is goood
 
your mother's goood in bed
 
error: undefined reference to your mother
 
Xeo
Hm, I just remembered that I'm getting a free 'trade visitor' ticket again for GC this year.
Whoo
And they reduced the number of wildcards compared to last year. Should be a lot less going on there.
 
user1804599
2:46 PM
Oops.
 
hai
can somebody help me answer this question which i posted yesterday?
0
Q: Unable to access tomcat resource with my client program

overexchangeI am able to access resource from tomcat server using below URL from my browser, http://localhost:8080/test/file1.xml Request header: Status Code:200 OK Request Headersview parsed GET /test/file1.xml HTTP/1.1 Host: localhost:8080 Connection: keep-alive Accept: text/html,application/xhtml+xml,...

program is in c++
sorry C
 
I can indeed downvote you
 
Hello, lounge.
 
any problem in the query?
 
@overexchange yes, your code is wrong.
 
2:53 PM
^ There's yer problem.
 
user1804599
Option.filter is so fucking nice.
 
Xeo
@rightfold What's it do?
 
user1804599
Same as List.filter assuming the list has at most one element.
 
user1804599
def authenticateUser(emailAddress: String, password: String): Option[User] =
  userFinder
    .findUserByEmailAddress(emailAddress) // this returns Option[User]
    .filter(_.hashedPassword(password)) // check password if not None!
 
Xeo
2:57 PM
so, fmap
 
user1804599
No, that’s Option.map.
 
user1804599
filter f Nothing = Nothing
filter f (Just x) = if f x then Just x else Nothing
 
Xeo
ah, okay
 
user1804599
If I used map there I’d get Option[Boolean] back. :P
 
Xeo
Hm, there's no single equivalent function to that in Haskell, eh.
nvm
oh wait, mfilter, not filterM
 
user1804599
3:02 PM
You can implement filter for any (Applicative f, Foldable f, Monoid (f a)) => (a -> Bool) -> f a -> f a.
 
Xeo
Or... simply MonadPlus.
 
@BenjaminGruenbaum am sending http request in send() call and waiting for httpresponse in recv() call. do i need to do something else here?
 
user1804599
@Xeo Less generic. :v
 
Xeo
Also, Monoid (f a) if anything
 
my http request is -- 'GET /test/file1.xml HTTP/1.1'
 
user1804599
3:04 PM
Oh right.
 
Xeo
Wait, how would that implementation look like?
 
user3010322
I want mingw builds to hurry up and do GCC 4.9
 
user3010322
Jaysus
 
user1804599
@Xeo filter p = foldMap (\a -> if p a then pure a else mempty)
 
user3010322
I wonder if Ruben's stuff has a GCC 4.9 thread-enabled MinGW build...
 
user1804599
3:06 PM
Call it ffilter for consistency with fmap. :P
 
Xeo
@rightfold Oh right, foldMap
 
user1804599
moldFap
 
@overexchange For about the billionth time - what do you think recv() puts in the buffer, and what do you think '%s' means as a formatting command?
 
Xeo
Although, if you can implement foldMap, doesn't that imply you can implement Monad?
 
user1804599
@Xeo Oh, dunno.
 
Xeo
3:07 PM
Both need extraction, no?
 
I missed a coup?
 
user1804599
Structural typing is so neat.
 
@ThePhD it's in process
 
@overexchange yes.
 
When using recv(), data is read from the network and is written to the buffer.
ConnectSocket
 
3:11 PM
@overexchange Yes, it is. Now, what does '%s' mean in a printf formatting string?
 
@BenjaminGruenbaum Theyd never hire a lounger though :P
 
it prints the NULL terminated string
'\0'
 
user1804599
@BenjaminGruenbaum office is way too hot during summer.
 
3:14 PM
@overexchange What if there is no null in the bytes so far received?
 
user1804599
> as well as some C for the lowest-level security code
 
user1804599
fail
 
oh memset?
 
user1804599
Use a high-level language pl0x.
 
@overexchange No. Either under-read by one byte or over-buffer by one byte, then use 'iResult' to shove a null in at the end.
 
3:18 PM
How's everyone's interesting day gone so far?
 
@Somberdon Sun - OK. Beer - OK, FA cup on TV - OK. Mods & rockers in the Lounge - not so OK.
 
@Borgleader why?
@rightfold ?
You work there or something?
 
@MartinJames Why not?
 
@Somberdon There was a kind of virtual explosion overnight. Shoggy blew up the kids.
 
@MartinJames you mean, iResult = recv(ConnectSocket, recvbuf, recvbuflen-1, 0);
if ( iResult > 0 ){
printf("Bytes received: %d, httpresponse: %s\n", iResult,recvbuf);
recvbuf[recvbuflen-1]='\0';
}
 
3:21 PM
@Edward I don't think it qualifies as an idiom. Sometimes for something like a megabyte it's convenient to use something like meg = 1024*1024. If you wanted (for example) kilobyte, megabyte, gigabyte, and terabyte, I guess an enumeration like: enum { kilobyte= 1024, megabyte = 1024*1024, ... could sort of make some sense...
 
@overexchange NO!! recvbuf[iResult]='\0';
 
Maybe. I'd use a user-defined string literal for that
 
@MartinJames Maybe it's just me being a bit new here, but is that an innuendo for something, or did someone literally decimate children? Lol.
 
@Somberdon Not me, - shoggy the moderator did, (in a virtual manner).
 
3:23 PM
@MartinJames Okay, I assume that means he tore some newbies a new one?
@MartinJames Sorry, it's a slow morning for me. Not always in a up-and-at'em mood when you're waking up to debugging stupid code.
 
@Somberdon Worse - he tore all the room owners a new one. It's a long story.
 
@BenjaminGruenbaum Cuz were such a pain in the ass ;)
 
@Somberdon You're debugging my code? Thanks!
 
@MartinJames actually the control is not going in if{}, control is going in else if ( iResult == 0 ). that means am not receiving the data from http server, but if i test from browser it works
 
@MartinJames I'm sure you wished. Lol.
 
3:26 PM
@overexchange ..and bfeore trying to printf the buffer with '%s' !!
@overexchange It means that the server closed the connection.
@overexchange Maybe you fed it something it disagreed with?
 
@MartinJames It's making me feel retarded right about now, too. Working with the SDL library and cant get the thing to thread without crashing. Lol. So, yeah, there's that.
 
Xeo
@rightfold So, as long as a type has a Foldable and Monoid instance, you can implement Monad with it: coliru.stacked-crooked.com/a/fa3ad8ab20cff50a
So yeah, MonadPlus is the short form of your (Applicative f, Foldable f, Monoid (f a)) :)
 
@Xeo What's up?
 
Xeo
Ohai
@Shog9 I just wanted to ask why you booted all the owners earlier. Though you likely have seen sbi's tweet (if not, you should probably read it now).
 
is visual studio any good?
 
3:33 PM
@Xeo ya, read and replied. Still waking up & making coffee, but I suspect you figured out by now that I removed most of the owners so that I could go to sleep. No offense to y'all, but this isn't a part of my job I consider worth losing sleep over.
 
user3010322
@Crow No, use QtCreator or vim or notepad.
 
@Shog9 Yeah - that's what I thought.
 
why would anyone use notepad? Also on windows
 
user3010322
Because it's cool.
 
@Crow If you can get it on CD, you can use it to stop a desk wobbling.
 
Xeo
3:36 PM
@Shog9 Right, okay. I still don't agree with it, but I can understand that.
 
@Crow To further their learning. See c.learncodethehardway.org/book
 
I'm about to spaz out! Debug code works but real code doesn't. That shit sucks...
 
How the hell do you read replies to something posted on a mailing list =/
(also, why do people use those these days)
 
That website just sounds like cancer.
 
@rightfold Yes I did use Commons (collections, beanutils (sic), dbutils, digester, JXPath, Logging(? I think I switched to log4j, yeah). But not Maven :)
 
3:37 PM
@Somberdon UB for sure.
 
@Borgleader mailing (as in mail -> MUA)
 
why would anyone want to learn something the hard way?
 
@MartinJames You're telling me...
@Crow That's what I'm screaming.
 
@Crow because anything else doesn't teach you how to solve problems, which means you cannot depend on it for anything "production"
 
@Crow Check out the website and you'll find out. It has a description of its learning technique in the intro.
 
3:38 PM
http://lists.cs.uiuc.edu/pipermail/cfe-dev/2011-March/014042.html
^ well... i mean they seem to be up on the web =/
 
Damnit, now I'm legitimately interested in the website....
\clickity
Oh, god... oh god, C! What is this madness?!
 
@sehe well, "learning the hard way" seems to imply it's not taught well. If the whole book was written in a mix of Russian, German, and Chinese, it would certainly be learning the hard way...
 
@Borgleader Lol.
 
@Crow wow. that's an interesting perception. I happen to have a positive connotation. And I have complementary bad connotations with "learning the easy way"
 
3:40 PM
@MartinJames instead of client i used telnet client i get this..
Welcome to Microsoft Telnet Client

Escape Character is 'CTRL+]'

Microsoft Telnet> open 127.0.0.1 8080
Connecting To 127.0.0.1...

Connection to host lost.

Microsoft Telnet> open 127.0.0.1 8080
Connecting To 127.0.0.1...

Connection to host lost.

Microsoft Telnet>
but browser works fine
 
@Crow Deep perspective...
 
@overexchange Well, I guess it's heartening to know that the server doesn't like telnet any more than your client code :)
 
@MartinJames or asserts. or differen conditionals. or different config/environment
 
@sehe learning the easy way sounds just as bad (probably worse) because it seems to imply nothing of value is being taught... dunno they both have weird connotations
 
@sehe nothing personal, certainly not a commentary on your abilities. Just needed there to be fewer cooks in the kitchen for a while.
 
3:43 PM
@sehe IME, it's usually UB that only pops up in release.
 
@Shog9 I understand that. I don't really mind. However, there was growing discussion (uproar/upsetness?) about it here, and I wanted it addressed at the right level.
(It's up to you to decide what you do, but as it is, I'm quite content that addressing it as a polite question to you seemed to have stopped the open flaring of negative emotions at the time.)
 
You've got several room owners now. Hasn't this whole thing run its course?
 
@Crow So, you've discovered the purpose of the catchphrase: it's a playful inversion of "the easy way" and means exactly that: not chickening-out, cheating and lazy :)
@RobertHarvey Yes. If you ask me. If you want to understand why I "invoked" you this morning, just look at the discussion/sentiments before that.
 
@RobertHarvey Oh - I do hope so. It would be nice to get back to ridiculing PHP and Java, each-others bad code and downCloseVoting bad questions.
 
The Frogs! They're aleapin' hither and tither!
 
3:48 PM
@Crow Did you read the intro? The site is a bit of a paradox; you're taught C by rote... typing in programs, character by character, in a text editor, with no safety net. It's the way people learned before they had Intellisense... in some ways, it is the easier way.
 
@MartinJames You never laugh at my code :(
 
@sehe Arsenal are losing? Oh wait - they haven't kicked off yet.
 
That was an embarassing arsenal of typos there
 
@sehe Only because I never look at it:)
 
ITT I should learn PHP to amuse some Loungers
(disclaimer: been there, done that, of course)
 
3:51 PM
@sehe Doan' brin' no stinkin' dollars in here.
 
user3010322
$cashmoney
 
Ow! Bits of me are burnt.
Imma throwing away this sun oil and getting some new stuff.
 
Xeo
@MartinJames Eat them for dinner.
 
@Xeo Heh - it's difficult to reach the end, even with a knife and fork. I wonder if the UV protection has a shelf-life?
 
@MartinJames how telnet client knows that it is connecting to http/ftp/smtp server, becasue w e immediately send http get/put/post commands right? any client performs any one app layer protocol using send()/recv() call in that telnet client program
 
3:59 PM
@overexchange It must dislike your headers for some reason.
 
do you think we can write a client which does socket()/connect() in common and then write logic for different app layer protocols
 
@overexchange Sure, but it would be easier in C++.
 
@overexchange Of course. Just for an obvious example, use ASIO for both.
 
OK, there will be a short intermission while I watch Hull thrash Arsenal.
 
@MartinJames There's a difference between "there will be an intermission", and "I'm leaving for a while."
 
4:04 PM
So much drama.
 
Xeo
Eh, drama has subsided, we're operating within normal parameters again
'cept that Cat seems to be dead.
 
He is probably working on Lounge<Chat>.
 
No he's wisely curled up on the couch - awaiting better times
 
why "lounge"?
 
user3010322
RestingPlace<C++>
 
user3010322
4:10 PM
ChillBox<C++>
 
In Western architecture, a living room or lounge room (informal: lounge) is a room in a residential house for relaxing and socializing. Such a room is sometimes called a front room when it is near the main entrance at the front of the house. The term sitting room is sometimes used synonymously with living room, although a sitting room may also occur in a hotel or other public building. In large homes, a sitting room is often a small private living area adjacent to a bedroom, such as the Queen's Sitting Room and the Lincoln Sitting Room of the White House. The term living room was coin...
for relaxing & socializing
 
@MartinJames ASIO i did not get u
 
not Study<C++>, not kitchen<C++>
 
user3010322
@chmod711telkitty typedef std::building::living_room<C++> insane_asylum_t
 
was going to suggest Lounge(C+1);
 
@ThePhD that sounds like cemetary
 
probably right, since most of the people have moved on from C++ to Java/C#
 
> Host Visual Studio must be at least 2012 (MSVC 17.0)
and here I thought 2012 was VC11
 
@chmod711telkitty Thank you for your suggestion. We will bring this to the attention of the board. You will be contacted for further instructables if the board chooses to go forward with your proposed organizational innovation.
 
user3010322
Nah, the version numbers are way off.
 
4:14 PM
@sehe It's a sedimentary cemetery, showing decades of programming history in layers of ancient cruft.
 
Excavate, Exacerbate, M... ! :)
 
@Borgleader It's Visual Studio 11, but version 17 of the compiler.
 
everyone calls it VC11 anyway.
 
other than i++, i+1; what other ways can you increment a variable by 1 in one line?
 
4:17 PM
it's pretty much just _MSC_VER and such that call it v17
 
well there must be something wrong with my path because i have vs 2010, 2012, and 2013 installed
 
@chmod711telkitty ::InterlockedIncrement (&x)
 
You asked the inane question...
 
user3010322
@chmod711telkitty ++i.
 
4:18 PM
~_~
 
@chmod711telkitty i += 1
 
@chmod711telkitty By paying real attention to it as a being in its own right, and building its self esteem.
 
@Borgleader that's a good one, was thinking more along the line of & and | - bit set operation
 
[](auto &c){c++;}(i)
 
user3010322
( i & 1 == 1 ) ? i <<= 1 : i |= 1;
 
user1804599
4:20 PM
@sehe ah, okay.
 
@chmod711telkitty Much easier to think of it in terms of or and xor (though you can synthesize xor from or, and, and not).
 
user1804599
@BenjaminGruenbaum No, but I can tell from the shape of the ceiling.
 
user3010322
SOMEONE
 
user3010322
Post an image here they want to see convolved!
 
Lounge< C += 1>
 
user1804599
4:24 PM
@Xeo ohnice :P
 
convolved?
 
user3010322
Just... post an image.
 
@DeadMG I put the latest visual studio i have installed in cmake gui and it still complains, im starting to think maybe theres an error in the llvm files
 
user3010322
On it!
 
@Borgleader What's the problem?
 
user3010322
@Borgleader He does!
 
@DeadMG Well its complaining that my host visual studio isnt recent enough
 
@Borgleader Thank you!
 
4:30 PM
LLVM 3.4 still supports VS2010.
if you have 2010, 2012 and 2013, then it should accept all of the above.
 
CMake Error at cmake/modules/HandleLLVMOptions.cmake:44 (message):
  Host Visual Studio must be at least 2012 (MSVC 17.0)
Call Stack (most recent call first):
  CMakeLists.txt:307 (include)
 
hm, did you get trunk?
 
> Current Generator: Visual Studio 12
i did svn update like 30 min ago
=/
 
yeah, they dropped support for 2010 in trunk.
maybe it's just a PATH issue? I'm not sure if they test with supported and unsupported toolchains installed side-by-side.
but you'll certainly have to ask on #llvm I don't know shit about this part.
 
ok thanks
 
4:32 PM
I just installed clang35 on ubuntu. it works fine except I hate linux =(
btw, is there an analogue for notepad++ ?
 
user3010322
Uh
 
user3010322
Gedit, maybe?
 
I use Geanie
 
user3010322
Pffff wow.
 
user3010322
This is hard.
 
user1804599
4:34 PM
TIL Scala has higher-kinded types. That’s pretty useful.
 
@ThePhD thats what she said
 
user3010322
@Borgleader I'd say it too, if I was around you.~
 
meh maybe I just have to install an IDE
wow ubuntu14.4 has python34 installed by default
 
user3010322
Kinky.
 
welp. eclipse vs qtdesroyer vs something else?
 
user3010322
4:38 PM
Code::blocks sucks, I can never get to using Eclipse properly (but it's been years since I used it, so my opinion is no longer valid)
 
I'm having trouble picking out a new laptop for myself. I really wish there was a site where I could kinda pick parts and qualities and they'd make it for cheaps
 
user3010322
No such thing.
 
user3010322
Well, the for cheaps part.
 
user3010322
It'll be for expensive. Verye xpensive.
 
user3010322
Wallet-breaking expensive.
 
4:39 PM
yeah. I've seen customizable laptops, but they run closer to $2k, wheras I'm eyeballing the $900-$1000 laptops
 
@MooingDuck well if you'd be a fag you'd have no choice but buy a macbook
 
@JerryCoffin Are those composite images, stitched together from several pictures?
 
@RobertHarvey Yes.
 
Cool.
 
I dished out $2k for a macbook pro last time, and the hardware was EXCELLENT, but the software was terribad, and the Windows drivers were worse. Terrible decision
 
user3010322
4:41 PM
Way cool.
 
he he he "Swaffelen"
 
user3010322
@MooingDuck Well, for 2K you can get a pretty expensive high-end laptop (try Lenovo's W series, or MSI's massive jet-cooled laptops).
 
@MooingDuck I've been considering a macbook pro because I'm a (very) amateur musician, and macs are what all the cool cats have.
 
user3010322
I myself have a Toshiba Qosmio that I got for some 1.7K with very high-end hardware.
 
user3010322
I won't recommend it unless you're willing to manage heat dissaption manually like I do: a lot of laptops really don't get the fans or vents right.
 
4:43 PM
@RobertHarvey if you want to run Windows programs, don't. If you're ok with mac programs only, then I recommend it.
 
ok, that algorithms this place use make sense. How the fuck is @Sbi still on the frequent users list? Or does he just spam the fuck out of this place overnight?
 
@RobertHarvey Reason > Logic
 
@MooingDuck I recently got my misses a fairly alright laptop for not that much
 
Xeo
@MooingDuck At least it wasn't 10k, like @Stacked IIRC paid for his new Mac-something
 
time to try to mount some blinds with my new DIAMOND DRILL BIT
wish me luck
 
4:52 PM
@thecoshman 54k messages in this room
 
@LightnessRacesinOrbit try using a drill to, makes it a whole lot faster
@MooingDuck o_0 how you find that?
 
Xeo
@thecoshman Frequent user list goes by number of messages first, and then the last active time
which is why it's so unreliable
 
@Xeo well fuck me, talk about bollocks mettric
 
Well Coded
 
also, no surprise the louds mouth dog is at the top of the list
 
Xeo
4:55 PM
ohai Cat
 
@Xeo It's entirely reliable. Just meaningless.
 
@JerryCoffin It failed to pick me up from the airport last week!
 
Xeo
@JerryCoffin *unreliable for determining owners
 
Nothing on this platform is reliable
 
@CatPlusPlus stupidity
 
4:57 PM
Holy shit, how the fuck do you manage local modules in cabal
 
@thecoshman So did my mother in law, but she's 100% reliable (at least when it comes to nagging, griping, groaning, whining, and generally being a PITA).
@Xeo Fair enough.
 

« first day (1309 days earlier)      last day (3638 days later) »