« first day (587 days earlier)      last day (4587 days later) » 

20:04
@CatPlusPlus Is that measured in days with presence, or actually 8760 hours?
Well, I sleep 10-12 hours a day on average.
And sometimes I have classes.
@CatPlusPlus That doesn't really answer the question. It could be that you spent 8760 hours in chat since about 2009 now :)
Ell
Ell
i sleep 6,7 or 8 hours each night
oh sorry I thought we were just sharing how much we slept. nevermind
we were
(if we includes you)
Where do you find the time to sleep 10-12 hours?
20:10
In bed.
Why, do you keep your time somewhere else?
Ell
Ell
im off guys, speak to you later :)
Indeed, I keep it as far away from bed as possible.
I've been here since 2011-02-27.
@ScottW I'm not; I just ate a saucijzenbroodje.
ham-kaasbroodjes > kaas-uibroodjes
Onions taste like onions, which I dislike.
Onions FTW.
20:18
FTW isn't on the list
Today was the best day of my life. I wrote a lexer and a parser, complete with diagnostics.
@RadekdaknokSlupik lekkur vet
it's not generic chat enough
enough
@DanDan Not generic enough? Lounge is clearly a template.
@RadekdaknokSlupik of what? Of single identifiers, whitespace-delimited?
20:19
@sehe source code, including identifiers separated by whitespace, yes, but also keywords and punctuation.
@DanDan You're not newbie-hints-savvy enough. Edit messages using up-arrow.
@RadekdaknokSlupik Come on, just spill the beans. What are you parsing?
@sehe Source code.
haha great. I need a real life up arrow.
@RadekdaknokSlupik Uhuh. Ah well, I'll let you foster your li'll secret.
20:21
> 3:10: error: Expected '->' after function name.
OOOH YEAAH
@ScottW I once wrote a Pascal parser. Just recursive descent, no lexing though.
I wrote a parser two days ago for data file format.
@RadekdaknokSlupik i'm curious. I'd love the finger exercise to see whethr I can come up with the equivalent in Boost Spirit. And then compare relative performances.
sbi
sbi
@CatPlusPlus You were late for the party.
20:23
@sehe The performance of my implementation sucks, I guess. But I haven't tested it. The lexer and parser are here, in libdaklang. It's incomplete but works so far.
Boost spirit scares me
ah I was here since 2011-03-13
Just assumed you were part of the furniture.
I've never seen such operator overloading abuse
@DanDan Wooooh!
I was here since the past.
20:24
@sehe eeep!
Lol
323
A: Strangest language feature

josefxThe weird things C++ templates can be used for, best demonstrated by "Multi-Dimensional Analog Literals" which uses templates to compute the area of "drawn" shapes. The following code is valid C++ for a 3x3 rectangle #include"analogliterals.hpp" using namespace analog_literals::symbols; ...

@sbi What party. :(
sbi
sbi
@sehe You young whippersnappers! I was here when the events took place that are described at the bottom of the newbie hints.
@sehe I remember you got your avatar from a previous conversation here which was also about lexers.
:P
sbi
sbi
20:34
@RadekdaknokSlupik I am not going to provide an avatar now for you.
@sbi why would you?
sbi
sbi
@ScottW Yeah, we all know that. It's legendary, at least since both Jeff and Joel twittered about it and it appeared (IIRC) in a SO blog posting.
@ScottW You can parse little bits of xhtml with regex
sbi
sbi
@RadekdaknokSlupik Yeah, why would I?
hi all
20:36
Why so harsh?
lol. just like that.
That, @sbi, is something that I don't know.
My company uses SVN, but I realized nothing prevents me from using a local Hg repo to manage my files between commits.
Redundancy.
Put a Hg repo in an SVN repo.
20:38
Not SVN thing.
Too lazy to click.
@EtiennedeMartel You can even clone SVN repo to Hg repo directly, and push your changes without converting back and forth.
sbi
sbi
@RadekdaknokSlupik Well, that makes two of us, right?
can anyone tell me if suffix trees(trie) are the best way to look for substrings in a long string?
@sbi Probably.
sbi
sbi
@theharshest I am sure someone can tell you that.
@theharshest define "best".
Select with tab, then hit space.
Not return. Stupid autocompletion.
20:44
@RadekdaknokSlupik "best" means it should take the least possible time to search that substring
There. Hg installed.
or say I want to look for every substring possible
Every possible substring in a long string? o.O
sometimes the principle of least surprise is tricky. For a utf8 string, should .size() return the number of chars or the number of codepoitns? What about .length()?
20:46
That'd be O(2^n) or something.
@CatPlusPlus NP-Complete
equivalent to subset sum, no?
@RadekdaknokSlupik yes
I think I'll make one of each with different names to avoid errors.
Wouldn't that be O(n!)?
@DeadMG Dunno. Not big on theory.
20:46
@RadekdaknokSlupik No.
it'll be less than subset sum, I think, because the substrings must be contiguous
That was a guess, since 2^n is a size of a power set.
@RadekdaknokSlupik no, it would be O(n)
coz we would preprocess the string to form a suffix tree
Oh you want the fastest possible way to do that?
Pregenerate all of them for all possible strings and use a lookup table. O(1).
20:49
@RadekdaknokSlupik I want a method which I can use in a programming competition
I'm going to go with a simple n^2
for(int i = 0; i < str.size(); i++) { for(int j = i; j < str.size(); j++) { substrings.push_back(str.substr(i, j); } }
@DeadMG that's the most trivial solution, hence the most inefficient way
@theharshest no, I don't think you can beat that actually
@theharshest The hell are you smoking? More complex algorithms have no guarantee of bettering the time complexity
20:53
"std::vector::[] using data() + index" is the most trivial solution, hence the most inefficient way
@DeadMG (n-1)(n/2) I think, isn't it?
@MooingDuck so you mean the solution given by @DeadMG is the best??
@theharshest I think so, it should beat the pants of a trie
there are n^2 substrings, and the very best you can do to enumerate them all is n^2 time
@DeadMG chill dude
20:54
and since my code has realistically zero overhead over n^2, then it's realistically unbeatable
oh, ignoring the potentially O(n) copy, but that's not actually part of the algorithm
@DeadMG yeah, that part could be optimized maybe, depending on what he wants to do with it
which is why I didn't include it inthe algorithm's running time
What is #pragma warning usually useful for ?
thanks all :)
@ScarletAmaranth disabling warnings
20:57
Interesting.
sbi
sbi
@MooingDuck Oops. That's right.
Been just looking into some pragmas since i usually use just "#pragma once" which is fairly common and supported I think.
sbi
sbi
(I was thinking about #pragma message().)
@sbi or #pragma error issues an error, it's confusing that warning is different.
sbi
sbi
@MooingDuck Um, isn't that just #error?
20:59
@sbi heck if I know
@ScarletAmaranth I think that's the only pragma that GCC and MSVC share.
msdn says : #pragma warning( error : 164 )
@ScarletAmaranth I think warning only works with the 4000-4999 warnings (or something) doesn't it?
which supposedly reports 4164 warning as an error
Yeah but they for some reason don't use the first number
"The compiler adds 4000 to any warning number that is between 0 and 999."
I dunno why but I'm as explicit as possible whenever possible.
I don't give a jolly if there's a chance that there's some implicit behavior that just makes things more confusing.
21:05
Meh warning numbers. Because identifiers were too difficult to implement.
whoops, infinitely recursive constructor. Stupid rvalue optimization
@MooingDuck Construct the shit out of that object ;)
myclass(myclass rhs) : data(std::move(rhs.data)) {}
Are you sure you want that?
@RadekdaknokSlupik not if it's infinitely recursive
21:08
Why not myclass(myclass&&) = default?
@RadekdaknokSlupik MSVC
:D
dat argument! :D
lol microsoft
Anyone have hints on compiling llvm/clang on Mint 12?
It appears it wants to use clang, but the packaged version is broken... [sic]
hmm. utf8string::insert(iterator position codepoint_iterator first, codepoint_iterator last) will be a PITA to code. Seems easiest to construct a temporary string to find the length, and then resize, then insert :/
21:16
"I use MSVC. Your argument is invalid."
I can't figure out why VC11 didn't get many C++11 features. I mean, variadics and constexpr are hard, but why no =default? noexcept? initializer lists and uniform initialization? Some of those features are not exactly huge.
C++11 support probably has pretty low priority for the MSVC team.
@EtiennedeMartel they did pretty much the entire standard library, which had to be quite the effort considering the lack of langauge support
@RadekdaknokSlupik your name is too long.
@EtiennedeMartel They are doing well on the concurrency front.
@MooingDuck your name is too short.
21:21
Bam. Hardcore thrash talk up in this bitch.
@EtiennedeMartel Their only priority is cash, which they get anyway, whether they ship a good product or not.
You might have a point.
Look at Windows Vista. Same thing.
eh, I disagree
21:24
Vista came with a large number of very important technical improvements, they just forgot to add all the user interface stuff on top
the only reason people hate Vista is because Microsoft didn't give app vendors or anyone else enough time to produce stuff that was compatible
and forgot to ship user-relevant stuff on top of their new WDDM and all the rest of it
MSVC comes with a cool library, they just forgot to add all the language features. :P
it's not a conspiracy, it's plain just some devs who forgot to move past adding all the cool APIs
If Windows devs weren't so stupid, there wouldn't be so much compatibility issues.
I mean, software vendors.
oh, and that
a large number of programs supposedly incompatible with Vista never were, they just checked the Windows version wrong
Many bugs happen because they rely on undocumented implementation details.
Or just doing stupid things.
21:27
Because, as we all know, sizeof(int) == 4!
It's not about that.
I partially is.
@RadekdaknokSlupik because they assumed all users had full admin rights usually
Type sizes don't change when you run binary on a newer system.
They do when you compile for another architecture.
21:28
@RadekdaknokSlupik Vista was not another architecture.
We're not talking about recompiling.
@DeadMG you had both 32-bits and 64-bits versions, afaik.
Many of the "vista incompatible" programs I tested were also incompatible with XP running as non-admin
sure, but Vista 64 was not very widely used
@CatPlusPlus oh yeah I forgot that. :P
21:28
and WOW64 was more than capable of being 32bit compatible with compiled 32bit programs
an x86 program run on Vista was either compatible or not, irrelevant of whether you were on Vista 64
What's with the practice of incrementing line numbers by 10?
@Maxpm so you can insert new lines between easier
Easily add more in between if you want to change something. BASIC code is unmaintainable as hell.
21:39
after all, when you've got GOTO LINE X, you don't want to have to change every single GOTO in your program when you insert a new line
that's for pussies
BASIC is for pussies.
and it would be totally like, spaghetti code and unmaintainable
Aha.
I find it amusing that they do that in this Java doc.
I find Java amusing.
in a bad way
21:41
Oh, it's awful.
I need a better way to handle my diagnostics. Currently I store them in a vector.
@RadekdaknokSlupik ofstream?
@RadekdaknokSlupik And that's bad why?
@MooingDuck I don't want to output them directly, but let the client decide what to do with them.
@CatPlusPlus Difficult to use.
What's difficult to use?
21:46
Maybe it's not difficult to use after all. :P
But I would like to output them while parsing.
I might create a consumer or something.
Currently, you pass a vector to the parser and the parser fills it with diagnostics.
Yuck, unpure code.
Don't pass an empty vector, return a vector.
lol that's a fucking good idea.
agreed
Only caveat is that the parser is the constructor of a class xD
21:47
I'll make it a free function returning a tuple.
Then collect it in a member vector.
man
so many bastards from the riots in London, it's twelve months later and we're still convicting people about that shit
I have no idea and don't really care
@LearningSlowly the puppy is not known for being helpful, sorry
@LearningSlowly a lot. As far as websites go, that's pretty advanced.
That's Flash.
well, there's no way we could possibly answer without spending much too long viewing it
21:55
@CatPlusPlus which is about as complex as websites get without having a database.
@MooingDuck Most websites use a database.
It's not a website, it's crappy Flash thingy.
With static content, most likely.
@DeadMG ....true
the point is, the question is arbitrary and unanswerable and this is a really poor place to ask anyway
Well, if you take 100 monkeys and a designer monkey, and assume it'll take 6 to 8 weeks, it'll amount to something like 51000 bananas.
21:57
@LearningSlowly do you know what that word means in this context?
Possibly more due to banana inflation. Monkeys just don't want flat bananas.
Alternatively, you could try with penguins and pickles.

« first day (587 days earlier)      last day (4587 days later) »