« first day (2048 days earlier)      last day (2892 days later) » 

12:00 AM
Is there some online-valgrind-ish tool?
 
@NaCl which compiler? gcc has some good self-analysis options --sanitize=address for example
 
@NaCl Presumably you don't mean: "Can I download valgrind?"
 
@JerryCoffin My gosh, how many ways of file i/o are you guys familiar with
This one looks really concise - but let's see if the other one works first haha
 
@OneRaynyDay there are a few more ways, if you allow C
and platform specific stuff
 
@OneRaynyDay Old lines about shaking sticks come to mind.
 
12:02 AM
Nope, I got valgrind, but the usage drives me crazy right now, because of the glibc debug symbol compression
 
@NaCl you mean omitting stuff?
 
Almost surely, yes
 
@doug65536 Ah - there's an interesting behavior difference between what I wrote and what you wrote:
Mine omits ASCII of 32's. Strange but it's there
 
this is basically what I suggested with the vector. this is the last thing Jerry mentioned I think
but I'd call .data, not take the address of [0]
this probably fixes space (ascii 32) issue
don't miss the std::ios::binary
 
12:11 AM
@doug65536 right, I just added the ios::binary flag, forgot about that. And yep - I'm first trying the way you suggested
 
@doug65536 Actually, I was refering to this mail-archive.com/debian-bugs-dist@lists.debian.org/…
 
@NaCl valgrind is actually fairly painless to build from source
get bleeding edge version
 
I got it, got the same behavior
version was the one from SVN today
 
maybe possible to relink libc using --whole-archive and not have compressed debug symbols
good luck though. every trick in the book is in effect on glibc
 
gawd, so I assume there is no such thing as "online memory analyzer"
this is awful
 
12:23 AM
you can build the library and change the link options, if you really had to
then LD_PRELOAD force it on your program
is it feasible to spin up a vm with an older linux distro that had uncompressed symbols?
 
not really
 
k
 
12:43 AM
@NaCl g++ --sanitize=address finds a lot. does it not abort out with detailed stacks?
do you know you have a use after free or something?
 
It's okay
Thanks for your effort
 
> I have wet dreams on ruby on rails
^ Coliru feedback.
 
coliru is implemented in ruby?
 
yeah, but not with rails
it's using sinatra
 
@StackedCrooked Hmm...so that's saying: "throw away ruby on rails, and wear rubber gloves while you carry it to the garbage can"?
 
12:47 AM
does it get a lot of load? I'm curious how many MB it transfers per month or whatever
 
@StackedCrooked yo, just want to thank you for your awesome webservice
 
It's mostly CPU load caused by compilation and running of user programs.
It doesn't need to transfer much data from/to the user.
@NaCl you rock :)
 
yeah. you are providing an amazing service: letting us change the command line
that alone blows away the other online compilers
 
It's a service I wanted for myself. I didn't add it because I like you or anything.
 
it is scary to allow arbitrary command lines, so I appreciate your bravery
 
12:51 AM
Users have been surprisingly nice up until now. Can't recall any hacking attempts.
Except when I first announced it in the lounge
12
The first day literally everyone tried to hack it in some way.
Doing random shit.
 
user406009
@StackedCrooked Maybe that's because a hacker already broke in and fooled with the logs?
 
user406009
Trust no-one.
 
@StackedCrooked Not true--I didn't. I was worried at one point that I'd broken it by accident though...
 
user406009
It's not paranoia when they really are out to get you.
 
12:52 AM
@JerryCoffin Yeeaaah right :P
@doug65536 Nah. I do what every recommends against.
It's a simple chroot using read-only mounts and ulimit seasoning.
 
@StackedCrooked b-b-b-baka
 
@OneRaynyDay :D
 
@StackedCrooked goes to show that defaults is pretty secure and fair under load already
 
@StackedCrooked ...and as I recall, a number of people on SO have told you they could break through easily--but so far none has succeeded.
 
add a bit more than defaults and it's secure enough
 
12:56 AM
@JerryCoffin Yep.
I often get emails from people who wanted to privately inform me they were able to perform shell calls using "system()".
While, you know, there's a box at the bottom of the page where you can enter shell commands.
 
@StackedCrooked Hey, I'll bet I can use popen too! Better watch out! :-)
 
Hehe :)
 
@StackedCrooked yeah, wget doesn't work. internet is blocked altogether?
 
@doug65536 Yeah. I did block that.
 
for obvious reasons
 
12:59 AM
That just seemed too risky.
Also, some jokers would invoke coliru from coliru causing deadlock.
 
@doug65536 wget doesn't work, but maybe getwet does?
 
@JerryCoffin lol
 
I didn't know the server was that promiscuous
 
chroot doesn't protect very well from privilege escalation bugs
 
@StackedCrooked ...or infinite recursion.
 
1:03 AM
@StackedCrooked Didn't you have a rogue daemon installed at some point
 
@JerryCoffin The possibilities are endless. I almost feel bad for not allowing it.
6
 
rextester.com/runcode allows network calls, I was able to compile boost.asio example that fetches google.com
 
....brb gonna try some funny thing
 
@CatPlusPlus Yeah. But I think that was simply because I was using a weak password.
Since that happened I changed the ssh port and used a strong password.
 
1:04 AM
Biggest problem with allowing network access is that your thing is now used to perform attacks on other services
 
you can rate limit severely if you really wanted to add network, and proxy it to hell
 
I was afraid that my service would be used in botnets etc.
 
@StackedCrooked yeah, exactly
I tried to make a thing to parse the unicode database and got stopped at step 1
understandably, though
 
So Rex allows network access. Which means it's even more liberal than Coliru.
 
1:10 AM
but their gcc is 4.8.4
 
@Cubbi s/4.8.4/obsolete/
 
er., 4.9.3, but still obsolete.
 
user406009
At least 4.9 supports C++14.
 
user406009
I really miss C++14.
 
Thanks to coliru, cppreference has compilable transactional memory, concepts, and experimental/filesystem examples now.
18
 
1:15 AM
Don't make me scared now. I'm not with stress :)
But yeah, that's pretty cool I suppose ;)
 
@Cubbi If stacked forgets to pay his bill, a lot of people are going to notice in a hurry. Oh, I mean: no pressure. Just sit back and relax.
 
lol
Better donate :)
 
Yes. I'm very poor and I need to feed five children.
 
I made a jsfiddle clone that puts less crap into the page and is more prone to abuse. so far so good
 
link?
 
1:18 AM
it isn't even fully finished.
but everything that matters, works
I made that years ago...
I would do it differently now
 
Looks good, gonna bookmark it
 
thanks. if you append /show to the url, after save, it shows just your page with nothing injected
same /show/html /show/code /show/css
jsfiddle injects stuff and puts your js in an inline <script>, so debugging is harder and line numbers are whacky
 
Yes, that's why I was seeking for a good alternative for a long time
 
I don't try to randomize the urls either. if you want to brute force through everything, go fo r it
 
@JerryCoffin Funny how people worry about accidentally breaking Coliru. I'd be thankful if they did since it provides me with important feedback.
 
1:26 AM
@StackedCrooked I don't feel as comfortable with timed out compiles, knowing that I might be causing starvation for other users
 
Yep. That's an issue sometimes.
 
if you had it round-robin for guests, then nobody can overwhelm it
 
I hate it when Coliru is slow. And it's very often slow.
@doug65536 How so?
 
easy compiles would make progress sooner. the default for the scheduler is to run long to optimize cache
 
@StackedCrooked I compiled some spirit on it today, sorry :(
 
1:28 AM
@StackedCrooked I don't (much) any more, but that was when it was nearly new...
 
@Borgleader Please provide me your IP so I can ban you.
 
you can trade off some bandwidth (by causing somewhat more cache miss) by reducing timeslice, making the other threads run sooner, and finish sooner
 
@StackedCrooked idk my work ip, i'll tell you tomorrow :P
 
so it is worse for the people hogging system, and better for easy compiles
 
@StackedCrooked Let me find @sehe's IP....oh wait, he'd never use Spirit. :-)
 
1:29 AM
@JerryCoffin That's when I needed the feedback the most. Why didn't you break it dammit!
@JerryCoffin lol
 
@StackedCrooked I can only plead laziness (or maybe just ineptitude--after all, if I'm inept, I'l be the last to realize it).
Wait...I've got it. Laziness and ineptitude!
 
easy compiles consist of racing to the next blocking I/O. difficult compiles sit there eating CPU. short timeslice would cause it to get I/O started sooner, but hurts performance for difficult compiles
 
@JerryCoffin You're inept at being lazy, I guess that's why you have a bee for an avatar.
 
@StackedCrooked would a basic bandwidth attack do it? If my vps sat there and reloaded the main page as fast as it could in 1024 overlapped async http clients, could I DOS it?
it isn't hard to put basic rate limits in the firewall
 
Yes. Coliru is very vulnerable to DOS.
But nobody has done it up until now AFAIK.
 
1:35 AM
thankfully nobody in their right mind would attack it
 
It would be kinda pointless too :)
 
@Borgleader Not a bee. A wasp.
 
nwp
a lot of people enjoy being a dick
it just seems they don't overlap with the people who know what coliru is
 
I've been typing so much today that my fingers are starting to twitchby themselves
i think i'm possessed by a coding demon
 
nwp
@OneRaynyDay side effect of UB
 
1:39 AM
@nwp side effect of chasing a stray single byte in a file
 
nwp
I should be sleeping, instead I try to fix debian's cmake files so I can actually link to llvm -.-
maybe I should just give up on cmake altogether, huge amount of work that was supposed to be avoided by cmake
 
@nwp as an external project? there is a patch step where you can add tweaks in Add_ExternalProject
you can also pass through -DCMAKE_xxx stuff with CONFIGURE_COMMAND
 
nwp
not sure what exactly an external project is. What you are supposed to do is find_package(LLVM REQUIRED) and be done with it, unless someone screwed up the paths and you have to hunt down the files and change them
 
ah when you said "cmake files" I pictured you using something that uses cmake as a dependency in your project
 
nwp
nah, just failing at doing the simple things
 
1:47 AM
like gtest, you can make cmake git clone it and patch it and invoke cmake on it then compile and install it to somewhere and stuff
@nwp link? I have gotten a lot of cmake stuff working, maybe I can help
 
nwp
I want to say "no, you just apt-get install gtest", but it turns out they "forgot" the libraries, so it doesn't link -.-
@doug65536 unless you have a debian based OS without a patch to it I don't think you could reproduce it
 
they probably forgot them because they don't have any "install" step in their cmake
I filed a bug against it and their reply was, "but you don't install it"
lol, they don't realize that you "install it" to somewhere in your build when it is a dependency?
seriously?
i.e. make the prefix be ${CMAKE_CURRENT_BINARY_DIR}/something
 
@OneRaynyDay Sounds like muscle spasms due to over-exertion. Good finger workout, I presume ^^
 
I have a wrapper hack that forces it to copy, basically wrapping a manually hacked "install step" after the build
 
nwp
set(_IMPORT_PREFIX) clears the variable _IMPORT_PREFIX right?
 
1:54 AM
what???
lol
 
nwp
don't let bartek see that :D
 
yes but I only needed a few thousand milliseconds to fix my error :)
 
Anybody have a link to a good rendering engine? I'm getting tired of rewriting the same GUI boilerplate so I can push entities onto the screen for data visualization.
 
qt has a pretty straightforward opengl
but that is probably lower level than you want on second thought
if a browser frontend, svg is easy
if a browser, endless chart libraries
 
Yeah, Qt/Swing/Tkinter are pretty low level. I just need to write objects that extend Entity (or w/e), have an update() and render() method, and where I can push some data into them. Other than that, I just need keyboard input to manipulate the view.
 
2:02 AM
the expansion of gists should be removed
the whole point of gist is being not here
or cap it to two lines and an ellipsis
 
Agreed there. It shouldn't post the whole file xD
Blegh, opengl doesn't have a scene-graph/entities. Hopefully Ogre3D is a slightly higher level library. If not, I'll roll my own but it won't be pretty.
 
2:19 AM
Sounds like a game engine...
 
if you want a scene graph you probably want a game engine, yeah
 
Well, for data visualization you might also benefit from a charts kit, like QCustomPlot
 
Yeah, it's basically half a level below a game engine; most of the core concepts, minus features like physics, resource managers, etc.
 
You gotta pay extra for those
 
scene graph consist of a std::map with a good comparator that sorts the scene by pass/shader/texture state/geometry state/etc
inserting into it makes the next in-order walk draw the inserted thing too
use a loop that walks it and "begins" and "ends" each state generically to render
 
2:28 AM
It looks like Ogre3D is pretty much what I need.
> Finally, if you run OGRE in continuous rendering mode
Yes!
 
the trick with animation is never filling arrays every frame, you incrementally update state and use it as-is in frames
 
Yep. Rendering is simple, but easy to do inefficiently.
 
user406009
@Aaron3468 The good thing is that modern computers are fast enough that you can just ignore inefficiency most of the time.
 
user406009
Especially with 2D stuff.
 
@Xeo After playing Akiba's Trip, I feel the need to go to Akihabara. And I probably won't get lost. lol
 
2:41 AM
@Lalaland Very true! Python's still not that fast, but it's already doing some simple HD renderring for games.
 
it is hard to resist doing a mass search and replace of typedef (.*) ([a-zA-Z0-9_]+)\s*; with using \2 = \1;
typedefs are extremely ugly aren't they? Annoyingly backwards
not to mention hilarities like typedef char rgba32[4];
or typedef (T::*lol_name_over_here)(int, std::string const&);
 
@doug65536, it depends on whether you are the leader of the project (so are able to prevent future typedefs). Otherwise you would be killing yourself LOL
 
s/def \(T::/def int (T::/
 
mr5
hi
 
ah, I need (.+) to avoid messing up complex typedefs
 
mr5
2:51 AM
How can I find the circular result sequence from a constant integer sequence given only a pivot?
For example:
Let sequence = [1, 2, 3, 4, 5, 6, 7]
pivot: 1, resultSequence: [5, 6, 7, 1, 2, 3, 4]
pivot: 6, resultSequence: [3, 4, 5, 6, 7, 1, 2]
pivot: 7, resultSequence: [4, 5, 6, 7, 1, 2, 3]
 
NooOOOooOO. Anything that involves labelling arbitrary data types is grimy. using tuples to store data is just as bad. Just make classes that are easy to instantiate if you're going to pass the same formatted data around often enough that it needs to be associated. Nothing wrong with 2DPoint(4, 5)
/me hates typedefs/other hacks that pretend to be OOP without the benefits of OOP
 
mr5
okay, I think I get it using loops but if you guys came up with a better approach, please ping me. tnx
 
@mr5 using modulo, you can wrap ascending values back to zero. Then it's simply a matter of appending the pivot and appending the next values for sequence.length() / 2. After doing that, finish by inserting the remaining values. Depending on your needs, choose how to round cases where the sequence is an odd length
 
mr5
3:10 AM
@Aaron3468 that's exactly what I'm doing right now. The length should be odd for because there is a pivot
 
@mr5 Whoops, *even.
The other option, which is less efficient, is to simply rotate the sequence until the pivot is centered. The most efficient solution is to count up from pivot - length / 2 to pivot, then count up from pivot + 1 to pivot + length / 2 (only because there is no shuffling the data around with inserts). IMO, don't worry too much about efficiency unless you are sorting sequences 100,000+, especially in C++
 
For small sequences such an 8bit sequence, you can cache all the possibilities.
also std::rotate
 
3:40 AM
> Ce n'est pas l'ensemble du personnel qui se met en grève, uniquement le personnel en charge des circuits de refroidissement.
réaction à l’annonce de grève dans les centrales nucléaires
 
4:01 AM
 
4:47 AM
@Feeds lol, what?
 
 
1 hour later…
6:10 AM
@wilx Photoshop has a "content-aware fill", in which it attempts to find a pattern of the content around it, and auto-fill.
Sometimes it is great, sometimes it creates abominations like these: i.imgur.com/Dt9N4.jpg
 
473
Q: Why is this program erroneously rejected by three C++ compilers?

James McNellisI am having some difficulty compiling a C++ program that I've written. This program is very simple and, to the best of my knowledge, conforms to all the rules set forth in the C++ Standard. I've read over the entirety of ISO/IEC 14882:2003 twice to be sure. The program is as follows: Here i...

 
6:28 AM
@Nican reminds me of "The Fly"
 
I need something like a multiprocess circular queue not multi thread. But I am afraid to go for a file based solution. What is the way to go ?
 
pipe?
 
@NeelBasu ZeroMQ. Redis.
 
pipe can act like a prod con buffer ?
 
yeah
 
6:30 AM
Redis can work like a queue ? and circular ?
 
It can work like a queue.
What do you mean by circular?
 
But when I read something from the consumer process that data is taken from the queue
But I don;t want the consumer to pop the data, only read
 
Ah, I see.
 
if you do grep thing | sort, it is just a pipe from stdout to stdin. grep produces, sort consumes. it is available as a primitive
 
I would probably still use Redis, have an atomic number, and a list.
 
6:32 AM
you can programmatically setup separate pipes
 
producer will push the data in the circular queue which may pop_front not no pop from consumer
 
ah, that is harder. you want more like a deque
 
Yes But in pipe even if programmatic I need the data to be present there even after the consumer reads
 
@NeelBasu do you really? why?
who deletes it then
 
yes right dequeue e.g. read only consumer observing head, and produces pushes in tail and if it goes beyond a limit it removes the one in head and then pushes in tail
 
6:35 AM
it is pretty much equal to one process connecting to a listening tcp socket in another process, and one sending to the other
 
Ven
Hi
 
Or SQL, and an atomic number. :B
 
even in case of listening socket the read data is removed
am I wrong ?
 
what else would happen?
 
@doug65536 I need to support multiple read only consumers
I am grabbigng sensor data and putting it in a buffer window and multiple application is reading it
 
6:37 AM
and you want to lose/overwrite data if a consumer doesn't read it?
which OS
 
yes right
Linux
 
shared memory is a super fast high effort way to do that
 
shared memory across multiple processes ? all applications are running inside the same VM
 
yes, that is what the shared means, shared by multiple processes
it uses paging to literally use the same memory pages in more than one process
 
6:40 AM
So producer process can be in C++ and consumer in any language ?
 
if you want to make it like that, use memory mapped file
 
how will the prod con concurrency be handled ?
 
that will also be atomic (on every platform I have seen)
synchronizing across the processes isn't as easy for that though
 
Oh! So mmap file I/O read/write is atomic ?
 
yeah, linux and windows both map the same pages when you mmap the same part of a file
 
6:44 AM
and with redis ? can I achive the same ?
 
shared memory is the moral equivalent of mmap of an imaginary file that doesn't actually exist. in windows, an anonymous mapping represents mapping part of the page file
boost has shared memory stuff, if you want maximum portability
it also has interprocess communication stuff, for that matter
 
Hmm but I think redis will be easier for other while writing consumer applications
 
ok
 
Thanks
But can I push a tuple inside redis ?
 
you realize that redis is a server, and you connect to it through TCP, right?
 
6:53 AM
yes
but in docs it says PUSH integer|string
I want PUSH (int, int)
or PUSH {k1: v1, k2: v2}
I don't know is that doable or not
 
it stores strings and ints, in key value pairs
 
Hmm but I need to store timestamped values like {ts, value}
 
PUSH {now(), data}
 
Ven
7:16 AM
lol redis c++ client
if you wanna use something that outdated, hf
 
Do it with SQL!
Also Redis is from 2009?
 
Ven
yea
 
Now I feel outdated :-(
 
@doug65536 But hilariously, can't actually launch processes and stuff.
 
7:38 AM
@Nican lol, yuck. :D
 
Ven
@rightfold ping ping
@Puppy what do you use to compile your TS files?
webpack?
I'll just use outFile for the time being
 
8:13 AM
^ Clever joke. The comments are hilarious.
 
Xeo
@Mysticial Oh man, don't remind me. I wanna go to Japan so bad, but maniez ;__;
 
> Dad joke exam passed, someone get this man a kid.
@Xeo Didn't you have a trip booked already?
 
@Xeo Spend less money on figurines :P
 
Xeo
8:33 AM
@R.MartinhoFernandes nah
@StackedCrooked I'm not even spending a lot right now, but I'll have to pay for two flats for the next year or so :P
@R.MartinhoFernandes I do have the Uncon trip booked. Is cosh still alive? We should get around to more in-detail planning soon-ish.
 
Ven
oh yeah, uncon. when's that?
 
Xeo
Around 18th of June
 
Ven
oke
 
9:10 AM
@Xeo You only need one flat dude :P
 
9:32 AM
@Xeo Wait, what.
Did you get secretly get married and divorced or something?
 
9:57 AM
He married his cat.
 

« first day (2048 days earlier)      last day (2892 days later) »