« first day (1260 days earlier)      last day (3674 days later) » 

6:00 AM
also
int x[10]; follows the same rules as everything else
static int x[10]; would be 0s, int x[10]; in local scope would be uninitialised and int x[10]; in global scope would be 0s (because global variables are static duration by default iirc)
 
altogether slept 12 hours in the past 24 hours
 
@telkitty.exe Great going. I only managed 6.
Looking at the full transcript, from day one (about 4 years ago), it seems Tony was the first contemporary room-owner to post a message here.
Followed by @sbi
 
6:20 AM
damn
2010 was 4 years ago, not 2.
 
@Rapptz ...except on a Pentium (which pegs it at 1.8321111 years ago).
 
6:46 AM
user image
2
 
7:31 AM
@Borgleader Why would he not like it?
Anyway.
GCC is missing std::put_time. :(
 
@VáclavZeman :: stereotypes ::
 
@Borgleader Damn. I miss the days when I could post images too. :(
What is the most creative use you can think of of the preprocessor token concatenate operation ## ?
 
you can make your colleagues consider suicide if you use the preprocessor "well"
5
 
All I've thought of is #define create_bots(N) Bot bot ## N;
@ScarletAmaranth lol
Seriously, though. Any creative uses? Anyone?
 
7:51 AM
@ApprenticeHacker: Get Boost source, grep for ##.
 
8:26 AM
@VáclavZeman it shows a lot of ##
 
9:22 AM
I wish there was a way for the community to step in and except answers for people who just never bother. Maybe require a good bit of rep to vote for it, and a good few votes. Just so that questions that have actually got a decent answer can be 'finished'
 
Boost.Log just brought intellisense to its knees.
Also, my head hurt while reading its docs.
 
9:51 AM
> his friends gave him the choice between the receipt, a Barbie, or his own arse
> after being "a little too active with the ladies"
I don't understand
 
Neither do I.
 
@kbok His face is equally acceptable.
 
I don't understand the ladies thing
 
@ScarletAmaranth that's clever
The car really looks like a toy car tough.
 
@kbok "He". Doesn't mean "they" (the ladies) also are.
 
9:57 AM
I don't understand what being active with ladies has to do with tatooing silly things?
 
@rightfold Erlang architecture question for you. Say I have a data structure that looks a look like XML, hierarchical nodes, attributes on those nodes etc. Do I use a module like 'node.erl', that has functions like node:add_child(Parent, New_type, New_name, New_attributes) node:update(Node, Updated_attributes) etc. I think so... but then I need to do some special handling for certain types of nodes. Or do I just need some sort of 'record' that presents the abstract 'node'? or both?
 
user1804599
Former.
 
user1804599
Similar to dict and digraph modules.
 
and how do I handle that say node of type 'foo' needs to do something special when you set attribute 'bar'
 
user1804599
10:03 AM
You can build a new layer on top of node.
 
a module just for that type of node? implementing a behaviour?
 
user1804599
That’s also possible.
 
user1804599
gen_node :P
 
user1804599
But be careful with the term “node” as it already means something in Erlang.
 
yeah I know
closer to what I have in mind would have to be called 'managed_object'... but that's not much better :P
would it be ~crazy~ to attempt to have each 'xml_element' run as it's own process?
especially when talking about having ~2million of the fuckers
 
user1804599
10:05 AM
@thecoshman I don’t see why you’d need that.
 
user1804599
If you want them to be mutable you have to do that.
 
user1804599
@thecoshman Two million processes isn’t really a problem in general, but might be overkill for a simple data structure. :v
 
user1804599
If you want mutability you can also use ETS, by the way.
 
well, any 'element' could receive an update, and then have some knock on effects, such as propagating that change to some related 'elements'
 
these had better be extremely lightweight "processes"
 
10:07 AM
@ScarletAmaranth Erlang <3
@rightfold ETS?
 
user1804599
@ScarletAmaranth The overhead of a process is 300B. :P
 
user1804599
@thecoshman Yes, ETS.
 
care to de-brevitate that :P
 
@rightfold Still, I'm hesitant to try launching two million processes.
 
user1804599
10:09 AM
It’s like… a mutable hash table.
 
@rightfold interesting...
 
Oh, they are Erlang processes.
 
keep up :P
 
I don't think they really mean a "process" process in Erlang
 
They don't map to native processes.
 
10:10 AM
well, that one is obvious
good luck with 2M native processes :)
 
I got 242 running on my OS right now.
I guess it could handle a couple of thousand easily.
But millions..?
 
user1804599
@StackedCrooked It is not a problem:
 
user1804599
2> [ spawn(fun() -> timer:sleep(2000) end) || _ <- lists:seq(0, 1000000) ].
[<0.36.0>,<0.37.0>,<0.38.0>,<0.39.0>,<0.40.0>,<0.41.0>,
 <0.42.0>,<0.43.0>,<0.44.0>,<0.45.0>,<0.46.0>,<0.47.0>,
 <0.48.0>,<0.49.0>,<0.50.0>,<0.51.0>,<0.52.0>,<0.53.0>,
 <0.54.0>,<0.55.0>,<0.56.0>,<0.57.0>,<0.58.0>,<0.59.0>,
 <0.60.0>,<0.61.0>,<0.62.0>,<0.63.0>,<0.64.0>|...]
 
Yeah. I first thought you meant native processes.
 
user1804599
Do not be silly.
 
user1804599
10:12 AM
Spawning a million OS processes would take gigabytes of memory.
 
Why would we talk about native processes like some savage?
 
@thecoshman are we not savage? :P
 
@StackedCrooked you may be <nose in air>
 
user1804599
Savage Chickens
 
mmmm
erlang seems interesting
 
10:16 AM
It is :D
 
If only the syntax wasn't so foreign.
 
It's functional!
 
it seems to me like it's a language you want to integrate with other languages
just to pilfer the free concurrency
 
except then the concurrency is no longer free
Hi
 
hellew
 
10:22 AM
@LightnessRacesinOrbit what even is that device
 
@StackedCrooked it makes sense surprisingly quickly
@ScarletAmaranth nah, just use Erlang directly
 
user1804599
 
user1804599
:3
 
user1804599
You can also send lambdas to other nodes, which is cool.
 
10:28 AM
oh yeah, wanted to ask, how 'secure' is internode communication. instincts tell me, not at all. I assume you have to build all the authentication/authorisation yourself.
 
user1804599
It is not encrypted.
 
user1804599
You can set secret cookies on both nodes.
 
user1804599
If the cookies don’t match, they will refuse to accept the connection.
 
user1804599
But that’s it when it comes to security.
 
user1804599
But you usually connect Erlang nodes on a single network anyway, not over the Internet.
 
10:30 AM
more or less what I susepcted
 
user1804599
If you want to connect over the Internet, use gen_tcp and crypto or something like that.
 
user1804599
Or a VPN.
 
so, if you trust that the only nodes running on your machine are yours and are trustable, can a node that says, write to the DB, just accept all those connections?
 
user1804599
Of course. vOv
 
Oh, so when you start a node, it doesn't automatically open itself to accepting messages from other machines?
 
user1804599
10:34 AM
It does. :D
 
but those 'secret' cookies prevent those other nodes (on other machines) from connecting?
 
user1804599
Yes.
 
user1804599
Look.
 
If you want two machines to be able to talk to each other, they need to know each other cookies?
¬_¬ I sense judging catty eyes
 
user1804599
 
user1804599
10:38 AM
net_kernel:connect_node is usually implicit but I wanted to demonstrate this.
 
@rightfold ah, you're starting the two nodes with explicate cookies/key, normally it is just pulled from some home folder, right?
 
user1804599
Yes it reads it from ~/.erlang.cookie.
 
heading out now
 
urrrgh sick
 
10:55 AM
alright, how do I do: filter (not . isVowel) string kind of thing in Javascript : - /?
(I don't know JS at all, I was looking for filter, these work on arrays, but I can't seem to find a simple way of converting a string to an array; of course I could write some horrible loops that would just push stuff but oh god)
ohoho, replace, nvm, nvm, got this shit :)
 
user1804599
11:21 AM
string.split(//).filter(function(x) { return !isVowel(x); )).join('')
 
11:35 AM
str.replace(/[aeiou]/gi, '') I ended up doing this
JS is horrible
I can't treat strings like ranges unless I array-ize them first, wtf
 
user1804599
> JS
 
user1804599
Use Python.
 
1
Q: C++ error when calling struct variable

Cioroianu DenisI have this struct: struct noduri{ int nod[100]; }; and this function: int clearMatrix(int var) { cout<<all[1].nod[30]; } int main() { noduri all[100]; cout<<all[1].nod[30]; return 0; } and I want the struct to be assigned to all 100 elements of ar...

why was this upvoted
 
rewrite all web browsers to accept Python and I will
 
is it idiomatic in JS to do string.split('').finallArray.join('')?
 
Xeo
11:45 AM
@ScarletAmaranth Stop surfing SO, learn moar Arrows :P
 
because that's a horrible thing to do
 
user1804599
12:01 PM
@ScarletAmaranth jsfiddle.net/MsYp8 :D
 
user1804599
(JS is a terrible clusterfuck.)
 
user784668
JS is worse than Intercal.
 
isn't python duck typed?
 
user1804599
Python uses duck typing.
 
user784668
There exists some Python code that uses duck typing.
 
12:07 PM
how is python better than js then?
 
user1804599
Why the downvote? It is a pretty nice set of links here — fge 1 hour ago
 
user784668
It's better than Intercal, for one.
 
user1804599
lolwat
 
user1804599
Hey why not post nice sets of links everywhere?
 
user1804599
 
user1804599
12:08 PM
How is a car nicer than a bicycle? They both have wheels, right?
 
user784668
Isn't there, like, a SO rule against link-only answers?
 
Anything like std::optional in the spec?
 
@Fanael Yes, yes there is.
 
user1804599
@Fanael Thing is: the links are not even remotely related to the question.
 
12:08 PM
That is, I can use without external libraries with C++11
 
user1804599
@JohanLarsson lol
 
@BenjaminGruenbaum No.
nor in C++14.
 
@DeadMG fml ty
 
user784668
@rightfold Oh, in this case… wow.
 
there's one in Boost and many support libraries and it's pretty simple to roll your own
 
12:12 PM
ty
 
user784668
> GMP 6.0 is upwardly source and binary compatible with 5.1, 5.0, 4.x, and 3.x
 
user1804599
harder better faster stronger
 
user784668
Why did they bump the major?
 
@JohanLarsson good job
 
12:26 PM
@Jefffrey that pic is what duck typing is to me:)
 
lol
 
@rightfold apply(this.split(''), arguments).join(''); this is clever
 
what does split('') do?
 
splits the string on each character it seems
it's really stupid
 
user1804599
It’s not stupid.
 
user1804599
12:37 PM
It’s logical.
 
why is it logical?
 
user1804599
Because you split on the empty separator, which occurs between every pair of characters.
 
user784668
@rightfold Except between the characters that comprise the words "ur mom".
 
@rightfold you could as well say that between any two pair of characters there are an infinite amount of empty separators
 
user1804599
Indeed, but that would be an impractical and silly implementation.
 
user784668
12:41 PM
Impractical?
 
user784668
Only in a broken language that can't even handle infinite lists gracefully.
 
It would still be impractical even if it could.
 
@Fanael afaik, "infinite lists" is not something that many languages support
 
user784668
Why? Everybody needs a clean way to get an infinite list of nothing!
 
unless you mean linked lists
 
user1804599
12:43 PM
Yes, and that way is cycle "".
 
also Haskell does not support infinite lists... it just forgets to evaluate them and does so only when you yell at it that you need the results
 
Xeo
laziness and infinite lists are orthogonal concepts
 
Yeah that's how you support infinite lists
 
user784668
Infinite lists do not need infinite memory.
 
user784668
node a; node b; a.next = &b; b.next = &a; is an infinite list.
 
12:45 PM
hey that's not fair
 
Xeo
take 5 [1..] can be strict for all I care.
 
I wouldn't call circular list infinite :v
 
Even by Lounge standards, this is a remarkably pointless discussion
3
 
Excuse me I think you mean pointfree
 
12:51 PM
hangs head in shame
 
Xeo
@CatPlusPlus that just had to come up
 
DS2 still a month out :<
 
And FTL advanced edition is coming soon
(And I still haven't finished DS1)
 
12:56 PM
I wouldn't want a T-shirt that explains to the world that I suck.
 
I got to final boss in FTL once and I'm not really feeling like playing that again
 
@ScottW I like "Don't Lie" by Vampire Weekend.
 
DS2 UI looks better
 
yeah
 
not really sure what to say about this, just watch and enjoy...
@CatPlusPlus you've only got to it once?
 
user1804599
Can also be infinite! Without GC though.
 
@thecoshman Haven't played much after that
It was that unfun :v
 
I bet the end boss, then I sort of didn't feel any point any more.
 
I had tons of fun with it
 
I don't enjoy grinding through games to get all the unlocks
 
1:03 PM
so there!
 
It was sorta like bullet hell, but you can't dodge anything
 
well, you can build your ship to dodge
or stealth to temporarily dodge
but yeah, not in the bullet hell sense of actually controlling the movement of your ship
 
holy crap, what a game!
 
There are better roguelikes :v
(Play Crawl)
 
1:11 PM
@thecoshman You hadn't heard of that before?
It's gotten fairly well known due to Desert Bus for Hope
 
> Lou Reed appears in Impossible Mode, killing the duo with a blast of lightning from his eyes. A video of Reed then appears commenting, "Impossible doesn't mean very difficult. Very difficult is winning the Nobel Prize; impossible is eating the Sun."
hah
 
I like how Vlad's bio just says "Unemployed."
10
does it means he is allowed to come here?
 
i think he conforms to the rules.
 
huh, apparently I wrote some drunk SO answers last night
 
1:17 PM
@Jefffrey Only if he's also not white and not straight.
 
they're not even that bad
 
he is probably white
time to get the fuck up and do something
 
So Oracle continues to develop their compiler, nice.
 
ITT "tutonic plates" and "reporting of" things. Oh, BBC...
 
user1804599
1:31 PM
@Jefffrey he is also straight, because he is still alive.
 
nice
he could be folded though
 
user1804599
1:50 PM
Okay.
 
user1804599
It is weekend again.
 
user1804599
What to do.
 
user784668
@rightfold Fuck.
 
user1804599
Rather not.
 
user3010322
2:26 PM
Mmm.
 
user3010322
Need to make mahself a NonblockingQueue of some sort.
 
user784668
Don't.
 
user784668
Use existing one.
 
user1804599
Use TBB, noob.
 
user784668
You will fuck up.
 
user3010322
2:27 PM
:(
 
One thing I can't get my head around is headers. I read all I could find about them in K&R but still am not entirely clear on their use when one has, say, a large amount of interrelated source files.
 
user784668
@rightfold Isn't TBB GPL'd?
 
user3010322
@Fanael GPL for those who're not paying for it.
 
user3010322
If I remember that correctly.
 
user784668
@ThePhD So it is.
 
user784668
2:29 PM
So it sucks.
 
user3010322
Mm.
 
user3010322
There's PPL, but that's Microsoft's.
 
Xeo
@ApprenticeHacker generally, headers are for interfaces (declarations), and source files are for implementations (definitions)
of course that gets a bit more complicated with templates
 
user3010322
s/a bit more complicated/completely useless
 
Xeo
s#ss#ss/#
 
2:30 PM
durr, just keep templates in headers and hope for the best :P
 
user1804599
@Xeo But class definitions!
 
user3010322
The implementation of a template must be completely visible to the user in order to use it, so it throws the idea that you can have crazy-jesus-fuck in your .cpp while still maintaining a nice clean interface.
 
user1804599
I put everything in headers. :v
 
and then you compile for hours
 
user3010322
That works well for Unity builds! Which when I first got here I was using extensively.
 
user1804599
2:31 PM
inline ftw!
 
user784668
Headers? Are we back in the seventies?
 
Yeah don't implement lockless shit yourself
Also unity builds are terrible
 
user3010322
@ScarletAmaranth Actually, Unity builds are several orders of magnitudes faster than a regular compilation.
 
user1804599
@ScarletAmaranth I always abandon the project before the code base is that large.
 
Unity builds are unparallelisable
 
2:32 PM
@rightfold ah :)
 
user3010322
The benefit of a regular compilation, however, is that if you make a change to a single cpp, you only have to rebuild that single cpp.
 
user3010322
Whereas for Unity builds, change on thing, and it fucks over everything
 
user784668
@CatPlusPlus Neither are regular builds. Some people call the reason "linking".
 
we need modules, vOv
 
Linking is less of a hit than compilation
 
user3010322
2:32 PM
Much like how in a regular code-base not on unity builds, if you change some base template class you're working with, the entire goddamn code-base rebuilds.
 
Esp if you dynamically link shit
 
Let's say I have head1.h and it depends on stdlib.h or something. Then there is head2.h that works with a struct from head1.h. Do I include stdlib.h in head1.h and head1.h in head2.h and then head2.h in my source file (i.e stdlib.h -> head1.h -> head2.h -> source.c) ? Or do I just include all three in the correct order in my source file?
 
user3010322
:D
 
user784668
I've worked on stuff where linking the regular build took more time than a full unity build.
 
user784668
2:35 PM
Fortunately, I don't touch C++ with a ten foot pole anymore.
 
Yes
Fuck C++
 
user1804599
@Fanael What do you touch?
 
Himself
 
Games or BSG
Hard decisions in life
 
user3010322
2:36 PM
BSG, and then invite Robot so he can kill everyone.
 
user784668
@rightfold Hard to touch anything when you're a nymphaea. It's not like I have arms or something like that.
 
seriously, though, can anyone help me with my dilemma? Has something similar been asked on SO?
 
It reminds me of this crawl.chaosforge.org/Thorn_lotus and it is not a good thing
 
user3010322
Mmm.
 
user3010322
I implemented my own lockless queue!
 
2:43 PM
It's broken
 
user3010322
... By not locking anything and just hoping the threads never collide!
 
user3010322
Nothing can go wrong.
 
So, it's just a queue
 
user3010322
Maybe.
 
If it's shared, it's broken
 
user784668
2:44 PM
@ThePhD They do.
 
Sam
c++ chat right?
 
user3010322
I mean, it'll probably work.
 
user784668
The three most important rules of multithreading:
 
You'll have visibility issues at least
You need a barrier
 
user784668
2:45 PM
1. You will fuck up.
 
user784668
2. You will fuck up.
 
user784668
3. You will fuck up.
 
So either lock or get a real lockless queue
 
user3010322
;~;
 
4. It's broken
 
Sam
2:46 PM
what's the best way for make money with c++?
 
user784668
@CatPlusPlus I thought there were only three the three most important rules of multithreading.
 
user784668
@Sam Don't.
 
user3010322
By not programming in it.
 
Xeo
Get a job
 
@Fanael You fucked up
@Sam Panhandling
 
user784668
2:47 PM
@CatPlusPlus Oh, right.
 
user1804599
Don’t implement anything yourself.
 
Just play games
 
user784668
I agree.
 
user784668
Games > programming.
 
@Sam nah, this is the chat room for the mentally challenged.
@Sam Object-oriented pole-dancing.
 
user784668
2:49 PM
@ApprenticeHacker the poles are too cold
 
Sam
so no money around c++
 
Xeo
Object-oriented Pole dancing
 
user784668
@Xeo So it's Bartek's fault?
 
Xeo
always
unless it's the Derpstorm's fault
 
user1804599
@Xeo Pole dancers are treated like objects.
 
2:53 PM
I should thank @CatPlusPlus for linking the dungeon-crawl page. Can't believe I never heard of it. Now I've finally found another excellent way to waste my time.
 
Play Mummy Chaos Knights
(no don't)
 
Is there a good tile-set for the game? The page you linked showed a non-symbol tile sprite.
 
It has console, tiles and webtiles version
 
I see
Expect to see progress made before the end of February 2002. Lol, their website is a graveyard.
 
Daily builds are broken right now, so you need to either build trunk yourself or play online
 
2:58 PM
thanks
 

« first day (1260 days earlier)      last day (3674 days later) »