« first day (1191 days earlier)      last day (3775 days later) » 

2:01 PM
@Xeo I'd call 'unref' 'unrefwrap' or 'unwrap' even. I mean, 'unref' means something else in my mind. Certainly doesn't imply that unref<T&>::type is a reference type
 
Xeo
@sehe True, maybe unwrapref would be better
too late, anyways
 
Ell
I need to make a "run after installing linux mint" script to download all of boost/gcc/clang/other libraries/tools and build them all from source
and a script to run every night to update things
 
@Borgleader ooh
 
Xeo
@Borgleader ?
if you write nothing, no
 
@Ell you spelled "haskell platform" weirdly :)
 
Xeo
2:06 PM
hm, turning around on my bed after sitting: bad idea
 
2
Q: Standard containers that reserve on construction?

noloaderI want a standard C++ container to use as an accumulator for reading from a network socket (that is, T = byte or unsigned char). I want the container to reserve a capacity on construction, and not initialize the elements. That is, I want to be able to do: container c(1024); and get the contain...

> I want the container to reserve a capacity on construction, and not initialize the elements.
But the type is unsigned char
 
Xeo
oh wait, vector of...
 
Ell
@BartekBanachewicz you spelled "ruby platform" weirdly ;)
 
Xeo
yeah, that always initializes
 
2:09 PM
@Ell lel rubyfags cannot into space
 
Xeo
@LightnessRacesinOrbit leg. much hurt. very bad
 
Ell
Sure they can!
Rubyfags can into functional and into oop
 
Xeo
let's break this up here
 
Hm, there's no std::integer_sequence on coliru's clang
 
Xeo
libstdc++ doesn't have it in 4.8
 
2:11 PM
New llvm build for VS time to be disappointed again
 
oh I thought clang was using libc++
 
Xeo
not by default on coliru
needs -stdlib=libc++ and -lsupc++ at the very end
 
flash was cocking up everywhere, so I try to update to a new flash player..download the thingy from adobe...execute it...it deletes itself. wut.
 
Xeo
nice update
I should get that
finally recognized its own worthlessness
 
1>CL : error : cannot mangle RTTI descriptors for type '_Facet_base' yet
1>CL : error : cannot mangle the name of type '_Facet_base' into RTTI descriptors yet
 
T_T
 
@Xeo and then I got this :)
what the hell, here's a link I guess ._. dl.dropboxusercontent.com/u/247271563/advertising.png
 
Xeo
so libc++ on coliru also doesn't have it :p
 
but wasn't that supposed to be C++14 draft-complete?
ah maybe coliru doesn't have the latest version
 
Xeo
maybe stacked hasn't updated ?
 
2:16 PM
yeah probably
 
If only all advertising was like this... "Here's another product that might interest you..." blank screen
 
@Ell "functional"
JSfags also say that JS can be functional
 
Ell
it can be
 
yeah, as much as ruby
 
Ell
right :3
 
2:17 PM
which is still fucking terrible at FP
 
JS and functional? ummm... maybe, but functioning? no
 
Ell
it's not terrible :3
 
It's not much better at imperative
 
hello. can someone confirm that this c++11 template implementation of insertion sort is correct? pastebin.com/MUxkmFkV
 
Ell
you can pass functions all up in this place
 
Xeo
2:18 PM
7 mins ago, by Xeo
let's break this up here
 
it should be usable as a drop-in replacement of std::sort
 
@Ell see that's a fucking problem
 
@ScarletAmaranth Yesterday I've seen a talk about monads in JS
 
Xeo
I said that for a reason
 
FP is not about functions :v
 
2:18 PM
it was weird
 
Ell
@BartekBanachewicz why? you pass functions everywhere in haskell right?
 
@CatPlusPlus FP is about floating points and things :)
 
@Borgleader Yep still can't parse type_traits.
 
@Ell which is completely missing the point if you focus on that
26 secs ago, by Cat Plus Plus
FP is not about functions :v
 
@AndyProwl to be fair, monads are an abstract concept that can be applied anywhere
 
2:19 PM
@ScarletAmaranth have you read monads in JS?
 
@AndyProwl hell, LINQ SelectMany uses monoids and monads
@BartekBanachewicz no
 
Monads are not very useful without do-notation though
 
Xeo
@ScarletAmaranth applicative monads? :p
 
the only language that has reasonable monads I've seen besides haskell is Scala
 
and C# with Linq
 
2:19 PM
@ScarletAmaranth Sure, I wasn't arguing the opposite ;)
 
Any language with macros
 
@ScarletAmaranth linq is for data, not for computations (at least I think so)
 
Ell
But functional isn't all about monads either, right?
 
And I mean real macros, not textual substitution like C
 
@BartekBanachewicz sure, but we're talking monads, not monoids at this moment
 
2:20 PM
@DeadMG I don't know why they bothered releasing it at GN2013, it's still "useless"
 
@Ell function composition is a good start (and higher-order compositions)
like, again (and again), >>=
 
@Borgleader I concur. It was way before it was ready.
 
I like the term "HOC".
 
Xeo
@BartekBanachewicz >=> > >>=
 
Ell
you can do function composition in ruby
 
2:22 PM
Modern paradigms are fucking hard to clearly define, because they overlap heavily
 
Xeo
@ScarletAmaranth that doesn't fit, imho. linq is for IEnumerable, a single kind of monad
 
Like, functional with monads is imperative :v
 
@Ell yeah, manipulating function class prototype and abusing existing operators
 
Ell
How is it abusing? o.O
 
@Ell There's no way to overload . for that.
 
Xeo
2:24 PM
...
 
IIRC Ruby doesn't allow arbitrary operators
 
That's like the least important thing
 
Xeo
^
 
true enough vOv
 
compose(f, g) is also composition
 
Xeo
2:24 PM
utterly irrelevant, even
 
yuck - How can people feel happy with themselves posting such a fucking mess?
 
How do you do lambdas in Ruby
 
So who in the lounge hasn't implemented/toyed with ranges yet?
 
def self.compose(f, g)
    lambda { |*args| f[g[*args]] }
  end
@CatPlusPlus ^
 
I just realised that I've never seen them, and blocks aren't the same thing
 
Ell
2:25 PM
double = lambda {|x| x * 2}
@Borgleader Me! I'm still excited about iterators.
 
@Ell yay for consistency with named functions btw
 
Xeo
wat
 
I think at some point it was Func.new block or some shit like that
 
okay you know what Xeo was right
 
@LightnessRacesinOrbit Wrong I lol'ed
 
2:27 PM
That's enough ruby for today
 
12 hours ago, by R. Martinho Fernandes
Oh noes, you said that word.
12 hours ago, by Rapptz
Days since the last ranges mention: 0
 
Ell
@CatPlusPlus you can do double = Proc.new {|x| x * 2}
 
everybody (except rapptz) loves ranges
 
Proc is even better
 
@AndyProwl Says Ranges Martinho Fernandes he can deny it all he wants. I know that's what the R stands for
 
Ell
2:28 PM
Proc doesn't capture locals or anything
 
I thought it meant "Robot"
 
@DeadMG And yet he implemented them at least partially IIRC
 
@Borgleader But he didn't get boners apparently
12 hours ago, by Rapptz
I don't get the boners for lazy evaluation
 
that sounds like being a bit too much used to one's solutions
 
@BartekBanachewicz If you want to get rep again for saying someone's code sucks go for it
 
user1804599
2:30 PM
> Sequences are colloquially referred to as “seqs” (perhaps a natural consequence of the key sequence-producing function being called seq), …
 
user1804599
lol
 
user1804599
consequence
 
Ell
xD
 
Oh god. That could well be another IOCCC entry. Using [0] for pointer dereference and no handle typedefs and are we in C and... urgh. I'm out. — Bartek Banachewicz 13 secs ago
what. are. those people. thinking.
 
user3010322
2:36 PM
@Xeo Black Lagoon was fine until the second season and everything just got several hundred degrees mroe fucked up.
 
Xeo
hansel and gretel arc :D
 
user3010322
u.u
 
Xeo
I don't get why people find that one so bad
 
user3010322
That's not really the worst one.
 
Xeo
roberta?
 
user3010322
2:37 PM
It was just such a drastic switch from the GUNS GUNS GUNS SMUGGLING GUNS SMUGGLING GUNS pace of everything.
 
user3010322
And then they just, in like, the VERY first episode of the second season,
 
user3010322
oh by the way CHILD PORN AND ABUSE
 
Xeo
that said, I still have to watch Roberta's Bloody Trail
 
user3010322
hope youdon't mind enjoy. <3
 
user3010322
It was pretty jarring.
 
user3010322
2:38 PM
I was all like "YEAH WHAT BOAT ARE WE GONNA RAM INTO WHO'S FACE THIS TIME."
 
user3010322
"... Wa.... w-what... what's going on what am I watching ;~;"
 
user3010322
Also, oh the first scene,
 
user3010322
dat RPG Scene was best scene
 
user3010322
 
Xeo
I lol'd at that one
 
user3010322
2:40 PM
@StackedCrooked ^ ARRRRRR PEEEEEEEEEEEE GEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEe
 
Xeo
ew , english dub
 
@Xeo Generic lambdas -> 1 minute! :P
 
user3010322
Yeh, terrible english dubs but ARRRRR PEEEE GEEEEEEEEEEEEeeEeeeeeeeeeeeee.
 
(but yeah, C++11)
 
what the fuck is going on here
 
2:41 PM
0
A: Why is PHP's zip_read() returning false?

VictorTry to zipped zip archive with normal compession. And check is zip has a password or no. And tha dump value: var_dump($zip_read);

brilliant.
 
Xeo
@AndyProwl std::ref greets you
 
> Try to zipped zip archive with normal compession
 
Xeo
although, I guess, nvm
 
Zip to zipped zip zip with normal zip
 
@Xeo Ah, what does it say?
 
Xeo
2:42 PM
nothing, my bad
 
Where has Vlad been?
 
in Moscow I would say
 
This answer directly answers the question "if I replace the expression return A{-a.i, -a.j}; by return {-a.i, -a.j}; the code compiles and executes correctly". If you are unable to understand the question it si your problem not main. — Vlad from Moscow 16 hours ago
excellent
@chris I am sorry but your advice is imply stupid. If there is no necessaty to use a lambda then do not use it. — Vlad from Moscow yesterday
 
Vlad confuses stackoverflow with code golf
 
two "helpful flags" for me tyvm
Vlad confuses life for The Vlad Show (when, in fact, it is The Lightness Races In Orbit Show)
 
2:47 PM
yeah, that too
 
(removed)
I'm so moved and
(removed)
 
Xeo
stopstopstopstopstop
 
whywhywhywhywhy
 
Xeo
just because
 
oh good
Lazy btard
 
user1804599
2:53 PM
 
← 10 messages moved to bin
 
> HE PARTS HIS HAIR WITH A SHOTGUN
 
real men don't part their hair
 
which reminds me I need to shave my head
 
@AndyProwl going to prison?
 
2:57 PM
← 187 messages moved from bin
@LightnessRacesinOrbit scurvy or lice
 
@LightnessRacesinOrbit Not planning it yet, but you never know
One must be prepared
 
@sehe o_0
 
@Xeo what is libsupc++? I can't figure it out from this page libcxx.llvm.org
 
Xeo
3:08 PM
supplementary c++ library
for fundamental ABI stuff
 
user1804599
I think I implemented by first binary search function!
 
Xeo
something similar to libc++abi
and libcxx-rt
I think those are the three options for building / using libc++
 
@rightfold Isn't that the algorithm whose Java implementation had a bug in it for like 10 years?
 
Java is a bug.
 
user1804599
I don’t know.
 
user1804599
3:11 PM
I wouldn’t be surprised if mine has a bug in it too.
 
> For example, this bug existed in Java SDK at Arrays.binarySearch() from 1.2 to 5.0 and fixed in 6.0.
Huh... 8 years
 
@Borgleader Actually I think it was :/ Interger overflow
 
user1804599
Mine doesn’t work.
 
@Xeo Erm. What difference would it make then?
 
user1804599
Fucking off-by-one error.
 
Xeo
3:16 PM
@sehe ?
Difference where?
 
@Xeo What difference does it make whether you build "using" or "agains" libsupc++/libcxxrt/libc++abi?
Does it matter? We're not here to discuss arbitrary points. We're discussing the quality of your answer. — sehe 4 secs ago
 
Xeo
Do you mean the difference between the three?
or whether you build libc++ with one of them integrated vs linking it in the final program?
 
Yup. I mean "fundamental ABI stuff" doesn't actually mean anything practical to me, making me unable to choose
 
Xeo
Sorry, no idea.
 
@sehe He doesn't seem to get that providing a copy/paste answer just isn't enough in this case (imo, it's never enough, but especially here)
 
3:20 PM
@Xeo Let's forget about that (I wasn't aware)
@Borgleader Apparently, though, I "didn't got" his point :)
 
Xeo
I think I've used all three before, depending on which I found easiest to get working at the time.
 
@haccks Instead, right now this 100k user tells you he doesn't have a clue what swizzling is about. However, he can still teach you what a bad quality answer is in such case :/ — sehe 5 secs ago
 
Xeo
haven't tampered with libc++ in quite a while
or C++, for that matter, really.
 
Isn't there.... a deb package?
 
user1804599
 
user1804599
3:23 PM
Although quot is nicer than Math/floor with /.
 
@sehe Implementation of stuff like exception handling, dynamic_cast, that kind of thing.
 
Speaking of binary_search... why does it return bool instead of an iterator to the value like every other algorithm o.o
 
@sehe He finally removed his answer.
 
guis
my school's msdnaa store is bugged. can anyone kindly donate a vs2013 iso to a poor beggar pls
 
user1804599
3:32 PM
@Purrformance fucktimkuik.org
 
@JorenHeit Linking against templates in other compilation units is possible if explicit instantiation is used. — Constructor 2 mins ago
Really? (Oops wrong comment)
 
@rightfold but viruses!
 
user1804599
@Purrformance but comments!
 
@rightfold "100% quality veerus 9/10 wwould recomend"
 
user1804599
Also, why wouldn’t we send you viruses?
 
3:34 PM
@rightfold I'd check the hash anyway
 
user1804599
Nou dan. :v
 
yesiwud
 
Ell
ah dern I got no marks
 
I see "plus.google.com", so I'm automatically inclined to agree.
 
3:43 PM
I mean that idiot Kumi Games but yeah that works too
 
Can someone confirm that this "explicit instantiation" comment is wrong? (I'm 99% sure it is, but I'd like to be 100% sure ;) )
 
er, C++11 does in fact offer such a feature.
assuming that you know in advance what it will be instantiated with.
 
can I do RAII in Haskell? e.g. in do notation I have a handle <- openFile "foo.txt" ReadMode and then a bunch of stuff and then I have to remember hClose handle. Is there a way to have the handle closed automatically at the end of the do expression? Or does this question make no sense?
 
er, explicit instantiation was possible even before C++11 ;0
 
@BartoszKP Yes, but extern templates were an extension. Now they're Standard.
 
Xeo
3:46 PM
@AndyProwl bracket
 
oh, extern yes
 
Xeo
Also, withFile (which is implemented in terms of bracket)
 
that execute-around stuff is a million light years from RAII.
 
@Xeo I'll search that, thanks
 
No it isn't
 
3:47 PM
yes it is
 
Xeo
@DeadMG RAII is exactly that
 
Don't use bracket directly though, it's low-level primitive for people writing resources
 
Xeo
and if everything is an expression, you can implement it easily without special features
 
withFile is what you want
 
OK
That was just an example though
I just want to understand how a RAII-like mechanism can be realized in Haskell
 
3:48 PM
@Xeo Except the compiler always executes around for you, so it's impossible to forget to execute around.
 
Not this shit again
 
Xeo
You have to remember to use RAII. At that point, it's the same as remembering to use withFile for example
 
it's not the same because you have to withFile at every use site.
 
Xeo
and that's different from creating an std::fstream how?
 
you don't have to remember to use RAII at every use site.
you just create the object and the compiler remembers it for you.
 
Xeo
3:49 PM
...
 
but that's the same
you need to remember to create the resource-managing object
instead of using the resource acquisition/release primitives directly
 
you only need to define the resource managing object once.
then you're done for all use sites.
 
You literally don't have access to the resource outside of inner withFile function
 
but you also need to define withFile once
 
@AndyProwl But you need to explicitly call it every time.
 
Xeo
3:50 PM
1 min ago, by Xeo
and that's different from creating an std::fstream how?
 
Okay, stop
 
@DeadMG but you also have to explicitly create a RAII object every time
 
Xeo
oh wait, maybe you're misunderstanding something
 
Have you ever actually used execute-around or are you just babbling because RAII is the best thing ever blah blah
 
(create as "instantiate", not "define")
 
Xeo
3:51 PM
Do you think you need withFile at every interaction point with a certain file (handle)?
 
Because this repeats always
 
Xeo
You have withFile "foo" ReadMode $ \handle -> do { ... } and that's it
 
@CatPlusPlus Maybe instead of "I'm right by default and obviously the other side has simply never used it", you could simply consider that it's possible to have two different opinions?
also I have had the misfortune of having to use execute-around.
 
Xeo
"misfortune", really now
 
withFile "foo.txt" ReadMode $ \fp -> do
    somethingWithFile fp
    somewithElse fp

{
    std::ifstream fp("foo.txt");
    somethingWithFile(fp);
    somethingElse(fp);
}
 
3:52 PM
@jalf They don't get wiped away. They will be available as long as Coliru stays alive. You can always make a backup of the entire svn repo if you like.
 
WOOP WOOP
Totally different things guys
@DeadMG No, you just sound like you've never used it
 
I see.
 
Xeo
ICE
 
so "I'm right by default and obviously the other side has never used it because I feel like they sound like they've never used it".
 
3:56 PM
I just shown you an example, but yeah w/e
 
no
"Create object on function local stack" is only a small portion of the cases in which RAII applies.
for example, a list of self-releasing objects.
 
ADTs in Haskell have no attached behaviour
 
right, so execute-around completely does not cover that at all.
and RAII does.
 
I think it does not cover it because you do not need it. You write programs in a different way.
Just my feeling though. I'm not really an expert so I should shut up.
 
do I "need" for ... my resources to be released correctly regardless of whether I place them in a list or place them on the function-local stack?
gonna have to go with "yes" on that one.
 
4:00 PM
Ugh
 
this is gettin serious
 
it's a programming language discussion after all
 
you mean like if I create a list of handles in some do expression, then I want to automatically release all the handles in the list at the end of the evaluation?
perhaps I understand your point
if I get it correctly, your point is that in Haskell I would have to define another withFiles wrapper in this case
 
well, that's far from the only case.
 
4:04 PM
I'm not saying it's the only case. I'm trying to understand your point
 
what if I want to, say, return an optional<std::ifstream>?
@AndyProwl My point is, that when I have something like std::ifstream, then it's the composability that really counts. std::vector<std::ifstream>, for example.
and if I do, I dunno, auto x = f(); then I don't need to know if x needs releasing or what the release function is, because RAII handles it for me automatically.
 
Ell
@CatPlusPlus what is the "Ugh" for? o.O
 
Tony recommends some dog food
 
I'll let you eat me
;)
 
> Installing update 114 of 138
I love fresh installs
 
4:14 PM
@DeadMG Good point. I won't try to make up a counter-argument myself, as I know too little of Haskell, but I'd love to see a reply from the other experts.
 
My options for dinner are:
- unheated Cassoulet from a tin can
- buying french fries
- doner kebab or something similar
 
execute-around isn't really Haskell-specific, virtually all languages that have resources and don't have RAII employ something similar.
unless they just do it C-style and don't provide anything.
at least, I am not aware of any that do not make one of those four choices.
 
interesting, in C# you could have the disposable pattern forwarded into composed elements if they're IDisposable ;0
 
Based on what I've seen so far I'm expecting a counter-argument would be something like "in Haskell you try to separate functions with side-effects from pure functions so you don't propagate responsibilities with side-effects back to the caller together with data.". I may be brainfarting.
 
Well, yes, most of your program can probably easily be pure
 
4:21 PM
ew
 
For handling multiple resources you just compose with functions vOv
There's also higher level things like pipes
 
@rightfold, do you know what is the cheapest hosting service that allows development of ruby and postgres?
 
That question makes no sense
 
better?
 
OpenShift
 
4:30 PM
I would get a VPS.
 
@StackedCrooked yeah, Linode is my fall-back, but it costs $ 240 dollars a year
that's a lot
 
Digital Ocean
 
hmmm, open shift has a free plan...
 
can't believe my friend talked me into going to a Steel Panther gig ;0
 
@CatPlusPlus openshift seems great
thanks
 
user1804599
4:38 PM
@Jefffrey Heroku.
 
user1804599
It’s free. :F
 
openshift too ;)
 
user1804599
I see.
 
do you use heroku?
 
user1804599
@StackedCrooked Ik eet patat met kip kerrie en een viandel.
 
user1804599
4:40 PM
@Jefffrey I use it to host my father’s start page. :v
 
lol, what a coincidence
 
user1804599
I did not have a VPS back then.
 
@Jefffrey I'd rather have seppuku.
 
@rightfold I need to develop a simple website for my father's company because the current one sucks a lot
 
user1804599
Do it locally first.
 
4:41 PM
yeah, of course
 
user1804599
> Thank you for your patients.
 
I don't know why I thought that I would need a VPS for ruby development
Do you think it (heroku/openshift) is enough for a very maximum of 10.000 visits a day?
 
Write it, deploy it, siege it, look at how many requests per second can it service
 
and don't post URL here, because by chance you may get more than 10k visits a day ;0
 
Dunno why you'd pick Ruby but w/e
 
user406009
4:46 PM
@Jefffrey Virtulabox + linux distro might make development easier.
 
@CatPlusPlus because the only languages I "know" and I feel moderately comfortable with are PHP, C++ and Ruby. Of course the only viable option is Ruby, of the three. Also considering that I have some experience with Sinatra and Postgres... well, there's not much of a choice.
Wt is simply an overkill. And PHP... I don't even need to tell you.
 
I'd pick PHP before Ruby
 
I definitely wouldn't.
 
:@
 
user406009
PHP is probably the worst language in common use.
 
4:50 PM
No, that's C
 
No, that's C pretending to be C++
 

« first day (1191 days earlier)      last day (3775 days later) »