« first day (856 days earlier)      last day (4318 days later) » 

user142019
21:00
Eliminating need for overly verbose and stupid visitor pattern.
As an C++ outsider, I'm curious, has C++ reached its final version, or are they still adding new features/APIs/syntax to the language?
user142019
I think of C# vs. Java as that C# is made for productivity and Java is made for compatibility with UML.
@ŠimeVidas They are and there is no final version.
user142019
C++11 is the final version.
21:03
for example I am hoping to get isocpp.org/blog/2012/11/…
user142019
It's the version that introduced final.
@ŠimeVidas - seriously, with the multicore trend, C++ will continue to evolve.
user142019
Use Erlang if you need concurrency.
Is anyone familiar with Haskell?
user142019
Yes, me.
user142019
21:05
And Cat and Robot and Fred too.
How much money do you think Kickstarter gets from failed fundings?
user142019
Maybe sehe. I don't know for sure but he has a paper copy of Learn You a Haskell for Great Good!
@Rapptz enlighten me
user142019
@Rapptz not enough.
@Zoidberg map :: (a -> b) -> [a] -> [b]
What exactly does that mean?
21:06
@DeadMG I find it weird that you're suddenly so keen on drinking beer while a few months back you kept explaining how alcohol is bad.
Granted, I don't know how Kickstarter actually works.
I understand for example head :: [a] -> a
Functional languages are like AI - they've been promising to take over the world for at least 30 years.
Xeo
Xeo
@Nils Map from a function and a list to a list
But when a project fails the people who started the project get no money
21:07
it maps a list of anything to anything
Xeo
Xeo
Basically, std::transform.
user142019
@Nils It means that map is a function that takes an (a -> b) (which is another function), that returns a new function that takes an [a] which returns a [b].
So what happens to the money that was backed but ultimately failed?
@EtiennedeMartel My "drinking" isn't anything like your drinking.
Does Kickstarter keep it?
user142019
21:07
It's the same as map :: ((a -> b) -> [a]) -> [b].
these two bottles- my whole night's worth- are 330ml each.
@Rapptz Refund it.
user142019
Another way to think of it is that map takes two arguments: an (a -> b) and an [a].
ok
thx :)
Kickstart doesn't get any of the project money.
@DeadMG Back when I was drinking regularly, it was no more than one beer a day
user142019
21:08
@Nils But strictly this is not correct.
I AM OUT OF BEER
user142019
Functions in Haskell always take exactly one parameter.
@EtiennedeMartel I have way less than one/day average.
@DeadMG ah ok
it's just that on occassion, I buy a few bottles, stick em in the fridge.
21:08
@DeadMG Same here.
and spirit
Heck, I don't even drink that much anymore.
@Zoidberg What about a function that does nothing but, I dunno, return pi?
user142019
@DeadMG not called a function.
user142019
That's a constant. :P
21:09
only if it's a constant that Haskell can determine entirely at compile-time, no?
the only thing I have left are two bottles of wine IIRC
I mean, I know that Pi is, but in the general case.
user142019
@DeadMG functions are pure, think about it.
user142019
Functions are pure, and you don't pass any arguments.
user142019
It must be a constant.
21:10
@DeadMG And anyway, the point is: why drink now? What changed?
@Zoidberg Right, but you still have to call a function get it.
user142019
(Yes there is unsafePerformIO but that's a special case.)
user142019
@DeadMG nope.
@EtiennedeMartel I found that the local shop sells a tasty brand.
user142019
pi = 3.14
user142019
21:11
Ohhh like that. :P
user142019
Well, implementation-defined.
user142019
GHC would inline this assuming it's not written by idiots.
@EtiennedeMartel It's counter-intuitive, but a drink or two can get you out of a rut.
user142019
But if you have a "function" that takes no arguments and doesn't use the IO or ST monads, and doesn't call any FFI functions then it must be a constant.
user142019
(Or bottom, but nobody cares about bottom.)
21:13
@DeadMG But, you hated beer a few months ago.
Anyway. Welcome to the club, I guess.
user142019
If a function doesn't return IO a then it's a pure function.
user142019
Assuming no idiocity like bottom or unsafePerformIO or bad FFI APIs.
@EtiennedeMartel Hencewhy he noted that it was tasty.
Can't turn down deliciousness.
@ThePhD Looks like he's growing up.
Gettin' some hair on his chest.
user142019
21:18
Generally anything of the form f :: a can in theory be evaluated at compile-time except when a is IO a or when unsafePerformIO or the FFI is used.
@Zoidberg implementation defined? is Haskell standardize is there another compiler than ghc?
user142019
Rephrase your question in English please.
Or in Dutch. :D
Is there another compiler than ghc to compile Haskell?
user142019
I know of Hugs and UHC.
user142019
21:19
There is Fay which compiles a subset of Haskell.
user142019
And a Haskell implementation for the JVM which also compiles a subset of Haskell.
@ThePhD Losin' some taste buds in his mouth.
Hm.
ah wiki says: "The language has an open, published specification,[18] and multiple implementations exist."
I wonder, if your tongue started rotting,
could you taste it rotting?
21:21
@ThePhD I think so, because the taste buds probably wouldn't be rotting all at the same speed.
i dont even care if it's c or cpp :) I just wonder how to get XCode to net complain about it. I always use the g++ (gcc) compiler. I already tried setting the file language to "c++" in XCode but it didn't change the fact it's complaining. — androidavid 36 secs ago
...
That'd be one hell of a torture.
Rotting your tongue from tip down to your throat.
And you have to taste it while it rots.
Man. I'd quit life after that.
you would for sure be able to smell your tongue rotting, not sure if you would actually taste it
you'd probably get used to the taste of it as it's progressing, the smell will be another matter since that isn't in constant contact with the odor of your mouth
@DeadMG: Your ArenaAllocator's destructor is recursive, and when I allocate large amounts of things, the destructor stackoverflows.
(I'm not yet claiming this is a bug that needs fixing, I'm looking at how the destructor works and still considering use-cases)
@MooingDuck The ArenaAllocator's destructor shouldn't do anything.
21:26
@DeadMG you're right, it's the Arena class itself
let me just pull up the file
and the MemoryBuffer's destructor is recursive
Hey @Ell, Cicada was able to build both Engine and Minicraft and run it successfully. I've uploaded fixes, and now it compiles under VS2012 just fine. Give it a try tomorrow and let me know how it went. Cheers! :)
Arena concept + ArenaAllocator? I've seen that elsewhere :)
yeah, I didn't define the MemoryBuffer's destructor.
in principle, it could be tail-recursive, I think.
you'll just have to edit the Arena class to manually loop through the list and destroy everything
21:28
@DeadMG that's what I was thinking
another thing I'd recommend is altering it to expand it's allocation size, so that you need fewer allocations
lets see.... BufferSize is hardcoded. Might want to make that a template with a default parameter?
or more complicated and maybe slower, make the first one like 1k, and each subsequent one 1.5x bigger? slower per call, but fewer allocations too...
Why is it that the answers that go "pass by reference" always seem to get 6+ votes
@MooingDuck It won't be substantially slower to allocate more.
@MooingDuck I did in a previous version.
> The whole problem with the world is that fools and fanatics are always so certain of themselves, but wiser people so full of doubts.
21:35
@DeadMG I was merely thinking there might be a penalties in runtime-sized-buffers.
Figured I could wave my e-peen around by quoting Bertrand Russell.
@MooingDuck Not really. Just allocate a buffer of (base * 2) + sizeof(MemoryBuffer) and place the MemoryBuffer in the beginning of that buffer.
then it will have exactly the same memory properties as the existing solution.
@DeadMG true
@DeadMG actually, with usage not at the end of buffer, you might get slightly better cache coherency.
nah
user142019
Hi.
21:37
the hot memory inside buffer will almost always be in the middle.
and the main case where it won't be will be when that chunk is full, and... it's at the end.
you can't get a coherency advantage by moving the positions of the data members
oh, looking again, you're right. The rest of the members of MemoryBuffer you don't touch often
(except that I put next and usage on the opposite sides of buffer, which was bad for this).
but that's a real micro-optimization
@DeadMG oh yeah, big time
but right now I'm trending towards using the arena for basically all memory allocations.
it's just so ridiculously efficient for working memory
Heh, I was only allocating 1024 nodes, each was... 28 bytesish
21:40
ah, well, even the old design's BufferSize would be enough for that.
@DeadMG don't make the mistake of using it for vector :P
there's no mistake there
@DeadMG wait, how would this help vector at all? I can see how it would waste a bunch of memory, but I see no savings
the efficiency of the arena is in it's excellent allocation and deallocation speed.
it can improve efficiency in any case where you're allocating "working" memory that can all be deallocated simultaneously.
although admittedly, vector will only take a few reallocations to rise above a size where the arena would really be helpful.
So, it's (roughly) like doing math on a napkin?
21:43
but for many smaller vectors, you could still be saving many allocations.
When you're done with the space, you just throw it out all at once?
yes
22 hours ago, by Cat Plus Plus
I'm a napkin
it makes allocation and deallocation ridiculously fast
Doing math on the Cat?
21:44
and wastes virtually no space except alignment requirements.
I've seen that strategy used for an allocation pool.
the trick has many names
user142019
I wish mobile platformed had Erlang APIs.
@DeadMG its initial allocation is no faster than vector's, and the first few resizes might be faster, but it wastes a LOT of memory. It's far more efficient to simply .reserve(1024) on the vector.
in, I believe, Smalltalk or Simula or something like that, it was called a "region".
user142019
21:45
Would be so fucking nice.
@DeadMG oh, I see, many small vectors. Yeah, that works
for example
user142019
while example
I have many places in my analyzer that are like, 1 vector per function, 1 unordered_map (uses vector internally) per type you make array of... etc.
do...while example
21:51
for(;example;)
Who the fuck decided it would be a good idea to give charmap's window a fixed size?
user142019
Reminds me of select folder dialog.
is hell++ better than hell? or even more hellish? (motto)
user142019
Haskell is Heaven++.
21:55
depends what you want from heaven
buhhhhhhhhhh cvs so slow
dunno why we haven't switched to Git or Mercurial...
manually merging changes/patches with winmerge is better than cvs
@R.MartinhoFernandes Well, damn.
My ass is now officially a desk chair.
user142019
Except inverted.
user142019
@ShotgunNinja You use CVS? ಠ_ಠ
21:59
perverted?
posted on February 18, 2013 by Eric Battalio

Welcome to In the Community. This week, meet Tom Serface, C++ MVP and longtime Visual C++ user. I have been using VC++ with MFC since it first came out circa 1993 and I saw it demonstrated at a local Software Development show. I've been working for Rimage Corporation for just over 25 years developing software to make our optical disc publishing hardware work. My software is mostly written in


« first day (856 days earlier)      last day (4318 days later) »