« first day (855 days earlier)      last day (4307 days later) » 

11:00 AM
Wait, v[0] isn't valid on empty vectors, right?
v.data() + ... it is, then.
right
Why can't you just leave off the &* part?
@R.MartinhoFernandes Don't think that is either.
@FredOverflow What do I return then?
The iterator, as the return type suggests?
11:00 AM
@FredOverflow Which one?
you can get an iterator past the end, but I don't think there's any Standard wording for one pointer past the end.
&* will give you a pointer, but you want to return an iterator, don't you?
std::array<...>::iterator or std::vector<...>::iterator?
@FredOverflow His iterator is obviously a pointer.
@FredOverflow A pointer is the common ground between array and vector iterators.
11:01 AM
Oh, you're doing small string shit?
but I don't think that the Standard permits one-past-the-end pointers for std::vector
Doesn't that slow down moves?
@FredOverflow Only if you make the array part too large.
How can rand of itself be a terrible pseudo random number generator? Surely that depends on the implementation? — TonyK 5 mins ago
I don't know how to respond to that. Anyone?
11:03 AM
@DeadMG Well, it does permit them (you can treat any object as a one-element array, so you can always get a one-past-anything pointer).
But it appears there's no way to get one for empty vectors :(
Lemme check data()
@R.MartinhoFernandes But the empty vector is not obliged to hold any object.
@FredOverflow Well, rand is not guaranteed thread-safe for one.
I think.
but go check the papers for the motivation of introducing <random>, they will list rand's flaws.
> A pointer such that [data(),data() + size()) is a valid range.
user1357851
rand isn't random at all
Seems like it works fine for me, then.
user1357851
because the algorithm behind its implementation
user1357851
11:06 AM
I usuall do something else when use rand
guess that it does
iterator erase(iterator it) {
    if(is_small) return get_pointer(as_small(), as_small().erase(get_iterator(as_small(), it)));
    else return get_pointer(as_small(), as_large().erase(get_iterator(as_large(), it)));
}
Fixed.
GCC says not.
@Telkitty wat?
Of course not... Sigh, copy-paste.
TIL changing something in ogonek::detail::partial_array means a full rebuild.
user1357851
@FredOverflow adding some number based on current date & time to the number rand generated, carry out some module function etc. Probably still not very random but I feel better :p
11:13 AM
Possibly less random.
[rmf@persephone ogonek]$ time bin/test/runtest -t normalization/official

[Testing completed. All tests passed (36754 assertions in 1 test case)]


real    0m31.923s
user    0m31.826s
sys     0m0.008s
[rmf@persephone ogonek]$
hmmmm
how big should I let my non-automatically-generated source files be?
Also, that's a fuckton of tests.
@DeadMG What do you mean?
well, I have a bunch of stuff where I kinda just chucked everything in this .cpp file
user1357851
11:16 AM
My style is one .cpp only handles one logically organized object
user1357851
I have started with one giant cpp file from my newb days
user1357851
evolved into using many cpp for the same tasks
My biggest file in ogonek has 875 lines. It's the UCD data structure definitions.
The second largest is 271.
huh
why does pow(int, unsigned int) produce a double?
user1357851
because results can be very long?
11:19 AM
pow always produces a double or a long double.
There is no point in dropping precision, I guess.
Could just write your own integer pow
user1357851
like 1000 to the power 1000
IOW, it is never an integer pow.
yeah, more likely I'd lose precision by converting to double and back
oh well, it's probably irrelevant
I find that weird though.
pow(int, unsigned int) shouldn't return a double by nature =/
it doesn't make sense
it makes sense in the case of pow(int, int) because a^-b will result in a fraction but not if it's unsigned.
11:22 AM
In wheels, tuple.h++ is the largest, at 561.
I honestly don't care much but that's where I start calling it "big".
hmmm
it probably just feels wronger because it's a pile of junk rather than ALL THE THINGS.
largest header file I have is 625 lines.
also, I spent weeks refactoring my Wide prototype and implemented absolutely no new functionality at all.
except better error reporting... for some definition of "better", anyway
do you use carets
no
I don't even record the line number.
but I don't crash :P
I think.
11:27 AM
without reporting the lines, it's kind of the same as not having errors at all to me. Especially in big files aha
user1357851
.h can get pretty big when you have a lot of inline functions or template functions
Yeah, dude. Line/column numbers are essential.
Man, debug iterators are killing me. Running these tests takes forever.
the lexer does record the line numbers
but the AST doesn't store them.
also, I don't really have intelligent errors to give for many kinds of error.
like I still have a few errors that are like, throw std::runtime_error("Whatever you've done, I don't support it.");
the important thing is that it doesn't crash.
and the second important thing is that I might actually stand a chance in hell of implementing some more semantics
So, I have a total of 45610 assertions in tests. Does that sound impressive?
depends on what they are
if you have 45,000 assert(1 + 1 == 2)
but it's sure a hell of a lot of assertions
user1357851
@R.MartinhoFernandes are you running automated tests?
@R.MartinhoFernandes it does sound impressive_. Allthough if this is just to verify the UNICODE tables, you might be better of dumping it in some canonical form and running a md5sum
@sehe No, I have no verification of data. Only behaviour.
aaargh
wtb uniform init :(
11:44 AM
want to buy?
Hmm does anyone know how to get make -j in scons?
yes
or these days it's basically just "want"
Running the tests in debug mode takes 51 seconds. In release...

real 0m0.249s
user 0m0.248s
sys 0m0.000s
Fuck you debug iterators.
lol
user142019
@Cicada Me too: MSYS.
11:48 AM
hmmmm
to implement overloading operator(), or to leave that for later...?
ah whatever, I'll deal with it later
Anyone home?
no
so
let's see if I can deal with variadic arguments without explicit support
at least it didn't crash the compiler
well, it works
now I need to instrument my AST with line/column/scope information.
user1357851
@GamesBrainiac this is an automated recorded message, we would like to inform you, all our friendly staff are on holidays. If you have urgent issue, our less friendly staff will attend you in the next 24 hours. Thank you.
user142019
12:05 PM
Is it possible to provide a custom allocator to std::vector that allocates executable memory?
yes, of course
but the vast majority of all allocators will not allocate executable memory.
LLVM has an abstraction for this purpose, I believe, for their JIT
user142019
@DeadMG no but I need one. :P
user1357851
you may ask, we might or might not answer
user142019
inb4 bin
Was afk
12:11 PM
@Telkitty I'll take that as a yes! :D
This is my code:
http://pastie.org/6202657
user142019
Wat.
Also, this is the superclass, pastie.org/6202661
user142019
MSVC doesn't support using T = U;? ;_;
On the first paste, I am getting an error on line `9
19* I mean
that's because begin and end only work for arrays and containers
whereas I'm looking at your code and I'm seeing shitty new[] and I'm guessing that info is a raw pointer
12:14 PM
Can't have templates in cpp files.
also that
@DeadMG : Yes, it is a container for values
94
Q: Why can templates only be implemented in the header file?

MainIDQuote from The C++ standard library: a tutorial and handbook: The only portable way of using templates at the moment is to implement them in header files by using inline functions. Why is this?

Ell
Ell
hi guise
@GamesBrainiac Well, don't ever use new[].
12:16 PM
@R.MartinhoFernandes : Sorry, I just have a previous background in java, so everything seems complicated
@DeadMG : What else then?
@GamesBrainiac You need to learn C++ from scratch. Java experience won't help you for shit here.
except going down completely the wrong paths
@GamesBrainiac Use std::vector<T>.
it's actually remotely efficient and correct.
So instead of using an array, I just use a verctor?
So, in this example, what would you do DeadMG?
vector* I mean
well, I wouldn't roll my own container, I'd just use std::vector directly.
and your SortedList is std::set.
@DeadMG : I hate it when I have to be that stupid noob, who really does not get anything, but here I am. I am sorry, but I do not know what you mean by roll my own container...
@GamesBrainiac You are duplicating functionality (in this case, a container) which already exists in the Standard Library.
thus you are rolling your own (creating your own) container.
12:19 PM
I see, thank you for that clarification
except, to be quite honest, you obviously don't have anywhere near enough experience to get it close to right
so seriously, stick to the Standard containers.
Ok, I will
Researching that now.
You guys are friggin awesome. How many years have you been with this language?
12:23 PM
three and a half
but std::vector is the kind of thing you should learn in your first week.
Ell
Ell
template <
class Key,
class Traits=less<Key>,
class Allocator=allocator<Key>
>
class set
Our teacher is the kind of person, who never uses the standard library...and does not really want to teach it to us either
Ell
Ell
why is it called Traits?
@GamesBrainiac ouch
@Ell The name is irrelevant. But it is, generally speaking, a traits parameter.
@GamesBrainiac Then it's best to ignore him as much as you can.
@DeadMG Way ahead of you. He also considers the use of an IDE a sin
12:25 PM
@GamesBrainiac Just listen him enough to pass the exam or whatever, and start learning C++ (not C with(out) classes) right away.
no software engineer worth shit would roll their own containers that are duplicates of the Standard ones, and doubly so to ask students to do it who are nowhere near experienced enough.
@DeadMG : Thanks dead. I thought so too
no problem
@GamesBrainiac Then he is utterly stupid (I mean, *nixes can be considered IDEs, heh).
12:26 PM
if you want to check out the tutorials I wrote, feel free
@Griwes : Yea, I know. Also, as a side note, this chat window is just friggin awesome...
they are not perfect by any stretch, but better than that.
it as user autocomplete! :P
@GamesBrainiac IRC is better, generally
user142019
template<class U, class... Args>
void construct(U* p, Args&&... args) {
    return new (p) U(std::forward<Args>(args)...);
}
12:27 PM
@Griwes I prefer this over IRC.
user142019
How would I do this in the compiler of doom called MSVC? :P
@DeadMG but... but... but colors!
:D
@Zoidberg Just provide 0 and 1 parameters, and then provide more if you happen to need them.
it's bothersome but not crippling.
user142019
@R.MartinhoFernandes is that a new version?
Ell
Ell
12:27 PM
@Zoidberg what is the point in that? :P
user142019
@Ell member function of custom allocator.
@Zoidberg It's a preview of a new version.
user142019
@DeadMG Ah I see.
it has variadic template support (but horrifically buggy).
12:28 PM
I had to stop using it
user142019
Oh. xD
user142019
Well I'll do your approach then.
yeah
@DeadMG : Reading it now
Compared to the quality of other CTPs they put out, this one is terrible.
12:29 PM
I had to put make_unique and memory arena's allocate up to five parameters so far.
They are usually quite solid for alpha stuffs.
but you can do it lazily on-demand so
@R.MartinhoFernandes Probably why they are taking so long to fix it.
Ell
Ell
god I drank way too much last night, I feel like I'm going to throw up everywhere right now
any cures? >.<
Drink more and you will stop caring.
user142019
Meh this is more like C++5.5.
user142019
12:32 PM
Is construct really necessary?
I thought it was optional.
user142019
Don't know but std::allocator has it.
> Effects: calls a.construct(p, std::forward<Args>(args)...) if that call is well-formed; otherwise, invokes ::new (static_cast<void*>(p)) T(std::forward<Args>(args)...).
Seriously, read the docs before mashing the keyboard.
user142019
ohlol
are you sure that hint is a good first parameter to VirtualAlloc?
12:36 PM
The hint version of allocate is also optional.
oic
right
what was I doing?
ah yes, LUNCHTIME.
Ok. Borgleader was doing some collation stuff... what does that leave me then...
Ell
Ell
seriously how do I get rid of nausea? :O
According to this I'm getting close to 1.0.
Ell
Ell
what is collation?
12:39 PM
I can't do bidi right now, though, because they are still making changes to it for 6.3.
@Ell Sort order.
So, what's left: sentence boundaries, line break opportunities, bidi, collation, fuckton of encodings. Ok, it's actually still a lot.
I think I'm about halfway.
Xeo
Xeo
Mornin'
Then a fuckton of bug fixing, tieing up TODO loose ends, and blatant optimisations.
"Hey, what's that?" - "Ogonek" - "wat?" - "it's a Robot's library" - "and what can it do?" - "convert umlauts to uppercase, for example" - "umm, that's... cool, I guess"
^ actual dialogue
I love your professional diagram.
What do you mean "professional"?
It's just boxes and arrows.
..exactly
You could at least use Visio
12:48 PM
What for?
readability?
It isn't really worth it.
Xeo
Xeo
So, I learned that my day flat had 5MB volume before throttling me, and that the week flat I have now had 50MB. So small...
@BartekBanachewicz That thing is not meant to be published. I can read it just fine in its paper medium.
@Xeo lolwut
@Xeo That's what she said.
Xeo
Xeo
12:50 PM
Effectively, I'm now back to 64kbit/s. :|
Oh well, atleast I can chat.
No you can't. We're all leaving in five minutes.
Xeo
Xeo
heh
Polish free Aero2 network is giving you limitless 512kbps
Ell
Ell
fuuuck
I'm dying
@BartekBanachewicz Polish-free ?
Xeo
Xeo
12:52 PM
@BartekBanachewicz That'd be nice.
@Xeo I'm surprised you managed to even open the chat.
Xeo
Xeo
:|
I just have to make sure not to press F5
Gaaaah, the newly moved-in neighbours above me seem to be doing some kind of karaoke. Extremely annoying.
@Xeo Can I post 5MB cat image? :)
Xeo
Xeo
@BartekBanachewicz I'll bin you.

« first day (855 days earlier)      last day (4307 days later) »