« first day (737 days earlier)      last day (354 days later) » 

12:08 AM
djesus its still going
 
just finished dinner
 
12:30 AM
still going
either my code sucks or im underestimating the slowness of debug configurations
theres a library out there that supposedly loads this in 9-10 min
 
that's pretty slow
imo
but idk the format
 
https://github.com/syoyo/tinyobjloader <-- this lib
http://graphics.cs.williams.edu/data/meshes.xml <-- the file is here (Rungholt)
It has:
Triangles: 6,704,264
Vertices: 12,308,528
the file has 58.8M lines
and I will crash because its one of those file with negative indices... im not even sure its conformant
ffs
> # Wavefront OBJ file made by Mineways, mineways.com
same exporter as the other one i crashed on
 
Hm.
Wish I had people who could help me with this architecture thing.
I'd offer to help with your obj loader since I am finally decent at writing parsers but iunno anything about the format enough to be of help.
 
Thanks, but I think I'm more or less done with it, turns out negative indices are valid but it should be a fairly easy fix.
Anyhow, the format is fairly simple
o/g indicates a mesh, v is a vertex (vn -> normal, vt -> uv)
f v/t/n
each face has 3+ blocks, t/n/ is optional
 
12:48 AM
I think I've found a decent way to solve my texture issue
at least in theory
The rendering system would have the lifetime of the textures
and then the entities would have a component denoting which texture to use
an ID of sorts
and extra information on how to use it
 
sounds reasonable
 
for now I'm not using textures
just rectangles lol
 
> Error 1 error C1001: An internal error has occurred in the compiler.
 
rip
 
face.idxs.emplace_back(idx.pos - 1, idx.norm - 1, idx.uvw - 1);
struct IdxTriple { std::size_t pos; std::size_t norm; std::size_t uvw; };
 
12:54 AM
emplace_back({ ... })
surprised that compiled
or add a constructor
I'm assuming idxs is std::vector<IdxTriple>.
 
correct
 
emplace_back(Args...) does new T(Args...);
and obviously you can't do T(Args...) when T is IdxTriple.
because it's an aggregate
 
doesn't work in MSVC (not in 2013 anyway)
 
wrapping it in { ... }?
 
just tried
> Error 1 error C2784: 'void std::vector<size_t,std::allocator<char32_t>>::emplace_back(_Valty &&...)' : could not deduce template argument for '_Valty &&' from 'initializer-list'
 
12:56 AM
wot
std::vector<size_t>?
I thought you said it was IdxTriple.
 
wait... did i fuck that up
indices.push_back({ idx.pos - 1, idx.norm - 1, idx.uvw - 1 });
 
does it work?
 
this compiles
indices.emplace_back({ idx.pos - 1, idx.norm - 1, idx.uvw - 1 });
 
I was talking about face.idxs though
 
> Error 1 error C2784: 'void std::vector<replicator::ObjLoader::IdxTriple,std::allocator<_Ty>>::emplace_back(‌​_Valty &&...)' : could not deduce template argument for '_Valty &&' from 'initializer-list'
 
12:59 AM
oh yeah sorry you have to change it to push_back.
my bad
 
is emplace_back supposed to work too? (i.e. its MSVC's fault that it doesnt?)
 
nop
my mistake
list init has no type
push_back takes T so it can resolve it but emplace_back takes Args... which can't
 
if instead i had a ctor that took 3 arguments, would i be able to do .emplace_back(a, b, c); ?
 
yeah but you lose aggregate status and default construction unless you add that
your call
 
ill keep it with the list init/push back
i dont think theres any significant advantage to the emplace back in this case
 
1:10 AM
I don't like SFML's naming convention in C++.
It feels weird.
I want to make an entity iterator but if I stick to SFML conventions I break generic code
so I'm thinking of splitting up my ECS (which doesn't need SFML) and use a different naming convention
what a weird bikeshedding/useless problem I have lol ._.
 
heh
at work, one of the programmer's VS was not setup properly and he committed tabs in a bunch of files
it annoys me to no end
 
I removed every instance of inheritance in my ECS while maintaining type safety.
I'm talking about the trick in the lounge
 
1:37 AM
@Rapptz Whats the sanest way to get a signed type the same size as size_t ?
 
std::streamsize.
found in <ios> which is included if you use <fstream> or <iostream>.
 
static_assert(sizeof(std::streamsize) == sizeof(std::size_t), ""); <-- this fails
MSVC defines std::streamsize as long long, whereas std::size_t is unsigned int
 
lol msvc
it's meant to be signed size_t
 
djesus... they dont do anything right...
 
streamsize is used in most places where ISO C would use size_t. Most of the uses of streamsize could use size_t,
except for the strstreambuf constructors, which require negative values. It should probably be the signed type corresponding
to size_t (which is what Posix.2 calls ssize_t).
from the standard
 
1:45 AM
I found an answer by cheers alf that says the signed counterpart of size_t is ptrdiff_t
 
I think that one's good too
 
2:30 AM
Successfully loaded all the files in my folder (and by successfully I mean it didnt crash)
I still need to split meshes on materials
but since I haven't implemented loading materials, I'll hold off on that
I did do some validation/comparison of the smaller files against assimp
so im fairly certain the results are mostly correct
 
 
14 hours later…
4:30 PM
@ThePhD So, aside from not handling well files where some meshes have uvs/normals and some dont, i think my results are good, but it runs abysmally slow (i havent looked into it yet, so idk if its my fault or msvc's stdlib), i also have to do proper splitting on materials
(i dont do materials at all yet because i haven't decided on how I'll handle them)
 
user3010322
5:25 PM
@Borgleader A great work by an amazing individual. He should get a raise.
 
user3010322
@Borgleader You can split in the obj file by just using material declarations to know when to split.
 
user3010322
@Borgleader The biggest thing is perhaps doing stream buffering, and also making sure you're front-allocating and move-constructing as many things as you can.
 
user3010322
Move-constructing the std::vector<Vertex> stuff should probably give you the biggest boon.
 
user3010322
If you're copying you're going to feel that pretty hard.
 
I'll profile the thing and see what's slow
@ThePhD I have 269MB file I can use to stress test :)
 
user3010322
5:34 PM
269 MB?
 
user3010322
Oh geez.
 
17 hours ago, by Borgleader
https://github.com/syoyo/tinyobjloader <-- this lib
http://graphics.cs.williams.edu/data/meshes.xml <-- the file is here (Rungholt)
 
user3010322
@Borgleader Damn.
 
11:15 PM
So I added this
for(auto&& entity : cyne::entities_with<lol, other>(entities)) {
    auto x = entity.get<lol>();
    auto y = entity.get<other>();
    std::cout << x->y << ", " << y->x << '\n';
}
but then I realised I didn't want to do the check twice (once with the filtering iterator, another to retrieve) so I added this variant
for(auto&& components : cyne::components_from<lol, other>(entities)) {
    std::cout << std::get<0>(components)->y << ", " << std::get<1>(components)->x << '\n';
}
 

« first day (737 days earlier)      last day (354 days later) »