« first day (860 days earlier)      last day (4081 days later) » 

5:00 PM
Till next time @LightnessRacesinOrbit
 
Xeo
@R.MartinhoFernandes lol
 
bye
-1
Q: Set a vars value until if-when user changes it in a form's input field

user2066907My situation is: I must only send one value for the var 'installments' to our gateway. I have no control of the data on the server side. I need to offer the user the ability to enter a different number of payments if they like, which would change the default value of 'installments'. I would li...

nuke it
> You can accept an answer in 45 seconds
oh seriously fuck off I've been waiting almost 15 minutes just let me fucking tick it
 
@LightnessRacesinOrbit dat profile pic
 
@sehe I would expect that from tony rather then you
 
5:11 PM
@BartekBanachewicz yeah
 
is c++ a good choice to make a spin wheel
7
 
@pourjour I recommend steel or (preferably) aluminium for wheels.
 
@JerryCoffin haha I mean a a wheel of fortune in 2d like a game
 
@JerryCoffin perhaps C++ for the machines to make it?
 
@thecoshman I've never seen a CNC lathe programmed in C++ (but I haven't programmed a CNC machine in a long time).
 
5:17 PM
@JerryCoffin well, usually C for the machine it self, no reason why C++ couldn't be used
 
@pourjour Should it spin left or right?
 
@BartekBanachewicz counter-right
 
@BartekBanachewicz there no problem
 
@pourjour are you sure?
 
I need some guide to start
it's not a machine man
 
5:19 PM
How big is the wheel?
 
It's just 2D game
I'm serious
 
The only way to reply a C++ question is to keep reloading the "new" page and snipe questions?
 
I'm not
@speeder and do it before I snipe them. jk. Best answer wins
 
user142019
C++ is a good choice for only very few things.
 
@pourjour then use Lua
 
user142019
5:20 PM
It's good for learning C++, for example.
 
@Zoidberg no doubt
 
@Zoidberg is it easy with c++
 
@speeder No -- you can reply to older questions. Depending on my mood, I sometimes give it 20 minutes or so, and only reply when all the answers at that point still seem flawed.
 
Lol, I've just realized that most of people here don't understand C++
@pourjour it's easier with Lua
 
"Dammit, I'm more than 15 minutes late for my three o'clock." John 3:16.
 
5:21 PM
@BartekBanachewicz so any tutorials
 
@pourjour what's the target platform?
 
@pourjour What do you want to target? Windows, OSX, Linux, iPhone, Android, ...?
 
@JerryCoffin windows
I already build this library
it looks lightweight
 
@pourjour Then take a look at LÖVE
 
5:25 PM
I love how all C libraries just pass "self" as the first parameter to every function
 
Given the performance requirements (virtually nonexistent) nearly the only obvious reason to use C++ would be if you know it (and some framework) so well that using anything else would be more work (IOW, C++ would probably make sense for me, might very well not for you).
 
user142019
lol Dutch Railways i.imgur.com/gDPHcAk.gif
2
 
Fuck redhat
can't get a damn compiler that's worth two shits
stuck on gcc 4.4
 
user142019
Also, this exists. reddit.com/r/cressening
2
 
Xeo
Yay, home.
 
5:27 PM
@Drise Okay, one more time, on three...1....2...3: Women are better.
 
@JerryCoffin Fair enough
I now need help converting a lambda expression :/
 
@Drise Though now that you mention it, a woman in a red hat...maybe.
 
mwahwahwa
 
@JerryCoffin haha
 
vm.load("print('derp')");
 
5:28 PM
I teach Lua by the way. If you want to learn Lua for whatever reason, ask me stuff.
 
@BartekBanachewicz tnx
 
pickId = std::find_if(GetVTKPipeline()->mapSurfaceNodes[counter + 1].begin(),
                                     GetVTKPipeline()->mapSurfaceNodes[counter + 1].end(),
                                     [=](const std::pair<const int, int>& node)->bool{return node.second==nodeID;})->first;
 
@speeder what does it mean "you teach Lua"?
 
Anyone mind helping me bring this out of a lambda expression?
 
@BartekBanachewicz I take it Lua is his student
 
5:29 PM
@speeder I want to learn Lua to pick in it for being stupid and useless. What's awful about Lua? :-)
 
@Drise yea. make it less terrible
 
@BartekBanachewicz "teach" means "Show or explain to (someone) how to do something"
 
@JerryCoffin C API
 
@BartekBanachewicz It means @speeder teaches interesting tricks to Lua
 
@R.MartinhoFernandes no. you can show somebody something, but he said it as like he was uni tutor or something
@LightnessRacesinOrbit so he pets Lua?
 
5:30 PM
@BartekBanachewicz "Being a teacher" and "being a qualified/respected/employed teacher" are not necessarily the same thing.
@BartekBanachewicz Chances are good
 
@LightnessRacesinOrbit are we talking about speeder or you? :)
 
@BartekBanachewicz Oh I'm no teacher.. though I do like to give idiots a good schooling once in a while
 
@Drise Create a functor. Anything you need to capture you'll need to pass to the ctor.
 
guys, I made a batch file on windows, and I need to call it from an infinite loop in another batch file - but when my call to the batch file returns, my infinite loop just...stops :/
do I need to run/start/??? with a particular parameter to not have this happen?
 
@GamesBrainiac ummm, lots of games, I guess. Are you in our steam group? I believe you can just see which games I own then, that should give you an idea ;)
 
Xeo
5:33 PM
@melak47 call stuff?
also, how do you return from the batch file?
If you do exit 0, the outer batch will also just exit
 
well..I don't really. it just..ends? :S
 
Xeo
Hmm
It should work then.
 
sleep.cmd: ping 123.45.67.89 -n 1 -w %1 > nul
 
Xeo
hmm
 
@JerryCoffin well, being non-thread-safe and non-threaded is kind of annoying, too
 
5:35 PM
//infinite loop thing cmd
:while
LutManager /pt a.lut
LutManager /pt b.lut
sleep 1000
goto while
 
user142019
/r/Handwriting is cool.
 
if I don't put the sleep in there it works just fine, but I don't need to reload the lut that often :S
 
Xeo
call sleep 1000?
 
@Zoidberg I like to handwrite on my iPad
 
user142019
I don't like to handwrite on my iPad.
 
user142019
5:36 PM
I like handwriting on paper with a BIC pen.
 
you don't have one.
 
@Xeo oh. :D
 
user142019
@BartekBanachewicz I have both an iPad and a BIC pen.
 
user142019
 
user142019
Best fucking pen in the universe.
 
5:38 PM
@Zoidberg wow, I didn't knew you have one
 
user142019
One what?
 
finally I have something to stop these stupid ****** games from messing up my gamma settings
 
@Zoidberg my GF uses only Staedlers; for drawing, though
 
Xeo
@melak47 Did that work?
@Zoidberg Eh, they have a bad grip.
 
yeah, with call it works :)
 
user142019
5:39 PM
@Xeo nah
 
@Zoidberg I agree.
 
Xeo
I like my penspinning pens better. :3
Cause I can play around with them while writing.
 
user142019
I rarely write though.
 
Xeo
/golfclap
 
5:40 PM
ugh
 
wtf is a golfclap
@Zoidberg Aren't you a bit young for pens? I mean, your generation uses them?!
 
@R.MartinhoFernandes What is the proper way of putting multiple Enable/Disable Ifs in one function template?
 
Xeo
@BartekBanachewicz EnableIf<Cond1, Cond2, Cond3>~
 
you know I thought most games were bad with their gamma LUT reset when you go fullscreen, or switch back into the fullscreen window..or exit the game...but this stupid thing resets it every time you enter the ****** window, fullscreen or windowed or anything . blergh.
 
Xeo
@LightnessRacesinOrbit A slow, uninterested clap.
 
5:42 PM
@Xeo We're thinking different EnableIf apparently
template <typename T>
using EnableIf = typename std::enable_if<T::value, int>::type;
^ how do I multiple of those
 
Xeo
@BartekBanachewicz Or EnableIf<all_of<Cond1, Cond2, Cond3>>~
 
@JerryCoffin I've been away too long. I don't remember what a functor and a ctor is... D:
 
@Xeo but all_of isn't metafunction!
 
Xeo
@BartekBanachewicz Pfft
 
5:44 PM
@Xeo :<
 
Xeo
You just suck.
 
I do.
Now how do I multiple enable_if?
 
Xeo
EnableIf<all_of<Cond1, Cond2, Cond3>>~
 
robot has this one
template <typename... Condition>
using EnableIf = typename std::enable_if<all<Condition...>, detail::enabler>::type;
but wtf is all here?
 
Xeo
same as all_of~
 
5:46 PM
class cmp {
int nodeID;
public:
cmp(int v) : nodeID(v) {}
bool operator()(std::pair<int const, int> const &node) {
return node.second == nodeID;
}
};

pickId = std::find_if(GetVTKPipeline()->mapSurfaceNodes[counter + 1].begin(),
GetVTKPipeline()->mapSurfaceNodes[counter + 1].end(),
cmp(nodeID))->first;
 
@Drise ctor = constructor
@Xeo ugh. all undefined
@R.MartinhoFernandes your guide needs tweaking. What's all?
 
user142019
Oh hey a subreddit for short people.
 
@JerryCoffin I was going to create a question, but thanks!
Now lets hope this works
 
Xeo
template<class... Conds>
using all_of = not_<any_of<not_<Conds>...>>;
@BartekBanachewicz ^ :3
 
YAY!
 
5:51 PM
@Xeo I suppose I have to create not_ and any_of myself ? -.-
 
Xeo
@BartekBanachewicz :D
 
I hate you so much
 
Xeo
template<class C> using not_ = bool_<!C::value>;
 
I hate you even more.
 
Xeo
template<class... Conds>
using any_of = decltype(detail::any_of_<Conds...>::test(bool_<Conds::value>{}...));
 
5:52 PM
...
 
Xeo
I'd paste more, but my VM seems to be dying right now.
 
Can't you just help me instead of laughing at me?
 
Xeo
namespace detail{
template<class... Cs>
struct any_of_{
  static auto test(Head<false_, Cs>...) -> false_;
  static auto test(...) -> true_;
};
} // detail::
 
@JerryCoffin You're awesome.
 
@Drise You're welcome.
 
Xeo
5:54 PM
@BartekBanachewicz Now you should have everything you need.
 
I miss hanging out here more regularly
 
Xeo
(The missing pieces, aka bool_, true_, false_ and Head should be obvious to guess and implement.)
 
@Xeo I will need help with Head, but don't spoil it yet
I understand the concept, I think
 
Xeo
Note that this one will not short-circuit, though.
 
will not what?
 
Xeo
5:57 PM
short-circuit.
 
Glurgle blurble.
 
@Xeo what the heck does it mean?
 
Xeo
I think robot has a version that short-circuits (and is a lot more obvious to understand).
@BartekBanachewicz false && stuff // stuff is never reached
 
Xeo
Btw, you could also just try implementing all_of yourself.
Think about what it has to do.
And implement that.
 
5:58 PM
Poland cannot into variadic templates.
 
Xeo
It's not hard.
You basically do a fold over the conditions with &&.
 
I have to fold anyway, right?
oh.
 
Xeo
If you want to check, I have the folding / short-circuiting version handy.
 
user142019
Short-circuiting is awesome.
 
Hey, @MooingDuck, you know when you said I should have events for my Window class?
 
6:05 PM
I just mistyped Short as Shart..
 
@ThePhD yeah
 
Well, the thing is I'm starting to get confused as to how I'm supposed to deal with the nuances of certain Window callbacks. Like, for example, all Windows messages return an LRESULT, either the default one from DefaultWindowProc or one you pass back yourself.
At a certain point, I'm trying to figure out who/what in the Event fired from the window - if anyone - should get control of the codes passed back to the OS from things like WndProc
 
@Bar
 
@speeder mm?
 
@BartekBanachewicz sometimes I get invited to teach Lua in universities here in Brazil
 
6:07 PM
@speeder that's nice
 
Specially related to game programming
 
user142019
Oh cool HIM release a new album soon.
 
@speeder I'm writing C++ Lua API right now
 
@JerryCoffin what is awful about Lua is that there are no Lua jobs :P
 
@Zoidberg (do you) really (listen to this o.O)?
 
user142019
6:09 PM
@BartekBanachewicz yes?
 
@MooingDuck What if all the handlers pass back different return codes for WNDProc? WHat then? Or do I just ignore the shit out of what they say and always pass a default return to the underlying OS?
 
@ThePhD The high-level handler should not know shit about WNDProc or result codes.
 
@DeadMG I'm planning to simply forward all WndProc events through the handler. Or is that a terrible idea or something?
 
@Xeo I give up. I suck.
 
user142019
If you abstract something away, don't directly foward anything.
 
6:15 PM
... Hm. Well, alright then.
 
Xeo
// assuming 'constexpr operator bool() const;'
// if not, replace '{}' with '::value' at appropriate places
template<class Head, class... Tail>
struct all_of : bool_<Head{} && all_of<Tail...>{}>{};
template<class A, class B>
struct all_of<A, B> : bool_<A{} && B{}>{};
@BartekBanachewicz ^
 
Tis fucking cold.
 
Xeo
Robot
 
user142019
Nah.
 
wat this
I am terrible
I am going to sit in the corner and cry
 
6:16 PM
@Xeo No, no, no, no. If not, fix it and derive from integral_constant.
 
Yeah Xeo, get started on fixing Boost.MPL already!
 
@R.MartinhoFernandes Do you ever wonder if you might not have been better off staying home than moving to Germany?
 
Xeo
How the fuck do I get sed to match {} but only if not followd by ;? I tried s/{}[^;]/::value/g, but that swallows up the next character. :( Various approaches with . and alternatives brought no results. A backreference would also do, but that errors on me...
 
You mean zero-width assertions?
Not sure if sed has that. Probably.
 
user142019
 
user142019
6:18 PM
lol
 
But now at least you have some terms to google :P
"lookahead" may also work.
 
@Zoidberg failwhale
 
Xeo
@R.MartinhoFernandes "assertion" sounds strange
@LucDanton ;_;
 
I don't make up the names.
 
hmm
 
'There should be such and such pattern here' makes sense, doesn't it? It's the zero-width that nonplusses me.
 
my code compiles fine, but for some reason, it has no effect.
2
 
@R.MartinhoFernandes I can't write all from your example
 
@LucDanton Because it captures nothing..
 
Xeo
$ rmf --google "sed zero-width assertion"
 
6:20 PM
@R.MartinhoFernandes Then what's wrong with 'non-capturing assertion'? Where does width come into that? Huh? Huh?
 
Xeo
Seems Robot's Google backend is down. :(
 
> Don't try my codes at home.
codes. With a s.
 
@LucDanton . is an assertion with width 1, I guess.
 
@R.MartinhoFernandes Dat Title Das Title
 
6:21 PM
@JerryCoffin Because of the cold? No.
 
Xeo
@R.MartinhoFernandes MSVC~
 
@R.MartinhoFernandes Btw this is what implementing 'std::is_move_constructible<optional<T>> {} iff is_move_constructible<T> {}' took me.
 
@R.MartinhoFernandes That's good to hear.
 
What are the trues?
 
Xeo
default and ???
 
6:24 PM
Destructible.
 
Xeo
How does a non-destructible type work?
 
Fine, as long as you don't destruct.
 
@Xeo you can't turn your computer off
 
Xeo
(void)new NonDestructible{};? :D
 
codes CODES CODES
 
6:25 PM
Yup. Brb sandvich.
 
@BartekBanachewicz :)
@LucDanton how do you make a brb sandwich?
 
make_brb<sandwich>
Also sand witch.
 
Xeo
Expected<Sandwich> brb();
 
@JerryCoffin I have wondered about it because it basically amounts to being away from everyone that had been a part of my life until then. But making new friends makes me not think about it so much.
 
Xeo
Crap. I need to go shopping for foodz, but technically, I'm too lazy to get out. :(
 
6:28 PM
IT WORKS! IT WOOOORRRKKKKSSS!
 
3 hours ago, by Etienne de Martel
WHY ISN'T THIS WORKIIINNNG?????
Three hours. Not bad.
@Xeo "technically"?
 
Xeo
factually, whatever
I can't remember the right word.
End of line: I'm lazy.
 
@Xeo Too lazy to even do that, heh? ;)
 
Xeo
Aye
Omg. TIL you have to escape () to make a capture group with sed.
That works for me.
 
Same in vim with default magic settings. (try :help 'magic')
 
Xeo
6:30 PM
magic, huh
 
@Xeo example?
 
huh
 
Xeo
As soon as my VM unfreezes.
 
I just noticed a massive bug in my code generator
but LLVM seems to have completely ignored the problem.
 
Xeo
$ echo "bool_<A{} && B{}>{};" | sed 's/{}\([^;]\)/::value\1/g'
bool_<A::value && B::value>{};
@NikiC ^
 
6:32 PM
uhh
 
@Xeo and what do you have to do to match a raw (?
 
1>C:\PROJECTS\LuaVM\LuaVM\LuaVM.hpp(46): error : type name is not allowed
1>    using EnableIf = typename std::enable_if<all<Condition...>, enabler>::type;
1>                                             ^
 
Xeo
@NikiC Unescaped (, I guess?
 
Ah
 
Xeo
@BartekBanachewicz ::value~
 
6:33 PM
I think now I got what you mean
 
Xeo
Or all<Conditions...>{}
 
I thought this was about capturing/non-capturing groups. Like normally with ( and (?:
 
Xeo
@NikiC Oh
No
 
@NikiC sed does not have the latter, I think.
(?: is PCRE.
(grep -P)
 
@R.MartinhoFernandes I tend to forget how weak the awk/grep flavors are ^^
 
Xeo
6:35 PM
Gah, screw it, I'll be back in half an hour.
I need some food.
 
Probably they are even regular ^^
 
Xeo
A regular regular expression? :O
 
@R.MartinhoFernandes If @Xeo is right there's a bug in your tutorial
 
@Xeo A regular expression that is truly regular. (i.e. is provably incapable of parsing HTML)
 
@Xeo Yeah, that's a real rarity nowadays ^^
 
6:37 PM
Most regex engines accept expressions that define non-regular languages.
@BartekBanachewicz You're right.
 
user142019
I like Perl's regex engine.
 
I'll fix it in the next push.
 
@R.MartinhoFernandes so what should it be?
 
Xeo
@BartekBanachewicz all<...>{} or more likely in your case, all<...>::value.
 
all<Condition...>::value
 
Xeo
6:38 PM
Are you even listening to me? :|
5 mins ago, by Xeo
@BartekBanachewicz ::value~
Anyways, brb.
 
@Xeo I am
1>C:\PROJECTS\LuaVM\LuaVM\LuaVM.hpp(76): error : EnableIf is not a template
1>                  EnableIf<std::is_arithmetic<T>, !std::is_pointer<T>>
1>                  ^
 
Xeo
not_<std::is_pointer<T>>~
 
Xeo
Or !std::is_pointer<T>{}.
You can't apply "not" to a type, fool.
 
without negation error is the same
 
Xeo
6:40 PM
Robot, you take over.
 
@Xeo :(
Viel Spaß.
 
@R.MartinhoFernandes I can stop if you're tired.
 
user142019
Man.
 
Please don't encourage the robot uprising.
7
 
@BartekBanachewicz Show the line of code.
 
6:41 PM
template <typename T,
	          EnableIf<std::is_arithmetic<T>, !std::is_pointer<T>{}>
	          ...>
	T get(int idx = -1) { return lua_tonumber(m_LuaState, idx); }
uuh.
 
Use Not<>
My EnableIf takes only types.
 
user142019
I'm going to port my web framework to C.
 
still teh same error :/
 
Really? EnableIf<std::is_arithmetic<T>, Not<std::is_pointer<T>>>?
 
EnableIf is not a template
 
6:43 PM
Show EnableIf..
 
template <typename... Condition>
using EnableIf = typename std::enable_if<all<Condition...>::value, enabler>::type;
 
Does your compiler support alias templates?
 
do you mean using =?
 
user142019
6:44 PM
@BartekBanachewicz template<...> using ... = ...;
 
Well, looks buggy, then.
 
FML.
@Zoidberg i know, sigh.
 
user142019
Me too.
 
now, really, FML
 
template <typename T>
using Foo = std::vector<T*>;
Foo<int> f;
// does this compile?
 
6:46 PM
@R.MartinhoFernandes yup
the single-parameter EnableIf compiled too, IIRC
but apparently const char* is arithmetic :P
and I needed more checks to remove ambiguity
 
template <typename... T>
using Foo = std::vector<T...>;
Foo<int, std::allocator<int>> f;
// does this compile?
 
@R.MartinhoFernandes ==== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ====
 
You sure EnableIf is in scope?
 
wtf's with all the tags in titles today
 
You'll need a workaround somehow.
I think just using the single-argument one multiple times should work: EnableIf<std::is_arithmetic<T>>..., DisableIf<std::is_pointer<T>>...
 
6:52 PM
@R.MartinhoFernandes I am retarded
2
I was suspecting it
now I know for sure
just don't hit too hard
 
My only excuse is that amount of my practical knowledge in metawankery is equal to 0
 
But the fail was unrelated...
 
IKR :/
now I have more ambiguities, but I think I will be able to get rid of them
 
Wow, you are now featured in two self-depreciating messages on the starboard simultaneously.
 
user142019
6:56 PM
Time to learn what a lens is.
 
@BartekBanachewicz You're such a starwhore.
 
I am just honest :P
 
@Zoidberg A piece of glass or other transparent substance with curved sides for concentrating or dispersing light rays.
 
user142019
No the other kind of lens. :P
 
warning C4503: 'std::allocator<_Other>::destroy' : decorated name length exceeded, name was truncated
 
How lovely.
 
(I know you mean the stuff to replace records)
 
user142019
lol bananas
 
Are you asking me how to construct relative path for a file? Srsly?Bartek Banachewicz 7 secs ago
^ there are worse people, at least
 
Also, fuck that PDF. That shit is borked.
 

« first day (860 days earlier)      last day (4081 days later) »