« first day (1156 days earlier)      last day (4018 days later) » 

19:00
@Rapptz talks about placement new vOv
your paper must be outdated
possible
or mine is
depends
I'm looking at N3376
> 2012-01-16
N3337
user3010322
Lol
user3010322
19:01
37 versions behind.
user3010322
Way to go, Jeffrey.
It's a C++11 draft, wtf
lol
aye but unless you want to pay 400 it's what you read
@ThePhD you are good at math, aren't you? :P
19:03
it's close enough for most things
the actual standard isn't $400
It's on GitHub
user3010322
@Jefffrey Horrible, actually. :D
I see
yeah the LaTeX is on github
user3010322
19:06
@Rapptz So the returns only come out in reverse when dealing with calling Lua funtions, not C++ ones.
lol
user3010322
I'm going to attempt to make C++ conform to lua's standard, and then use the same convention when getting arguments for both.
lua? Sounds familiar.
@cyberspace009 it's a scripting language
user3010322
No it doesn't.
19:09
@BartekBanachewicz yeah, see it here in google. Blizzard used this language?
most games use it for scripting
scripting? You mean programming?
no as in scripting
I have to say, Teslagrad is very pretty.
like NPC scripts
19:11
Also tight controls and interesting mechanics.
I'm sorry. I'm new to game dev.
I'll look it up
@cyberspace009 WoW's GUI uses Lua extensively. This allows extensibility.
Anyone seen the Hobbit?
@EtiennedeMartel so, just extending or branching code by using other programming/scripting languages?
@Code-Guru nope. I heard good things about it.
@cyberspace009 scripting, in this context, refers to treating some of the game's code just like any resource.
3
19:13
It's very good, despite the changes made to parts of the story
Just like you could load meshes, or materials, or shaders, then you can also load code.
@cyberspace009 think of it as an advanced config file
Wow, interpreter language. Matlab uses this interpreter, too.
19:18
lol it seems alf is still trying to make auto main() -> int a thing.
1
A: Convert array to set in C++

Cheers and hth. - Alf#include <set> #include <utility> #include <iostream> using namespace std; auto main() -> int { static int const a[] = {3, 1, 4, 1, 5, 9, 2, 6, 5, 4}; set<int> const numbers( begin( a ), end( a ) ); for( auto const v : numbers ) { cout << v; } cout << endl; }

19:39
> N3797
wtf
350+ versions more than mine?
user3010322
Get good, scrub.
Xeo
Xeo
> foldling over an infinite list diverges (never stops), because foldl is tail recursive.
uh what
wasn't that foldr?
Question
does *.txt match all text files recursively or just in the current directory?
user1804599
Current directory.
user1804599
**/*.txt matches recursively.
19:49
meh :/
Depends on what where
user3010322
@Xeo I've hit a brick tuple wall.
user3010322
Need some help. u.u
Xeo
Xeo
?
user3010322
I'm trying to make a rtl_pop.
Xeo
Xeo
19:51
wokay
user3010322
Which just processes arguments in reverse order from ltr_pop,
user3010322
but still keeps them in the same order (TArg1, TArg2, TArg3)
user3010322
I'm currently trying to use it like: rtl_pop( fx, types<Arg1, Arg2> ), where it processes Arg2 and then Arg1, but lays them out to fx like fx( arg1, arg2 );
user3010322
I can do the processing in reverse, but when I pass it through I end up with arg2, arg1, which is just all kinds of balls-wrong.
Xeo
Xeo
It's really not that hard. Either you pack it all in a tuple-thingy and generate indices in reverse, or you do the manual recursion and do rtl_pop(...); pop(...) instead of the other way around
I just noticed that's foldl (ltr_pop) vs foldr (rtl_pop) over the typelist
19:58
@Rapptz With what? In an effort to be pointlessly annoying, gnu grep (just to give one example) will treat something like grep -r include *.txt as meaning: "search for "include" in files name *.txt, and recurse into directories named *.txt (of which there probably won't be any). Relatively recent versions do let you get semi-sane behavior by invoking it with --include-dir * (or something similar -- been a couple of months since I had to put with it).
By contrast, most similar tools for Windows actually attempt to be somewhat sane, so findstr include *.txt looks only in files that fit *.txt, but doesn't restrict directory names the same way.
user3010322
That's the way I implemented my file stuff.
@Jefffrey All papers are numbered consecutively, so successive versions of the draft are often something like a hundred or so apart.
user3010322
Albeit, you specify a separate boolean that says "search the directories recursively"
Oh, findstr does that as well (/S, to be exact).
user3010322
Other than that, *.txt and .*.txt searches only for file names found within that directory (or lower, with the recursive flag)
user3010322
20:08
Yay, I have sane behavior that's Jerry-approved~
@JerryCoffin oh
@ThePhD Now try writing a sane version of "move"/"mv". For only having about 4 decisions involved, it still sticks in my mind (20+ years later) as one of the more difficult things I ever had to figure out -- especially for something that seemed like it should be simple, bordering on trivial.
user3010322
@JerryCoffin u.u no thanks?
user3010322
WHy can't I reverse this type list. <_>
@ThePhD You can. The problem, of course, is that reversing <_> yields the original list, unchanged because it contains only one element (_).
user3010322
20:17
Ahaaa, I see what you did there!
@ThePhD I would certainly hope you did! :-)
@ThePhD I actually think it's a good exercise. The actual coding involved is fairly easy. Most of the difficulty is in sitting back and thinking about what you honestly want it to do in situations X, Y and Z.
user3010322
@JerryCoffin Yeah... but.... but but mah brain!
user3010322
It's already under a lot of duress.
user3010322
Hm. I need a type that cannot be accessed...
@ThePhD Did I ever tell about the time they had to lock down the Air Force base where I was stationed because an idiot was going into the base command post, and (per standard routine) they asked him if he was under duress, and the idiot answered "Yes. Of course I'm dressed." Even though it was obvious he'd misunderstood, he'd said "yes", so...
user3010322
20:23
@JerryCoffin Hahaha, that's actually pretty crazy.
user3010322
And a giant waste of time!
@ThePhD Yup--for about 2 hours nobody could enter or leave the base, and even most movement on base was quite restricted. Honestly, pretty much the whole afternoon was blown.
user3010322
@JerryCoffin Did you guys take the offending solider outback and teach him a lesson in pronunciation and grammar? :D
@ThePhD This was the Air Force, not the army (therefore, he was an Airman, not a soldier). He was certainly belittled mercilessly--but he was pretty accustomed to that. This was the same guy who'd decided a girl (who was underage and the daughter of a Colonel) would like him better with blond hair, but when he tried bleaching his hair, it came out bright orange instead. He, however, seemed to think we were all just joking around when we tried to point out the he needed to reform his ways.
user3010322
20:39
Bright Orange Hair... like his head was on fire? o.0
Xeo
Xeo
@JerryCoffin Being the daughter of a Colonel shouldn't stop you from hitting on someone. The underage thing, on the other hand...
He also listened to "The Doors" quite literally from the moment he got home from work until about 2AM nearly every day--on a boom box with the volume turned up to about the 20% distortion level. He also lived directly across the hall from me (I still avoid listening to The Doors whenever possible.
@Xeo Just being the daughter of a Colonel shouldn't, but messing with the underage daughter of his boss's boss's boss's boss's boss's boss (I may have missed a couple levels there, but you get the idea) was about as stupid as you could get.
Xeo
Xeo
I agree
20:42
Please clarify "messing with"
user1804599
Argrg.
I suppose, in fairness, I should add that he was only 18, and I think she was only around 2 years younger than him, so it wasn't really all that huge an age difference, but still.
user1804599
Why do ORMs that lack support for composite primary keys even exist?
Because they were written.
By folks not unlike you ("Hey there's a cool project. I'll write this in XXXX." Then - attention deficit)
Xeo
Xeo
20:45
Whee, salad
@sehe I did my best to not be privy to exactly what they did, but saw her leaving his room with her hair a mess and clothes pretty obviously thrown on in a hurry at around 2-3AM or so a couple of times.
Mmm. "Messing with" granted.
Xeo
Xeo
@JerryCoffin What was the age of consent where you were stationed?
user3010322
@Xeo I'm not getting very far with this approach, heh.
loading...
user3010322
20:48
Coliru doesn't load very well from MIT. <.>
Xeo
Xeo
coliru, y u no load
user3010322
Oh, it's just coliru.
Xeo
Xeo
You killed it. Well done.
Just realized, Coliru sounds like "Kolere".
user3010322
You know, it's not evne my fault. :c
20:48
@StackedCrooked paging Dr. Crooked
@Xeo I'm not absolutely certain, but I think it was 18. Nowadays, it's pretty common to allow some leeway when one is just under 18 as long as the two are within 2 or 3 years of the same age, but at that time I'm pretty sure it was a hard cuttoff at 17 or 18.
Xeo
Xeo
@sehe "Dr. Crooked" sounds wrong.
@JerryCoffin Ow
It sounds... crooked
Xeo
Xeo
@ThePhD So, any other link? :P
user3010322
Xeo
Xeo
20:50
hah
user3010322
@Xeo ^ That one might work better.
LOADED
Xeo
Xeo
Also, on the topic of crooked: youtube.com/watch?v=xJ8lMZ084Ww
@ThePhD really, if the metaprogramming doesn't work out for you, just resort to the easier option
user3010322
I don't want to forward as a tuple. :c
user3010322
THAT'S FOR WHIMPS.
20:54
@ThePhD It's spelled "wimp" (no "H"). Technically, it probably should be w'imp, since it's really a contraction of "wet and limp".
Xeo
Xeo
@ThePhD 1. you're doing types<RArgs..., Next> in the body - wrong way around. 2. you're having the trouble we discussed before, reverse_types can't find its own declaration
@JerryCoffin [needs citation]
inb4 "http://chat.stackoverflow.com/transcript/message/13538064#13538064"
@sehe Since you obviously already knew, why did you ask?
weak. 2/10
user3010322
20:59
@Xeo Is there a way to do it without functions?
@ThePhD I literally gave you a reverse_tuple implementation :|
y u no adapt
user3010322
@Rapptz Becauseee, it's not the same!
Not now
how is it not the same
user3010322
Uhm.
user3010322
21:00
I'm not sure.
Xeo
Xeo
@ThePhD partial specialization?
it's literally in the repository dude
man
I just realised why it's different.
@Rapptz "because reasons"?
nah, I use tuple_cat.
user3010322
@Xeo I tried that, but
Xeo
Xeo
21:02
@Rapptz wut
I thought I did it without it
user3010322
I couldn't figure out the base case. :c
Xeo
Xeo
@ThePhD the same as with the function?
@Xeo ?
Xeo
Xeo
@Rapptz Recursively splitting one part of and cating with the reversed part?
user3010322
21:03
@Xeo But how do I express two tuples types<> and types<RArgs...> on reverse_types, and ahve it still resolve to types<RArgs...> at the end of the day?
@Xeo yep.
Xeo
Xeo
ew
user3010322
Like
Xeo
Xeo
reversed-indices are 5 lines, c'mon :/
user3010322
I did reversed indices!
user3010322
21:04
This is harder. u.u
user3010322
reversed-indices has the 0-number tracker to detect when it reaches the end!
Xeo
Xeo
I meant that for Rapptz
well, it was a quick and easy solution and it's not going to kill me
user3010322
template <typename... T>
reverse_types : ????????????? {};
user3010322
What does the base declaration even look like here? :c
21:05
there should be a proposal to make working with parameter packs easier
user3010322
There should be a proposal that allows compile-time reflection, and standardizes that across all types.
user3010322
Not being able to access the AST blows so many chunks.
user3010322
And instead getting these half-traits where we do a bunch of stupid guesswork.
std::tuple is okay but there needs to be something cooler I guess.
I remember a type_list proposal
21:07
but I think it was overambitious or something, I forget
user3010322
@Xeo coliru doesn't load here, remember? u.u.
or here
Xeo
Xeo
It's weird. It loads fine if you hit "share" or open the homepage
user3010322
@Xeo ... Oh.
user3010322
... You know, that's just dirty. :c
Xeo
Xeo
21:09
what, why
lol
user3010322
I don't know!
user3010322
It doesn't feel like types
user3010322
Or like build_indices
user3010322
21:12
Or even reverse_indices
user3010322
You've got a second struct there. It's not just simple partial specialization all the way down.
Xeo
Xeo
@ThePhD The second struct is only for convenience
user3010322
Oh.
Xeo
Xeo
You could also write reversed_<types<>, ...>
@ThePhD Obviously, reverse_cowboy (matches perfectly with cowboy_cast)
Xeo
Xeo
21:14
a using-alias might've been better
awkward syllable elision alert
juuust arrived for the sex talk, yes!
Reverse, cowboy!
3 hours ago, by Jefffrey
his mum
user3010322
Well...
user3010322
It almost compiles.
21:24
Ship it!
user3010322
Almost. I have to fix whatever's making rtl_pop fail. :c
user1804599
> AbstractIssueProviderFactory
user1804599
lol
I have to admit, other libraries get even less appreciation than Spirit, it seems:
21:32
Ah hey. Boost.Filesystem.
Library's decent. Feels like it lacks something though.
Standardization?
Proper shell wildcard globbing.
Nah. I meant in its API
@sehe Yeah I'm implementing that right now, not very fun and I just said "fuck it"
@Rapptz There appears to be some 'preload' library that emulates it on argc/argv for windows. For q&d this might be interesting?
user3010322
f(std::forward<Args>(declval<Args>())...)
user3010322
^ Is that not possible?
21:35
are you okay?
:)
user3010322
No.
user3010322
I am not okay.
user3010322
I need lots of meds and lots of help.
He's undefined
21:35
well, declval is for unevaluated contexts.
like decltype and stuff
user3010322
This is inside a decltype.
should be okay then
Deeeeep inside
user1804599
How can I avoid boilerplate when not using an ORM or query builder?
though
kinda looks odd
user3010322
21:37
Oh, that's okay.
@sehe well, my solution was converting it to regex. That ended up fucking things up when I had to do things like **/*.txt so I decided to just do */*.txt instead.
user3010322
It's still not compiling. :3
make it recursive by default :/
user3010322
I don't know what ** is for.
user3010322
What purpose does it serve?
21:39
globstars are dumb
user1804599
@ThePhD It does recursion.
user3010322
I'd rather pass a flag for that.
user1804599
Because fuck find.
@ThePhD you do have to pass a flag for that in bash
shopt -s globstar iirc
but iunno, screw globstar because I don't feel like deciding if I should use a regular directory_iterator vs a recursive_directory_iterator and meh
> melak47 deleted branch snake at melak47/D3DEngine 8 hours ago
It's over. RIP
Xeo
Xeo
aw, just when I'm getting started!
@ThePhD It's unnecessary
declval<T>() == forward<T>(v), on the type-side
user3010322
21:52
@Xeo And when v doesn't exist?
user3010322
How do you magically generate v?
Xeo
Xeo
for some invented v
I'm only talking about types
user3010322
So you need to make one up if you don'thave a v
user3010322
The maker-upper type is declval
user3010322
Also, I did some massive cheating for ltr_pop and rtl_pop
Xeo
Xeo
21:53
again... decltype(declval<T>()) == decltype(forward<T>(invented_v))
user3010322
For easy type deducation that even MSVC can do.
Xeo
Xeo
what
> _xeo pushed 1 commit to _xeo/Spielplatz
4 minutes ago
6d69b9d - snake timu!
user3010322
Hm. That's a lot of code.
Xeo
Xeo
@ThePhD Either the first or the second overload is redundant
I'd remove the second one
user3010322
21:55
It's not, actually.
user3010322
Because GCC is retarded.
user3010322
Though, actually, that may not be a problem because I'm cheating.
Xeo
Xeo
no, wait, why the fuck does one rtl_pop overload have two types<...> and the others don't?
user3010322
I'm fixing it, relax. u.u
user3010322
@Xeo Refresh.
user3010322
21:57
I guess I could remove the second overload.
Xeo
Xeo
second overload still redundant
user3010322
Maybe GCC won't cry because I'm not using rtl_pop in the decltype anymore.
Xeo
Xeo
I linked you a fix earlier
put everything in a class
user3010322
(Fun fact: MSVC could resolve it by itself without the need for another overload).
Xeo
Xeo
that way the declarations will find themselves.
@ThePhD because MSVC is broken
user3010322
21:58
Because MSVC is, on occasion, smart.
is anyone here experienced with boost asio and networking in general?
Xeo
Xeo
I dabbled with Asio for a little while. If it's an easy question, I may be able to help
thanks a lot! I am trying from the morning to make boost asio work with gmail
i just didn't know what I was getting myself into
@nightcracker It never not sucks
i made it work on port 25 and server aspmx.l.google.com, but google doesn't allow home ips to be used due to spamming and the only way is to use a ssl certificate with port 587 and server smtp.gmail.com
I simply can't manage to get ssl certificate work (using openssl) with boost asio.
Xeo
Xeo
22:02
Never did anything in that direction, sorry
It seems my question is ultra specific and very little people have knowledge on the exact matter
Xeo
Xeo
Maybe the Boost mailing list would be a better place
thanks for your time, I will try more
thanks, i will go there
@Xeo halp
explanation needed
Xeo
Xeo
?
22:07
I've used that:
memoized_fib = (map fib [0 ..] !!)
   where fib 0 = 0
         fib 1 = 1
         fib n = memoized_fib (n-2) + memoized_fib (n-1)
but it appears it doesn't lazily-eval
hey Bartek
I have a question
I'm pretty sure that Haskell memoizes by default, doesn't it?
Don't use !!
@DeadMG nope.
isn't that one of the benefits of that whole purity shit
Xeo
Xeo
22:08
@DeadMG purity != laziness
also
good morning
@CatPlusPlus why?
@Rapptz well, shoot
Anyway, why doesn't this lazily eval again? Because of !!?
Because it's O(n) maybe
Don't use lists for random access shit
Also it does lazily evaluate, I don't know what you expect
user3010322
@Rapptz So here's the main problem we're having:
user3010322
22:12
When we hook a C++ function into lua, we return a tuple for multiple return types. That's all fine.
user3010322
When we call the C++ function from lua, we invert the return. We then get the lua function from the lua interface, and then call the function through lua, and then invoke the C++ function.
user3010322
So we're reversing our reversal, and in the end it's wrong.
@CatPlusPlus I was doing PE#2
sum $ filter (\x -> x < 4000000 && even x) (map fast_fib [1..100]) -- works
sum $ filter (\x -> x < 4000000 && even x) (map fast_fib [1..]) -- works not
fib = 0 : scanl (+) 1 fib
@R.MartinhoFernandes ohwow
22:14
@BartekBanachewicz Why can't I do this?
> x = { "hello", "one", "two", "world" }
> x:insert("hello2")
stdin:1: attempt to call method 'insert' (a nil value)
bugs me
@BartekBanachewicz Erm.
it works for strings so it feels lazy on their part
sum is not streaming.
@Rapptz hm there's table.insert
yes
22:15
ah so you are just complaining on prototype
yeah, kinda sucky
@BartekBanachewicz You want takeWhile. filter on an infinite list is an infinite list.
@R.MartinhoFernandes mhm.
I see
Xeo
Xeo
takeUntil (> 4000000) . filter even
mine's sum $ filter (\x -> x < 4000000 && even x) (map fib [1..40])
because it doesn't know about what comes next
22:17
did they change it?
they always change PE2 for some reason
@Rapptz lol nearly identical
I only did the first 25 questions in Haskell before I got bored
user3010322
@BartekBanachewicz Lua cannot create user data for itself, that's specifically a C-API thing, right?
@ThePhD right
user3010322
Then I guess that's the only way to separate out the issues.
22:19
@R.MartinhoFernandes sum $ filter even (takeWhile (< 4000000) (map fast_fib [1..])) :3
I don't see the point of laziness here tbh
Fusion
Only one pass on the input
Xeo
Xeo
If Haskell was strict, you'd have problems with the infinite list and then going over the list 4 times (map, takeWhile, filter, sum) (all the while creating intermediate lists). With laziness, those can be fused away (the output values of map can be directly forwarded through takeWhile to filter and from there to sum.
22:26
I guess what @Rapptz meant is you can just replace [1..] by [1..40] here
My fib is better.
yeah the question has an upper bound.. it's.. pretty meaningless imo
All of your fibs are useless
BTW, as for PE#3
is that cheating?
user1804599
[1, 1] who needs more?
22:35
@Rapptz mmm. I disagree. Regexen are overkill. And very unsuitable for user-supplied wildcards
Anyways, boost filesystem suggests you use regexen indeed. I think file globbing itself ought to be standardized. (Opengroup/POSIX?)
Definitely not.
It's also not solving.
@Jefffrey you missed one: daughter with benefits
Anyways, @Rapptz I was gonna write this thing and got halfway. If I complete it, I hope to remember to drop you a line
what thing?
@sehe All signs point to POSIX 1003.2-1992, section B.6
haha. I'm almost curious what that is
I tried looking for it but outside of glob source comments I couldn't find it :P
22:53
hmpfh
i <- liftIO $ fmap readInt getLine looks very cool
but what if I want to stop on empty line/EOF
@sehe dirty dirty mind
@Jefffrey just a programmer, thank you
you are welcome
;)
what the fuck Integer is not a Monoid
Num a => Monoid (Product a)
Num a => Monoid (Sum a)
22:58
aaaaah right

« first day (1156 days earlier)      last day (4018 days later) »