« first day (2028 days earlier)      last day (2911 days later) » 

1:02 AM
yoooo
wtf
how am I the only one in here
 
omg I missed drama yesterday
 
oh there you are
I was worried the mods had evolved into mads once more
 
The FBI has harassed me for 6 months and is now threatening to subpoena for reasons unknown. https://blog.patternsinthevoid.net/fbi-harassment.html https://t.co/lmUsUTmMFs
huh...
 
oh my
that would suck
 
1:28 AM
what is the best compiler optimization?
3
 
that question doesn't make sense
 
actually putting -O2 on my compiler solve my problem on looping.
2
 
...are you serious?
 
-NO2 is for going very fast
 
1:38 AM
clang, when im looping on 200000 vetex
the compiler is sending me the xyz 2 times / loop
thanks for the one who help me about that
 
@CarloowLescano It's funny and sad at the same time because everyone that tried to help you suggesting AABB, bounding boxes, BVH and such assumed that you weren't completely dumb and were already with -O2 / -O3
 
yeah that was my bad too
when we checked the assembly code
we noticed that it doing crazy stuff
 
what code are we talking about?
 
bad code
 
code with the best compiler optimization
 
1:45 AM
what does -02 do?
 
@Charlie g++-trunk: error: unrecognized command line option '-02'
here, have some monospace
 
I was gonna say that
 
lol
 
-O2*
 
you can't move memory allocation outside the lock wtih std::*map<K,V,...> containers :(
 
1:47 AM
man g++
 
I wish I could create an object outside the lock, then insert can link it into place in the tree
 
what lock
 
the lock I use to protect it
 
how does that have anything to do with std::map
 
1:49 AM
generally it is a very bad idea to allocate memory while holding a lock, for obvious reasons, like page faults
@DmitriBudnikov it allocates memory in insert
 
I am joining a drone club, there are people who are making their own drones, lol
would be interesting to meet those people
 
operator new is thread safe why are you locking around it
 
and learn a thing or two
 
@DmitriBudnikov irrelevant. I still have to allocate memory while holding a lock with the stdlib map if I have to hold a lock to insert
 
your problem doesn't make sense
but then again given the VAST amount of information you are providing this isn't too surprising
 
1:52 AM
hm interesting, what does it actually do? -O2?
 
what problem. I am saying the api is badly designed because you have to allocate memory in the insert, you can't allocate memory outside the lock, then acquire the lock and call the insert api. obviously insert is not thread safe
 
obviously not
if you need thread safe insertion with fine grained allocation you use another container
 
the api could allow me to allocate a tree node outside the lock...
 
that being said there was a proposal to decouple node allocation IIRC (let me ask the oracle @Luc to confirm)
 
then pass it to insert to use
yeah, it fits into the current concurrency push
if you avoid doing big calls in locks, perf goes way up
lock acquire/release become one-loop cas
 
1:55 AM
The oracle has let us down
Anyway I do remember some kind of auto node = map.alloc_node() map.insert_node(node) thingy being proposed
 
yeah, that'd be exactly what I am talking about. glad to hear something might materialize in that direction
that was inspired by guys not wanting O(log N) + (crazy ass malloc page fault) lock duration
 
but then again you could also use your own container lol
standard containers are not known for their ~~great multithreaded performance~~
there's Boost.Lockfree and things
 
man this /02 option did wonders for me
why was I not informed earlier
 
it's fairly new
easy to miss
 
"/O1 and /O2 also enable the Named Return Value optimization, which eliminates the copy constructor and destructor of a stack based return value. "
 
2:08 AM
quick question, do I lose a reputation point for giving a downvote?
 
@Jfevold on answers. no penalty for questions
 
@DmitriBudnikov doesn’t ring a bell, but I tend to stay away from allocation
 
@LucDanton when you insert into a container, you have to be holding the lock that protects it, and when you insert, the container might allocate memory, so you end up holding the lock across a really long call to allocate that could be done ahead of time outside the lock
i.e. all my other threads are piling up in a lock convoy while insert plays with heap data structures and does page fault handling
oops disk I/O needed, crazy lock duration
in a way one might argue that insert has no O(log N) because malloc can take all day
the malloc implementation might require a lock so my threads queue up at the end of the lock convoy already piled up against the heap implementation
it's bad
 
Or insert might take O(1) after a while because the vector has already allocated enough memory (I don't actually know what you are talking about)
 
2:24 AM
@Mikhail >I am saying that if I have to acquire a lock to insert, and the insert might allocate memory, then all my threads are locked out from acquiring the lock until that memory allocation finishes, which is O(whatever malloc feels like)
if I could allocate outside the lock I use to protect my map, then I could do that while other things acquire/release the lock protecting the map
 
Yes, but it won't allocate for every insert, as a practical matter. It doesn't allocate every time in most std::vector implementations.
 
then the insert would be guaranteed O(log N)
 
If you have lock contention when using std::map you shouldn't be using std::map the end
 
you dont hold locks on data structures while you allocate memory, it is nonsense
 
Can't you over-allocate and avoid calls to malloc?
 
2:27 AM
if you do that, then your programs are pretend multithreaded
you would end up holding locks across everything and running sequentially
 
user406009
@Mikhail arena allocator = best allocator
 
I use std::map to hold big 10 megabyte things, so I don't have much std::map overhead... If you have truly massive std::maps pointing to lots of small elements you might benefit from a different structure to optimize the data locality.
 
all you need to do is make sure you only hold your locks when you really need to, and hoist unrelated delays outside the lock as much as possible, then you go in, do everything as fast as possible, and get out as fast as possible
code acquiring a lock should behave like a person running into a burning building to save someone inside. they prepare everything outside, and they should try to make the exit time be as close to the entry time as possible
 
I think most implementations of malloc might also require acquiring a lock.... so either way you need to hold some global malloc lock, I guess you avoid the lock in your code only to stall on another one from the os/libc/msvcrt
 
which is why you do it outside the lock you use to protect your data structure
other threads can get in and out lots of times while your malloc runs
 
2:35 AM
I'm still thinking the solution to your problem is to over-allocate.
 
let's say 3 threads piled up on the heap lock, and a page fault is happening for that page, now someone calls something that inserts, I acquire my lock, now all my threads are locked out until that page fault finishes and 3 threads ahead of me get the malloc lock
if I could do that outside the insert lock then there is no convoy, other threads get in just fine, just my thread waits for that page fault and heap convoy
yeah it won't help for all containers. you could allow implementations that can't preallocate to just return null object and make preallocated insert overload ignore it
to comply with iterator invalidation rules and performance upper bounds, implementations are pretty much pinned down to a few candidate data structures
the ones that guarantee never invalidating iterators are pretty much guaranteed to be individually allocated. I havent seen implementations that try to do better because malloc is already pooling and binning
 
@doug65536 that's why you do lock-free arenas
 
2:54 AM
I lost my drone
it flew to somewhere & I lost control
 
you can get fly-home controllers that autopilot back to you when you lose control
 
it didn't work
18 hours ago, by Telkitty
and comes with a crooked control so it's naturally flying towards the left
 
lol, obviously you have to calibrate your controller
 
control is a bit freaky to start with
:/
 
real planes have that too. it is called "trimming up the aircraft"
 
2:58 AM
:'(
I was wondering what those side trimming buttons do ...
I am so retarded
 
even without autopilot, pilots didnt sit there and hold the stick back... you setup the trim so the plane stays in the right configuration by itself
your inputs are just the difference from nothing
 
😰 😢 😥 😪 😭
 
no matter how hard they try, they would not be able to make a controller that does exactly the right thing because your craft is probably not perfectly balanced and it has to apply a constant input to hold steady state
that is why you center everything up with trim knobs
with modern drones you are basically flying the autopilot all the time. your inputs are just requests to the autopilot. it should be trivially easy if there is no wind
 
3:26 AM
^ Intro sounds almost exactly like the Beasty Boys.
 
So, If I have like 2k to spend on a drone, what should I get?
 
A good one :P
This clip is hilariously stupid :D
 
3:52 AM
I am 23 and what is this
 
#define Eegeo_DELETE if(Eegeo_LOG_ALLOCATIONS) {Eegeo_TTY("Scalar delete at %s :: %d\n", __FILE__, __LINE__);} delete
2
 
user406009
@StackedCrooked Just wait for him to do:
 
user406009
`if (x) Eegeo_DELETE blah;
 
muffled screaming echoes into the distance
 
What the fuck is that?
 
3:59 AM
^ Threads, explained.
Nice POV.
 
That depends on what you mean by thread
 
If I have to be traumatized then so do other people
 
4:55 AM
<dismissive comment> Saying threads are state machines is like saying rectangles are shapes, whats the point?</dismissive comment>
 
the top left corner
WvW rewards tune up, glorious
 
the who
@Mikhail Recall that computers are state machines
 
@DmitriBudnikov lmao they’re still at it
(???)
 
Subway in Tyria confirmed
> Every time I read stuff like this, I lose more confidence that the scientific method as currently applied, funded, and published is capable of truly conquering complex systems like the brain or nutrition.
how the fuck is nutrition related
Encore un commentaire au caractère infondé et anglophone.
 
5:36 AM
k I’m done writing a thing, do I let it rest and come back to review it later once I’ve taken my mind off it or do I publish early and let you fine folks review
 
Send it to arXiv! Then you can pretend you're a mathematician.
 
@DmitriBudnikov Everything is a state machine! *milks a giant cow from a mountaintop
 
@LucDanton let it rest
 
@LucDanton I always spam like crazy when publishing something
Does not work very well.
 
My software design has improved vastly since I began programming, yet I still can't write bug-free code to save a life. Maybe it's time to buy some pretty reference books to display on a bookshelf so that I can feel like a real programmer?
 
5:52 AM
Your first sentence feels contradictory.
Most of the code I write doesn't have bugs, but I also don't have tests.
 
Be more clear about what you're asking — nhouser9 Apr 24 at 6:32
it's clear enough — DOS4004 Apr 30 at 21:18
:snackoverflow:
 
> La SNCF investit dans Hyperloop
jelisquoi.CeCILL.jpeg
 
Outlining algorithms to solve problems comes quite easily to me. The issue is that I'm a jack of all languages and master of none. Usually when I have a problem, it turns out to be the result of faulty intuition about return values, behaviour of functions, and other language/library-specific details. Java leaves me chasing nulls, python nones, and C++ tends to be making a lot of mistakes with unfamiliar libraries.
 
Ven
@Morwenn sorry for last night :\
 
So even though I can code and enjoy problem-solving, sometimes I wonder if it's safe for me to be pursuing it as a career. I'd probably make a bad programmer and I'd feel bad leaving behind glitchy code ^^; end(self-doubting-monologue)
 
6:03 AM
@LucDanton hein
Si la SCNF pouvait investir dans la qualité de service ce serait bien
 
Ven
If you don't have tests and tell me "my code doesn't have bugs", you either write HTML, use Agda/Idris, are a liar, or consider aforementioned bugs "features".
 
@DmitriBudnikov nos mes impôts à l’œuvre
 
Yay, GitHub now has signature support.
Sadly, you cannot sign the stuff you put in "Downloads".
 
Ven
@Aaron3468 it's not a monologue, you're not alone in the room.
 
@R.MartinhoFernandes neat
 
6:05 AM
@Ven A soliloquy then?
 
@LucDanton non c'est privé mtn je crois
 
@DmitriBudnikov me semble pas (mais c’est compliqué oui)
 
@Aaron3468 Running into problems with nulls and nones sounds like issues with the algorithm design (it doesn't account for degenerate cases, perhaps?), not familiarity with the language.
 
> GCC and MSVC C++ Demangler
> This American web site is proudly supporting Donald J Trump for President 2016.
Are you saying that the standard doesn't define it for non class types, so as to bind to both lvalues and rvalues? Can you give more (all the) details by providing an answer? References to the standard itself would be appreciated. — skypjack 1 min ago
no I am too lazy
let me handwave the answer in a comment
 
@R.MartinhoFernandes I suppose. I was surprised when some python code was running incorrectly. It turned out that in addition to map() operating on a string as an iterable instead of an instance, that an append() operation returns None instead of a reference to the list. To me, those are both implementation specific, rather than flaws in the algorithm.
 
Ven
6:12 AM
@Aaron3468 sure
 
And that's a lot of what I spend my time debugging. When I was first getting acquainted with swing for java, I made the mistake of implementing redraw() but never calling update() to force a redraw, so the GUI would render, but do nothing. It kind of embarrasses me when I finally realize how simple those errors are, when I'd not have made them with better knowledge
 
Get used to reading docs.
 
or looking up stuff on SO
 
Ven
Is D really adding a complexity annotation to functions? O.o
 
I master concepts quickly, but I need to develop the skill to recall details before I've made a mistake so many times I can't help but remember. In short, I'm irritated with my poor study skills and it's time for me to figure out how. Thanks for the tips!
 
Ven
6:30 AM
If you think you master concepts quickly, I think you don't understand the concept of mastering
and I'm not saying to randomly be mean or fire shots. I'm saying that because "mastering" is a big thing to do.
 
AJA Pouilly-les-Nonains (c’est juste un nom ridicule, c’est pas intéressant sinon)
 
It's all good. Not much I can do to overcome my deficits by chatting about them. Sometimes it feels I'm chasing my tail; I start working on them only to realize years later that it hasn't improved them.
I acquire new skills quickly, but I've never been able to develop them much further than basic competence.
 
@LucDanton L'histogramme est intéressant
 
Ven
7:06 AM
@Aaron3468 if that can make you feel any better, i've been programming for around 10years now, and I just wasted half a day because I was editing the wrong file.
6
 
> Sadiq Khan pourrait être le premier musulman maire d'une capitale occidentale.
C'est Sadiq, Khan on y réfléchit.
 
Ven
0 .
 
sbi
I'm just leaving this here.
 
@DmitriBudnikov seulement si t’es Pouilleux
 
mhmhrf
 
sbi
7:17 AM
@Ven I kinda stopped doing this after the first decade or so.
 
And now you're blown away because you didn't know mumble translates to "ânonner" and that's a fantastic coincidence given this pun
next level humor I know
+puncoin 0.01 ptc
 
Ven
@LucDanton did u read da pun
 
7:38 AM
pls never mention it again
 
7:51 AM
it again
alors comme ça on drapeaute les messages postés en langue étrangère ?
 
Ven
yeah not only french. wtf?
 
:snackchat:
 
I am not sure neighbours were not slightly hostile when they learnt that I might lost my drone in their backyard, probably thinking I was spying on them.
 
Ven
8:07 AM
@fredoverflow ugh flash :[
@Zoidberg I have an amazing project idea for you.
@Zoidberg make debuggers work with optimized code by showing optimized AST ;D
 
OMG the ads on the DConf stream are loud!
 
Ven
okay, I'm back to a broken – but compiling program.
the worst part is, this is erlang, so not exactly a compiled language.
 
@Ven lol
 
Ven
:( the only thing the compiler said was "internal error"
 
ICEs, IDEs, what's next? IEEs?
I wonder what'd make an internal Esomething error.
 
Ven
8:21 AM
IEEs? Not of the 754 kind, I hope.
 
lol
 
> : note: template argument deduction/substitution failed:
brilliant diagnostic there g++
 
:D
g++ isn't very good at diagnostic messages
 
> Completely ad-free now! Enjoy the live stream without interruptions!
lol 1 minute after I saw that, the next ad starts...
 
@Griwes IME there's no such a thing
 
8:36 AM
And now the audio is gone.
gotta love technology
Ah it's back.
 
live ad stream without interruptions!
I wonder if live ads are a thing
like, a theater show made of ads
I'm sick
 
user1804599
@Ven Many compilers perform optimizations after converting ASTs to a lower-level representation, so that won't work.
 
lol kc
 
@Zoidberg Hm, this "Lowering" concept Walter is talking about right now sounds interesting. Have you ever done that?
 
user1804599
I'm not watching
 
8:42 AM
> rewriting ASTs to simpler, canonical forms
 
I WILL never update firefox again
 
I imagine rewriting a for loop to a while loop, for example.
But Walter did not give any examples.
Ah now comes an example.
 
piece of shit updates nothing great but only to disable my adblock
 
user1804599
That's called desugaring
 
Oh, while loops are actually converted to for loops :)
 
user1804599
8:43 AM
Which I have done, yes.
 
@fredoverflow Imagine rewriting them to more complex forms!
 
user1804599
My compiler converts module definitions into final class definitions with private constructors and static methods.
 
@Griwes Rewrite everything to monads!
 
I'd say something about exceptions and semicolons being monadic here.
 
Hello girls.
I'm back.
 
user1804599
@fredoverflow data ??? = Abstract | Final | Virtual
 
Ven
@Zoidberg you can show low-level representation instead :)
 
I want to know if anyone can think of an effective Matrix data structure that would allow fast access to both row and column vectors.
 
user1804599
@Ven I don't think showing LLVM IR is going to be much better than showing assembly code.
 
Ven
@fredoverflow it's almost the same thing as going from AST to IR :v
 
8:49 AM
@Owatch Flat array with row and column views?
 
Ven
@Zoidberg at least it'd be annotated (I'm sure you can generate that)
 
I've currently got a 2D array with row vector pointers.
 
user1804599
@Owatch hash table where the keys are (x, y) pairs and the values are cells
 
Which is nice, but when you want the Column vectors you suddenly have to create them.
 
Ven
would be one line in APL
 
user1804599
8:50 AM
Everything would be one line in APL
 
Hash table might be good. Thanks
 
user1804599
@Ven should I do S-expressions in my compiler?
 
Ven
you hate s-expressions.
 
user1804599
No how come you think that?
 
Because you hate Clojure? ;)
 
user1804599
8:53 AM
Clojure's problem isn't the program data structure
 
user1804599
It's the lack of types and the lack of the lack of special cases
 
So I can abandon my "Clojure, but with braces and semicolons" project? :(
 
Ven
Feb 8 '15 at 19:41, by рытфолд
I hate almost everything.
 
user1804599
Elixir is Clojure with do and end
 
Ven
and you hate Elixir, QED.
 
user1804599
8:54 AM
Yeah it's untyped. Not suitable for anything
 
Ven
also, I pretty distinctively remember you telling me you hate s-expressions, and you went and designed some kind of... other system
 
user1804599
That parses into S-expressions
 
user1804599
I hate the syntax of S-expressions. Not the data structure
 
Ven
sighs
 
Oh, the D compiler has a spell checker built into it.
 
Ven
8:55 AM
it better. every compiler does
 
user1804599
I once implemented an S-expressions parser similar to Elixir
 
user1804599
@Ven Python doesn't. Misspelled a function name haha good luck motherfucker you probably won't notice until production
 
Ven
which explains
Jan 14 at 10:49, by Madame Elyse
I hate Python.
 
user1804599
People who like Python haven't done three-year 50 kLOC projects in it
 
Ven
guido did!
Guido's so stupid he could've invented Go.
 
user1804599
8:58 AM
Guido is oblivious. He even wrote CPython in C
 
Ven
yes, otherwise he'd have had to name it something else than CPython.
 
user1804599
Clearly a masochist
 
user1804599
HaskellPython
 
Ven
ugh, I average 100 messages in this chatroom per day. Talk about productivity.
 
user1804599
So little
 
8:59 AM
@Zoidberg How much tests did you write in Python, Clojure and other languages? You usually need at least 50% test code.
 
user1804599
@fredoverflow 0
 
Ven
zoidberg never writes test.
 
Dynamic typing doesn't work without tests.
 
Ven
why not, zoidberg
 

« first day (2028 days earlier)      last day (2911 days later) »