« first day (2239 days earlier)      last day (2709 days later) » 

user1804599
3:00 PM
funfact Death Stranding is an indie game
 
Ell
I would like to try brewing
 
It's probably a case of premature optimization. Compilers optimize this, as you can seesehe 8 secs ago
Woot
 
Ell
Hmm. I'm not sure how to test whether my foldl is actually a foldl :V
 
Ven
..?
as opposed to what, a foldr?
just use an operation that's not commutative (like /).
 
Ell
as opposed to a foldr yeah
@Ven oh yeah ofc.
 
Ven
3:09 PM
ez way
 
user1804599
@Ven associative
 
user1804599
Commutativity can't distinguish foldl from foldr.
 
user1804599
foldl (<>) = foldr (<>)
 
@Ell did it workeded
 
Ell
@LucDanton Nope :P
I'm working on it though :3
 
Ven
3:19 PM
@rightfold of course it can.
@rightfold try foldl (/) 3 [1,4,8] vs foldr (/) 3 [1,4,8]
 
Ell
/ isn't associative either though
so that doesn't show much
 
Ven
..?
what doesn't show much?
 
Ell
it doesn't disprove rightfold I mean
 
Ven
ah
 
user1804599
(/) is neither commutative nor associative, so it can't be used to distinguish commutativity-sensitivity from associativity-sensitivity.
 
3:20 PM
my pizza arrived
and it's so good I forgot I wanted to take a pic until I was 50% done
 
Ven
omg cheese
 
user1804599
One difference between stock foldl and foldr is argument order to the step function, but that may not be the case in Ell's custom fold.
 
user1804599
And it's no requirement for the functioning either. For example, in JavaScript, the step function receives the accumulator as its first argument for both reduce and reduceRight.
 
And here's a generalized version of method3 for n-dimensional arrays. Observe how clang still optimizes to the same assembly for the OP's sample. Zero loops. — sehe 1 min ago
 
Ven
@rightfold to be fair, you don't often stumble on operations that are associative but not commutative, but yes
 
3:22 PM
Woot. Godbolt is aweseome again
 
Ven
@sehe goddamn clang is impressive.
 
It is. Mucho
 
user1804599
@Ven You do, you just don't tend to care about these properties in those cases.
 
I wonder whether GCC happens to be built with the wrong preset arch for -march=native
 
user1804599
A common example is (a + b) / 2.
 
Ven
3:23 PM
@rightfold when a tree falls in the forest..:)
yeah
 
nwp
It is almost 2017. Why can I not have std::variant?
 
Ven
What not
 
@Ven every single time you use floating point numbers. a*b*c != c*b*a
 
Ell
@nwp #define std boost ;)
 
ew
 
user1804599
3:24 PM
@Ven dat a french proverb
 
Ell
and then don't use any std stuff xD
It was an attempt at a joke but there are far too many ways for that to go wrong that it's not viable even for a joke.
 
Ven
@sehe fuck IEEE 754 then? :P
 
if you're in a lazy environ
 
:iguess:
 
foldl and foldr on infinite lists should do infinite loop differently
 
3:26 PM
@Ven calm down Frenchie
 
i.e. folding left to right should do some operations
right to left should do none because infinite list end
 
user1804599
@AlexM. foldr f z replaces : by f and [] by z in the list, and this works on lazy infinite lists.
 
user1804599
foldl f z does auto r = z; for (auto x : xs) r = f(r, x); return r; which indeed doesn't work on infinite lists.
 
user1804599
Mnemonic: : is right-associative, hence foldr respects its structure.
 
user1804599
Example: foldr (@) z (1 : (2 : (3 : []))) = 1 @ (2 @ (3 @ z)).
 
3:33 PM
In my current Cookie Clicker game, clicking the big cookie yields 14.882 septillion cookies at this moment. Hmm.
 
Ell
@Griwes close it
remind yourself of how things can disappear instantly, regardless of how much time is put into them
:O
 
nwp
@Griwes CTRL + W makes it go faster
 
@Ell Why do you not like C++-related accidental values? :(
 
Ell
I didn't know it was c++ related :P
 
...ISO/IEC 14882, you badlet.
 
Ell
3:40 PM
I don't really do much c++ anymore
 
love.
don't live here anymore :(
 
Ven
? ;o)
sehemo?
 
I don't understand what happened to firefox in the last updates
if you let it sit idle then come back you get horrid lag
for like 30 sec
 
0
Q: how many v8 isolates can I create?

Eduard BondarenkoI just constantly create v8::isolates in a loop, but something going on when we reach 80%. I cannot create more isolates and receive this weird OOM message. 1723 is the i value in a for(int i = 0...) loop. We have memory to continue create isolates. So what the problem ? Thx.

... what?
 
Ven
he looks 13
 
3:55 PM
1723 is beautiful number. Prime, of course. I'd keep it — sehe 9 secs ago
@Ven That would be very appropriate ^
 
Ven
upvoted already. :P
 
:)
 
Ven
It does ask the question "how do you keep a number". A leash? A jar? A bowl?
 
@sehe Nice
 
@Ven Just, don't return it to the available pool. Nobody else gets to get 1723 isolations anymore
 
Ell
4:04 PM
@Ven a phone book
 
Ven
@Ell 1723 doesn't look very much like a phone number though. :P
It'd probably feel alone there.
 
Ell
yes :P
 
Ell
4:21 PM
Idris is ignoring my Show instance :(
 
Ven
:/
you can make it explicit with %instance
 
@LucDanton ah mais je connaissais en fait
 
Ell
@Ven doesn't want to work on the repl :P
oh well
Idris does indeed seem to be quite buggy :V
esp the infinite recursion that I get in my compiled module but not on the repl
 
4:37 PM
what's up nerdlets
 
Ven
yo
 
I Ven I missed you.
go back to discord Ven. we love you
 
Ven
i sure believe that
 
Ell
*Bifunctor> main
io_bind (prim_write "\923\"a\".\955\"z\":\"a\".\955\"s\":\"a\" \8594 \"a\".\"s\"\"s\"\"z\"\n")
        (\__bindx => io_pure ()) : IO ()
I don't get this.
It sees the definition of main plainly
but :x main never terminates o.O
I'll have to ask on IRC
 
user1804599
 
@Ven I, for one, want you back there.
 
Ven
@bitcode you weren't even there then :c
@rightfold you linked it to me twice already =P
along with the compile-time-checked null return
 
user1804599
5:25 PM
It was posted today
 
5:50 PM
0
Q: Python module for longlong types

markSxI'm trying to make a int64_t module for python because python doesn't have a long long type. I found one in ctypes but I can't use it. So, I have embedded an intro in my application so the best way is to create a module that returns int64_t from c++. PyObject *Py_int64_t(PyObject *poSelf, PyObje...

 
> This is unacceptable, currently installing D3, how could the game not be up 3 hours before launch […]
 
Ell
@LucDanton how could the rocket not be at mars 3 hours before launch!?
@Ramy ?
 
 
1 hour later…
7:31 PM
@R.MartinhoFernandes say, I meant to ask you the other day but where did you find the 'what is five’s ordinal?' problem? did you come up with it yourself? it’s a really fun one and I’m sure I’ll be hanging on to it
 
user1804599
@Ven I wrote yet another type checker! :D
 
@rightfold How do you write them so fast.
I'm still working on mine. DDD:
 
user1804599
7:49 PM
@ThePhD good tools and competence
 
user1804599
Also this is a really simple language :P
 
@ThePhD Simplifying the problem to the point that it's trivial. Note that I don't think this is necessarily a bad thing--in fact, when you're defining a language it's what you should generally be shooting for. Rules that are easy to verify are likely to be easy for a user to understand as well (though that's not absolutely guaranteed).
On the other hand, if you start with an existing language, you're kind of stuck with its existing rules--and those may be a lot more difficult to enforce. Then you get languages like C++ that are so difficult to parse that even getting to the point that you can start working on type checking is a massive amount of work.
 
The Electoral College strikes again
How do people still play along in this :/
@LucDanton friend of mine posed it to me
 
One of the guidelines in the first edition of Effective C++ (back in the 90s) was to always declare destructors to be virtual. It's kinda amazing how things have changed.
Compare that agains the really expert-level guidelines of Effective Modern C++
 
8:11 PM
-4
Q: Translate scala to C++

kfklnkldnI am wondering how i would be able to translate the following scala code into c++? type Pos = (Int, Int) // a position on a chessboard type Path = List[Pos] // a path...a list of positions import scala.util._ def first(xs: List[Pos], f: Pos => Option[Path]): Option[Path] = { if (xs == Nil) { ...

/cc @fredoverflow @Mysticial
 
8:29 PM
good evening
i'm searching for information on evaluating port usage on modern Intel microachitectures
is it going to be a good question if i ask "what's the optimal value of the port usage statistic in vtune analyzer"?
might get closed as opinion based
 
@R.MartinhoFernandes Well, addmittedly this can be viewed as an attempt to fix the broken voting districts... :P
Also the ethics advisors of the last two presidents kind of implied that unless Trump does a thing with his things, the College should not vote for him...
 
Lel Electoral College listening to anyone
 
8:46 PM
I have started using FF's Reader View and I find it rather helping when pages are full of ads etc.
 
user3790646
8:57 PM
Hello everyone.
 
user3790646
Is the Lounge<C++> Discord group still active? :)
 
user1804599
@StackedCrooked Declare all classes as final.
 
user1804599
Did you know inheritance causes AIDS in children?
 
user1804599
final saves lives.
 
	(9)  Nutritionally, hundred dollar bills are equal to ones, but more
	     sanitary due to limited circulation.
 
9:41 PM
@Mysticial Is it unusual to have a lot of iTLB cache misses? I see it when I run perf on my test app.
I means that the code is spread out over to many pages. Which I find weird.
If I remove some of the tweaks it becomes 40% slower but iTLB miss rate drops to 10% and idle-front-end cycles remains at 50%.
I don't understand why the faster code has more iTLB misses.
Perhaps it's caused not by my code but due to context switches or something.
The test application is a network emulation that runs TCP a flow at 40-70 Gbit/s.
 
have some lols before bed
 
Ven
@rightfold congrats )
@ThePhD experience.
Rightfold is a veteran.
After you wrote these a few times they don't seem like a mystery at all.
 
user1804599
10:16 PM
SCAN INITIAL n SUBSEQUENT n + ACCUMULATOR INTO OUTPUT STREAM total
 
Ven
Reminds me of common lisp's LOOP
 
user1804599
CREATE INPUT STREAM load double precision;
CREATE OUTPUT STREAM warning text;
CREATE REACTOR load_warning AS
    FROM load
    WHERE load > 8.0
    SELECT 'High load: ' || load INTO OUTPUT STREAM warning;
 
user1804599
10:34 PM
The awful syntax is part of the fun.
 
user1804599
I'm going full ThePhD.
 
@StackedCrooked do you remove filesystem from coliru's version of boost?
Ah, you allow the header but don't link against it.
 
user1804599
Pass a linker flag.
 
Any chance you could share the linker command I would need?
I don't have a clang VM handy
 
user1804599
Pass -lboost_filesystem to clang.
 
user1804599
10:42 PM
Maybe also -lboost_system.
 
Awesome. Thanks rightfold.
I'm trying to reproduce this bug: svn.boost.org/trac/boost/ticket/12311
But apparently a bad path isn't the right kind of error.
If any of you have any ideas of other ways to artificially make the directory_iterator fail, let me know.
Here was my starting playground: coliru.stacked-crooked.com/a/6aa2ed4d02f97ad5
 
user1804599
@Ven OMG I'M DYING XD
 
user1804599
sauce pl0x
 
Ven
https://t.co/bD0Xmwi2zD
 
10:51 PM
In my library std::map<key, value> has an _mRBTree a non template type that provides the operations for the map type. How is _RBTree able to assist the map<K,V>?
 
user1804599
Profunctor optics are pretty badass though.
 
Ven
Has anyone talked about removing arr from the Arrow typeclass? (It's technically not a breaking change because nobody actually uses Arrows.)
@rightfold :D
 
user1804599
Arrows are just strong profunctors that are categories.
 
user1804599
11:26 PM
@Ven PureScript has subtyping, and this can be used to deal with JavaScript events for example: try.purescript.org/?gist=76cf412981c0b28767138852adf4326b
 
user1804599
:P :P :P
 
@StackedCrooked fairly sure their actual recommendation was "declare your destructors virtual if the class has a virtual member function", which is a decent rule of thumb even today
sure it's not always necessary nor sufficient, but if you're aware of the consequences, you don't really need "rules of thumb" anyway
also disregard final, its pointless
 
Its pointless what?
 
if you have to enforce stuff so people won't do stupid things, they will do them anyway
and given the language we're talking about is C++, the target surface is huge
 
@milleniumbug Correct. Effective C++, 1st Edition, item 14: "Make destructors virtual in base classes". Most obvious place it's really obsolete: Item 2: "Prefer iostream.h to stdio.h".
But hey. In 1992, none of us had headers without extensions on them...
Oh, and yeah: Item 50: "Read the ARM". The ARM is clearly ancient history now (though the general idea of "read the authoritative reference on the language" really isn't obsolete at all, so this item was just a concrete class derived from the correct base class).
 
11:57 PM
Does not work is fantastic explanation. Do you mean that your PC explodes every time this line is compiler? Does your cat start running around your home? Or may be there is delicate sound of thunder? — SergeyA 3 hours ago
so stealing that
 

« first day (2239 days earlier)      last day (2709 days later) »