« first day (519 days earlier)      last day (4428 days later) » 

11:00 AM
damn, why do one line answers get upvoted so much? :(
 
Dammit, Unity goes crazy when I try to use GVim.
 
Unity sucks balls
Why does nobody use Kubuntu?
It's Ubuntu with a decent interface.
 
It's been a while since I've used KDE.
GNOME Shell isn't all that better than Unity.
 
GNOME 3 you mean?
 
Unity is GNOME 3, too. Shell is GNOME3's default WM.
It looks and works pretty much the same.
 
11:11 AM
@CatPlusPlus I use gvim -f& but there are still issues at the bottom of the window sometimes.
 
I get phantom or duplicate icons in the launcher
And it disappears from Alt+Tab.
 
Wut? Can you give some steps to reproduce?
 
Okay, freshly logged in.
gvim --remote-tab-silent foo, appears in the launcher and in Alt+Tab, all's fine.
Opening second file notifies of activity.
Oh, hey, now it works. Last time I tried to keep it in launcher, maybe that screws it up.
I can live without an icon.
 
Does :tabe bar work as 'opening second file'?
 
No, gvim --remote-tab-silent bar
 
11:16 AM
Kate ftw!
or kvim, for you die-hards
 
Okay, it works. So, note to self: don't try to add the damn icon.
 
Ye, no issues either here. Won't try keeping in launcher.
 
Also, clang compiled in 15 minutes.
Yay.
 
@CatPlusPlus You don't have the menu bar btw. Don't know how to fix that for --remote & friends.
 
What menu bar?
 
11:20 AM
Hopefully you won't miss it.
 
is the modulo operator supposed to work on pointer arithmetic?
 
If you mean that crappy-OSX-style global menu, then it works.
@bamboon No.
Pointers are not numbers.
 
Was never fixed on my distro :( What gives?
 
@CatPlusPlus yeah thanks, after writing it and thinking about it, it indeed makes sense
 
You use menu in vim? I never did.
 
11:23 AM
It's a catch-22. I don't know what it's for so I don't really know if I'll miss it.
I still end up not using it.
 
11:36 AM
what package is "find" a part of on Linux?
coreutils?
 
findutils?
 
lol
 
?
 
I'll check my Arch VM
wow, it is findutils
that just sounded stupid
sorry @Pubby
 
:)
 
12:01 PM
@rubenvb I use Xubuntu :) I also have Lubuntu on my hard drive just for fun.
 
@rubenvb People do, I use it :)
 
at least not everyone is crazy then. Kudos to you :P
But that does not take away you should really alll be using Arch.
 
@rubenvb meh, there's a lot of effort in switching
and I have no major gripes at the moment
 
@Mysticial Specifically number crunching is where there should be less of a difference. What features of C++ (or maybe C) might speed number crunching that are not available in C#?
 
@DavidRodríguezdribeas @Mysticial docs.go-mono.com/index.aspx?link=N:Mono.Simd Mono.SIMD
 
12:14 PM
Note that it is a language that has both reference and value semantics, and that for value types (including all primitive types and user defined structs) the generic containers behave kind of like C++ containers. That is, unlike Java, there is no boxing/unboxing on vector-equivalent containers
 
Aren't all compiled languages pretty much the same with number crunching?
 
Ell
hi guys
 
@Ell Hello
 
@Pubby They might make it harder to do it right. Consider Java, if you decide to use a generic container as your data structure, numbers will be boxed into objects, and iterating over the Vector means iterating over a vector of pointers to Double, so there is actually two jumps to get to the value, and locality of references is lost which in turn hits performance really hard --the cache loader cannot pre cache the next operands effectively
 
@DavidRodríguezdribeas I didn't know Java had boxed vectors, but yeah, very good point. I was more thinking about single computations though, like arithmetic and such.
 
Ell
12:34 PM
@DavidRodríguezdribeas don't c#s generics avoid boxing?
 
Don't forget JIT optimisations.
 
@Ell Yes, C# generics don't box.
@CatPlusPlus There are certain things that cannot be done by the JIT optimizer, like changing the data structures
 
Ell
what is the reason for boxing?
 
And there is also what Pubby mentioned above, I don't think that (assuming that you implement your own c++ style vector on top of plain arrays) the hit would switch to SIMD instructions on the fly.
@Ell In general, when you need to pass an Object around and you have a primitive type, languages create object wrappers.
As of containers, Java generics are a poor man's implementation of generics, it introduces type safety at compile time, but don't change the fact that the actual underlying container manages Object (it just checks at compile time that the values inserted are of the right type, and injects casts when reading the elements back)
java.util.Vector<String> is actually a java.util.Vector with extra checks and casts on the interface, but there is a single binary implementation of Vector for all types
("hit" a few lines above is a typo, it should be JIT --damn autocorrect!)
 
Ell
12:51 PM
howcome they implemented it like that? backwards compatability?
 
mac: autocorrect on desktops is an awesome idea! the world: wtf?
 
Having everything derive from Object seems like a very bad idea in statically typed language.
 
0
Q: Why are the inherited functions hidden in base class in this code?

LazerIn this code sample from http://www.gotw.ca/gotw/005.htm, I was shocked to learn that in class Derived, f(int) and f(double) are not visible! class Base { public: virtual void f( int ) { cout << "Base::f(int)" << endl; } virtual void f( double ) { cout &l...

vote to close please
 
@rubenvb: I thought Macs came with full keyboards?
 
Do Mac keyboards only have one key, just lice the mice? :)
 
12:55 PM
Isn't the whole point of autocorrect to deal with the fact that touchscreen keyboards are crap compared to actual proper keyboards when it comes to input?
 
Ell
@Pubby why is that a bad idea?
 
@Ell That's a design decision on which I was not involved :) Backwards compatibility at the VM level is probably one of the causes, changing the object model is probably another. The design decision is that with or without generics you cannot have Vectors of primitive types.
@rubenvb I hate it. I prefer my mistakes than it's mistakes. Try to write the << operator here:
std::stream& operator<<( std::stream& o, T const & )
 
@Ell Well I don't know squat about Java, but it seems like void* - it's a type that actually weakens the type system.
 
I type ostream more often than stream!!!
 
12:58 PM
@DavidRodríguezdribeas I think you can have vectors of primitive types in Scala. Its collections are "specially compiled" for all 8 primitives.
@Pubby void* means "dear compiler, I don't need your help. F*** off!"
 
@Pubby: In Java before generics Object was the only way to have collection classes like linked lists and dynamics arrays without having to duplicating code for each type.
And it was terrible way to work with collections
 
That sounds exactly like void*
 
Because everytime you need to dereference something in Java collections prior to generics you had to cast the Object back to whatever type was in it
And this involved a runtime check everytime you did that
So it was slow as shit
@Pubby: It's worse than void* because of that runtime check that happens when you downcast it.
 
Yeah, and void* is entirely optional which makes it actually a useful feature. Don't think you get a choice with Object.
 
Generics help with it somewhat but because it needs to be backwards compatible it's bolted-on rather than properly designed into the language.
 
1:03 PM
@Pubby well... Object still contains enough information to detect whether the later cast is correct or not
gotta go
 
@Pubby It's not exactly the same; you can't call equals and hashCode on a void*. And those are fundamental in Java Collections code.
 
@FredOverflow Macbook Wheel: youtube.com/watch?v=9BnLbv6QYcA
"I'll buy almost anything if it's shiny and made by Apple"
 
@CollinHockey: I was just about to quote the exact same thing
How does the Mactini know the difference between "c" and "ab", since both sequences involve 3 taps?
 
"The magic of software"
 
@Insilico timing
 
1:08 PM
@FredOverflow: But there's apparently no delay between the last tap and the displayed letter so there isn't a pause like morse code
 
They probably cut the pauses from the video ;)
 
Would be much faster if the Mactini accepted input as Unicode code points in binary form
But then again that's too "nerdy" for a Mac product. :-P
 
O_o
 
1:27 PM
And more importantly, how the hell it worked, since now it crashes pretty much on start.
 
It'd make (some) sense if that deleter also happened to take care of the resource...
 
I'm so sick of shared_ptr.
2
 
aka this is using those constructors of shared_ptr that allow to construct a 'view' into shared pointee or something with associated lifetime. Want an example?
 
Yeah.
 
I do agree that it's crummy that the associated resource in this case comes from the deleter...
 
1:35 PM
Ah, I see. But that GC code is silly, since it doesn't really hide anything.
And why the hell would a texture need refcount, anyway. It needs to live as long as the renderer does.
 
Doesn't make sense until we know what's the deleter for tbh.
 
It's bit earlier there, it deletes the texture.
 
I guess someone thought they'd want tight control over texture usage?
 
The problem is, it doesn't work and nobody is around to fix it.
This game needs a rewrite so badly.
(Some TUs here need more than 1GB RAM to compile with g++.)
Pathfinding is funny, too. It creates and tears down about 20 threads per second.
 
I do not like OGL wrapper code.
@CatPlusPlus I've been working on a similar game although haven't gotten very far, any interest?
 
1:40 PM
@CatPlusPlus I did laugh, but I wouldn't call that 'funny'.
 
No, you're right, after a year it's just sad.
@Pubby Another Big Thing, eh?
 
Is this stuff hard to implement on Windows? libcxxabi.llvm.org/spec.html
 
@CatPlusPlus Hehe, I think so.
 
I have a kind of example low-level code stuff from here: code.google.com/p/ontl
 
@Pubby Public repo?
Oh nice, it hit assertion in boost::mutex.
 
1:43 PM
@CatPlusPlus If that's directed at me, then not yet. I haven't even gotten anything useful to compile yet x_x
 
I keep trying to get back on working on this, but I always hit a wall.
 
Ell
does anyone know the name of that javascript-based local wiki?
 
@Ell of what javascript-based local wiki?
 
Google > javascript-based local wiki.
 
Ell
@daknokt there is a wiki engine that is just a single page (I think) where you can add pages etc. etc., just for personal use?
 
If it's just for personal use then why not use a text file?
 
TiddlyWiki or LivelyWiki?
 
Ell
TiddlyWIki, thats it
@Pubby wiki is more organised?
 
Which is the first result in Google for "javascript-based local wiki".
 
Ell
@CatPlusPlus oops :L
sorry >.<
 
1:47 PM
This game has 32kLOC.
 
I think DF has around 150-200k.
 
202 C++ files, 27K.
Largest source file has 111kB.
 
wat
 
Anyone familiar with X window and GLX? How is the framebuffer related?
 
1:53 PM
Oh hey, a piccolo with an image of itself on it.
 
NPC::Think has 850 lines.
 
2:14 PM
i just discovered something weird, when i put static int inside a function, it is slower than when it is outside of the function, any idea why?
 
Define "slower".
And you're doing it wrong, because you don't profile or measure something completely irrelevant.
Also, it doesn't matter.
 
Doesn't static in functions have to have some sort of initialization lock?
 
slower = 908 vs 764
that is 9.08 seconds i think...
so 2 extra seconds doesnt matter?
 
Learn statistics, profiling and then do silly benchmarks.
 
@Rookie Post your profiling code?
 
2:19 PM
i ran it 200*6 million times
 
Ran what.
 
and then i ran it again 4 times... same results
the code, xor128 random function testing
 
And it still doesn't matter.
 
Yeah, it doesn't matter. I'm still curious as to why he's getting those results though.
 
copied it from wikipedia but then i decided to make the seed into a struct, i noticed it ran slower as a struct, so i tested how to make it faster... i tried all combinations and noticed static mystery on the run
also i noticed that without static keyword it runs also slightly slower, not much... which i understand even less
i mean i removed static keyword when the variables were outside of function
 
2:22 PM
We still need to see the code before this means anything, do you have a link?
 
Xorshift random number generators form a class of pseudorandom number generators that was discovered by George Marsaglia. They generate the next number in their sequence by repeatedly taking the exclusive or of a number with a bit shifted version of itself. This makes them extremely fast on modern computer architectures. They are a subclass of Linear feedback shift registers, but their simple implementation typically makes them faster and use less space. Example Implementation A C version of one xorshift algorithm is: uint32_t xor128(void) { static uint32_t x = 123456789; static ui...
theres the code
 
We want YOUR CODE that you ran the profiler on.
 
Haha, "profiler".
 
@CatPlusPlus ?
 
Good one.
 
2:23 PM
I don't understand :(
 
Also, turn optimisations on.
 
i have O2
 
Who'd want to try to implement some DF clone in Haskell?
Well, GC clone.
I'm curious how much code would be saved on that.
 
To all the real Slim Shadys out there (i.e. all those wo know PEG):
0
Q: Left factorisation in Parsing Expression Grammar

Konrad RudolphI’m trying to write a grammar for a language which allows the following expressions: Function calls of the form f args (note: no parentheses!) Addition (and more complex expressions but that’s not the point here) of the form a + b For example: f 42 => f(42) 42 + b => (42 + b)...

 
Function application binding less than addition?
 
2:27 PM
yes
bad idea?
 
Feels weird.
 
@CatPlusPlus Eh, my vaporware is using Scheme which seems like a perfect fit for it, much more appropriate that Haskell. I'm almost certain that DF follows Greenspun's tenth rule.
 
Scheme is a perfect fit for eyebleeding.
 
What do you mean?
 
((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((()))))))))))))))))‌​))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
Oh, sorry, it's Scheme.
([([([([([([([([([([([([([([([([([([([([([([([([([([([([([([([([([([([([([([([([‌​])])])])])])])])])])])])])])])])])])])])])])])])])])])])])])])])])])])])])])])])]‌​)])])])])])
 
2:29 PM
@CatPlusPlus Well you essentially get the raws for free. They're just sexps.
 
Pretty much the same in Haskell.
Except with no parentheses.
 
What do you mean? Don't you have to write parsing code?
 
incidentally, I just remembered that PEGs are always unambiguous so the grammar in the question is unambiguous. It’s just wrong …
 
GHC can derive Show and Read classes.
data Foo = Foo { a :: Int, b :: Int } derive (Show, Read) can be serialised and unserialised into simple text format.
At the beginning you'll have hard-coded data, anyway. Later you can write a better parser for a better format.
 
Well yeah, but does that work dynamically?
 
2:33 PM
Yes.
That's like, the point of serialisation.
 
I'm interested in how it would work not dynamically.
 
Also Template Haskell can be used to derive much more powerful stuff.
 
template haskell is much more limited than c++ templates
 
Hardcode the expected file in, read file at runtime, compare to hardcoded one, reject if they're not the same? Lol.
 
2:34 PM
for example it has no partial specialization
 
Eventually you'll need to create a format and parser that's backwards-compatible, anyway.
What.
Template Haskell is not generics, it's metaprogramming.
 
@CatPlusPlus Don't feed trolls etc.
 
c++ templates aren't generics either
we all know that
@LucDanton yes that'S a good rule to remember
 
Right.
 
I encourage complete and contextually helpful sentences though.
 
2:36 PM
Right.
 
@LucDanton Apples and Beer etc.
 
@CatPlusPlus What about the massive amount of game state? Wouldn't it be kind of a pain with Haskell?
 
No idea. I want to find out.
 
I'm very interested in how it could be done, so if you find out then tell me.
 
Hmm, I’m beginning to suspect that my PEG is actually parsing the correct thing, albeit inefficiently
 
Ell
2:44 PM
@JohannesSchaublitb why arent c++ templates generics?
 
Although I'd prefer state[x][y] over some elegant yet overly complicated Haskell gobbledygook anyday.
@KonradRudolph I don't know anything about PEG or what you're doing, but I parsed an almost identical grammar using parsec and found it extremely simple to do so.
 
@Pubby Parsec actually uses PEG or something pretty similar as far as I know
 
@KonradRudolph Dunno.
 
3:04 PM
@Ell because they are called templates not generics
i dont know of "generics"
the same way that c++ classes are not puppies
 
Ell
@JohannesSchaublitb I thought templates were an implementation of generics? generics being the concept, templates being a way of doing it?
 
how come in these discussions ambiguous terms are always introduced out of necessity. "concepts" for example...
 
Concept is a concept. Nothing ambiguous about that.
 
@CatPlusPlus there's c++ concepts too....
 
Not really.
 
3:07 PM
oh, you know what I mean...
 
Ell
how about we start prefixing the specific terms with # and so if it has no # we mean the general, every day life term :L
I thought #templates were an implementation of #generics? #Generics being the concept, #templates being a way of doing it?
 
the worst is when people talk about c++ methods. and i have no clue about what methods they talk about
 
How about no.
 
morning
 
sometimes it seems some people mean "method of writing a function"
or "method of fixing a bug"
but i really have no idea
 
Ell
3:09 PM
@JohannesSchaublitb I always interpret "method" to mean "member function" or just "function"
 
so "method of pythagoras" means "function of pythagoras" ?
i see now!
 
@Ell It's nowhere in the standard, so @Johannes doesn't know about it ;-)
 
Ell
oh :L
 
it's meant with the best of intentions :)
 
3:13 PM
lol
 
Ell
4:08 PM
does anyone happen to now what unconditional/conditional reflexes are?
 
unconditional reflexes are unconscious reactions that, I believe, every person has and executes without question by default
e.g., attempting to run away from perceived danger
conditional reflexes are "conditioned" in by training to be able to perform other acts unconsciously
 
Ell
ah kk, thanks
 
OH fuckcakes
I forgot to call my mother
 
Ell
:s
its okay, I called her last night ;)
apologies if that is offensive :S
 
why would it be?
 
Ell
4:22 PM
If she had passed away or was ill or something? I'm overly cautious with people I don't know :L
 
heh
evidently :P
if it was serious, I wouldn't randomly spew it out into the chat :P
 
Ell
good point actually :)
unless you were looking for sympathy?
 
from this lot? no way
 
ohai
what's up?
 
ohai Tony
 
4:26 PM
what's going on?
I'm bored
 
Ell
@DeadMG you could have no one else :L
 
do you think it's cool that you click the links and you get the part of the grammar?
 
@DeadMG nice wall of prose.
 
yeah, I know that much
just wanted your opinion on the link clicking thing
 
4:37 PM
Never heard of Wiki? Ikiwiki, docuwiki, moinmoin, etc. all do this but better. At least docuwiki does export to static html files so you can have your cake and host it on S3 too
 
no, I've never heard of any variant of Wiki that is not a PHP plugin
 
@DeadMG by the way your links are borked
 
Ell
@DeadMG tiddlywiki :L
 
@DeadMG hear a little more then. jeez
 
@sehe But I just clicked them and they work fine.
 
4:38 PM
404 Not Found
Code: NoSuchKey
Message: The specified key does not exist.
Key: Specification/Language/Statements/..\Grammar.html
RequestId: B852DE2095AF5E67
HostId: 6oFoK57DxuypMTkVLsZG2p//a6w+btOZUBR2DK+clmdGmBrim8NiMCMYNEVWF/OA
Obviously, your windowsy paths are completely out of line in a HTTP setting
 
rofl
 
Ell
@sehe grammar works for me?
 
Chrome copes with them just fine
 
@Ell windows...
 
Ell
oh. No need to make me feel special though >.< :P
 
4:40 PM
@DeadMG True. Also on linux. But that is really more of a bug. It shouldn't actually work, IMO (it is a nice guess that they do on your behalf)
 
I thought that ".." was common to all operating systems and filepaths in general and Unix understood it too?
 
@DeadMG It's not the .., silly. It's the slashes.
 
ah
 
@DeadMG Good morning. Time for coffee, perchance?
 
what?
 
4:42 PM
Hi
 
@DeadMG I though you were a little slow to catch on there
 
need a bit help with binary tree
 
@sehe No, just paying attention to more than one thing at once :P
 
@DeadMG Ah, I see. I get all of that except the "No" part. There is no contradiction: you just cite a reason to be slow :)
 
given an array c[0...n] sorted in descending order and value V, find k such that c[k-1] > V > c[k]...
need help
 
4:44 PM
@vastutsav Really, logging it? Burning it?
@vastutsav Where's the tree? You mention an array, not a tree
 
oops
 
also
 
binary search
just palin binary search
 
@vastutsav std::upper_bound
 
how come the page has the old title in the source?
I wiped and re-uploaded the whole thing, and the title doesn't match the new version
 
4:45 PM
@DeadMG I - honestly - wouldn't know. I plead browser cache
 
heh
could be
 
@sehe did not get you
 
 
ohhh
thnks
 
4:47 PM
what if the array is in descending order?
 
Then you use the overload with the comparator as the fourth argument.
 
@vastutsav just use it with std::greater<T> as the ordering predicate
 
ok
 
@vastutsav to be honest, a simple loop would be ok too. I don't really see what problem you have, so perhaps post what you got and the point where you are stuck on
 
actually am tryin to find the longest decreasing subsequence using the nlogn algorithm
a part of it requires binary search
 
4:50 PM
ok
 
nd m getting that part wrong
 
@vastutsav just use std::search?
 
try again :P
 
@DeadMG congratulations: you created - working - hyperlinks
 
4:52 PM
hey
regular hyperlinks can, at most, only link to a specific line
 
> There are no limitations on the types or values involved, only that they are comparable with the switch expression.
So UDTs are possible?
 
@FredOverflow Yes- any type, they don't even have to be the same between cases.
 
Are you doing linear probing?
Because switch on dense ints is usually implemented via LUTs.
 
"Note also that actual execution of the equivalence operator is not considered an observable side-effect."
 
@DeadMG I don't see how that is better than if/else
 
4:54 PM
i.e., under the as-if rule, the implementation can skip it if it has a better algorithm
 
@DeadMG these are regular bookmark links (to anchors or something). Teach me how to link to a 'line'? I don't think that is possible, unless the target element has an id
 
well, if you link to an anchor, the browser will only jump to the line it is on
if you anchor just one word in a line, the browser won't disambiguate it from all the other content in the line
at least, for "browser" == "Chrome"
 
@DeadMG ow what limitations. Why would you want more control? And what should it do instead?
 

« first day (519 days earlier)      last day (4428 days later) »