« first day (1805 days earlier)      last day (3146 days later) » 

1:00 PM
oh hey, that wiki page has a BF interepreter in haskell there cc @AlexM.
implemented with StateT as well
 
what wiki page? I won't look at spoilers :<
 
@BartekBanachewicz Quite a few brainfuck implementations do essentially that internally, so N increments in a row turn into +=N.
 
@orlp 250 bytes of binary what? x86 instructions?
 
@AlexM. I don't think it spoils anything considering it's written imperatively
 
@Potatoswatter amiga
not sure what it uses
 
1:01 PM
C+plus?
 
user1804599
@Potatoswatter an inhabitant of type T is a value that has type T.
 
it's fun in that it uses (left, right, middle, program) as data structure
 
ugh
 
funny idea
 
is the flag spammer back?
 
interstella vibe
 
cpx
C+plus=Cplus
 
oh and it uses MonadWriter instead of MonadIO
 
1:04 PM
@orlp 68000? That was unexpected.
 
@AlanMachado I had to read that 4 times before I got it. -.-; — Borgleader 8 secs ago
Am I stil half asleep or is his sentence confusing?
 
@elyse Does piecewise_construct_t have another inhabitant besides piecewise_construct?
 
user1804599
 
@Potatoswatter m68k-amigaos, so yes
 
user1804599
1:06 PM
@Potatoswatter yes, copies of std::piecewise_construct.
 
@elyse Should I know who that is?
 
user1804599
it's Walter Bright who said that DMD was written not in C++ but in C+
 
@orlp ...or you can do it other ways.
14
A: Optimisation for a brainfuck interpreter

NemoWell, this is not C. And it is not an interpeter. So, yeah, pretty much totally inappropriate for this question. But what it is, is, a perfectly portable brainfuck compiler using C++0x variadic templates. You have to #define PROGRAM as a comma-separated sequence of C-syntax characters, becaus...

 
user1804599
Someone wrote an optimising Brainfuck compiler in sed.
 
cpx
Unless + in C is overloaded its NOT C++.
 
1:08 PM
@elyse I wrote a C++ metaprogram in sed, which iteratively took GCC error messages and fixed them. For a real database-oriented codebase. True story.
4
 
@elyse imo it has to self limit to only one instance.
 
@Potatoswatter Vigil is better
 
user1804599
Fuck memory addresses. Give each object its own IPv6 address!
 
error? Delete those lines
 
user1804599
@thecoshman that's the same thing.
 
1:10 PM
@BartekBanachewicz too risky I want to start with my own ideas and see what's what at the end
 
@elyse not really
 
user1804599
how?
 
and why?
 
your definition leads to accepting that making a global instance of a type is a singleton, if you don't construct any local version.
My definition means that you can only have that global instance.
 
user1804599
@thecoshman no
 
user1804599
1:11 PM
that's not how types work
 
user1804599
The type of integers inhabits 99 even if you never use the value 99 in your program.
 
stop using real knowledge @elyse
 
@Potatoswatter Cheers!
 
@elyse I didn't say you have to explicitly access said singleton
 
user1804599
Another way to see it: a singleton type has at least one value, and all values of that type are identical.
 
1:13 PM
the things you can do with the partial application stuff are fascinating
foldr (\ acc x -> acc ++ x) "" (map wordToBinString firstFour)
foldr (++) "" (map wordToBinString firstFour)
TIL they're equivalent
 
user406009
@AlexM. If only by "fascinating" you mean unreadable.
 
@AlexM. :)
 
Someone should write a C++ proposal!
 
@Lalaland I think the 2nd version is much more readable
 
How can we really say we have lambdas when there's no partial application?
 
user406009
1:15 PM
Theoretically, std::bind is fine.
 
@Potatoswatter how would you propose this looked like? there's std::bind already
 
user406009
But those stupid placeholders.
 
user406009
I would love a std::bind without placeholders.
 
@Lalaland If only by "fine" you mean unreadable.
@Lalaland double standards much? :)
 
@BartekBanachewicz Just put one expression after another, duh.
 
1:15 PM
@Potatoswatter that implies currying
 
> Our compiler is old. There are comments in the source from 1982
 
@MarcoA. repost
 
@BartekBanachewicz mine is better
 
@BartekBanachewicz btw, how do you name stuff in cases like when take takes less than the indicated amount, atm I'm doing it like
firstMaybeFour = take 4 ws
actualTakenByteCount = length firstMaybeFour
 
user1804599
@Potatoswatter closures and partial application are equally powerful so it doesn't matter which of the two you have
 
1:16 PM
does stuff like this collide with the Maybe thingy when reading
 
kinda
firstFourOrLess maybe?
 
that works
 
user1804599
let x = 1;
return (y) => x + y;
return ((x, y) => x + y).partial(x);
 
user1804599
last two lines are equivalent
 
I should really refactor this whole thing though
and make it work with the results of chunksOf
i.e. with chunks of at most 4 bytes
 
1:19 PM
@BartekBanachewicz All language semantics are equivalent to lambda calculus in the end. Given C++ with fundamental partial application, C++ without fundamental partial application is merely a subset dialect.
 
user406009
class Foo {
   int x;
   Foo(int i_x): x(i_x) {}
   int operator() (int y) {
      return x+y;
  }
}
return Foo(x);
 
@Potatoswatter I disagree with the first point
 
user406009
Objects are also equivalent to closures.
 
poor man's closures again
and poor man's objects
 
@BartekBanachewicz All imperfect, real-world implementations of Turing-complete languages are also imperfect implementations of lambda calculus.
Bah, I gotta go. Good night and good closure!
 
user1804599
1:23 PM
@Lalaland yes.
 
user1804599
classes are object constructors, and functions are object constructors
 
user1804599
struct T {
    T(int x) { }
    void operator()(int y) { }
};
 
user1804599
now T is a curried function!
 
user1804599
T(1)(2)!
 
user1804599
[] (int x) { return [] (int y) { }; } same thing ;)
 
1:28 PM
goggles on
template<typename T>
T &cute_singleton() {
	static T cute;
	return cute;
}

hdf_shock_provider *&provider = cute_singleton<hdf_shock_provider *>() = new hdf_shock_provider(key);
C++ level: ThePHD
 
user1804599
lol
 
user1804599
terrible
 
yes :3
 
user1804599
Bool in Haskell is a 2-ton.
 
you forgot bottom
 
1:34 PM
each chick is a single ton
my head hurts
 
user1804599
@BartekBanachewicz I don't care about bottom.
 
I think I'm going to start using GADT syntax for all my data declarations
Do you think it's a good idea?
 
no idea what is it
 
user1804599
Use F*.
 
user1804599
It has only GADT syntax.
 
user1804599
1:36 PM
:P
 
I'd like my autocorrect to deduce the language I'm writing in from the context
 
user1804599
Then you want OS X.
 
@elyse funny
 
@elyse It does it?
I need it in my phone actually
 
user1804599
@Mr.kbok Yes of course why else would I say that
 
1:38 PM
Sometimes you say stuff that makes no sense
 
user1804599
You could also be an annoying hipster, complain about how much autocorrect sucks, and then write text with shitloads of typos in it.
 
Are you thinking about someone in particular ^^
 
@Morwenn My reading of [list.ops] says it's not allowed to swap: 1) swap isn't mentioned in the complexity. 2) Reference and pointers aren't invalidated. Swapped objects are still valid, but it seems against the spirit of the spec.
 
@Mr.kbok Generalized Algebraic Datatype syntax
 
Jeebus, my pet rabbit just jumped on my chest and stuck his butt in my face
 
1:40 PM
That's how I say hello to my colleagues too
 
user1804599
@Mr.kbok no
 
data MyData = A | B Int

vs

data MyData where
    A :: MyData
    B :: Int -> MyData
 
yay I made the thing work with chunksOf
 
user1804599
no, I will target x86-64, not JVM
 
I still suck at haskell
 
1:41 PM
 
user1804599
that way I can properly implement greenthreads
 
I'm getting better at this
then again, I wrote the original code at 2AM after a day of work
 
@AlexM. don't worry this feeling will soon disappear :D
 
user1804599
@Mr.kbok What do you not suck at?
 
lol
 
1:43 PM
@elyse I think I'm good at C++ and making crepes
 
user1804599
learn more programming languages in your spare time
 
user1804599
it will open up your mind
 
I know I should
 
user1804599
do it
 
But I also want to build stuff
 
user1804599
1:44 PM
do them at the same time
 
You can't be efficient if you're learning
 
user1804599
build stuff in Scala
 
I tried with Hate, but if I want to make a fun game I'm going to be 20x faster with C#
 
user1804599
try F#
 
Yeah, I tried. I like it.
There's a huge gap, though, between getting stuff done and actually understanding the concepts
I made this "game" in hs
 
1:47 PM
@Mr.kbok C# has the huge advantage of you having actual experience in it
 
user1804599
.globl main
 
user1804599
because global was too long
 
@Mr.kbok ooooh
 
user1804599
@Mr.kbok lol generateBoard :: IO (Map (Int, Int) Int)
 
@elyse at the cybercafe, I pay by the char
 
1:47 PM
lolwtf Sehe still in code :D
 
yeah :D
 
what's a Sehe
 
(id %=) == modify
no need for that lens if you're not using it
doInsertCake :: (Int, Int) -> SampleState -> SampleState
doInsertCake cursor us = let group = groupCakes cursor in
    (group.group.group.group) (us & (grid %~ (insert cursor (us ^. nextItem))))
herp derp
 
Morning
 
the point in having State is in not passing it manually @Mr.kbok
specifically instead of taking us and doing (us & (grid %~ ... you could just do grid %= inside of MonadState
 
1:52 PM
You guys make me miss Haskell
 
> (group.group.group.group)
 
user1804599
I want to add the value [EBP - 8] to [EBP - 16] and store the result in [EBP - 16].
 
user1804599
'd that be like add [ebp - 16], [ebp - 8]?
 
1:54 PM
@BartekBanachewicz Nice
 
@Potatoswatter Yes, but std::sort has less constraints, so calling std::list::sort from std::sort should be valid.
 
@Morwenn std::sort is defined to use swap. list::sort is required by omission not to swap. I don't think either can call the other.
 
@Potatoswatter Implementations of std::sort freely copy and/or move stuff without copying them anyway. They might already break if a user-defined swap does something unexpected.
 
@elyse x86 only supports indirection on the source operand.
 
user1804599
oh
 
user1804599
2:01 PM
except for mov I hope
 
@elyse copy to register first vOv
anyway fuck x86
x64 is much nicer
 
user1804599
I target x86-64.
 
user1804599
I'm not going to bother with 32-bit targets.
 
I think that it's a given that a user-defined swap only exists to swap objects and for performance reasons. If it does something unrelated, then the one who wrote it should be the one to blame.
 
user1804599
of course
 
2:06 PM
@Morwenn Not sure what you're talking about. The algorithms cannot manipulate the sequence using anything besides swap, the comparison, and whatever else is specifically mentioned. Anything the user might define is constrained by e.g. [swappable.requirements] under penalty of UB.
 
@Potatoswatter I mean: I'll accept the argument if you can find me a reasonable case where using std::list::sort from std::sort might produce a result different than the one expected :p
Oh, I didn't check swappable requirements. You're right about that point.
 
What are the guarantees of std::sort about iterators?
 
@Morwenn std::sort has no way to re-link iterators, it can only navigate through the sequence as given and call swap.
 
Eh~, it would be great if its only guarantee was the post-condition std::is_sorted(begin, end);....
 
2:16 PM
ow ow ow ow ooooh....
 
I think I'm gonna use an SQL database for now
 
that odd feeling when you swallow some tea and can feel the warmth travelling down into your stomache
@BartekBanachewicz it's shit, but it works, so fuck it
 
what's shit?
I don't think RDBs are shit
 
what's specifically wrong with SQL?
 
@BartekBanachewicz I know, but I couldn't work out how to do it that way
 
2:18 PM
@thecoshman :)
 
user1804599
SQL is nice but has some warts.
 
I don't know what's wrong with SQL, but apparently we can keep coming up with better alternatives vOv
something about webscale or some such nonsense
Can some one translate these silly times units, fancy supper eclipse
 
what about a operational language for RDB's based on XPath?
that must already exist.
 
huh?
you mean like... a table with an ID column for XPaths?
 
@thecoshman like what
 
user1804599
2:23 PM
datalog master race
 
@BartekBanachewicz I don't know, I don't really care much about all this db hipster stuff. I've never really need to look into it too much beyond "that's a db, it'll do". If I ever need to seriously think about a db system, I'd rather have someone else do it for me, it sounds so painfully boring.
 
@thecoshman so, to sum up, you're saying things about things you have no idea about just to keep the chat scrolling
 
user1804599
funfact: in JS you can increment a finite number a finite number of times and can eventually reach infinity.
 
@BartekBanachewicz no, I'm repeating heresy
 
@Potatoswatter From what I read, std::sort isn't required to use swap though. It only requires its iterators to satisfy the requirements ValueSwappable so that std::sort can use swap.
 
2:26 PM
@elyse proof that infinity is finite!
 
@thecoshman I suppose ignorance can be blissful alright
 
@BartekBanachewicz seriously, stop taking everything that is said as if was some sort of scientific paper
 
@thecoshman that's very, very far from requiring a minimal amount of "why" when someone says that something is shit.
 
@BartekBanachewicz nah, just roll with it bro
 
user1804599
> 1.7976931348623157e+308 + 1 === 1.7976931348623157e+308
true
 
user1804599
2:28 PM
> 1.7976931348623157e+308 + 1.7976931348623157e+308
Infinity
 
@thecoshman I can see why your career is going the way it is.
 
@BartekBanachewicz no you can't, all you can see is the inside of your own ass
 
1:0
yaaaawn almost weekend
 
yay, two days to further my poor sleep
maybe I should just get some pills... something that can actually make me sleep when I am sleeping
 
@BartekBanachewicz H-2
my head still hurts
not sure if alcohol will help
 
2:31 PM
@Morwenn It's not allowed to use MoveConstructible so what else would it do?
 
Wait, actually, I'm pretty sure whether it will :/
 
> *first shall satisfy the requirements of MoveConstructible [...].
Looks like it's allowed to.
 
user1804599
 
sweet, I was able to turn my decoding thing also work with 5 byte chunks by turning the compressed nulls into their longhand form intercalate longhandNulls $ splitWhen (==122) cleanBytes
haskell is ezpz
 
hmm FTGL looks cool
I wonder whether I could use it
 
2:37 PM
@BartekBanachewicz is there a way to still use something like a fold when you need essentially two accumulators? for example
wordsBackToInt :: [Word8] -> Int -> Int
wordsBackToInt [] _ = 0
wordsBackToInt (w:rest) cnt = ((fromIntegral $ toInteger w) - 33) * (85^cnt) + wordsBackToInt rest (cnt - 1)
this could have been a foldl except for that cnt which gets incremented on each op
 
@AlexM. you mean a pair of accumulators?
 
oh yeah I can use a tuple
lemme see
 
user1804599
fap
fap
fap
 
@Morwenn Ah, didn't know that. So sort is allowed to use extra memory. New since C++11.
@elyse is that a slow fap?
 
user1804599
2:42 PM
fapfapfap
 
user1804599
fffaaappp
 
@Potatoswatter The only restriction that seems to be in the way is the global restriction that algorithms should not modify the container.
@elyse I shouldn't be laughing xD
 
I have a small problem in vim here
Whenever I select a YCM suggestion(of a class member), an extra split opens up at the bottom
 
user1804599
try the YMCA suggestion
3
 
shit
this library uses gluTess*
which are fixed pipeline I think
fuck
 
2:47 PM
@BartekBanachewicz lol, the erm... not to recent past called, they want their old shit back
 
@elyse heh
 
@Morwenn hang your head in shame, no, the other head!
 
I think where you say UB you mean IB? Because no one should ever shrug off UB. — sehe 2 mins ago
 
@bluefog disable it? Or move it to the top? What is the problem?
 
2:55 PM
@sehe Can I stop the extra split from coming up? Right now I have to switch to it and close
 
Yes.
 
@sehe How?
 
It's in the faq. :help youcompleteme-faq - very informative
 
@EtiennedeMartel asshole
 
@sehe thanks :)
 
2:58 PM
I can't think of ways to explain it any better :)
It's a well written faq entry
 
> They talk all day long of how, "We're all in this together" but if you don't bow to the great altar of their vast knowledge and beg them for permission to question what they believe you are suddenly the enemy.
This guy really hears himself talking and thinks "yep, it's all good"
 

« first day (1805 days earlier)      last day (3146 days later) »