« first day (1385 days earlier)      last day (3555 days later) » 

Ell
12:08 AM
I have has 6 pints of cider plus 1.5 of some cocktail
Does that mean I need 7.5 pints or eater to replace with?
I think ill assume one punt is half murder
Editing is so much effort on mobile. *litre
 
Aaaa I had no DNS for a second
Scary
 
Ell
OooOoohhh
 
12:29 AM
Urgh stupid MediaWiki putting permaredirects where it's not asked to
 
12:44 AM
Bad question of the day:
-3
Q: Whose gonna do this system for me...Pleeeeaase

Adejoh John AmeduSOMEBODY HELP!!!!!!! Java and Python o Minicab Booking System o o Alpha-Cab is a minicab company, which is planning to develop a booking system to organise their services and boost the quality of the services. The company has one head office and multiple local branches, where local services...

 
Fun fact, questions starting with SOMEBODY HELP!!!!!!! are 63% more likely to be closed. (Disclaimer 87% of all statistics on the internet are made up on the spot) — Borgleader 11 secs ago
 
:)
 
Even Santa VTCed
this kid won't get anything for xmas
 
What's the state of pure functional programming in C++?
 
12:51 AM
Don't ask Bartosz Milewski
He's very annoying
 
Is the memory allocator up to the task of a bazillion allocs / deallocs per second?
 
@BryanEdds Try it
 
Lay off the drugs
 
presumably it will be optimized for small allocs
I'd like to read up on modern C++ allocators
 
then do
 
12:56 AM
any idea where?
 
no
 
I wonder how copious use of shared_ptrs work in practice
how problematic cycles will be a in a real functional program
shit like that, someone needs to write about
 
I don't think anyone sane will recommend copious use of shared_ptr.
 
^ this
 
We use RAII and value types around these parts.
 
1:05 AM
Well unless you use it the sean parent way as essentially a value_ptr (IIRC thats what he was emulating)
 
Man I hate C++11 constexpr
so verbose
so terrible
 
@BryanEdds I've used weak_ptr about 3 times total, ever (in real code). Of those, I'm pretty sure one was necessary and one unnecessary.
 
i respect that position, but how can you do FP in C++ without shared_ptr?
 
@Rapptz Feel free to write it all with TMP instead. Certain to be much shorter and more readable!
@BryanEdds What does FP have to do with shared_ptr?
 
You can write functional code just fine w/o shared_ptr
 
1:08 AM
is there an alternative?
 
Not using it.
 
@BryanEdds Many. TMP is as pure functional as it gets, and no shared_ptr in sight.
 
can you write a purely functional data structure without shared_ptr?
functional list, set, map, et al
 
wtf is a pure functional data structure?
 
Like I said.
C++ has value types, move semantics, and RAII.
 
1:10 AM
@Borgleader immutable, for one thing.
 
@LightnessRacesinOrbit you pinged me? what can I do for you?
 
@JerryCoffin oh that's all he meant? should have just said immutable =/
 
I just can't fathom how to implement a functional list with sharing without shared_ptr
could you hack up a quick example?
a functional list is efficient because unchanged data is shared
 
@Borgleader I'm not sure what he meant, and certainly not at all sure that's all he would have meant.
 
you could copy everything for each cons, but that wouldn't be efficient AFAIK
 
1:14 AM
Wow
You called it cons. Interesting.
 
Move semantics is destructive of the old copy, so that wouldn't work either, AFAIK
 
@BryanEdds Question #1: What do you want to optimize? cons normally translates to linked lists, which often translates directly to 50+% space wasted right off the bat.
 
A lisp-style list.
 
Those are linked lists aren't they?
 
It should use structure-sharing for efficiency.
 
1:16 AM
@Rapptz yes
 
They're singly-linked lists from back to front, AFAIK
 
hehe linked lists... efficiency...
 
efficient as in more efficient than copying the entire data structure for each modification
no, wait, they're singly-linked from front to back
i think
 
I'll keep using vector thank you
 
That benchmark is always stupid
Cause search has always been slow with linked lists
 
1:18 AM
@Rapptz I'm stupid too so :D
 
@Rapptz Stupid benchmark, but doesn't change the fact that good uses for linked lists are pretty rare.
 
Yeah I'm not disagreeing.
 
std::list is unrelated to a functional list
 
@JerryCoffin You have a question on that very topic don't you?
 
@BryanEdds It doesn't matter. The underlying data structure is nearly the same and it has the same problems.
Making it immutable doesn't magically make it better
 
1:20 AM
@BryanEdds Oh really, why dont you elaborate
 
ah wait, nevermind, it's somewhat similar
 
@Borgleader Yes. If they'd provided for it at the time, I'd probably have self-answered, but it's all right. It was intended as more or less a FAQ, and has worked out reasonably well for its intended purpose.
 
In either case.
 
at any rate, I'm just trying to figure out how C++ might implement a functional list without shared_ptr efficiently
where efficiently = what is expected from a functional list in functional languages
 
@BryanEdds Most of the time, you just use vector, copy as needed, and still end up using substantially less memory than most functional languages.
 
1:24 AM
right, but I'm wondering about FP in C++
 
@BryanEdds Wrap vector in a class called list and make it immutable
done
 
He wants sharing
Which pretty much constraints it to shared_ptr
 
@Rapptz whats that thing called again... oh yeah
XY problem
 
so, you're definitely stuck with shared_ptr then?
 
with your particular silly constraints yes
but if I wanted to make a better functional list I wouldn't use shared_ptr or a linked list
 
1:28 AM
what makes it silly?
what would you do?
 
@BryanEdds If you insist on shared ownership, your choices mostly boil down to reference counting (which is what shared_ptr provides) or a tracing garbage collector (which is what, for example, the Boehm/Demers/Weiser GC provides). I've used both, but neither particularly recently. IMO, wanting either one usually indicates that you're trying to write some other language with C++ syntax instead of really writing C++.
 
@BryanEdds Plug in GC that can reorder list nodes together
 
sharing is the only way to make it efficient, AFAIK
 
Forget about everything else, it won't work
Easier: don't try to do that in C++ at all
Easier still: don't use C++ at all
hth
 
Terrible.
 
1:31 AM
I keep finding articles here and there about FP in C++, so I'm trying to see what merit is really there
 
@BryanEdds As already pointed out, in most cases you can use a vector, copy as needed, and still use less memory (and CPU time) than if you'd used a shared structure with most functional languages.
 
Would be interesting to see how far that scales
100 entries?
 
lol no
 
hahah a lot more than that
 
10?
 
1:33 AM
@BryanEdds think more in the thousands
 
I wonder...
Someone really need to do some measurement on this stuff
 
@BryanEdds why don't you? since youre so interested
you can use this to benchmark
 
Well, F# seems to do what I need
So I don't personally have the motivation
 
oh and here I thought you were a Haskellite
 
@BryanEdds honestly... a good compiler should be able to detect what you're doing and optimize it out
 
1:35 AM
using lisp words?
 
@BryanEdds Let's start with the basics. Consider a list of int's. I typically use VC++ in x64 mode, so I'll assume that. A Lisp-style list has two pointers per node. Each of those pointers is 64 bits. An int that'll fit in that size is 32 bits. That means a list of int devotes four times as much space to the pointers as the actual data. Looking at it from the other direction, you need to share five copies of every list (on average) to catch up with just using a vector and copying as needed.
 
More importantly, linked lists are murder for cache if you're not smart about them
 
well, if you have a compacting collector, not an issue as much
 
Yes, that's the point
You really really really need a GC for this to be worth it
 
@CatPlusPlus Not just a GC, but a copying/compacting GC.
 
1:38 AM
Yes, shared_ptr with dumb refcounting won't do
 
@CatPlusPlus Even a tracing GC that doesn't compact the heap generally won't do.
 
@JerryCoffin adding shared_ptr into that mix makes it even worse as then you have to store the count too... which depending on implementation could be either 64bit or 32bit... either way it's more space
 
That pretty much rules out (anything close to conforming) C++, since C++ allows you to do things like hash an address, and expect it to stay the same forever.
 
I would like to see a program made with functional contstructs that use no sharing.
 
@Mgetz Not only that, but adds yet another level of indirection to most access. Worse, if you have multithreading involved, it involves locking on every access to that (now potentially shared across threads) reference count.
 
1:42 AM
I don't think it's hard to make an immutable container with move semantics.
 
@JerryCoffin offtopic: don't you have to call std::declare_reachable on a pointer you obsfucate?
 
the GC thing isn't supported by any compiler lol
 
the problem with move is that it is destructive, and anything implemented with it is not functional
 
@Mgetz Yes, but that's a different issue. Here the point is that if you store something in a hash table (for example) and later re-hash the same address, you need to get the same result.
 
@BryanEdds if its a temporary who the hell cares?
 
1:43 AM
@BryanEdds the latter is an implementation detail
the former is irrelevant
 
the end-user would have to specify for each operation which is allowed to be destructive
so that would complicate the interface
 
huh?
 
@BryanEdds I think you're confusing implementation immutability with compiler implementation
 
@BryanEdds i dont think you know how move works =/
 
i might not
 
1:45 AM
I'm talking about temporaries dude.
 
move invalidates a pointer, right?
 
No
It extends its life time. Or well, implementation detail.
Usually a move is implemented through swapping pointers.
 
Anyone uses libvirt
I really don't know how to give a guest a public IP
Or: tell me how to configure bridging to not break networking
 
well, I'm sufficiently confused
 
Do you know C++?
@CatPlusPlus Nope.
 
1:47 AM
The point is FP world and C++ world are very different.
 
stopped using it before C++0x
 
it's called C++11 now
 
so move semantics isn't all to clear to me
 
@Rapptz I keep thinking I do... to the consternation of myself and the rest of the room
 
Carmack has been doing functional C++ - I wonder how he does it
 
1:50 AM
@BryanEdds why don't you google it?
 
couldn't find any actual code
 
you could probably make an immutable (constexpr) compile time list
would be cool
 
Good morning.
 
32
Q: Functional Programming in C++

Red HyenaCan someone guide me how do functional programming in C++? Is there some good online material that I can refer? Please note that I know about the library FC++. I want to know how to do that with C++ standard library alone. Thanks.

 
1:52 AM
he uses shared_ptr
 
@Rapptz that would be useful actually...
 
I could prep up a quick demo I think.
 
so, what I'm hearing is, Functional C++, don't do it.
 
@BryanEdds I think you're confusing pure functional programming with a semi-functional style
 
interesting... also uses shared_ptr
 
1:57 AM
ftl is such a meh library
I don't know why people always link it
 
so, it seems you can do functional in C++ all the way up until data structures
generally speaking
 
@Rapptz because it shows up in google searches?
 
well don't blindly link things from google bub
 
honestly I know nothing about it, it was just to refute the "no code assertion"
 
FTL abuses operator overloads to make C++ look like Haskell
 
2:00 AM
no, I didn't say there was no code
I said there was no code by carmack
that's the code I want to see
i bet he's got it figured out better than most
 
He wasn't very good at C++ last time I checked
 
He still isn't.
A few months back he was tweeting about how the std containers aren't good
 
lol
 
well, they're not if they don't giveyou sufficiently granular control over the memory model
maybe tht was fixed in C++11 however
 
@BryanEdds they give you extremely granular control via the allocator interface last I checked
 
2:04 AM
maybe it was fixed
i hope so
it's so hard to figure out the changes from reading the spec, i probably still couldn't say for sure
 
So many things were fixed, it's almost like a new language.
 
how are modules coming along?
 
or did they die
 
Nope, still in proposal phase.
 
2:06 AM
I thought concepts were higher priority
that and filesystem
 
user3010322
@JerryCoffin Do you know if you can resize a Gdiplus::Bitmap after it's been created?
 
@ThePhD wai u use that... use WIC if you're going to manipulate bitmaps
 
user3010322
I'm using GDI / GDI+ to create a RasterFont texture.
 
user3010322
It's incredibly slow, though, because I have to perform a copy of some of the Gdiplus::Bitmap data.
 
@ThePhD what for?
 
user3010322
2:12 AM
GDI/GDI+ renders text and doesn't require me to set up some kind of rendering device first.
 
user3010322
So I can reduce its scope to a single function and be alright.
 
@ThePhD Don't remember offhand.
 
Oh god I think I managed to create the bridge properly finally
 
user3010322
@JerryCoffin Hm... well. I can't figure it out, so I'll just make a new bitmap and hope Gdiplus::Graphics doesn't try to bit my head off. :D
 
@ThePhD and that's why I avoid GDI/GDI+
that and the fact that fonts rendered by GDI/GDI+ look like shit
 
3:00 AM
 
3:36 AM
TIL "con" as in those in scams means "confidence".
 
user2985029
@MarkGarcia what did it mean before today?
 
I thought it is a word of its own (though I think it's being accepted as such now).
A confidence trick (synonyms include confidence scheme, scam and stratagem) is an attempt to defraud a person or group after first gaining their confidence, in the classical sense of trust. A confidence artist (or con artist) is an individual, operating alone or in concert with others, who exploits characteristics of the human psyche such as dishonesty, honesty, vanity, compassion, credulity, irresponsibility, naïveté, or greed. == Terminology == The perpetrator of a confidence trick (or "con-trick") is often referred to as a confidence (or "con") man, woman or artist, or a "grifter". The first...
 
user2985029
@MarkGarcia well, previously i thought it was a name
 
user2985029
can't remember when i figured out the confidence trick thing
 
user2985029
recently though, for ages i just didn't know
 
user2985029
3:52 AM
i'm not talking about con men, i'm talking about cornelius
 
user2985029
etc
 
user2985029
i never knew that con man was confidence trickster for so long
 
user2985029
i thought it was just con man
 
user2985029
one day it dawned on me
 
user2985029
con is short for confidence
 
user2985029
3:55 AM
a con man will gain your confidence
 
user2985029
that's what i think
 
user2985029
maybe i still dont understand
 
user2985029
the complex social interactions
 
user2985029
but i'm sure there is a link between con and confidence and the things that con men do
 
4:28 AM
I wonder where potato is
 
Yeah... haven't noticed him for a while now.
> seen 1 hour ago
Just not on chat.
 
4:48 AM
So stupid.
"hello"_stuff should have been constexpr or something.
why couldn't it be template<size_t N> operator"" _stuff(const char (&arr)[N]) instead of operator"" _stuff(const char* str, size_t len);
 
5:02 AM
Because conventions.
And it's convenient for them.
 
@Rapptz You can have the template version that contains the source code characters, no? Something like operator""_stuff<"hello">, no?
 
@MarkGarcia No
@Jefffrey No
This issue is fixed in C++14.
There's template<typename CharT, CharT... chars> auto operator"" _stuff()
Which allows me to do "stuff"_stuff and query the size at compile time through sizeof...(chars).
 
Cool.
 
C++11 has template<char... Chars> but it only works with integers lol
it's very weird
 
@Rapptz A few weeks ago he left a comment saying he was having some sort of problem with his ISP that prevented him from using chat.
 
5:46 AM
Note to self: don't keep VNC connected when emerge is running so pty doesn't stupidly wait for lines to render sloooooooowly
 
Maybe potato & sock potatoes are blacklisted by SE
 
6:40 AM
@TonyTheLion @MartinJames I'm there a few days before hand, so Thursday & Friday would be good.
We're still working out what we're doing, so could travel a bit, but probably not as far as London
 
@thecoshman Orite. Anywhere in Midlands is OK by me. I'll drive there, find a B&B/hotel and make it an overnighter so I can have beer.
 
7:09 AM
okay, today I'll disable my mouse wrap script and see if I like it better w/o
 
This material design thing by Google doesn't make much sense to me.
 
7:23 AM
@MarkGarcia I think it's one of those abstract art things
 
Neurologist was pissed I wanted to do medical tests. This seems like a good sign.
 
also energy drinks are better than coffee :O
 
@MarkGarcia The only thing I know for sure is that loading that PDF is the hardest thing my browser has experienced in a while.
I can hear its voice in the background: "<sub>make it stop, please</sub>"
 
lol
 
I'm pretty sure your brain can parse that HTML better than the chat does.
 
7:28 AM
@MartinJames I'll have to talk the misses, she's got this crazy idea we should try to see my family
 
@thecoshman lol
 
Old college friend asked @betsyphd what kind of dad I was. She said "the kind with two bouncy houses". Well actually, now it's 3 (runs away)
I don't get it. Halp.
 
Belly? Don't know.
 
@BartekBanachewicz If you're in "MSYS2 shell" do an export PATH=/mingw64/bin:$PATH, or open a "MinGW-w64 Win64 Shell", which basically does that itself on startup.
 
@Jefffrey A google search for "bouncy house" yields this, among other sexually related connotations.
 
7:38 AM
@BartekBanachewicz What did you do?
 
> They have been marketed with such names as "Bounce House"
 
@LightnessRacesinOrbit @R.MartinhoFernandes yeah, re-read what I said about recommendations
we were talking about different things but my arguments were kinda weak anyway
I was wrong
 
Xeo
@Jefffrey You never heard of bouncy houses?
 
@BartekBanachewicz All drives are mounted as /<drive-letter> in MSYS.
Dammit I'm late to the party :-p
 
@Xeo Well, yes. But why should he run away?
 
7:40 AM
Going to install Arch on my work PC now. Wish me luck :-p
 
@Jefffrey Oh.
 
I might be an a rather arsie mood this morning. The sort of arsie mood that can results in little chats with a manager...
 
lol
So first day at the new job
 
user3010322
How is it?
 
Qualcomm? :P
Or perhaps AMD.
 
7:51 AM
Told everyone how awesome Haskell is?
 
Not yet
@thephd not started yet :p
 
user3010322
._.
 
Trying to get into the office
 
Is VS supposed to recompile everything if it can't find project's .PCH file?
 
> I have got a test task for C++ junior. Project - is an draft of an arcanoid, made using company's own game engine. My task is to complete the game. source
"Here, work on this abandoned project."
 
7:55 AM
@thecoshman What did the manager say?
 
these fish look evil. but it's not nice to say they are evil based on their species
 

« first day (1385 days earlier)      last day (3555 days later) »