« first day (1381 days earlier)      last day (3557 days later) » 

Ell
12:00 AM
I also wanted to put together the simplest computer together
Ie not a SOC but CPU, ram separate
Just to see how it works
I'm sleepy. Night all!
 
Yeah, start small.
 
Good night.
 
I built a chess clock on a breadboard before this.
 
Xeo
Aldnoah.Zero this week was nice too
 
12:12 AM
Have you guys learned C++ immutability via some video or paper?
It doesn't seem that straightforward to me.
 
Coliru keeps giving me
rm: cannot remove `/var/chroot/tmp/1406506372.60438/ru/LC_MESSAGES/messages.mo': Permission denied
rm: cannot remove `/var/chroot/tmp/1406506372.60438/de/LC_MESSAGES/messages.mo': Permission denied
rm: cannot remove `/var/chroot/tmp/1406506372.60438/nl/LC_MESSAGES/messages.mo': Permission denied
rm: cannot remove `/var/chroot/tmp/1406506372.60438/fr/LC_MESSAGES/messages.mo': Permission denied
lol
oh it's the cache
very weird
 
Hello, World
 
Hi
I mean, you make a class immutable by not introducing mutable member functions. What about the performance of passing a 1000-elements immutable vector into a function that returns the same vector with 1 more element?
 
@Code-Apprentice 404 world not found
 
You can't move the vector in, because that wouldn't be immutable. RVO most likely kicks in, but you still have to make a copy of the vector.
Either that or you use some lazy algorithm and you just store the difference and the reference to the original vector.
That way you end up implementing Haskell's lazy evaluation in C++.
Doesn't sound like a win to me.
And I'm talking to myself like every other time I try to get into this topic.
 
12:35 AM
@Jefffrey This is a different problem
Also for a vector storing the difference doesn't really work, because it's not a vector anymore
More likely would be copy-on-write
 
Well, you are adding an element, so that can be considered writing.
 
So what's the hype with "immutability" in C++?
 
Slapping const on everything
 
I feel like you are being sarcastic.
 
12:39 AM
Not really
 
I don't see anything new about slapping const on everything that should be const.
 
Everything is new in C++
Also you should remember the discussion about how const is ~immutability~ :v
 
Was it about mutable?
 
No
Immutability being part of type design
 
Oh right.
I'm still left with the impression that immutability in C++ (being it defining everything const or class level or both) is not always a viable solution.
 
12:48 AM
> Also, The screenshots look like I took them with a potato. That's Macbooks for you.
 
There's a lot of magical things you can do with immutable things if you have a GC
 
Interesting :/
 
1:01 AM
@CatPlusPlus then what's the point of programming?
programs are there to change the variables ... no?
 
Well, there is one place in C++ where immutability comes in pretty useful.
 
@chmod711telkitty Dunno
 
Easier interfaces for constexpr objects.
 
It's a waste of time p much
 
auto s = MakeMagicalCompileTimeString("abc"); auto s2 = s.push_back('d');
As opposed to using s = MagicalString<MAGICAL_STRING_LITERAL("abc")>; using s2 = PushBack<s, 'd'>;
 
1:05 AM
it's not feasible to make constexpr strings until C++14.
 
Yeah
The latter form works decently well in C++11.
 
the former works in C++11 too
only because you used auto to make it less ugly
:v
 
Well, yeah, but the functions are probably really ugly in C++11.
 
yes
 
Not that the latter is pretty.
And the type would be MagicString<N>.
 
1:08 AM
there was an answer I saw on SO that was really impressive
 
I wouldn't be surprised if I've seen it.
Was it about the macro?
 
no
 
Cause yeah, the macro's pretty fun.
 
found it
here's the answer if you want to upvote it or w/e
12
A: How to generate a constexpr version string from three integers (or perhaps a git/SVN commit/rev. string)?

dypHere's a little C++1y solution --- I think I LOVE C++1y. #include <utility> template<int N> struct c_string { int length; char str[N+1]; constexpr explicit c_string(int p_length) : length(p_length), str{} {} }; template<int M> constexpr auto make_c_string(char const (&...

 
Yeah, I've been playing around with something like that.
But it tends to be a lot easier with constexpr algorithms and C string functions.
And the funny thing is that you can pretty much just stick a constexpr on the existing one, at least with a naive implementation.
I don't know how well that scales.
But we might be seeing more and more constexpr standard library functions due to the fact that normal functions are usually nearly there.
 
1:15 AM
I need to clean up my gears/meta directory thing
now I know how Luc feels
I'll add it to my todo
 
I didn't quite realize that the immutable class way was possible at first.
So I started on the ugly encoding-in-type way
And then realized the other way was possible when thinking about it.
I kind of want to make something to execute regex with it. Learn about recursive descent parsers and mix it with the compile time stuff I like playing around with.
 
Should I make every meta function into its own header?
iunno
 
I've kind of been taking that route. Boost seems to like doing that.
 
1:36 AM
@Rapptz Group them. imo too many files is annoying =/
 
@Rapptz, Found any great uses for named operators? I can see them being useful for specific things, like if (5 <in> vec)
I actually want to give that binary obfuscation thing a try with a C++14 interface.
It doesn't have to be perfect, so __TIME__ works for seeding the generator, but it'd be cool to see it work and have the implementation looking pretty simple.
For now, back to this bug in our emulator.
 
@Borgleader Well.. they're gonna be grouped somehow obviously lol
because I just plop them all into one header
 
1:51 AM
am drunj
 
I like this ROM's code
Pseudo-C version of it anyway
That one actually has a purpose
That one doesn't AFAICT
Unless it's trying to introduce a small delay, but there's a delay timer for that
 
Good morning.
 
Good late evening
In all the time I've been here
I just noticed that icon for sound notifications
 
12
Q: Audio slider for chat pings

BorgleaderWould it be possible to have a slider to control the volume of the chat pings? I know I could use the Volume Mixer on Windows to lower my web browsers volume but then that affects everything (such as youtube, twitch, etc) which is troublesome. Since the volume icon is already used to set whe...

of course it got no attention from the staff
 
1:58 AM
It's never bothered me
I just can't believe I've never noticed that icon
 
> She enjoys running, rowing, and triathlons. Captain Lawrence is unmarried.
Why is this on wikipedia.
 
Hint: the first comment is "This is a terrible idea."
 
Is syntax sugar good in general? Just saw a guy writing swap like this in python: A[i], A[A[i] - 1] = A[A[i] - 1], A[i]
 
that's language support for tuples
 
2:15 AM
> Experience with C++11 and implementing some larger codebases targetting the newer standards has led me (and, I feel, many of the rest of us) to prefer unique_ptr over raw pointers in a large number of situations.
Thank you Captain Obvious =/
 
Er.
> Raw pointers can go completely unused in many applications, possibly even most applications, though obviously not all of them.
 
Er?
 
I think s/raw/unique/ too.
 
it's a stupid idea
 
> I've personally always been of the opinion that the common case (the things you do most often) should be easier to do than the uncommon case in any language or API.
And the common case is not unique_ptr.
If it is, you're doing it wrong.
std::unique_hammer.
 
2:19 AM
Whats the common case?
 
Not unique_ptr?
 
> we've tried adding some sort of umbrella headers, like <std-all>
Interesting
 
I have never done that
 
Most things in our codebase are not in unique_ptrs, nor in shared_ptrs, nor raw pointers.
 
user3010322
Awwh yeah
 
user3010322
2:20 AM
Just improved the semantics of one of my APIs.
 
user3010322
Now it's like silk. :D
 
And I'm willing to bet we have more raw pointers than unique_ptrs.
 
user3010322
Unique ownership (and the usual resulting non-copyability) is actually very much a special case in C++, so I agree with Robot.
 
@ThePhD Like moth larvae gunk?
> Please note that these images are copyright protected. Reproduction without permission of the copyright holder is prohibited.
 
user3010322
Yes, except spun by the 6th Century Chinese Favored Courtesans.
 
2:22 AM
Wow.
Those images are out there at the border of interstellar space, and I cannot reproduce them here on Earth.
 
NASA places their images in the public domain so you should try there
:D
 
I am there.
Not all the images are by NASA.
 
weird
 
Oh.
Those.
 
2:24 AM
I wonder if the reason they don't link them all is because they don't have permission.
I hope not.
 
TIL Word has a lorem function: zdnet.com/…
 
@MarkGarcia I think there's one for a bunch of random numbers, too.
Oh, close enough. =rand(#paragraphs, #lines/paragraph)
 
user3010322
Okay.
 
user3010322
PIX breaks when I try to use it, so I can't debug this graphics error.
 
user3010322
.... Horror. ;~;
 
user3010322
2:32 AM
Oh well. Accomplished what I wanted anyhows.
 
@chris I wonder if there's more =func stuff on Word. A quick search so far returns nothing.
 
According to Microsoft's article, =rand, =rand.old, and =lorem.
 
3:07 AM
welp
good enough for me
 
@ThePhD will "love" this
 
didn't you post this a year ago?
 
LOL a hashtag just helped me
 
Id be highly surprised
 
After wondering why they exist earlier today
I was trying to find a chat message and all I remembered from it was my reply including a sarcastic hashtag.
 
3:11 AM
anyway, time for bed, gotta wake up at 5:30
 
@Borgleader Shit. It's almost 5:30.
 
Chat needs better search
 
@Rapptz Maybe we should add hashtag support
(Seriously, please no)
 
@chris #i #can #already #do #this #stuff. so the only need is some un-Lounge-like cooperation.
 
btw
do you guys have any criticisms on this:
11 mins ago, by Rapptz
https://gist.github.com/Rapptz/2da8f0a4e2a102caa256
 
3:21 AM
@Rapptz I really don't understand the need for this: {'f', "returns 42", opt::constant(42) },
 
just if you want a flag to return a constant
by default things have opt::constant(true)
so --flag would return true
this just generalises to return anything
 
Oh.
@Rapptz How does it do with e.g. --stuff without =<some value>?
 
$ ./dev --stuff
usage: dev [options...]
dev: error: option '--stuff' requires an argument
Boost.PO has this thing called implicit but I don't wanna support it
 
Just an opinion: is_active is somewhat verbose for my taste. has or the like feels better. Besides that, I like it. :)
 
I considered that but I felt like it was ambiguous
i.e. has what?
because options is a container
 
3:32 AM
Aha! {"stuff", "modifies stuff", opt::bind_to(stuff) }, Why you no space after { ? :P
 
the real question is
why do I have a space before }
 
I like my braces with spaces.
 
it looks weird to me
reminds me of ThePhD's ( stuff )
terrible
 
+20001 - That took long enough. Anyone got something they want me to screenie?
Whether it'd be here or Meta.SE.
 
donate me 500 rep
:>
 
Oh, it's not even deleted - yet...
 
...
 
Hey guys, trying to insert into a set here with transform. "transform(m_teams.begin(), m_teams.end(), inserter(teamNames, teamNames.end()), [](stVecPair team) { return team.first; });"
 
3:47 AM
stVecPair is a pair matching the map (m_teams) being interated through. I'm getting a no matching function call to transform. Any ideas?
 
Though it lacks comments, some which sure are gold.
 
4:02 AM
'Why on Earth would someone commit air piracy just to finance a terrible movie decades later?' 'People are very strange these days.'
3
 
73
Stack Overflow Academy

Proposed Q&A site for programmers who want to learn how to ask good questions on Stack Overflow

Currently in definition.

^^ Well this is so sad that it's hilarious.
 
@Mysticial A moderator proposed it. Wow.
 
Employee rather.
 
4:27 AM
11
Q: Will anyone actually be able to use Academy effectively?

EmrakulProposal: Stack Overflow Academy As badp pointed out in comments: ...what makes you think that people who can't ask proper questions about what they're doing will be able to ask proper questions about asking proper questions on what they're doing? In other words, we're taking people who a...

This is good:
> ...what makes you think that people who can't ask proper questions about what they're doing will be able to ask proper questions about asking proper questions on what they're doing?
 
semantic satiation too strong
trait
 
4:48 AM
Is this saying I shouldn't use inheritance? Or that I should?
 
0
A: Newbie "forgiveness"

chmod 711 telkittyThink of the newblets on this site as feral kittens that occasionally come to your premise. You want to adopt them and let them inside but at first they need to be house trained, because if you don't you would end up with shit all over your place. Not all kittens are okay with that, some run away...

 
5:06 AM
man
what
boost docs has lied to me
:(
 
This is C++? My past few years were a giant lie. — chris 4 mins ago
 
oic
> As Daniel Krügler pointed out, this technique violates 14.6.5/2 and is thus non-portable. The reasoning is, that the operators injected by the instantiation of e.g. less_than_comparable<myclass> can not be found by ADL according to the rules given by 3.4.2/2, since myclass is not an associated class of less_than_comparable<myclass>. Thus only use this technique if all else fails.
3
Q: When are hugs acceptable in the workplace?

djechlinAs someone who has had a job before, particularly one in the office, it is my understand that physical touch is high risk. However per the votes on this answer it seems to be enthusiastically received from the workplace.SE community, so I was wondering what the more nuanced guidelines are for whe...

You guys don't hug at all?
People hug all the time in the hospital.
We tend to form friendships with coworkers here.
So hugging isn't too strange.
As long as it isn't a long hug or anything.
 
user3010322
@Borgleader Marketers like you make the world a terrible place. D:
 
user3010322
5:33 AM
@Rapptz sol almost has 50 favorites. :o
 
I know.
I get a notification every time
 
user3010322
Whoa.
 
user3010322
One of the people who's favorited it is this guy
 
user3010322
And he's contributed to this Selene thing
 
5:34 AM
@Feeds This is awesome.
 
user3010322
>
Object lifetime handling
Smarter Lua module loading
Hooks for module reloading
 
Wiseau is totally Cooper.
 
user3010322
wat.
 
user3010322
WAT.
 
user3010322
THEY DON'T CHECK OBJECT LIFETIME
 
user3010322
5:35 AM
SO THEY JUST LEAK <_>
 
user3010322
@Rapptz Hey here's a cool feature Selene has:
 
user3010322
> Registering Object Instances

You can also register an explicit object which was instantiated from C++. However, this object cannot be inherited from and you are in charge of the object's lifetime.
 
user3010322
... Wait, we support that just by allowing you to set a pointer object.
 
user3010322
Hah. We're already cool. :D
 
I wish there was a way to inject operators w/o inheritance.
wtb silver bullet
 
user3010322
5:39 AM
I think @R.Mart developed something like that?
 
@Rapptz Wait for C++17 and hope the operators proposal gets accepted?
 
not like that
I need it for enums
which aren't classes
technically..
 
Well, that's just relational, too, so meh
Or just equality and inequality
I forget
 
user3010322
Does... does sol make "enums" ?
 
user3010322
5:44 AM
Does... does lua even have "enums" ?
 
no and no
 
user3010322
Should we try to fake it up?
 
no
enums should work out of the box since they convert to ints
if you want to support enum classes you'd have to just cast it to the underlying type
 
user3010322
There's probably no use to making strongly typed enums in lua.
 
user3010322
The most you could do is just make the thing a table.
 
5:48 AM
I wish we had templated code gen
using enum classes such a pain in the ass
fucking C++ standard
 
@Rapptz Free functions?
 
yeah that's what I'm currently doing it but I don't know how to not pollute the namespaces
 
using namespace wheels::enums::operators; on location.
 
The problem is that I have an enum class for another thing. I want to define operators for it but don't know how to inject those operators.
I wouldn't want to inject it globally and putting them in a localised namespace seems to not help.
I might be shit out of luck
which is why I kinda wish I could do bitflag_operators<enum>; and call it a day :<
 
6:13 AM
constexpr bool bitflag_operators(Enum) { return true; } can be used with ADL.
 
6:42 AM
@Rapptz which defaults to int, right?
 
yeah
 
thecoshman so know C++
 

« first day (1381 days earlier)      last day (3557 days later) »