« first day (2633 days earlier)   

12:24 AM
@ScarletAmaranth Racket/guile/mit-scheme (I was forced to use it in undergrad for E&M simulation)
 
12:41 AM
-2
Q: CUDA: best way to rewrite some loop

Ian McCartneyI have to rewrite some junk of code using CUDA, but I'm new to it. The whole pseudocode in Python is below Y = np.zeros_like(A) m = X.shape[1] n = A.shape[0] for j in range(m): for i in range(n): s_min = max(-1, -i) s_max = min(2, n - i) for s in range(s_min, s_max)...

^somebody vote to close
 
I keep maintaining this AnimeRatings Chrome extension even though I don't use it myself. It keeps breaking due to environment changes.
This time the problem was that myanimelist introduced a very trigger-happy anti-flooding mechanism. So I need to introduce some rate control.
 
1:15 AM
TIL there's a community called "dwitter" where people compose 140 character JavaScript programs that produce interesting visuals https://www.dwitter.net/top
3
 
We gotta make C++ more web friendly, at least make some easy canvas API, or something like PIXI.js
 
1:52 AM
@sehetw @0xbadcode @konchog3 @NevAriJason @RussianEmbassyC 1.) Downloading code is enough for a penetration. Code can be run remotely. This Wikipedia article is good: https://en.wikipedia.org/wiki/Arbitrary_code_execution 2.) The server can check in and not notify the client that server-side code is running. If that were the case, Windows and Adobe would not run .
Oh boy
Someone is wrong an ignorant twat on the internet
In Haiku WTF: "I made the gzip /
Serialization code run /
Using Boost Asio"
Thanks for the legwork, i managed to make the code run using boost:asio, but that version didn't compress for some reason (probably ordering issue), but this works perfectly. — val 1 hour ago
None of that makes sense
 
Hm. I figured it would be possible to build a parser that builds layout from a string-based drawing. (Thick lines indicate non-stretchable part of the UI.) But it took me way to long to make this drawing..
Can't beat XUL's vbox and hbox. (Or flexible boxes.)
 
2:23 AM
@StackedCrooked Of course you can. And it will suck badly because of the defacto DSL you'd require for specifying more complicated edge cases. Or flexible layouts. Or scaling policies. Etc.
In other words, if that were a mildly interesting idea, it would have existed for decades.
There's a reason we're still doing stuff like resource files, XAML, CSS/LESS, Qt.XML etc. instead
 
Hey, I did better than VB6.
@sehe But yeah. Something like that seems best. It's also declarative.
Got the idea from a blog post describing how the IPv4 Header Diagram can be parsed to generate a IPv4 header generator/validator. blog.rafaelferreira.net/2008/04/couple-of-interesting-dsls.html
But IPv4 header parsing is simple to do in C or C++. So there's no gain.
 
@StackedCrooked Disagree. Perhaps better than WinForms code-behind hell.
@StackedCrooked There's gain in the face of changing/varied specs in formal formats
 
I suppose it would be handy during the design phase of the protocol. Every time the header changes the code would be ready as well.
But it would only a few minutes of work to update the fields in a IPv4Header struct.
Although..
I recently spent 2 hours (with help from a colleage) figuring out why my parsing of the Flow Label field in the IPv6 header buggy.
Extracting/updating a 20-bit field is damn nasty. (If only bitfields were portable.)
 
2:42 AM
Yup. In about 10 years you'll have complete test coverage. Of a protocol that's obsolete by then :0
 
The unit test was pretty simple. Write a value, extract the value and check that they are the same. Testing all 2^20 combinations takes only a few milliseconds.
 
Almost recommended him to apply as WH "Cyber Expert". But the likelihood of that actually working out scared me.
 
@sehe there is a reason why they call it a 'bear market'
 It is a transition from high investor optimism to widespread investor fear and pessimism
this is what happens when you introduce bear to the sentiment ...
 
> If you're downloading an app and the IP address of the app is known to the server that the app was downloaded from then all that's needed is an open port to inject instructions to run the downloaded code. That is how an RCE works.
 
2:46 AM
@Telkitty please don't randomly plink me
@StackedCrooked Iff there is one it might work that way. I'm going to just sell tinfoil hats to people like that from now on. Only $4k each
 
How can that work.
You can't just send code over a socket and then expect that the server will execute them for no reason.
 
Well, have a vulnerable OS, send exploit, profit :)
Simples!
@StackedCrooked Not "for no reason", but "for good treason"! (T'is the season). "The app is advertised by the Kremlin" (which ... it basically isn't)
 
~ $ ssh [email protected] rm -rf /
rm: it is dangerous to operate recursively on ‘/’
rm: use --no-preserve-root to override this failsafe
Oh hey it worked :P
Almost.
 
@StackedCrooked who owns that linode
 
I do.
First time I actually run the rm -rf / command.
 
2:52 AM
Ah so it actually uses pubkey auth :)
Why did you pick London datacenter? Did you not hear about Brexit :)
 
Yeah. Actually I have a shortcut: alias li="ssh [email protected]"
 
@StackedCrooked Mine is linode (and includes -XCt screen -DR
 
Nice.
Is that X forwarding?
 
@StackedCrooked Yes, I don't use it obv. But it's just a habit
 
sudo rm -rf / is probably one of the the most well known but least run command
 
3:44 AM
Gosh. I'm wanking to fibonacci for no raisin.
 
4:08 AM
warning C6262: Function uses '66720' bytes of stack: exceeds /analyze:stacksize '16384'. Consider moving some data to heap.
wonder if thats why the stack smashing cookie is triggered...
Wait a minute, the stack should be larger than 16k...
 
4:40 AM
I think it's around 2 - 5 MB
It's just a warning.
 
The whole stack yeah, but there might be a warning in case one single function goes over 16KB
 
Well, I recompiled with token changes and my stack smashing went away...
 
5:38 AM
Also, is "pass by value and use std::move" really better than the old alternative of passing arguments by const ref? (clang tidy's modernize-pass-by-value)
 
Depends on the type, but yeah it should be
if its a temporary in the const ref case you end up with a copy, with pass by value that should be 2 moves
if its not a temporary, in pass by const ref you get a copy + passing the ref, in the by value you get a copy and move
so unless its not cheap to move...
 

« first day (2633 days earlier)