« first day (1143 days earlier)      last day (4031 days later) » 

14:00
@ThePhD Make the user provide the generator.
@MartinJames I know one in London that does (Cafe Porto). I wish I knew one in Berlin.
user3010322
@R.MartinhoFernandes mylua.register<std::tuple<int, int, int>, float, double, double>( "arf", object_with_so_many_overloads ); // fucking ewwwwwwwwww
Really, look at SWIG or whatever
user3010322
( Lua can support multiple return types, hence the std::tuple<int, int, int>)
@ThePhD Go again back to the drawing board and consider how that should work.
14:01
Also "C++ doesn't have codegen", think outside of the box
@ThePhD Is that supposed to be "returns three ints, takes a float, a double, and a double"?
Doesn't seem messy at all.
It doesn't need to run within the compiler
user3010322
@R.MartinhoFernandes Yes.
How less messy can it be? It's as minimal as it can get.
14:02
It has the signature types and nothing else.
@R.MartinhoFernandes Yeah, bit to far to go for a meal. I guess I'll have to substitiute with some other food, or McDump :(
@CatPlusPlus Using an external build step is gonna be painful.
No it's not
You just add it to the build system and forget about it
I have not eating fast food for ages :'(
Or even pregenerate sources and commit them
14:03
@CatPlusPlus I guess it's fucking painful with crap like VS.
No, it's not
I wanna a double cheeseburger with fries :/
MSBuild supports this just fine
But then, VS supports things like T4, so maybe not.
T4 is actually sorta nice.
I generate git versioning info with MSBuild
user3010322
14:04
mylua.register( "arf, object_with_so_many_overloads( int, int, int ) );
// std::tuple<int, int int> return is implied, yay!
// At least, this would be like my dream-ish kind of syntax
It's a tool that's built, and then run to generate sources that are then included in all other projects
user3010322
@R.MartinhoFernandes ^ Something like that would be cool
It's literally not a problem at all
craving for melt cheese on grilled beef patty ...
14:04
@CatPlusPlus Yeah, I'm sure. That's why I mentioned VS, not MSBuild :P
VS is MSBuild
Unless you need to support old VCBuild in <2008, it's not a problem
user3010322
My reflector would work if Clang wasn't a dick. :c
I know. But good luck doing that from VS's interface. (Well, using its own editor to hack project files doesn't count :P)
VS GUI doesn't even scratch the surface of what MSBuild can do
But then again, what GUI does
Edited your answer. A lambda could be more efficient on some compilers. However, I'm retracting my upvote for now, as this solution crucially assumes that stable_partition visits elements sequentially and only once. This isn't guaranteed. You'd need to transform elements into pairs (value, index) so you can inspect the actual index. This trumps the efficiency... :( — sehe 4 secs ago
14:06
Put your stuff in a separate .targets file, and add <Import> into your project files
I think Bartek's code has a memory leak.
VS won't touch it
@Rapptz lolwut?
You need to do this exactly once
I thought he knew better.
14:07
You can even make it a NuGet package for automated installation :v
He calls new here but there's no delete anywhere.
must be a hindsight thing
@R.MartinhoFernandes agreed. It's the VS integration that does my head in :( as always
user3010322
That's actually really good voerload resolution syntax...
user3010322
Im gonna keep that for myself.
user3010322
14:08
When I invent my language.
WTF does "overload resolution syntax" mean?
should tell Bartek he's a noob when I get the chance
6
user3010322
@R.MartinhoFernandes Just, when a type has overloaded functions, how you select which function you want to call (in the case of a delayed / type-erased function call).
PhDLang
user1804599
You pass in the arguments you want to pass in.
user3010322
14:10
@Rapptz Phlang actually sounds kind of cool.
user3010322
PhlanD is a bit weird, but also nice. :D
user1804599
Phantom Derplang
PlanB
@Rapptz FWIW, blaming says it was kbok. Still, Bartek reviewed it and approved :P
user3010322
IIRC they had a discussion about it
14:12
@ThePhD Erm, what? Either the language does it, or you are effectively making functions with different names (where whatever special syntax you add is essentially some special suffix).
user3010322
@R.MartinhoFernandes I want the language to do it by specifying a type list for a function call, e.g. my_overloaded_function( int, other_struct_t, float );
@R.MartinhoFernandes dang, github's blame UI is nice.
first time I've used it.
Xeo
Xeo
@ThePhD That entirely defeats the purpose of overloading.
@ThePhD Oh. That's picking an explicit overload. It leaves you with a non-overloaded pointer.
user3010322
14:14
@R.MartinhoFernandes Yes, that's what I mean. I want picking an explicit overload not to be ugly gross function pointer syntax.
If I was designing a language I would make that a non-problem.
Non-problems are better than solutions.
user3010322
True enough.
if I made my own language I'd probably only allow operator overloading
I feel like not having overloading creates more problems than it solves.
user3010322
14:15
I'm not sure how I'd make overload resolution a non-problem, though.
user3010322
@DeadMG ( e.g., see C? )
no.
Xeo
Xeo
@DeadMG Who says that the "non-problem" involves not having overloads?
well
it's true that Wide also doesn't have the problem of creating overload sets.
Fact is, overloads sets are not a thing in C++ type system.
user3010322
14:16
Perhaps if C++ has the notion of overload set of functions, that you could pass around then invoke the right overload of the overload set
and it's also true that I was planning to add a kind of f.resolve(types) syntax.
user3010322
@R.MartinhoFernandes I know right! But they're part of the compiler!!
I mean
user3010322
VC++ always gives me errors "cannot resolve overload of <overload set>" and then proceeds to list a gazillion overloads.
right now you can implement a C++ function by setting the export name, and you can get the mangled name of a function, but you can't resolve one from a set.
user3010322
14:17
If you just included that shit in the type system, maybe I could just pick when I wanted to. D:<
so if you have void f(); and void f(int); then you can't implement them.
so I really need a .resolve(...) member so you can mangle the name.
Xeo
Xeo
@Lightness "Clang" does not exhibit that behaviour - libstdc++ does, which Clang uses by default on Coliru.
@Rapptz I left a comment on the commit.
Xeo
Xeo
@R.MartinhoFernandes []soon.
(Not really)
user3010322
Is nobody fighting for that lift/chain paper? =/
14:19
I still want explicit functions
Xeo
Xeo
What chain part are you talking about?
user3010322
Sorry, I associate the two together: the lifting expression / lifting lambda paper?
Xeo
Xeo
I haven't touched the paper in forever
user3010322
:c
@Xeo aha!!
How do I change that on Coliru?
user3010322
14:20
The only problem I see with overload sets is templates.
@LightnessRacesinOrbit Pass -stdlib=libc++ to the compiler.
how is that problematic?
user3010322
Er, well, specific to my case.
@ThePhD No, it's not.
Xeo
Xeo
@R.MartinhoFernandes Needs -lsupc++ or something like that
14:21
Wide generic functions and C++ templates can be part of a Wide overload set.
Knowing the overloads helps naught in your case.
The problem is that you can't read people's minds, not that you can't get all the overloads.
user3010322
I guess so.
I thought you had realised that already.
user3010322
I am, slowly!
14:22
@LightnessRacesinOrbit Ah, yeah, bad install. You need to link to supc++ explicitly like Xeo said.
user3010322
It's just that I wanted to be able to also have the concept of a runtime overloaded set
Xeo
Xeo
Doesn't seem to help, though
Ah, didn't see that
"sup C++"?
Wait, no, seems broken anyway.
14:23
that's a real command line argument?
Xeo
Xeo
@Rapptz support
Supplemental C++ library
@Rapptz supc++ is the C++ support library.
Xeo
Xeo
14:23
38 secs ago, by Xeo
Doesn't seem to help, though
It was one of supc++, cxx-rt and another
there are three libraries that you can use, IIRC
@ThePhD I don't think that makes sense.
I see
Clang sounds like a mess
@Rapptz That's a bad install.
14:24
to be fair
implementing a C++ compiler is just a mess.
user3010322
@R.MartinhoFernandes Probably not... The idea was that you could have all functions of "x" name be contained in a runtime overload set. If you invoked that overload set with certain parameters, it'd pick the right one at run-time (much like a virtual function in C++).
I recall stacked having a hard time installing libc++
there's an amazing amount of support libraries for stuff like EH and linking
@ThePhD Woah, that's not making more sense.
Uh virtual functions don't resolve overloads at runtime
user3010322
14:25
@R.MartinhoFernandes Sorry... Just ignore me. :D
OR is purely compile-time thing
Oh, you changed it now.
Xeo
Xeo
@LightnessRacesinOrbit ARGH, I always forget where to put linker flags
fucking annoying
You can't do that without RTTI.
Thing is, you don't... need to do that.
@LightnessRacesinOrbit Whoa. It prints (nil) for nullptr?
14:26
Unless you mean to call something with signature any(any, any, any)
Just write everything in C#
There I solved your problems
dynamic does resolve overloads at runtime.
That'd be 99.99€
btw robot, did you write to JetBrains or didn't have time/forgot?
Xeo
Xeo
Did you write the Python script yet, btw?
user1804599
dynamic is nice.
14:28
@CatPlusPlus No time. Sorry.
I will as soon as I clear my work backlog, which is ginormous
Fucking Solr
I should probably learn the whole team city setting up thing
@Rapptz Want to copy my settings to start with?
@Rapptz Appaz. And I don't see why not, tbh
Create a config, attach VCS root, add build steps
14:30
@Xeo Heh, I did the same thing first time ;P
@Xeo So, you say Clang doesn't exhibit the issue. Were you just pointing out that this is a library thing and not a compiler thing (which is true: I have clarified that in my answer now; thanks), or had you seen the alternative behaviour in some version with some combination of build flags?
does TeamCity have an RSS feed for building a project?
Xeo
Xeo
@LightnessRacesinOrbit The former.
the LLVM people have a nice setup where build failures are reported in their IRC
@R.MartinhoFernandes sure
14:31
In your profile, lower right corner, there's a link to customise an RSS feed with whatever you want.
user3010322
What does std::is_function work on?
user3010322
Just functions / function pointers?
Xeo
Xeo
R(Args...)
@ThePhD Your computer
14:32
@ThePhD Anything.
@ThePhD function signatures
Xeo
Xeo
Well, yeah, anything. Reports true only for R(Args...)
There'll be XMPP reporter, there's email reporter already running, and you can also use tray/IDE notifier
user3010322
Ah. Hokay.
user3010322
So it's a good separator then.
Xeo
Xeo
14:33
?
@Rapptz Oh. Seems I can't make my settings public. Ask the @Cat to copy it over, I guess.
user3010322
@Xeo Don't worry about it: I'm doing things the right way, I promise. :D
Xeo
Xeo
...
@Xeo Cue "that's not what std::function is for".
Xeo
Xeo
@R.MartinhoFernandes s/::/::is_/?
14:34
Oh.
That.
Xeo
Xeo
Okay, I have to ask - how do you replace, for example, the second match?
since matching on : would be std:is_:function :<
Metarunners don't copy, so dunno if that's really helpful :v
@CatPlusPlus Ugh.
Maybe they copy with the entire project
Metarunners are cool.
Should be copyable and shareable.
@Xeo Either build a regex with groups and shit, or use the c option and confirm manually.
14:37
Oh, you've got metarunners defined in parent project
Xeo
Xeo
@R.MartinhoFernandes I see
I tend to prefer c.
> Before pushing the results, lua_pcall removes from the stack the function and its arguments. If a function returns multiple results, the first result is pushed first; so, if there are n results, the first one will be at index -n and the last at index -1.
@Rapptz IOW yes.
yeah I figured that out a while back
your code has a memory leak in it btw
git blame says it was kbok
@Rapptz functor storage or elsewhere?
user3010322
14:40
std::unique_ptr
user3010322
Is really all it needs, I think.
@ThePhD it's not that simple if I guessed right what it's about
34 mins ago, by Rapptz
He calls new here but there's no delete anywhere.
user3010322
@BartekBanachewicz It's the functor_storage, yeah.
@Rapptz eh, right. std::vector<detail::function_wrapper *> wrappers; should be a ptr_vector
or the state destructor should clear that up
but that was a duct tape solution anyway
14:43
Duct tape works
user1804599
Magnets work better.
I let that slide because we had much more important issues to fight than <2kB memory leak
Xeo
Xeo
Seriously? Even though the fix is increadibly easy?
I just didn't like the idea at all and wanted to replace that by something else
I figure I forgot to make an issue on it
user3010322
@BartekBanachewicz You and me both. =/
14:45
@BartekBanachewicz Ugh, R0.
user3010322
I truly wish there was a better way to go about this function wrapper business.
@R.MartinhoFernandes IKR
user3010322
I wish lua assigned your function a unique identifier of some sort
@ThePhD it kinda does
user3010322
It doesn't expose that to you, though.
14:46
"R0" is much better than "Ro0", I think. (Was it you @Rapptz that also mentioned how ugly it looks?)
@ThePhD it kinda does
user3010322
You have to go through the stack and use upvalueindex
user3010322
And all that jazz.
Xeo
Xeo
@R.MartinhoFernandes o0
Just leave the R out. Makes for a better emote.
@R.MartinhoFernandes R.0
user3010322
14:47
r0 r0 r0 your boat, gently down the stream...
What's nice about Lua?
user3010322
Nothing.
@R.MartinhoFernandes nah
user3010322
Flee in terror.
14:48
@Jefffrey in short, it's JS sans bullshit + fast
Nov 16 at 19:05, by Rapptz
lol ro0, reads very strangely.
Yeah!
user1804599
@BartekBanachewicz so it’s just fast?
that's different than saying it's ugly!
@rightfold :D
Don't you dare defy my memory. I may forget important stuff, but passing remarks about meaningless shit? Never!
user3010322
14:48
@Rapptz Pedantiiiic.
@Jefffrey for a longer explanation, you need to put it in a context. "What's nice about Lua when doing X?"
@BartekBanachewicz Fast compared to?
Xeo
Xeo
What's nice about Lua when everybody seems to want to write a wrapper for it?
Then it's pretty fast
14:49
fuck the lua API
Have you seen a horse adding 2 and 2? They take forever.
@Xeo a wrapper for its C API, not Lua itself
Xeo
Xeo
Reimplement Lua, done.
@R.MartinhoFernandes But they run like the wind
14:49
@Jefffrey other mainstream scripting languages
@Xeo Havok did that. I think it's still :effort:
user3010322
@EtiennedeMartel <_> Wat in the world.
I saw this episode. It didn't feature horses last time.
user3010322
@BartekBanachewicz Already done by Havok.
@ThePhD In Montreal.
14:50
the only nice thing about Lua is that it's better than Python for embedding it. But they're both shit so being better than shit while still providing a shit API doesn't make it that great. :|
Why's Python bad for embedding?
user3010322
> NO TOUCHING ANYONE ON THE MASTURBATION FLOOR — whether they have given you permission or not
Genitals must be covered off the masturbation floor (in the lounge)
python needs manual ref counting
user3010322
<_________>
user3010322
THIS MAKES NO SENSE.
14:51
@Rapptz Oh.
> no ejaculating on anyone without their permission
Oh gawd, wtf
@ThePhD Why wouldn't it?
Refcounting is easily taken care of with simple wrappers (and Boost.Python is ready solution)
It's people masturbating.
Anyway. I need to get to work.
14:52
Together but.. not together
See y'all!
@R.MartinhoFernandes it's much bigger and unwieldy.
user3010322
I ENVER THOUGHT I'D BE READING RULES LIKE THIS
user3010322
BUahahahahahahahaha
Python could be better for embedding, but refcounting has nothing to do with it
just one annoyance really
user3010322
Oh god, I'd hate to be in a room with othe rpeople masturbating. You would hear like, all the shlicking and slushing sounds of everyone's penises and cunts.
user1804599
mruby
user3010322
Argh. Arrhwajdhwadhwjkdhj @___________@
user3010322
Why did I imaginet hat my brain plsno.
14:54
room topic changed to Lounge<C++>: Genitals must be covered off the masturbation floor (in the lounge) [c++] [c++11] [c++1y] [no-answers] [no-questions]
@ThePhD ohhh
masturbation is a boring subject.
@Rapptz eh, Lua isn't a bad language. I mean, when you write it you can feel that it was actually designed, not slapped like some JS abominations, nor born from the cpu assembly like C.
ahahahaha
Robots are taking over the lounge!
noooooooooooooooooooooooooooooooooooo
14:55
Lua is extremely lightweight. It lacks a decent standard library as a result :/
user3010322
@melak47 Get that SDF out of there. <_>
user1804599
Tcl.
user3010322
Tender Care Loving?
@Rapptz stdlib library has some nice things you might like
I already checked out of interest
user3010322
14:55
@melak47 Thanks!
@ThePhD lol, oops. opened the wrong sln from the history! :p
Only 3 interesting things and they were all string functions with specialised pattern matching
user3010322
@melak47 It's okay. How's the project going? :D
14:56
@BartekBanachewicz No such thing
You should make an easier to embed Python VM instead of doing so much Lua!
Xeo
Xeo
The currying has become concious and taken over Braket.
that's not the actual lua standard library :/
@Rapptz of course it's not :F
14:57
It's lack lustre.
> stdlib library
curry (f, n)
Curry a function.
Parameters:
f function to curry
n number of arguments
Returns: curried version of f
...Best description ever
@Jefffrey what else would you like ...?
lol, the std::vector::buffer_overrun() proposal in the Asylum was revived.
Haha you have to give it number of arguments
14:58
Know what the heck does curry means
google it
@Rapptz Ain't it "lackluster"?
Or alternative spelling?
user3010322
Either or, I think.
alternative
In mathematics and computer science, currying is the technique of transforming a function that takes multiple arguments (or a tuple of arguments) in such a way that it can be called as a chain of functions, each with a single argument (partial application). It was originated by Moses Schönfinkel and later worked out by Haskell Curry. Because of this, some say it would be more correct to name it schönfinkeling. Uncurrying is the dual transformation to currying, and can be seen as a form of defunctionalization. It takes a function f(x) which returns another function g(y) as a result, and yi...
user3010322
14:59
lustre is legacy, though
@CatPlusPlus it's dynamically typed, of course you do. But you can chain a single-argument function indefinitely rather easily and I believe i've implemented that here
@Rapptz :P
@Rapptz As two words, you mean? (Nevermind the -er/-re issue)
@BartekBanachewicz Does not follow
@Jefffrey you are supposed to know that
14:59
@Rapptz That's because they insist on no features you can't implement in completely portable C.
@BartekBanachewicz Python does it just fine IIRC
no the two words was me trying to type another sentence but decided on not doing so :(

« first day (1143 days earlier)      last day (4031 days later) »