« first day (1418 days earlier)      last day (3522 days later) » 

3:01 PM
@PolymorphicPotato safePerform x = do { condom; x }
 
condom = mempty
Thou shalt not x!
 
lel
Can I make WinGhci make use of cabal sandbox? :F
 
So... UDP eh?
 
@Jefffrey hm?
 
Xeo
@PolymorphicPotato mzero, rather
 
3:06 PM
Aahahah lmao that issue report
> :set prompt λ makes WinGHCI unable to start.
2
 
lol
 
I am gonna code in Haskell today
I haven't at all yesterday
 
sorry
 
:18664923 yeah I was playing LoL with joozek
we didn't feel like coding
 
i don't know why i'm being an ass
 
3:12 PM
He's picking up Haskell really quick by the way
@Jefffrey meh no offence taken
 
I have a binary file. It has a bunch of random numbers that I need to put into an array so I can do a few sorts. How do I get the file into an array?
 
Try spoon
 
@kush are the numbers of the same size in binary?
Basically his attitude towards Haskell is "fuck theory, I want results"
 
@BartekBanachewicz I believe so
 
3:13 PM
so he sometimes asks funny questions like What's this funny <$> thing?
 
Use a 10cc if the file is big.
Don't do drugs.
 
@BartekBanachewicz I think I'm the opposite. "Fuck getting things done, moar theory". Yup, sounds about right.
 
@R.MartinhoFernandes thanks :P
 
@Jefffrey I'm also more like you; it works really well in practice (I mean that we pair-program basically. he's always like "okay let's leave the theory of this monadic combinator for now, how do I JSON" :D)
 
I was hoping I could try to get it to work in Linux
 
3:14 PM
If I write Haskell I usually do things in the most basic way possible
 
@kush vector<int_insert_size_t> stuff (istream_iterator(file), istream_iterator())
 
Complete with line numbers etc
 
@CatPlusPlus hm?
@CatPlusPlus "most basic"?
 
Ell
Usually if I do something in haskell it's just writing fib.
or calculating pi in a naive way
 
@Ell that might be your problem in getting it
 
Ell
3:16 PM
@BartekBanachewicz I think I just haven't tried hard enough yet to be honest
 
solving haskell puzzles is considerably different from writing real programs, as in every language :P
 
@AlexM. lol
 
Ell
Yeah
 
@Ell +>++[-<<[->+>+<<]>>>+]
 
So, a 2D game between an haskell server (game logic) and JS client (rendering) people are recommending UDP (+ fast, - non reliable, - random order of packets) sockets and binary format.
 
Ell
3:16 PM
I haven't tried actually writing something that I wanted to write yet
 
Tis beautiful.
 
@Jefffrey uh you're still on that
 
Ell
@Jefffrey depends what kind of game
 
@AlexM. I didn't notice it was a drive-by
1
A: Why C++ version of file parser is slower than Python one?

seheYou copy a lot of strings (all the vector elements) use a new instance of istringstream each line did you use compiler optimizations? Here's a version that addresses my comments: #include <boost/algorithm/string/split.hpp> #include <boost/algorithm/string/classification.hpp> #include <vector

 
IMHO this idea is kinda fucked up.
 
3:17 PM
I get the feeling the "+ fast" of UDP is terribly overvalued.
 
Just use Haste.
 
@Ell Something that needs to get updated 40 times per second, minimum and therefore needs to ask the server 40 times per seconds what to do.
Very short messages.
 
@Jefffrey using sockets for logic-display communications sounds just wrong
 
You mean 25ms latency tops?
 
Very quick back and forths. Something like: "hey, I'm here and 0.00012s have passed, wat do now?"
 
Ell
3:18 PM
@R.MartinhoFernandes Me too
 
And the server is like: "your new position is { 2344, 5 }"
 
Ell
I think tcp is suitable in most cases
 
Either pop up a render window in Haskell and draw with OGL or use Haste and render on <canvas>
That's my profffesional opinion on the subject.
8
 
> profffesional
I'm not sure if I'm mocking the word or the spelling.
 
@BartekBanachewicz Haste is for compiling Haskell to JS. I can code JS just fine if it's just for rendering.
 
3:19 PM
@R.MartinhoFernandes Prophezional.
 
@R.MartinhoFernandes I'd probably make that a function; what might be more convenient to deal with (remember the fun with large strings in MSVC :v) is embedding all the version info in the executable by appending it/making it a section, but that requires more runtime support otoh
 
@Jefffrey Valderman added a lot of interop lately.
 
@BartekBanachewicz I don't understand what problem would Haste solve, really.
@R.MartinhoFernandes I guess.
 
@Jefffrey If the client is browser then have fun with using UDP
 
@CatPlusPlus That requires a lot of platform-specific stuff and things I really don't want/can't have in a header-only thing.
 
3:21 PM
Yeah
 
@Jefffrey not having a nice 2D API in Haskell?
 
Just saying
 
I'll ask differently
 
@R.MartinhoFernandes what the hell is that? ideone times out and on my box: Error: Out of range! Youwanted to '<' below the first cell.
 
Why do you need the separate client at all
 
3:21 PM
The problem with a function is that I can't easily (at all?) fallback it to __GNUC__ and stuff.
 
@BartekBanachewicz Rendering would be done in JS which has thousands of graphics libraries available.
 
@Jefffrey Why do you need to render in JS
 
@BartekBanachewicz Because I like the idea of physically separating logic and rendering.
Taking the best of Haskell with the best of browsers.
 
@Jefffrey "physically"?
 
@sehe Meh, half-closed memory tapes.
 
3:22 PM
I have my screen connected through a cable, does that count? :P
 
@R.MartinhoFernandes You can still protect it with a macro
 
@BartekBanachewicz They can potentially be run in two machines kilometers apart.
 
@sehe Prefix a >, I guess.
 
Using two different languages.
 
@Jefffrey that's the way, not the goal (And a shitty one)
@Jefffrey So can be a GPU stream
NVidia rendering clound and Steam streaming is a thing
 
3:23 PM
#ifndef NONIUS_COMPILER_INFO
#define NONIUS_COMPILER_INFO read_compile_version_macros
#endif

std::string compiler_info = NONIUS_COMPILER_INFO();
 
@sehe Also, it's not interesting if you can't actually see the memory tape as it runs: notice how there's no output.
 
Or somethin. Maybe just a string macro will work though dunno
 
@Jefffrey I just don't feel there's any practical use case for that. If you can render, then you most probably can run logic too :v
 
It might be problematic to insert large strings there
If not function then you should support a config header macro for this probably
 
@BartekBanachewicz Ok, the problem is: graphics with haskell is terrible, at least IME. graphics in JS is awesome, at least IME. Haskell is very good at: here some numbers, give me some new numbers. So the idea of haskell on the server that receives data and responds to JS clients is just... an orgasm.
 
3:25 PM
@R.MartinhoFernandes it keeps failing regardless of how many > I prepended :)
 
Because passing that on command-line probably won't work on Windows
@BartekBanachewicz That's how every thin client online game works
 
and hardly any of them is realtime
 
@sehe That's broken. The loop is clearly forward-biased.
 
@BartekBanachewicz Uh
 
[->+>+<<], 2 forward, 2 back. No bias.
 
3:27 PM
The end game would be to have a simple server executable that you can place on a server, start it and then multiple people open a browser on that server and play a game.
Together.
 
yes that's what I'm doing
 
[-<<[whatever]>>>+], 2 back, 3 forward.
 
which works really nice
The catch is that I'm using HTTP.
And I accept 1s delays.
 
The catch is that you don't even need 10 updates per second.
 
precisely.
 
3:28 PM
@sehe Maybe it fails because it's an infinite loop?
 
For a 2D game with physics and whatnot, that's simply not acceptable.
 
@BartekBanachewicz How do you think MMOs work
 
Because that's what it is, and you can't see anything interesting unless you can see the memory tape as it runs.
 
@CatPlusPlus the clients are hardly "thin"
 
@CatPlusPlus Hybrid logic, in both clients and server.
Client anticipates the server and then syncs with it.
 
3:29 PM
@Jefffrey Nope, all the game logic is pretty much on the server.
 
I'm just guessing.
 
They do interpolation so they have some logic yes, but the server is authoritative
 
It just runs across the memory tape building the Fibonacci sequence. And by "runs across" I mean it just keeps moving forward and leaves nothing behind.
 
@R.MartinhoFernandes well, tell that to bf (yet another Brainfuck interpreter)
 
that's how Blizzard can change balance without issuing a client-side patch.
 
3:30 PM
@CatPlusPlus being authoritative and calculating everything for everyone is a different thing
 
they started out with a much fatter client (in physics terms) but have been migrating it all to the server over the years.
 
Also all FPSes like Quake of Team Fortress
You only send inputs to the server
 
@R.MartinhoFernandes mmm. the error is confuzzling though. Ideone agrees it takes a while :)
 
They never send game state
 
now they can fix more bugs and balance problems without client patches.
 
3:30 PM
@CatPlusPlus yes, that's what I'd like to do.
 
You can't trust client's game state
 
@CatPlusPlus well it's a good point
 
@sehe I used bfdev, btw. 4mhz.de/bfdev.html
 
Orite.
A shooter is actually a very good example.
But then again no UDP in websockets.
 
I feel like a Scotty server wouldn't be able to handle 2 players making 60 requests per second each.
 
3:31 PM
@Jefffrey it would alright, it's the problem with HTTP not with scotty
 
It doesn't actually have an open-ended memory tape, just a loopy one.
 
Unless of course you have an octa-core, 3GHz, etc...
 
There are MMOs that do computations partially on the clients
(PlanetSide 2 for example)
 
@Jefffrey Scotty with Warp will still be absurdly fast
you just need different kind of fast
 
But it's a rare exception where you really need a massive massive scale of things
 
3:32 PM
@BartekBanachewicz Probably.
 
If you want a recent example of thin clients then Titanfall runs 100% in the cloud
 
Something like a connection and then fast packets back and forth.
 
Yeah basically scotty could serve you statics
you'd need a separate handler thread for updates
 
@BartekBanachewicz ngix for that
 
@Jefffrey Why would they make 60 updates per second
 
3:32 PM
that's what people have done on the internet
 
@CatPlusPlus I'd like 60FPS on the browser
 
Rendering FPS has nothing to do with that
 
How so?
 
Why would it?
Inputs arrive asynchronously
 
Every frame the client needs to query the server to get the new data.
 
3:34 PM
@CatPlusPlus No "butt" joke?
 
No, that also arrives asynchronously
@Puppy I'm a butte and forgot
 
The game moves also when there's no input.
 
See AI or whatever
 
You just render at 60FPS and if something arrives in the meantime you update the world on your side
Sure you need to fit in a frame then but it's not like it arrives EVERY frame
 
3:34 PM
@Jefffrey quake doesn't need 60 updates per second to render 60fps
 
@sehe Looks like this.
That's along the way to building 377 (F14) in the highlighted cell.
 
@Jefffrey look into client-side prediction
 
It also already has 610 (F15) being built in the cell after, and 233 (F13) being dismantled in the cell before.
 
@CatPlusPlus Ok, let's consider a player that pushes a box on a ice floor (in the game). The player sends input and the server have to keep responding with the box position and rotation every frame in order for the client to render the box smoothly sliding away from the player.
 
@Jefffrey You interpolate between input/network frames (so send 'NPC x started to move this way' and then just keep moving it until 'NPC x stopped' arrives)
@Jefffrey That will a) deplete your bandwidth in an hour b) destroy any game experience in case of latency (you can't assume no latency)
 
3:37 PM
right
that's interesting
 
The point is
8 mins ago, by Cat Plus Plus
They do interpolation so they have some logic yes, but the server is authoritative
How Quake etc works is you get delta changes and then a full state dump every now and again
 
delta changes?
 
That's why things tend to jump around in high latency
 
@sehe I'll call it "Fibonacci wave".
 
Is this the simplest way to create a custom exception class in C++11 that doesn't do anything fancy over the regular std::runtime_error?
 
3:40 PM
@Jefffrey it's also rather hard to do. I've done this on uni last semester
 
struct RandomDeviceError : public std::runtime_error { using std::runtime_error::runtime_error; };
 
granted we used C++ which made it absurdly hard
but still it's a complicated topic
@CatPlusPlus AKA keyframes
 
yeah, I see
 
Should put it in my art repo, actually.
 
@Jefffrey I could give you the code but you'd cry your eyes out
 
3:40 PM
There was some butt demos about doing physics in the butt and then sending them to client, but dunno how that works really. Probably still in the same way
4
 
Havok proposed separate-thread physics years ago
I've read their paper about that
 
@nightcracker Please stick to inheriting virtually from std::exception.
 
but I think they locked that to rendering frame
 
boy I broke my code generation hard.
 
@R.MartinhoFernandes why from std::exception?
 
3:43 PM
@nightcracker Because none of the existing standard classes derive virtually from std::exception :P
 
@BartekBanachewicz seems to depend heavily on who does the benchmarking. For example: lowlatencyweb.wordpress.com/2012/03/20/…
 
Something like: "bullets has been created at x,y and will go with an offset of this vector every second", then, for example, the server detects the collision with an object and sends that to the client which in the meantime rendered the bullet up to the colliding object and can now show blood or whatever. Correct?
 
@everyone that is discussing how to do rendering/networking correctly, this is the authorative resource for that: gafferongames.com/game-physics
 
I TRUST GAMEDEV SOURCES COMPLETELY
 
@nightcracker First time I saw it, I thought it was one of those domain parking sites.
 
3:44 PM
@R.MartinhoFernandes okay! fibonacci wave is all the rave :/
I was preoccupied.
Will be now too, cooking
 
@R.MartinhoFernandes he has a new design =/ his old design looked better IMO
but it's by FAR the best resource on this topic I've read by a mile
 
Writing RK4 integrators is not fun
at all
 
@nightcracker Not deriving virtually from std::exception means you can't do use multiple inheritance sanely (doing so breaks catch(std::exception)). The standard classes don't, so they're off-limits as bases for exceptions.
They're not terribly useful anyway.
All they do is categorization and categorization with non-virtual inheritance is broken.
 
@JerryCoffin hm.
 
@R.MartinhoFernandes :cplusplus:
 
3:48 PM
@R.MartinhoFernandes ergh, so either I have to create my own baseclass for exceptions or write a custom .what/constructors for every exception class I make
 
.what is in std::exception.
 
but it doesn't store a string, so I need to override both
 
@BartekBanachewicz That kinda looks like a bad config or at least non-equivalent one
 
@JerryCoffin dunno what might cause that. Request size? Different methodology (the article you linked measures latency)?
 
@BartekBanachewicz I've said it before, but it bears repeating: most benchmarks on the web are like kids racing cars, where the winner gets to keep both cars--except in this case, the other kid gets to drive your car, and you have to settle for "but honest, I was driving your car as fast as it would go", when (not if) his car wins.
 
3:49 PM
vOv all my exception classes return statically known strings, or strings built from static strings and non-stringly-typed data.
 
If you want to service extremely large amounts of requests you probably need more than one box and a HAProxy/Varnish somewhere in the stack regardless of the httpd
 
@R.MartinhoFernandes I was under the impression that it was essentially an empty struct. But I haven't checked.
 
@nightcracker Use Boost.Exception :v
 
@OmnipotentEntity It is, plus a couple virtual members like what().
 
@BartekBanachewicz You'd have to look carefully at methodology to have any certainty. If you thought a while, you could probably come up with at least 10 independent variables that could contribute, leading to an immense number of possible combinations. And when you were done, you'd probably find that the reality was something you still hadn't considered at all.
 
3:52 PM
@JerryCoffin well damn I was that close to concluding that C is slow and we should stop using it :P
 
If all you want is static files then the best thing to do is throw them on some CDN anyway
 
@CatPlusPlus inb4 torrent-httpd
 
And that first graph sure as hell don't show a real app behind that httpd
 
@BartekBanachewicz James Kanze once said (and here I agree with him): "Never trust a benchmark you didn't falsify yourself."
 
don't shoot the messenger :P
 
3:54 PM
@CatPlusPlus what does it do?
 
@nightcracker everything, compared to std::exception
 
Attaching arbitrary data to the exception
 
I'd rather not make my personal library dependent on boost =/
 
badlet
 
@nightcracker good luck rewriting it then.
 
3:56 PM
I don't need arbitrary data on exceptions either
 
@nightcracker "my personal library"?
I have a hard time figuring out how that makes sense.
 
@R.MartinhoFernandes aka wheels
 
@R.MartinhoFernandes work in process, think like Rapptz's gears
 
I might understand if it was something else.
But if it is your personal thing, depending on boost shouldn't really be troublesome.
 
Well I have a header-only OpenGL window library
 
3:58 PM
"I'm management and my legal department, i.e., myself, has not approved it".
 
that I have forgotten for 3 years and suddenly remembered but that's another story
 
Ell
@nightcracker what is your library called?
 
but yeah I wouldn't attach (and didn't) boost to it because it's meant to be used in shitty (think uni) environments
 
@Ell I think I have an outdated very very early version of it on github, but I won't bother linking it
 
all those fuckers creating WinMain :S
and calling CreateWindow directly
 
3:59 PM
still needs some work before I can make a massive commit (I know, hurr) and I can push it
 
Ell
@nightcracker Just copy and paste boost::exception into your namespace or w.e. :P
 
and doing switch(lParam)
 
Ell
I think that's legal
 
it is
 
and case (WM_MOUSEMOVE): int mouseX = HIWORD(wParam);
brrrr
I cringe just thinking about it
 
4:00 PM
let me just say, if I only was on linux I would depend on boost on everything in a heartbeat
however some of my build environments are on broken-beyond-fixing windows pc's
 
why don't you fix your build environment then :P
 
mum is making raspberry jam
 
sounds like that's your real problem, not Boost
@AlexM. She's coding games for rPi?
 
yum raspberry jam <3
@BartekBanachewicz lol
 
because I'm not willing to spend either the time to make a custom mingw-w64 distro, find someone else's and check if someone else's is using sane parameters or maintaining in my head a list of 50 million libraries to download and compile on every stupid toaster windows pc I come along in my life
 
4:03 PM
I want that icon for my repo! :<
why doesn't BB show it :F
 
this is my personal library, I want to be able to copy/paste it on any fucking default environment and have it work
 
Ell
maybe there should be a mingw distro maker thing
 
Because you didn't set the language in the repo settings?
 
for any real application project of course I'd include boost
 
Ell
Also. Boost exceptions works in msvc doesn't it?
 
4:04 PM
@nightcracker why don't you use MSYS
 
@BartekBanachewicz lol
@BartekBanachewicz starred for shame
 
@nightcracker what
You're the fucking one unable to set up a proper environment, not me, mind you.
@CatPlusPlus where's the goddamn @dolan
 
All problems with building on Windows are resolved by not building on Windows
 
not unable, unwilling
 
MSYS2 is working p nice for me so far
 
4:07 PM
Some people, when confronted with a problem, think “I know, I'll use MSYS.” Now their entire environment is royally fucked in a shitty emulation that's half broken.
 
@Rainbolt: The expense is making me write in one long, straight, horizontal line instead of a reasonably-proportioned rectangular box of auto-wrapping text. — Lightness Races in Orbit 19 secs ago
 
It's not emulation
 
what is wrong with these people
@nightcracker their*
 
@nightcracker you're just bad at life
also it's not emulation, it has proper windows builds of everything
 
Also fuck MSYS, just run a VM with Linux
 
4:08 PM
It emulates POSIX, no?
 
vagrant <3
 
@nightcracker what would that mean for you
 
Yes and C++ standard library emulates C++ standard
 
it fucking breaks when you have parentheses in your path
among many other things
 
Ell
4:09 PM
@nightcracker I'd say it implements POSIX
 
@Ell just like wine emulates a win32 environment for applications, I'd say msys emulates a posix environment for applications
 
Ell
@nightcracker Wine doesn't emulate either
It specifically says so in the title :P
 
linux emulates windows now shut up :P
 
Ell
Wine = Wine Is Not an Emulator
Wine implements the windows api on top of a posix platform
 
maybe I'm missing some definition of emulation that you guys are using
 
4:11 PM
C++ development is broken anyway regardless of the OS
 
Ell
@nightcracker I think so
 
@nightcracker maybe you're missing the definition of emulation
 
emulation in my book is imitating something while in reality it's something different
 
It's a software layer that implements an API
 
@nightcracker hint it's a well-defined term
 
Ell
4:12 PM
@nightcracker Would you say msvc emulates c++?
 
In computing, an emulator is hardware or software or both that duplicates (or emulates) the functions of one computer system (the guest) in another computer system (the host), different from the first one, so that the emulated behavior closely resembles the behavior of the real system (the guest). The above described focus on exact reproduction of behavior is in contrast to some other forms of computer simulation, in which an abstract model of a system is being simulated. For example, a computer simulation of a hurricane or a chemical reaction is not emulation. == Emulators in computing =...
 
> In computing, an emulator is hardware or software or both that duplicates (or emulates) the functions of POSIX in WINDOWS, different from the first one, so that the emulated behavior closely resembles the behavior of POSIX.
 
Windows has/had a native POSIX subsystem
 
TIL strikethrough doesn't work here
 
Also god it's an API are OpenGL implementations emulators
 
4:15 PM
@nightcracker oranges emulate cars tho
POSIX is not a computer system
it's an abstract concept.
 
if you strictly consider POSIX and win32 as purely API's, fine
 
POSIX (/ˈpɒzɪks/ POZ-iks), an acronym for "Portable Operating System Interface", is a family of standards specified by the IEEE for maintaining compatibility between operating systems. POSIX defines the application programming interface (API), along with command line shells and utility interfaces, for software compatibility with variants of Unix and other operating systems. == Name == Originally, the name "POSIX" referred to IEEE Std 1003.1-1988, released in 1988. The family of POSIX standards is formally designated as IEEE 1003 and the international standard name is ISO/IEC 9945. The standards...
 
why doesn't boost::exception inherit from std::exception?
 
@nightcracker It's in the boost::exception FAQ
Basically, it's apparently because of suckiness of std::exception
 
poziks
@milleniumbug yeah it annoys me though. caused me a bug recently :(
EVERYTHING should derive std::exception
 
Xeo
4:33 PM
yay
 
there are so many people at college during the day, this is weird.
 
@BartekBanachewicz The part that sucks is that nothing can be considered "portable" unless Windows supports it. Which never will because Microsoft is a douche in that aspect.
 
Depends on your target
 
Desktop PCs
 
re.match(r'.*abc.*','\nabc')
# None
genius
 
4:36 PM
You're bad at regex
You need multiline mode
 
thought so
 
@nightcracker strikethrough doesn't work here
 
@R.MartinhoFernandes ~~IKR~~
 
@LightnessRacesinOrbit TIL about acoustic coupled modems
 
@Mysticial Just FWIW: at one time Windows NT did have a POSIX subsystem (in fact, it's one of those rarities: a POSIX implementation that was actually certified as compliant, which I doubt most Linux distros could pass).
 
4:42 PM
@milleniumbug Last century I forgot about acoustic coupled modems.
 
@JerryCoffin I heard about that. But not anymore, lol.
 
> Last millenium
FTFY
 
I need to buy ~ 27 books to last me the next nine days.
 
@Mysticial Hardly a loss, IMO. It was implemented as a subsystem, which meant it was completely constrained to its sandbox--POSIX programs couldn't use Win32 functions at all. They had a compliant 1003.1 POSIX, but nothing else, so POSIX programs couldn't, for one example, use sockets (at all).
 
oh
 
4:51 PM
posted on September 03, 2014 by Scott Meyers

From now through September 9, O'Reilly's running a sale: all EBooks are 50% off, including the Early Release version of Effective Modern C++.  (Buying the early release version also gets you a copy of the final digital edition when it comes out, which is slated to be in about a month.) My book is currently at the top of the O'Reilly Best Seller List (okay, it's not so much at the top as

 
HELP
Amazon thinks I'm a junkie.
 
Owned
 
"Hmm, he looked at one syringe. Let's offer him the whole catalogue of syringe products"
And it's by the hundreds.
 
Xeo
It's especially nice for things that you only need to buy once, in general
 
@R.MartinhoFernandes lol
 
4:55 PM
HERE, YOU CERTAINLY NEED A HUNDRED SYRINGE TIPS.
 
@R.MartinhoFernandes Because they don't want you to reuse them and get shit that will kill you early. Since that means they lose a customer.
 
This is why I'm not too worried about those scary scenarios involving Amazon profiling you based on your purchases. They're terrible at it.
 
is this base exception class missing anything over std::runtime_error? coliru.stacked-crooked.com/a/1050998583dafa3c
 
Why shared_ptr (also no make_shared)
 

« first day (1418 days earlier)      last day (3522 days later) »