« first day (1301 days earlier)      last day (3662 days later) » 

11:02 PM
@R.MartinhoFernandes Erm. It only seems to have time.
 
soldiers come to rescue
 
@Nican It doesn't matter.
 
@R.MartinhoFernandes I think you mean <ratio>?
 
template <typename T, typename R>
using length = std::duration<T, R>;
using metres = length<int, std::ratio<1>>;
using millimetres = length<int, std::milli>;
using kilometres = length<int, std::kilo>;
(int might be too small, but that's not the important bit)
 
Oracle is still suing for Google's clean room implementation of Java? o.o
 
11:05 PM
I see. Thank you.
 
It's missing dimensional analysis, though, so you can do things like metres(1) + seconds(1).
 
I wish beer.se was really alcoholicdrinks.se instead
I just don't see beer.se useful in the long run
 
Why not use Boost.Units
 
vodka.se
 
user3010322
11:07 PM
hammered.se
 
Oh it's still super old
@ThePhD I accepted your pull request.
 
user3010322
Yaay!
 
Actually, I don't think it's too hard to plug dimensional analysis into <chrono>. Hmm.
 
user3010322
You should update the readme.
 
user3010322
The TODOs at the bottom are outdated.
 
11:09 PM
Gotta write a PoC someday.
 
People of Colour?
 
Proof of Concept.
 
Oh
 
@R.MartinhoFernandes you mean like meters/second?
 
user1804599
11:09 PM
TIL: Hero is by Skillet.
 
that would be cool
 
user1804599
I always liked this song, but I never knew who made it.
 
user1804599
F# has units of measurement. It’s pretty nice.
 
And that's something that the C++ seems type system seems made for.
 
Aww man. That big meta question got historically locked.
First time I've had a post get a historic lock.
 
user1804599
11:11 PM
As does Sass, which is very nice.
 
user1804599
If you multiply 2px by 4px, you get 8px^2. In LESS you’d get 8px.
 
template <typename Dimensions, typename Rep, typename Ratio>
struct quantity : private std::duration<Rep, Ratio> {
    using almost::all::the::stuff::from::std::duration;
};
This would work as a basis.
 
I could cerainly use something like speed = megabytes/second.
Actually megabit is what I usually need.
 
user3010322
Variadic templates could cover the dimensions, no?
 
Damn EEs making "Megabit" be a thing.
 
11:13 PM
@StackedCrooked std::ratio<1> vs std::ratio<1, 8>.
 
user1804599
I prefer megatit.
3
 
user3010322
template <typename Rep, typename Ratio, typename... Dimensions>
struct quantity : private std::duration<Rep, Ratio> {
    using almost::all::the::stuff::from::std::duration;
};
 
user3010322
Then you could just slap a bunch of tagging types for dimensions. :D
 
Also, good thing I am in a lab full of engineers and nobody uses inches.
 
11:15 PM
I really like how chrono allows implicit non-lossy conversions.
 
user3010322
Though, actually.
 
user3010322
For meters / second
 
user3010322
for the tags
 
nightzies
 
user3010322
You'd need to specify which is an inverse tag
 
user3010322
11:16 PM
and which is a multiplying tag
 
@Nican std::ratio<1> vs std::ratio<254, 1000> :P
@ThePhD No.
Dimensions is a list of pairs (tag, exponent).
 
user3010322
Ah.
 
user3010322
Compile-time exponent?
 
metres/second is L^1 T^-1
 
Dimensions to it.
 
11:17 PM
@ThePhD std::ratios, I guess.
 
user3010322
template <typename Tag, std::ptrdiff_t Exponent>
struct tag { };
 
@R.MartinhoFernandes Piece of Crap?
 
I often need to deal with legacy timeval and I like how simple the conversion to chrono is.
seconds(tv.tv_sec) + microseconds(tv.tv_usec)
 
Did you try that in VS?
I had code with mixed type arithmetic failing.
(That's why I use Boost.Chrono)
 
user3010322
Stacked works with QtCreator and GCC/Clang
 
11:19 PM
@ThePhD With ratios you can cover stuff like square roots.
 
user3010322
@R.MartinhoFernandes Oh, eww, square roots. u.u;
 
@ThePhD Would be OK for carrots - makes them easier to slice.
 
@R.MartinhoFernandes no, haven't used VS in the last few years.
 
@ThePhD T=(ML/F)^(1/2)
 
The only thing that fails is trying to do a lossy conversion without explicit duration_cast
 
11:21 PM
Well
Your pull request fails to compile
As expected because you work with MSVC
 
@StackedCrooked <chrono> does allow lossy conversions if you use floating point reps. (The core of nonius is all built on std::duration<double, something> because of averaging and stuff)
@Rapptz hahahaha
 
@ThePhD sup
 
> error: 'usertype' was not declared in this scope
How did this compile.
 
user3010322
Eh?
 
11:24 PM
@R.MartinhoFernandes I wondered about that. If it checks both ratio and rep.
 
user3010322
I thought that was userdata
 
user3010322
Goddamnit, MSVC
 
user3010322
@Borgleader HALP REFRACTIONS PLS ;~;
 
@R.MartinhoFernandes Not even C++98 compliant :v
 
11:24 PM
@StackedCrooked Yeah, there's a std::chrono::treat_as_floating_point trait that enables lossy conversions (when dealing with floating points you don't really care)
 
user3010322
To be completely fair
 
@Rapptz Does this mean the template is never instantiated?
@ThePhD If it's about MSVC, that's not possible.
 
user3010322
It is instantiated
 
usertype<T> doesn't even exist, I don't think.
 
user3010322
Because I stepped-through the code
 
user3010322
11:26 PM
That code is being called. The thing with MSVC is that templates aren't instantiated until they're used in some part of the code.
 
user3010322
So you can put the names fo types and functions that aren't used
 
Oh he just added it to the code.
 
user3010322
and then declare them after
 
@ThePhD It's the same with other compilers.
 
@ThePhD Give me link, I don't guarantee results though
 
11:27 PM
@ThePhD have you tried using just a fully refractive sphere or something and a checkered plane to debug?
 
user3010322
@melak47 I don't have texturing yet. u.u;
 
The thing with MSVC is that it takes any garbage you put in templates and accepts it.
 
@ThePhD world position % something for color
 
user3010322
Well, no, I didn't put garbage.
 
user3010322
usertype is a function
 
11:28 PM
But you could.
 
user3010322
it's just declared AFTER the arithmetic function that calls it.
 
just any pattern that makes it easier to see what is beign refracted :S
 
user3010322
That's why this error is happening.
 
don't forget about your auto without trailing return error :v
 
user3010322
Huh?
 
user3010322
11:28 PM
Where's that? :c
 
It's in the log.
 
/stack.hpp:110:69: error: 'get_helper' function uses 'auto' type specifier without trailing return type
 
user3010322
Oh, it was a tiny one at hte bottom
 
user3010322
Got it.
 
You guys use Catch for tests?
 
user3010322
11:30 PM
Yeah
 
catch as in catching exceptions?
 
@AlexM. no
 
user3010322
No, CATCH the framework
 
With this github.com/rmartinho/wheels/blob/stable/include/wheels/test/… you can get the test results integrated into TC.
 
@ThePhD I'll google that
 
user3010322
11:31 PM
Just google CATCH cpp or Catch C++
 
user3010322
Or something like that
 
yeah found the repo
 
user3010322
I am a little annoyed, though
 
?
 
user3010322
I wish functions declared in namespaces and in the global namespace could be declared after they get called.
 
user3010322
11:33 PM
Like, in a class declaration, all the functions can be used without you having to specifically order them.
 
user3010322
I wish the same thing applied to free functions.
 
it's not entirely true for classes.
it's kind of half-assed there
 
like struct test { int f(other& t); struct other { int x; }; }; would fail
and I'm okay with the whole top down thing anyway
never bugged me
I think if it wasn't top down it'd be harder to parse (?)
 
user3010322
Probably. You'd have to do a single pass and build the symbol table first,
 
user3010322
11:36 PM
and then do a real pass after determining that all the things exist.
 
I'm not sure if that'd be possible for C++.
 
user3010322
vOv
 
Consider a template that uses a function that itself uses the template.
 
user3010322
Could probably ask @DeadMG. He's the compiler guy. :D
 
user3010322
@Rapptz New pull request that should fix the small errors.
 
user3010322
11:38 PM
My TeamCity ran it just fine.
 
user3010322
Should be all set.
 
I've got an idea and started experimenting with it
 
I wonder how it would be if I was forced to think of my games as a list of entities with constraints between themselves
 
pico to giga is not allowed
 
11:42 PM
like, this object changes when this other object changes, in the following way
in the screen above "4=3" is read as "the variable at location 4 changes value to 3"
2:4+5 is "variable 2 has the value of variable 4 + 5 at all times"
I'll try to compose constraints together and see in what kind of deep shit I end up
 
Sorry to break it to you but 4 + 5 is not 8
 
user1804599
In Fortran it is.
 
3 + 5 is 8 though
 
@AlexM. I don't understand what you are talking about.
 
1 min ago, by Alex M.
2:4+5 is "variable 2 has the value of variable 4 + 5 at all times"
 
11:45 PM
Oh variables
You need clearer syntax
 
@AlexM. 2() { return 4() + 5; }
:P
 
@CatPlusPlus yup, this is just something I wrote in 30 mins to see what happens
 
That's kinda like spreadsheet. A1 = B2 + 1;
 
yup something like that
 
That's reactive programming btw
 
11:47 PM
it has a name? :(
 
Ssssh, don't spoil it.
 
I'll never invent anything
 
TIL about reactive programming.
 
@AlexM. Everything interesting has a name in functional programming :P
 
@AlexM. Sorry, world ran out of potential inventions in 1984
 
11:47 PM
damnit
 
Yeah, we can nuke it and start over.
See if we can avoid inventing PHP this time.
 
All the shittiest ideas have to go somewhere
tbf that's Ruby now
 
Interstates.
 
I still need to solve my dilemma with composing constraints, so I'll keep on writing code and see where I end up
 
11:50 PM
I'm even writing C++ for this!
can't stop now, no sir
for (auto& c : constraints)
look at that
I'm 1337 C++ programmer
 
user1804599
C++ did not exist in 1337.
 
is that what they teach in schools nowadays? O_o
 
C++ is traveling through time in the wrong direction.
 
I wrote a backtracking constraint solver once
 
11:51 PM
It's almost like implementing Prolog
 
C++ totally existed in 1337
 
I should learn how to make decent coffee
 
user3010322
Coffee is the devil.
 
user1804599
CoffeeScript.
 
user3010322
@Rapptz Accept my pull request.~~~
 
11:56 PM
C(offee)++
 
> makedecentcoffee.com
Of course it exists
 
user1804599
> Use the filters to help you find decent coffee!
 
does it teach you how to make decent coffee?
so far it only tells me to buy stuff
 
user1804599
Oh God dat pun.
 
> This question appears to be off-topic because you misspelled, "help".
-2
Q: Hrlp me with this code in C++

user3622226Error 1 error LNK2019: unresolved external symbol "public: bool __thiscall Fisiere::getFilesData(wchar_t const *,class std::vector,class std::allocator >,class std::allocator,class std::allocator > > > &)" (?getFilesData@Fisiere@@QAE_NPB_WAAV?$vector@V?$basic_string@_WU?$char_...

sigh...
 

« first day (1301 days earlier)      last day (3662 days later) »