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

2:00 PM
@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.
 
2:01 PM
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.
 
2:02 PM
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
 
2:03 PM
@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
2:04 PM
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 ...
 
2:04 PM
@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
 
2:06 PM
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.
 
2:07 PM
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
2:08 PM
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
2:10 PM
@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
 
2:12 PM
@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
@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
2:14 PM
@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.
 
eh
 
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
2:15 PM
I'm not sure how I'd make overload resolution a non-problem, though.
 
user3010322
@DeadMG ( e.g., see C? )
 
no.
 
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
2:16 PM
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
2:17 PM
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
@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
@R.MartinhoFernandes []soon.
(Not really)
 
user3010322
Is nobody fighting for that lift/chain paper? =/
 
2:19 PM
I still want explicit functions
 
Xeo
What chain part are you talking about?
 
user3010322
Sorry, I associate the two together: the lifting expression / lifting lambda paper?
 
Xeo
I haven't touched the paper in forever
 
user3010322
:c
 
@Xeo aha!!
How do I change that on Coliru?
 
user3010322
2:20 PM
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
@R.MartinhoFernandes Needs -lsupc++ or something like that
 
2:21 PM
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.
 
@R.MartinhoFernandes Now it's really unhappy: coliru.stacked-crooked.com/a/57f76db9e2d86592
 
user3010322
I guess so.
 
I thought you had realised that already.
 
user3010322
I am, slowly!
 
2:22 PM
@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
Doesn't seem to help, though
 
Ah, didn't see that
 
"sup C++"?
 
Wait, no, seems broken anyway.
 
2:23 PM
that's a real command line argument?
 
Hmm, dunno.
 
Xeo
@Rapptz support
 
Supplemental C++ library
 
@Rapptz supc++ is the C++ support library.
 
Xeo
2:23 PM
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.
 
2:24 PM
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
2:25 PM
@R.MartinhoFernandes Sorry... Just ignore me. :D
 
OR is purely compile-time thing
 
Oh, you changed it now.
 
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?
 
2:26 PM
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
Did you write the Python script yet, btw?
 
user1804599
dynamic is nice.
 
2:28 PM
@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
 
2:30 PM
@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
@LightnessRacesinOrbit The former.
 
the LLVM people have a nice setup where build failures are reported in their IRC
 
@R.MartinhoFernandes sure
 
2:31 PM
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
R(Args...)
 
@ThePhD Your computer
 
2:32 PM
@ThePhD Anything.
 
@ThePhD function signatures
 
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
2:33 PM
?
 
@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 Cue "that's not what std::function is for".
 
Xeo
@R.MartinhoFernandes s/::/::is_/?
 
2:34 PM
Oh.
That.
 
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.
 
2:37 PM
Oh, you've got metarunners defined in parent project
 
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
2:40 PM
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
 
2:43 PM
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
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. =/
 
2:45 PM
@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.
 
2:46 PM
"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
@R.MartinhoFernandes o0
Just leave the R out. Makes for a better emote.
 
@R.MartinhoFernandes R.0
 
user3010322
2:47 PM
r0 r0 r0 your boat, gently down the stream...
 
What's nice about Lua?
 
user3010322
Nothing.
 
@R.MartinhoFernandes nah
 
user3010322
Flee in terror.
 
2:48 PM
@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
2:48 PM
@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
What's nice about Lua when everybody seems to want to write a wrapper for it?
 
Then it's pretty fast
 
2:49 PM
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
Reimplement Lua, done.
 
@R.MartinhoFernandes But they run like the wind
 
2:49 PM
@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.
 
Cue LuaJIT
 
user3010322
@BartekBanachewicz Already done by Havok.
 
@ThePhD In Montreal.
 
2:50 PM
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.
 
2:51 PM
@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.
 
2:52 PM
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.
 
2:54 PM
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
 
2:55 PM
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
2:55 PM
@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
 
2:56 PM
@BartekBanachewicz No such thing
 
You should make an easier to embed Python VM instead of doing so much Lua!
 
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
 
2:57 PM
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
 
2:58 PM
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
2:59 PM
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
 
2:59 PM
@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 (3820 days later) »