« first day (1282 days earlier)      last day (3671 days later) » 

12:09 PM
0
Q: Meta hasn't changed at all

JefffreyYesterday I've received the following reply: Meta StackExchange actually recommends that most questions, even ones that are network-wide, are asked on child metas first. Then, if it makes sense for them to be moved, the OP can move up to Meta.SE. So while this wouldn't be off-topic at MSE, I ...

Might be interesting ^
 
user1804599
Has anyone used CTemplate?
 
@rightfold I use CTemplate ATM, yes.
 
template<typename T> class CTtemplate { static CTemplate<T> GetInstance(); };?
 
user1804599
On a scale from PHP to Jinja2, how nice is it?
 
12:28 PM
@rightfold Insufficient context to answer you. That's not really a valid scale. If you like Jinja2 then your main problem with CTemplate will be that it does not have loops or conditionals or arbitrary code, though this is a deliberate design decision that I've come to admire somewhat.
Meanwhile, dinosaurs
 
user1804599
Meh, template engines without loops.
 
Called it
It's a religious decision, in a sense, not to incorporate them. You achieve the same results in other ways, but without writing procedural code in a template file (which should not be a computer program). I've come to believe that this is the correct way of doing things.
The code required to actually use a template is a little verbose perhaps, though that's more to do with the fact that you're using C++.
I do somewhat miss the expressiveness of Smarty, though -- which is where my comment about valid scales comes in, because PHP is not really a template engine (any more) but PHP libs like Smarty are.
@Jefffrey I think I agree. Either the mods don't really understand it properly yet either, or the whole migration was fundamentally flawed, or both.
Certainly it was rushed, that much is becoming clear.
 
@LightnessRacesinOrbit lol @ @Vlad
 
user1804599
instance Monad MarkupM where
    return _ = Empty
    (>>) = Append
    h1 >>= f = h1 >> f (error "Text.Blaze.Internal.MarkupM: invalid use of monadic bind")
 
user1804599
12:38 PM
lolwat
 
user1804599
dat >>=
 
hey, don't insult my favorite markup library
wow, I've just taken an handful of the right amount of spaghetti I wanted to cook (100g). .. that doesn't happen very often
ended up pouring in an extra 10g just because it's easter
 
user1804599
Yum, spaghetti.
 
user1804599
I’m going to eat with family today. :(
 
user1804599
Such a waste of fucking time.
 
user1804599
12:46 PM
Normally eating takes half an hour, now it will take like three~four hours.
 
...
You're so ungrateful.
Cherish your family - you only have one and one day they won't be there for you any more.
 
user1804599
“be there for you”
 
user1804599
Outside of silly dinners, I never see them anyway.
 
shakes head
I pity you with this attitude
 
I didn't picture lightness as a family guy.
 
12:50 PM
@rightfold dutch culture maybe?
 
user1804599
I have no closeness with my family whatsoever.
 
user1804599
They are neither friends nor enemies; just neutral people I don’t care much about.
 
@Jefffrey Family is the most important thing.
@HamZa Douche culture, perhaps.
Rightfold only seems to care about himself
 
@LightnessRacesinOrbit No, it's not for everybody. And it shouldn't.
 
user1804599
@LightnessRacesinOrbit I also care about my friends.
 
user1804599
12:55 PM
I don’t care about non-friends.
 
@Jefffrey Yeah, that's my point. It doesn't matter whether it's "for him" or not. In fact it should be about them.
 
For a society, family should be the most important thing for an individual, for an individual, especially an adult, not necessarily so
 
@LightnessRacesinOrbit I meant: family is not supposed to be, for everybody, the most important thing.
 
important or not really depends on from whose side
 
I have just a small subset of family I care about, the rest I don't even know them
 
12:57 PM
If so happens that they are also your friends, then why no?
 
Bitching about spending a whole four hours with your family for dinner on Easter Sunday (OMG HOW WILL U COPY???) is just ungrateful in the extreme.
 
it is like 'queen & country' or 'in the god we trust' are used by the ruler
 
user1804599
yolo
 
what's good that to do for individual like you and me? nothing
 
Not really. Your family gave you life and an unbringing. An education. Food, housing, clothing.
 
user1804599
12:59 PM
My parents did.
 
@rightfold do you have any siblings?
 
user1804599
With “family” I am referring to family that is not parents.
 
user1804599
@HamZa No.
 
Yes, so shut the fuck up and have dinner with them.
 
I see...
 
1:00 PM
When I was three, I 'lead' my equally young neighbour and went to my grandma's place 30 minutes walk away. When I was escorted back by my aunty my parents didn't even notice
 
They probably hoped you'd run away from home
 
I don't think they care whether I run away or not
 
lol "unbringing"
 
My dad is great though, took me to travel a couple of times when I was young
young I meant under 7 years old
 
also "COPY" damn
@Jefffrey Wrong
I've heard about people who whom this is the case and it's saddens me to meet some of them
 
1:04 PM
I walked both sides of great wall when I was 5 year old - walked not carried by my parents
 
people should have varying priorities; it enables evolution- if we all always cared about only the same thing, there could be no natural selection
 
user1804599
 
@DeadMG Yes because natural selection (a) still occurs in 2014, and (b) depends on whether you consider family important or not
Puppycock
 
user1804599
Yum, puppy cock.
 
@LightnessRacesinOrbit Why does it sadden you?
 
1:06 PM
@Jefffrey Because it's sad.
AHAHAHAHAHA
@Xeo lol....
 
It's always nice to have close family & close friends and soulmate
but most people don't get all that
 
yeah, because we all striving not to be alone
 
A lot of people have their own ambitions, worked hard at it, I admire that too
depends on what you want
 
Sure, fine
But don't bitch and moan about a three hour family dinner on Easter
 
user1804599
yolo
 
1:10 PM
@LightnessRacesinOrbit I'm sure that if you were forced to be with a group of people you simply don't care to see, you would bitch and moan too.
Socially forced.
 
Deary me
Never heard such a bunch of self-centred ungrateful crap in my whole life
Suck it up
 
I'm just being the devil's attorney here, I love my family
 
advocate?
 
advocate
 
1:14 PM
I hate lunch and dinner with people, but that's just me, it really doesn't matter with who
formal lunch and dinners
 
I rarely enjoy dinners, especially couples dinners.
 
not "relaxed" lunch/dinners
@JohanLarsson yeah, advocate :)
 
Family is ok though but I live 800 km away so it is not very often we have dinner.
 
Besides all that, it's free food.
 
@LightnessRacesinOrbit lolwut
 
1:18 PM
@HamZa What's confusing?
 
@LightnessRacesinOrbit it's free food, that's not a good reason to eat with family
 
@HamZa "It's free food" is always a good reason to eat said food (unless the food is really horrible).
 
meh, food is more than just feeding. It is one of the few things I spend money on.
 
user1804599
It’s not free food.
 
user1804599
Everyone pays for themselves.
 
1:21 PM
@rightfold lol
 
Imo finding a nice piece of meat buys much more than expensive wine or some other bourgeois bs.
 
user1804599
duh vOv
 
lolz
 
@rightfold Bet they only said that to you because you're a cock. Everyone else gets it for free.
 
user1804599
They didn’t say it.
 
user1804599
1:24 PM
It’s logical and we always do it this way.
 
not everyone can get it for free, somebody has to pay
 
@rightfold E_DUTCH...
 
user1804599
One person paying for everyone’s food would cost them a fortune.
 
user1804599
Restaurants aren’t particularly cheap.
 
go to mcdonalds instead
 
1:26 PM
@DeadMG They used to teach at school when we were really young "always put others first", and I thought "wait, that's stupid... how can that possibly work?!"
same thing I guess ;p
 
lol
 
user1804599
@DeadMG I prefer not to puke, thanks.
 
Ewwww McDonalds
 
Burger King 4eva
 
BK is better for sure
 
user1804599
1:28 PM
s/Burger King/Local snackbar/
 
user1804599
Hundred times cheaper, hundred times better.
 
Yeah but you're there
So I prefer something else
 
user1804599
Good.
 
dem triple whoppers
 
Oh my, "OVER three hours"? In my day you'd work on a problem for a week before considering that you were getting nowhere. This new generation is always in such a hurry. — Lightness Races in Orbit 4 secs ago
#trollolololol
 
user1804599
1:31 PM
#yololololo
 
fuck
I'mma have nightmares about virtual function pointers.
 
I just had a dejavu
user image
5
Side effect of the drugs?
 
s/going to//
 
@Jefffrey lol
 
it's funny cause I always thought that virtual functions were pretty simple things
 
1:36 PM
TIL Tokyo has 2,079 7-Eleven stores.
That's a lot.
 
Tokyo is a big city.
 
that's a lot of people as well :)
 
population 13 million
damn
Belgian population is 11.14 million.
 
user1804599
@StackedCrooked Tienduizend keer zo veel als in Schijf.
 
user1804599
Valt mee.
 
user1804599
1:39 PM
Gewoon flink kweken.
 
fokken
 
2:18 PM
English.
This is a Q&A and not a chatroom or university. — Lightness Races in Orbit 11 secs ago
 
user1804599
lol, MVC in PHP.
 
user1804599
Sounds like a pain.
 
user1804599
Probably possible with WebSockets or AJAX but urgh.
 
user1804599
Might be interesting to do with JS and Node.js though.
 
wtf?
MVC in PHP is piss-easy and doesn't require WebSockets or AJAX.
 
user1804599
2:25 PM
How are you going to make the view observe the model without WebSockets or AJAX?
 
There's this new technology called a webserver
 
user1804599
Are you confusing MVC with Model 2?
 
o/
 
You're confusing MVC with some other not-MVC thing, by the sounds of it.
 
user1804599
2:26 PM
Not really.
 
user1804599
Observation is an integral part of MVC.
 
user1804599
You update the model and the view instantly reflects the changes.
 
Of course Wait, what?
 
user1804599
Kinda difficult with PHP.
 
No, that is not an integral part of MVC.
> As client technologies have matured, frameworks such as JavaScriptMVC and Backbone have been created that allow the MVC components to execute partly on the client (see also AJAX).
This is a relatively new adaptation, not core to the pattern.
Typically your view is just a CTemplate or Smarty template file. Models are classes containing functions to interact with a database. Controllers take input, interact with the model, then pass the data to the view for generating the end result.
 
user1804599
2:28 PM
> A model notifies its associated views and controllers when there has been a change in its state.
 
That's an abstract description, designed for interpretation within the context of desktop GUIs. In the web world it doesn't necessitate an immediate update to your browser window.
 
\o/
 
user1804599
\o
 
./
 
user1804599
2:30 PM
vOv
 
this is a strange looking person so far
 
user1804599
He needs a name.
 
So in rightfold's world a web app designed in an MVC form needs to do constant polls of a database on the server side, and the browser has to do constant polls to the server to retrieve any new information from the database. For no apparent reason.
^ there's his name
 
user1804599
Not necessarily polls.
 
user1804599
The server can push through a WebSocket.
 
2:31 PM
\.o.o./
 
user1804599
Or streaming responses.
 
Not quite as catchy as Moon Unit Zappa, but what can you do
 
I have a problem to choose names actually...:(
haha
 
user1804599
> In a Model 2 application, requests from the client browser are passed to the controller. The controller performs any logic necessary to obtain the correct content for display. It then places the content in the request (commonly in the form of a JavaBean or POJO) and decides which view it will pass the request to. The view then renders the content passed by the controller.
 
user1804599
This is more similar to what people seem to call MVC.
 
user1804599
2:34 PM
IMO.
 
please give me a name :)
 
user1804599
@needaname cock1
 
@rightfold That's because it is MVC. Adapted for the web paradigm.
 
lol xD
 
2:35 PM
> Since Model 2 drives a separation between logic and display, it is usually associated with the model–view–controller (MVC) paradigm. While the exact form of the MVC "Model" was never specified by the Model 2 design, a number of publications recommend a formalized layer to contain MVC Model code
 
that's an attribute really :P
 
Model 2 is Java codeword for specialised MVC
 
Was a particular technique ever implemented (besides Python) to edit a page without calling the database?
I'm looking for every Google search result and there seem to be nothing like that, in any language..really?
If it's true it sucks that nobody did.
for editing a page I mean to actually get the values from the previous request rather than submitting its post-edited values
not really a question..just for a hint ;)
 
...
@LightnessRacesinOrbit Well, at least the baby won't grow up with a mother who didn't want it.
 
@DeadMG You're right it would probably turn out all ungrateful and selfish like rightfold ;)
 
2:43 PM
are there explicit conversion operators for pointers to userdefined types?
 
user1804599
Be more cryptic, please.
 
mmm i can try :p
 
If there were not, OS API interaction would not be possible.
 
ok going to drink tea and solve the issue for myself. Thanks.
 
if a have a struct B { bool t; }; i can have an explicit conversion operator from B to bool, but if I try to static_cast<bool*>(&of_some_B) i get a type error, i can work around it with reinterpret_cast but is there a way to enable static_cast to your type when you know it is safe?
 
2:46 PM
What
 
I put my right void* in,
I put my right void* out,
In out, in out.
shake it all about.
6
 
^^
 
@MartinJames I swear you're, like, permanently drunk.
 
@LightnessRacesinOrbit Well, TBH, I maybe a bit drunk ATM, yes.
 
2:51 PM
mm
@gnzlbg No. You cannot redefine conversion semantics between pointers.
You say it's "safe" but, frankly, it's not. The compiler knows better than you.
(although that's probably a standard layout type, but whatever)
 
yeah, the Standard actually does permit a cast from B* to bool*.
it was used for inheritance way back in C.
 
but struct A { built-in type; }; has the same layout as built-in type
@DeadMG but not a static_cast right? only reinterpret/dynamic casts are allowed
 
C permits basically any cast
 
don't think static_cast is legal but reinterpret should be.
 
@DeadMG yes, reinterpret is, i was looking for a way to tell the compiler that a static_cast is also valid in that situation, but there doesn't seem to be one
 
2:59 PM
not between pointers.
 
i thought that maybe there would be explicit conversion for pointers to user-defined types, but I dont think so, e.g.:

`explicit constexpr operator bool*() noexcept { return this; }`
 
lost me
What problem are you trying to solve?
 
user1804599
Object.defineProperty is neat.
 
@LightnessRacesinOrbit i wanted a user-defined type to feel more like a native type
 
3:05 PM
yeah, but it's not.
 
using my_bool = bool;
static_cast<bool*>(&my_bool); // works

but for the struct B { bool; }; it can never work
@LightnessRacesinOrbit why not? it's fun!
in Haskell you use the pattern all the time
 
o.O
yeah that's a good reason for doing a thing
quiet today
 
@MartinJames I love you. :)
 
8
Q: How to make this hand-colored drawing even more fancier?

mathI wanted my son to color some brain template. I will put this into front of my thesis (on visualization of diffusion MRI tractrography data of the human brain), as book cover. How can I put this in even fancier context? Employing some shadows? Where? I just want to look this a bit more profession...

 
3:12 PM
so many memories to that song
why am I dancing?
 
we have the possibility to dance for seven minutes per day at work
 
you mean there's a rule that states that?
 
gymnastics + music
the rule is that it is ok but you don't have to of course
 
nice
 
so the rule is that there is no rule?
 
3:18 PM
for 7 minutes
 
user1804599
 
@LightnessRacesinOrbit hmm, the way I read my answer it is clear
 
@JohanLarsson didn't say it wasn't
 
ok
would you like the rule to be 'you dance or you die'?
better flex them joints
 
lol
 
3:21 PM
it is actually pretty nice, we have a woman who started this year and she is the dancemaster.
 
@JohanLarsson yes :D
 
user1804599
Now to expand it with Socket.IO support.
 
the hokey cokey are you serious
nightmares
 
stop crashing stop crashing STOP CRASHING!!!!!!!!!!!!
 
3:28 PM
@telkitty.exe Tell that to the badgers.
 
0
Q: Reading from a file,using headers and cpp's

user3554176Ok,so I have a 3 level inheritance tree of vehicles. The leaf classes (the last ones down the tree) are six. I want to make a function that will read from a .txt file,and then assign the information to different variables (e.g. the file will contain 2006 Toyota Supra Diesel and these will be assi...

 
Why has no one written a bot to redirect the debug log onto a chat here? :p
 
proof?
 
Proprietary sorry
 
3:32 PM
haha, yeah we wouldn't want to share your error log :p
better keep it ALLLL to yourself >_<
 
debug dog!
coz dog > log
 
sadly, no ... had supper midnight
really should be in bed soon
a lot of things tomorrow - need meh sleep to be safe after tie weight and throw mehself into the depth of the ocean
 
well as long as you're happy
 
3:41 PM
@LightnessRacesinOrbit debug dog? woof woof.
 
lol
 
4:06 PM
today I'm trying out vacherin cheese
TIL pasturing and pasteurizing are very different.
btw, what is the indices trick?
 
pasturing means the sheep stand outside in a field for most of their lives. pasteurizing means their milk is boiled clean
2
 
f_them_all, lol
 
@Xeo I've read that a few times and still don't get why I'd use it. The page is very poor at explaining why I should care.
 
@Xeo ah, the "exploding tuple" as Andrei called it
 
4:14 PM
That's why Robot's pinned message about FAQing it bemuses me.
a usage example wouldn't hurt
 
Xeo
@LightnessRacesinOrbit Tuple unpacking without recursion. That's basically all there is to it.
 
@Griwes trolololol you took the bait :)
 
Xeo
of course it can be used for much more
 
@LightnessRacesinOrbit lol
 
@LightnessRacesinOrbit very good
 
Xeo
4:18 PM
@LightnessRacesinOrbit Search SO for 'indices'
or 'gen_seq' in my case
 
> @needaname if you thing kat PHP is htat useless, then use something else and getthe fuck out of this chatroom, instead of flaming here
lol
high drama in #PHP
 
if someone came in here and said that C++ was useless, we'd just agree with them
 
Alright..Came here because of the ping thing.
 
4:34 PM
@DeadMG C++ is useful
@needaname the ping thing, that rhymes :)
 
Pong thong also rhymes.
Maybe I need sleep. My brain is out of control.
 
everybody do the ping thing
 
by vengaboys
:P
 
hello.
I wrote an article on dynamic_cast and are seeking comments 69.195.124.169/~cppdemys/?p=11&shareadraft=5353f7b3b0baf
 
4:38 PM
chown 666
 
reinterprete_cast
is that a reinterpretation or reinterpret_cast? :)
 
spelling!! will check.
 
argh
I read the word "dynamic" and I had traumatic flashbacks to virtual function pointers again.
 
> Make C++ intelligible and free from ambiguity
paha good luck
 
well trying.. anyway ;-)
 
4:41 PM
"Multiplicity inheritance" awful English here
 
@LightnessRacesinOrbit thank you!! checking.
 
I like your blog overall
Did you get any feedback from that LHS panel yet?
 
@StackedCrooked haha yeah :D
 
ITT: Pedants, pedants everywhere.
 
4:44 PM
@LightnessRacesinOrbit nothing yet... just posted the link 2 min ago
@LightnessRacesinOrbit I like that you like it ;-)
 
@Damian I think you're wrong
 
;-)
Should I add some more examples .. for example showing upcast that can be done implicitly?
 
Not sure about that "dynamic_cast to void pointer" part. Isn't this normally done with static_cast?
 
totally different things.
 
As a suicide mission I could also look at how the compilers like GCC and Clang implements dynamic_cast
 
4:47 PM
trust me, you don't want to.
 
sbi
Hi.
 
the cast to void* is part of the C++ standard.. I think is a hint on how to implement dynamic_cast.. but I am not 100% sure.
 
sbi
Anyone here who knows a bit about Minecraft? Rails and switches, to be precise.
 
@sbi yes, my 9 years old son ;-)
 
4:48 PM
@Damian They're totally unrelated.
 
sbi
@Damian My son knows about it, too, but he isn't here.
 
@DeadMG Do you mean vtable lookup when you have polymorphic types, i.e. virtual functions?
@sbi Mine is .. I can ask him
 
sbi
Ok. Lemme phrase this...
 
@sbi off topic, can we take it somewhere else?
 
sbi
I just ask that quick question here. The puppy will bin it if he doesn't like it. :)
I have a rail switch, which I want to activate using an activator rail, putting a bit of redstone dust in between. That works pretty well – except that the switch switches the wrong way. How do I negate a redstone signal? (Or am I approaching this the wrong way?)
 
4:55 PM
@sbi the answer is "use a lever to change the signal"
 
sbi
@Damian Sigh. And how do I do that?
 
@sbi are you in surval?
 
sbi
@Damian Currently, yes. But I can switch to that God mode, if necessary.
 
@sbi switch to God mode and press 'E'.. there you can find a lever
 
sbi
@Damian LOL. I wasn't asking how I get a lever. I have lots of them. I was asking how I negate a signal using a one.
 
4:59 PM
@sbi woof
 
sbi
@DeadMG Are you annoyed? Shall we take this elsewhere?
 
no
just marking my territory :P
 

« first day (1282 days earlier)      last day (3671 days later) »