« first day (1020 days earlier)      last day (3914 days later) » 

12:02 PM
Hehe - I took my car down the garage and left it, got a lift back, (gone 20 min). Aus 86-2 when I got in. I'm going to take Bailey for another 20 min walk, see if I can cause another wicket b4 lunch:)
 
We could really use a good C++ benchmarking tool. If you are experience with statistical analysis and low-level programming, it might be an interesting and useful tool. Something similar to CriterionBartek Banachewicz 7 mins ago
hehe
 
12:14 PM
If I could close a tab on this work laptop without it causing my music to skip, I would be so happy
 
oh gawd
What age is that laptop from?
 
Xeo
Hmm... in Haskell, is it possible to write something like g |> f where all arguments applied to that will go to g, regardless of g's arity?
 
@TonyTheLion it' a terrible work laptop with like 3.5 gig ram ¬_¬ eclipse eats up nearly all of that... and I use chrome, and sometimes I even have to start up glassfish :O
@Xeo yes...
 
@thecoshman How?
 
@R.MartinhoFernandes vOv
 
12:20 PM
Well, you have picked the single most memory-hungry browser :p
 
Xeo
@thecoshman ...
 
@jalf oh sure, blame the browser
@Xeo (I have no idea about Haskell)
 
@thecoshman no, I'd rather blame Eclipse/Java, but Chrome also uses much more memory than Firefox, at least (at least if you have more than a few tabs open)
 
Xeo
@thecoshman Hi, I only had 2gig at my home PC for the longest time. Still could close tabs without my music stopping. :P
 
Which may be worth the cost if you prefer the browser, of course. I'm just pointing it out :)
 
12:22 PM
@Xeo I only had 2gigs at home too until recently... that was linux though... but I did have to more or less mono-task
 
@Xeo Maybe.
Lemme try something.
I assume |> is some sort of composition thing.
 
@thecoshman any news on Canada?
 
Xeo
@R.MartinhoFernandes I'm thinking of repeatedly partial-applying . (or |> itself) to the second function.
@R.MartinhoFernandes (|>) = flip (.)
 
@TonyTheLion B.C. ghost town could become major natural gas hub
 
@TonyTheLion not really
 
12:26 PM
FF, 15 tabs open, peak working set 742060K. I guess that would be a lot if you only had 2gig, but then again, the OS would have reduced the working set and so strangled the browser.
 
@TonyTheLion it's still around
 
Xeo
@MartinJames 22 tabs, 680m
 
@thecoshman oh damn :(
@jalf I figured as much.
 
@JerryCoffin I agree with this. I'd also extend that ignoring to 'for ever'
 
@Xeo Yeah, my current WS is a bit less than that, so if I opened those 7 extra tabs, prob. about same. Not gonna try it with Chrome.
 
Xeo
12:31 PM
Funny, there is already something like |>, called -| - too bad it takes a "Strategy", as it's part of Control.Parallel.Strategy.
> Sequential inverse function composition, for those who read their programs from left to right.
Obviously, .| also exists
 
@Xeo 36 tabs (in the active tab group. Probably 70 or so open in total across all groups), 510mb working set, 580mb peak
 
Xeo
Multiple videos loaded in the tabs?
 
hard to count meaningfully though, because (1) memory consumption depends heavily on which pages are actually loaded in the tabs, and (2) Firefox loads and renders tabs lazily, so if you haven't visited a tab this session, it probably doesn't cost anything
@Xeo hmmm, yeah, got a couple
 
Xeo
hmhm
 
@Xeo Doesn't work as you want.
 
Xeo
12:38 PM
Main memory hog atm is Adobe Scout for me, in idle, with close to 1gig
@R.MartinhoFernandes Hm?
 
It doesn't pass along all arguments.
 
Xeo
@R.MartinhoFernandes Ah, yeah, I meant in the sense how I currently have it, as simply (|>) = flip (.), sorry.
Dammit, uncurry only uncurries the first two parameters
repeated application of uncurry with recursive tupling on application... hm
Meh, since I need the arity to have that actually work, might aswell hardcode it to an unspecified limit :(
Ah, actually, I don't think I can even hardcode that.
 
so erm... unit testing... let's say you have a library class 'foo' and you are using it in a class you want to unit test called 'bar'. You have a public function in 'bar' that is basically just delegating to 'foo'... should you test that function as unit test, or 'integration test'.
 
what the heck is the difference?
 
if you want to maintain the distinction, I'd probably call it an integration test. I usually just lump everything together as "automated tests" though
which may or may not be a sane thing to do :p
 
12:48 PM
IMO, unit is just looking at basically the public interface a class offers, does this one class do what it needs to do. Integration is where you start to test the 'system', bringing these classes together
 
@jalf automated tests aren't always the best choice :P
 
@thecoshman ah I see
 
@jalf yeah, to me it makes sense to test it as 'unit testing' in my case, junit.
 
@FlorisVelleman When they are a choice, they are the best.
 
@FlorisVelleman when aren't they?
 
12:50 PM
@FlorisVelleman what do you mean 'automated'?
 
@jalf When you got 2 days untill a deadline
 
Xeo
...
 
2 days?
 
Ell
What tests could you write that are manual o.O
 
@FlorisVelleman in those cases I should prefer manual tests?
 
12:51 PM
@FlorisVelleman yes, when you are only days away from a dead line, you are going to be glad you wrote those automated tests to help minimise those last minute mistakes sneaking in.
 
@jalf Yes because they tend to be faster to do
 
@FlorisVelleman ...
wat?
I don't know how fast you work, but my computer is a lot faster than me
 
@Ell tests that say: "Please enter "start" to start testing."
 
you realise you write unit tests the same weather they are manual or automated... the difference is that automated ones are automatically run for you...
 
It can run a thousand test cases in a second or three. If I have to test manually, the rate is quite a bit lower than that
or did you mean writing the tests, as opposed to running them?
 
12:53 PM
@jalf Yes, I was referring to writing those scripts when there is not a lot of time left before a deadline, in which case I would go for manual testing
 
@Xeo Yes, you can. With a limit I can do it. I am struggling to solve it without limit, but I think it's feasible.
 
@FlorisVelleman perhaps you should have picked a better framework and/or used more appropriate level of testing.
 
Xeo
@R.MartinhoFernandes Actually, huh, I guess you could do it with a type-class and many instances?
 
@FlorisVelleman You're supposed to start testing early in the development process. Not two days before the deadline.
 
@FlorisVelleman that's fair. Of course, it's a failure of your development process etc, but yes, if you don't have time to write automated tests, then doing so may not be the best idea :p
 
12:57 PM
@jalf That was all I was getting at :P
 
@Xeo Something like that.
 
@FlorisVelleman that is sort of like saying, "there's no point cleaning your teeth, once they have fallen out" I mean, yes, true, once they have fallen out it is too late, but the way you phrase it makes it sound like you mean, no point ever cleaning your teeth
 
Xeo
GHCi might not be the best place to try and write that
 
Is it a place?
 
@Xeo Aragdhshrt herh eajnh df kgjkdfjg give it up.
It needs type-level meta programming.
 
Xeo
1:03 PM
:/
 
You literally need a IsFunction type class that acts as a C++ type trait.
 
Xeo
Not just an Arity trait?
Oh, wait
I see why
a -> b also matches a -> b -> c
 
Exactly.
You need something like instance (IsFunction b MFalse) => YourClass (a -> b) where
Writing IsFunction is simple, but requires the overlapping instances extension.
 
Xeo
So not even hardcoding Pipeline (a -> b), Pipeline (a -> b -> c) etc will work?
 
Xeo
1:06 PM
A shame
 
Pictures, gentlemen, is the secret for quick reps stackoverflow.com/a/17991205/46642
:/
 
Xeo
@R.MartinhoFernandes ... that example with g = (*2) and f = (+) (just with three args) looks dangerously close to my examples.
 
Ell
Is iterating through a vector more expensive than forwards? Or generally, is there a penalty for looking back in memory?
 
> Lots of C++ developers bash the .NET GC simply because they don't understand it.
 
1:12 PM
@Xeo f = join ((.).(.)) (+)
 
Ell
Wait random access means that there is equal penalty no matter where doesn't it?
 
@Ell as far as C++ is concerned, yes, the cost should be the same. How the actual CPU and memory subsystem handles it is (or may be) a different matter
 
Depending on size and access patterns, iterating sequentially may yield better cache behaviour.
 
Ell
Right
 
afaik, it is just as fast for all practical purposes (a common suggestion in both Intel's and AMDs optimization manuals is for simple for loops to count down towards 0, rather than up)
 
Xeo
1:14 PM
@jalf because only one load is needed?
 
@Xeo because the condition test can be done as a simpler instruction (test if register is zero)
otherwise, you have to load the value into a register (unless it is an immediate), compare them, and then inspect the result of the comparison
 
Ell
I wrote an iterative depth first search, but for now its slower than recursive version. I did write it in ruby mind :3
 
@Xeo Well, Bjarne can eat a dick.
 
Xeo
@ThePhD I fully agree with him on static if in class scope, actually.
 
I don't.
I have to make complicated base classes, template specialize them, and inherit them, just to get the same functionality as static_if.
Concepts don't do me any favors for my use cases either.
 
Xeo
1:18 PM
A simple class-scope static if encourages bad code.
 
@ThePhD Are you sure you're not just writing bad code?
3
 
Xeo
Why do you want class-scope static if, specifically?
 
@Xeo Because I'd like to disqualify certain function overloads from existing given certain template parameters. Robot and Rapptz showed me some ways to do it, the "most elegant" ending up looking like this: coliru.stacked-crooked.com/…
 
Xeo
Do you think you need static if for that? You have, I think, about the only valid use-case for static if - for now. The real problem, I think, is that you can't restrict non-template functions based on their class' template parameters without the template<class U = T> requires(!std::is_same<U, int>()) hack
 
Guys, Using Boost is it good or a bad idea ? well i have been using boost for like a year and i feel like i am addicted to it n not practicing standard library ?
 
1:26 PM
ITT: boost::addiction
 
@Navin you need to go to rehab
 
@Navin It's generally a very high quality library. If it does what you need, then hey, what's the problem? Use what allows you to write code and get stuff done. :)
 
@Xeo I do think I need it.
But unfortunately, nothing about Concepts or C++11 or C++14 or C++17 right now is going to make that easier.
 
Xeo
Bjarne's gripe with class-scope static if is that you soon code yourself into a mess when you have optional members.
 
@jalf but when i go for an another interview i cant expect them to install boost and give?
 
Xeo
1:30 PM
(It also seems to mess badly with certain compiler implementations.)
 
JBL
@Navin It feels like it's somehow the antichamber of std, so why not use it ? What you use in boost could very well go in std in the future.
 
@StackedCrooked You're one funny man.
I find boost clunky at times
Use one small part and it pulls in half a gig of headers
 
JBL
@TonyTheLion That's annoying indeed. :/
 
@JBL yea thats true
 
@Navin you can choose whether to work for a company which refuses to use Boost. Or you can adapt, and work without boost there, while using Boost at home
@TonyTheLion yeah, I find myself using boost very little these days
 
1:35 PM
@jalf true
 
@jalf I haven't used it in forever.
 
@Xeo I'm cloooooose. ideone.com/Z1O8SI I just need a few more hacks.
 
hack everything
 
IME Boost can be largely divided into four chunks: (1) stuff that got added to the std lib so you no longer need boost for it, (2) stuff that is interesting, but too complex and/or academic/sandboxy for me to want to use it, (3) stuff that is useful, but so trivial that you might as well just write it youself, and (4) stuff that is actually relevant to use. And the (4) chunk is surprisingly small
 
h4x0rs
 
1:37 PM
(I should have just gone with Template Haskell, but whatever, this feels like TMP)
 
@R.MartinhoFernandes I have no idea what that even is
 
Xeo
@R.MartinhoFernandes ... you crazy robot
 
Actually, I think the "start black magic" comment is not in the right spot.
 
@jalf (2) is a big chunk
 
agreed
 
1:38 PM
@StackedCrooked Way too big.
 
@R.MartinhoFernandes I don't even know how you come up with this stuff?!?
 
@TonyTheLion It's @Xeo's fault.
 
@R.MartinhoFernandes I don't know about that. I'm glad that it exists (it's a good sandbox from which new, useful stuff may grow). It's just not really practically usable
 
Xeo
Hi :D
 
Hi Xeo, how do you come up with this stuff?
 
Xeo
1:40 PM
The idea is very basic: Function composition where all passed arguments go to the first function in the pipeline
 
hmmm
yea, I have forgotten my Haskell somewhat, because I haven't done enough of it
the notation confuses me :/
 
Xeo
{-# LANGUAGE MultiParamTypeClasses,
             FunctionalDependencies,
             FlexibleInstances,
             OverlappingInstances,
             UndecidableInstances,
             FlexibleContexts #-}
Add ALL the extensions
 
@TonyTheLion Erm, don't worry, that thing is waaaaaaaaaaaaaaaaay over the top.
 
hahah, just Robot fun.
 
1:41 PM
I don't even think I understand it well enough to explain it.
 
but you wrote it?
 
@R.MartinhoFernandes yep, that's code
 
I don't want to go to work...
 
Xeo
class TypeCast' t a b | t a -> b, t b -> a where
 typeCast' :: t->a->b
class TypeCast'' t a b | t a -> b, t b -> a where
 typeCast'' :: t->a->b
 
@ThePhD dat feel. I know it.
 
1:41 PM
I just stumble along from compiler error to compiler error.
 
Xeo
Why two of that?
 
@R.MartinhoFernandes seems legit.
 
@ThePhD I took vacation for today and tomorrow.
 
JBL
Using "magic" to qualify block(s) of code in comments already looks suspicious.
 
I feel sick, but the usual policy in my head is to just power through sickness and go to work.
But really, I don't even want to power through the sick.
 
1:42 PM
I have vacation next week (Thurs/Fri), but because I'm leaving they're taking it off my pay at end of month
 
Wading through this code sucks.
 
@Xeo I don't quite remember. I just copy-pasted it from previous adventures.
 
with my move, this month is going to cost me a fortune.
 
Xeo
lol
 
Xeo
1:43 PM
OH FUCK YOU STUPID FLASH
 
I want a pet ferret. I <3 ferrets.
 
Xeo
Seriously, wtf. This stuff worked for over two weeks, and now it's broken again
AJSHAJKSGHJKAHGJSH
 
oh gawd :/
 
Xeo
I want to throw something.
 
JBL
> Flash
 
1:44 PM
Poor Xeo, wanting to kill Flash
 
I really have almost no idea of what is going on when I do this kind of TMP-ish crap in Haskell.
 
Throw me!
 
@Xeo I have been in that position quite a few times in recent months.
 
It's kinda like those noobs that just try different stuff until it works.
 
Off a building.
 
1:45 PM
I can comiserate with you
 
Out a window.
To my death.
 
NOoooooooooooooooo
@ThePhD I need you <3
 
JBL
@R.MartinhoFernandes Hey, it's better than sitting passively, no ?
Actually writing code.
 
Xeo
@TonyTheLion The worst being, it's the same fucking error we had 2 weeks ago, with something apparently being broken in the Flash Professional-generated part of the script >_>
 
@R.MartinhoFernandes Trying stuff is so noobish.
 
1:46 PM
@StackedCrooked Well, trying it randomly is.
 
@Xeo urgh
 
@JBL also
 
JBL
> possible benchmark exceptions hard-coded within
What the...
I don't even understand the logic behind this.
 
1:58 PM
GCC notices you're implementing memcpy and emits a call to memcpy. Comedy gold. http://gcc.gnu.org/bugzilla//show_bug.cgi?id=56888
 
user784668
GCC notices you're violating ODR and does something.
 
user784668
Oh wait, it's UB, anything can happen.
 

« first day (1020 days earlier)      last day (3914 days later) »