« first day (1682 days earlier)      last day (3259 days later) » 

12:31 AM
Lounge is ded
 
user3010322
@CatPlusPlus So luajit uses a custom executable to directly generate the peobj file, which then gets linked with everything else.
 
user3010322
In other words, there's no way to "unoptimize" the object code.
 
user3010322
Without rewriting this peobj code.
 
Ell
What is it doing to cause crash?
Yoy must have UB somewhere right?
 
user3010322
12:33 AM
:l
 
Ell
I guess try running with -fsanitize-* or VS equivalent
 
VS reset the layout again I am sure it is doing this on purpose
 
Ell
It is doing it on porpoise
 
and importing my exported settings doesn't work that's it i give up
 
user3010322
Yeah...
 
user3010322
12:39 AM
I specifically modified luajit's msvcbuild.bat and changed it to even link to the debug runtime.
 
user3010322
There's nothing I can do to get a better stack trace.
 
user3010322
Everything is shit.
 
user3010322
Because the object file is generated.
 
user3010322
By a program.
 
user3010322
Which doesn't take debug vs. no-debug.
 
user3010322
12:39 AM
Fuck me.
 
user3010322
This is the shit that comes from hand-generating your shit.
 
user3010322
"But it's fast."
 
user3010322
BUT IT'S IMPOSSIBLE TO DEBUG OR FIGURE SHIT OUT.
 
user3010322
AND ONLY ONE WIZARD IN THE WORLD WITH THE INTIMATE KNOWLEDGE CAN EVER UNDERSTAND THE BULLSHIT YOU'VE DONE HERE.... AND THAT'S YOU!
 
user3010322
And nobody else. On your team. Or in the world.
 
user3010322
12:41 AM
Good job. You're now an expensive person.
 
Ell
Well you're using it wrong obviously
Breaking some invariants
Litter asserts through your code
Before calling the luajit stuff
 
user3010322
Wrong: This builds AND runs on regular lua 5.1, 5.2, and 5.3.
 
user3010322
There's no special "calling the luajit stuff".
 
@ThePhD Yes that's the JIT part
(It's not really object file)
@ThePhD Doesn't mean you haven't broken a contract
You might be depending on some implementation detail of the original VM
Or just plain UB that JIT exposes
 
user3010322
The chances of me figuring this out without a stacktrace or anything else is so grossly minimal, I can't even begin to describe it.
 
Ell
12:43 AM
@ThePhD still, you must be breaking some contract
Or there is a bug in luajit
Build it on Linux and run with sanitizer or valgrind or something
 
user3010322
:l
 
Ell
Do you know where it occur
*occurs?
 
@ThePhD is it actually crashing, or are you debugging and detected a segfault?
 
user3010322
@MooingDuck It's detecting a bad pointer access.
 
user3010322
+ 0x10 from a nullpointer
 
user3010322
12:47 AM
And throwing an Access Violation
 
@ThePhD detecting != crashing
 
Well if throwing an AV isn't crashing for you
 
Disable JIT and then enable it incrementally until you find which part of the code segfaults vOv
Also there seems to be switches for JIT optimisation level so
Disable that
 
The Windows JRI deferences nullpointers left and freaking right, and when it detects that that occured, it then creates and throws the nullreferenceexception. Took me a long time to realize I should just ignore those access violations.
 
Ell
Why don't you step through the code until it segfaults?
 
12:55 AM
> We just switched from Rust to Nim for a very large proprietary project
lol /cc @Rapptz
 
@Ell if he can't get a stack trace, I doubt he can step
 
Ell
Nim doesn't have zero cost abstractions does it?
 
user3010322
Shit....
 
user3010322
I've compiled with 5.3.0, 5.2.1, 5.2.3, 5.1.0, 5.1.5 for lua
 
user3010322
None of them fail.
 
user3010322
1:06 AM
It's just luajit.
 
user3010322
It's the only one that fails at runtime.
 
user3010322
Arrrrgh
 
Ell
@ThePhD can you step?
 
user3010322
I am stepping one ASM line of code at a time.
 
Ell
@MooingDuck I guess not
If its all ASM...
 
user3010322
1:07 AM
One line of disassembly*
 
user3010322
Guess this summer I should learn me some ASM.
 
Ell
Nah
 
@StackedCrooked Today's episode of Arslan is great. Next week's looks amazing too.
 
user3010322
Oh.
 
user3010322
I'm a fucking idiot.
 
user3010322
1:14 AM
@Rapptz We have bad code in our tests in sol. @___@
 
user3010322
Also, Rapptz, can you teach me how to separate test cases into different files? Having them all in one thing in sol is a bit painful.
 
Mar 3 at 5:20, by Park Young-Bae
@ThePhD Is there a reason sol's tests are all in a single file?
 
@ThePhD You're doing it in wrong place
 
@ThePhD kek
 
@ThePhD ?
they're behavioural tests.
code here, expected behaviour there.
 
user3010322
 
user3010322
non_overloaded takes 3 arguments.
 
user3010322
I only pass one in the lua.
 
user3010322
The regular PUC lua checks nulls.
 
user3010322
luajit doesn't.
 
user3010322
@Rapptz And after fixing all my bad test case code, luajit now works with sol perfectly and all the tests compile and pass with no errors or warnings!
 
user3010322
1:21 AM
I'll make a PR soon.
 
@ThePhD lol
 
user3010322
@Borgleader I'm a week early on my sol goal!
 
You know you spend too much time doing computer graphics if you see wire aliasing during long-weekend vacations. http://t.co/51pyac4J3d
lol
@ThePhD congratz
you now have 3 weeks to do the other thing, i have a calendar reminder. better be on time ;)
 
user3010322
;~;
 
user3010322
But... but the other thing is so much harder!!
 
1:23 AM
I have nothing fun to work on.
I thought I'd work on Filesystem TS but it's a mess
 
finish ogonek ;)
 
nty
 
work on your card game then
 
gamedev is a sin
 
they say that about all the fun things...
 
1:30 AM
is it hallal to specialize std::default_delete
 
no
actually I don't know
> A program may explicitly instantiate a template defined in the standard library only if the declaration depends on the name of a user-defined type and the instantiation meets the standard library requirements for the original template.
sure I guess
 
Let's say it meets whatever those requirements are then
 
If there is no restriction, you can do it. If there is no allowance, you can do it but it has to be the same more or less.
 
allah is great
 
well in any case
I consider it evil.
when I see default_delete I always assume it calls delete x; or delete[] x;
would be weird if std::default_delete<Foo> did SomethingEvil(x);
 
1:36 AM
it's for an opaque handle
 
probably better to provide your own deleter
and an alias for the unique_ptr using it.
 
Have you considered overloading delete? Specializing std::default_delete means it has to do something different than just deleting (except you know, you shouldn’t really).
 
@Rapptz meh, it's kind of polluting
 
it's correct™
 
@LucDanton yeah I guess I could do that
 
1:39 AM
@buttifulbuttefly Not necessarily a good fit depending on how opaque the handle is supposed to be.
 
template <class T> struct default_delete {
    constexpr default_delete() noexcept = default;
I see even the standard wishes you could do this
 
ayyy, found him
he only gets a short sidequest :<
 
spoilers
 
@buttifulbuttefly If 'opaque' means 'incomplete', delete is not the right tool (either in overloaded or default_delete form).
 
@Rapptz did you have to explicitly say you didn't kill him?
in the save game generation I mean
 
1:42 AM
lol yeah
dw I'm just kidding
it's obvious he'll be there
 
There's supposedly TW2 save import
 
yep
 
still its kind of a spoiler
 
the quest could've taken more than 15 mins tho
I mean wth
 
@Borgleader When you import your save or generate one it's pretty obvious if he didn't get killed then he'll be here somehow.
Just like Triss.
 
1:44 AM
@LucDanton Opaque as in, it's a created through a C API. opaque_ptr thingy = create_thingy(); destroy_thingy(&thingy);
 
also I had sex
and killed keira immediately afterwards
 
Congrats
 
not starring sry
 
what a time to be geralt
 
I suppose template<> struct default_delete<incomplete_foo> { void operator()(incomplete_foo*); }; is fine as long as you morally delete the pointee.
 
1:44 AM
wish I could get over the wraiths
but it's making me not wanna play
 
the baron's quest is the best I've seen
 
@buttifulbuttefly Yeah that’s a job for a deleter, not default_delete.
 
and it further ramifies after you finish it, really nice
 
@LucDanton alrighty then
 
Ell
@ThePhD did you add a check?
So you don't make this mistake again
 
user3010322
1:47 AM
Check for what?
 
I scrolled up and had a massive deja vu
 
something from an article from before the game was released
> He knows someone who's played 200 hours of The Witcher 3: Wild Hunt and still hasn't seen all the content.
I kinda believe this
been playing for 20 hours and didn't even do like a quarter of what's available in velen
 
Ell
@ThePhD the lua thing
 
user3010322
@Ell I just fixed the tests. There's no static checks in lua for "you passed the correct number of arguments". We can bake asserts into the code, MAYBE, but that's... not really the most useful thing either.
 
Ell
It does runtime checks though right?
 
1:52 AM
Is lua like jabbascript where function signatures are useless
 
no
well I guess?
I don't know
if you don't pass in the correct number of arguments the rest are nil by default in regular lua
 
Ell
That sounds sucky
 
it is
but it's the only way to do default arguments in lua
 
Ell
Static typing is just so much better than dynamic I feel
 
this has nothing to do with dynamic typing
 
Ell
1:56 AM
If I was embedding a scripting language I'd prolly choose python
@Rapptz okay
I guess you could get that behavior in a statically typed language
I just associated it with dynamic vOv
Dynamic duck typed I mean
 
@Rapptz Yep that's jabbascript
idk who thought that kind of behaviour is a good idea
 
I don't really like it
it allows for the hacky way of doing default arguments though
x = x or 42
 
I don’t really mind.
 
I've had more than enough bugs caused by that nonsense in jabba
 
Ell
Hmm or maybe I'd embed a JVM
 
2:04 AM
@CatPlusPlus It’s not like having the right number of arguments makes the call valid anyway.
And then there are things like quasi-overloads and ....
 
No, but it doesn't go on silently
 
@LucDanton But it's a start!
 
It really should be a hard failure
 
@CatPlusPlus Depends on what the writer did? That’s the point.
 
well I mean you can't do anything with nil in lua.
 
2:04 AM
34 secs ago, by Luc Danton
And then there are things like quasi-overloads and ....
 
it'd probably give you an error in the function body
 
37 secs ago, by buttiful buttefly
@LucDanton But it's a start!
 
It gets you nowhere.
If you want checking, you’ll need to write it yourself one way or the other.
 
Ell
That's the lua motto isn't it?
 
..no
 
Ell
2:05 AM
"Write it yourself"
 
Obviously I'd also rather have types
 
Ell
@Rapptz hey man no need for that ellipsis
 
In Lua instead of describing the parameters you write checks. That’s it.
 
But it does cause bugs that might go unnoticed until later and that wastes time and is annoying
 
it was 2 dots
not an ellipsis
 
Ell
2:07 AM
I knew you'd bring that up
 
@Rapptz heh
 
Ell
I thought I was the one being lenient on you
But that's what I get in return
Oh well
I guess I deserve it
No need for the two dots
This place sucks balls
 
sorry alt tabbed
I was just kidding
Lua doesn't have version checking macros
can't find them anyway
 
user3010322
@Rapptz You can check against a few macros defined in the library.
 
user3010322
If none of them exist then you're on Lua 5.0 or worse.
 
2:16 AM
not a solution
 
user3010322
What're you looking for anyhow?
 
user3010322
Or, trying to do?
 
what else
check version
found it
LUA_VERSION_NUM
not documented
go figure
major * 100 + minor
503 for 5.3, 502 for 5.2, 501 for 5.1
it was added in 5.1 so it doesn't exist in 5.0 or lower
 
user3010322
2:43 AM
@Rapptz You're writing luaL_checkversion
 
user3010322
?
 
Hey, does anyone know if you have to license to use MSVC for commercial purposes?
like if you have a program that you want to distribute and it requires the runtime dlls for msvc, do you have to pay microsoft?
 
Pretty much everything on Windows requires some version of the runtime libraries.
So no, you don't need to pay to use them. Furthermore, MS distributes the runtime libraries for free.
 
@MichaelMitchell No. There are (or were the last time I looked) some restrictions on the kinds of programs you could write (e.g., not directly compete with Office or Windows) under some circumstances, but that's about it.
 
2:56 AM
very cool, thank you.
@JerryCoffin ok
so what about using Visual Studio
 
@MichaelMitchell What about it?
 
do you need to have a non-express or student edition to release commercial stuff?
well, I guess they can't really tell, since it just uses msvc to compile everything
 
You need a license to use Visual Studio. But you can do whatever you want with the binaries that you compile with VS.
 
@MichaelMitchell Not sure about student edition, but you can release commercial stuff with the old Express Edition or the newer Community Edition.
 
ok
very good information
thank you
 
user3010322
@Rapptz I made the functions lua_version and stuff work in the compat layer.
 
user3010322
So I guess we have those now.
 
user3010322
I'm still wondering why you want it, though
 
..?
I don't
 
user3010322
...
 
user3010322
3:28 AM
Wait
 
user3010322
Why were you asking about it before, then? ;~;
 
user3010322
@DeanSeo I updated `sol` to be able to work with `luajit`, so if you want a NECKBREAKINGLY FAST lua implementation that still has 5.2 / 5.3 API codepaths, you can totes use it.

I'd rather stick with just using regular vanilla lua 5.3 though. :b
 
blazingly fast
 
@ThePhD Curious backticks.
 
markdown not multiline
 
3:40 AM
currently I got this: `std::vector<std::shared_ptr<Peer> > peers_;` inside the Host class. So I can create and add a new peer like this: `std::shared_ptr<Peer> peer = std::make_shared<Peer>( std::unique_ptr<Host>(this));
peers_.push_back(peer);`
But how would I do this if I wanted to use a unique_ptr instead of a shared_ptr?
constructor of Peer looks like this btw: Peer(std::unique_ptr<Host> host) : host_(std::move(host)) {}
 
move it or don't use an intermediate verbibol
also have you heard of emplace_back
 
Have you tried clear()ing the vector from time to time to see what happens?
or just for the sake of trying
 
so should I choose a unique_ptr over a shared_ptr here?
 
We can’t say. Only you can.
 
I say yes!
 
3:53 AM
@buttifulbuttefly It must be a fair coin toss.
 
I tossed the coin again it said no.
You can't trust anycoin nowadays :(
 
Alright.. thanks it works fine and thanks for mentioning emplace_back @buttifulbuttefly. Even though I move all the time everywhere now.
 
Butt do you like it?
 
terrifying
 
4:28 AM
@Rapptz Is there a way to tell jsonpp to parse a number of bytes, rather than parsing until the first \0 is found?
 
no
 
easy to add but it does input validation so iunno how that'd work
 
Doesn't std::string not rely on \0? If so, maybe jsonpp also doesn't.
 
I'll just write a \0 where it expects it but that's hacky hacky.
 
user3010322
4:31 AM
There's no overload for const char*, sz for jsonpp?
 
user3010322
SMELLS LIKE AN INCOMING PULL REQUEST.
 
no it converts it to std::string
 
@ThePhD Low-hanging fruit. :P
 
user3010322
Oh.
 
@buttifulbuttefly Are you sure you need it?
 
user3010322
4:31 AM
Why don't you just have a version that takes const char*, std::size_t n ?
 
Doesn't std::string::c_str add the '\0' for you?
 
I parse from pooled buffers. I don't add \0. I will.
 
or is the '\0' middle of the string?
@ThePhD I can
 
user3010322
You should totes do it!
 
It'd require reworking a bit of the parser logic
but it's possible
 
user3010322
4:33 AM
Does the parser make copies of pieces or does it just keep views to pieces?
 
I don't remember why I went the null-terminated-string approach to parsing
maybe cause it's easier for me to reason about
just a const char*
goes through the string once
 
Rapptz the C programmer
 
ikr
I saved myself sizeof(size_t) * 2 bytes.
those bytes matter™
 
ITT AVX512's coming out
 
4:38 AM
I think I'll take iterators instead
nah iunno
 
Cannonlake for desktop will probably be out before then. lol That should have AVX512. (I hope.)
 
Iterators are kinda good on AVX.
There. Threads merged.
 
@Rapptz Gotta support std::forward_list<CharT> somehow!
 
lol
 
Actually I think it's my buffer being corrupted hmmmmmmmmmmmmmm
 
user3010322
4:39 AM
Hrm.
 
I mean what are the cons of taking iterators
 
user3010322
Now that I see Rapptz's parser I have better ideas on how to do my own.
 
user3010322
@Rapptz Absolutely none, your code will pretty much work as-is.
 
@Rapptz ~templates~
 
user3010322
@MarkGarcia Library is already header only.
 
4:40 AM
~
 
I guess parse(str, str + n, ...); is a bit weird compared to parse(str, n, ...);?
 
user3010322
Just forward parse( str, n ) to parse (str, str + n)
 
@Rapptz This is C++. How is it weird to use a pair of iterators?
 
user3010322
So long as you're not taking Iterator&& you should be fine.
 
@wilx not very
 
4:41 AM
Not really.
 
Morning.
 
Ok it was the buffers being corrupt somehow
 
Morning.
 
@buttifulbuttefly rip
 
No actually they are not corrupt it's just that this whole design is shitty
rip still
I'll go have launch
 
4:43 AM
um
what exactly is the exception thrown?
is it "unexpected token found"?
 
(the design of this buffer pool not your lib which is positively great)
I think I know how to fix actually
 
throw parser_error("low surrogate pair found but high surrogate pair expected", line, column);
these errors
 
 
thanks feeds
very helpful
 
> I've taken two quarters (co-op engineering university) of C++ and so far we've really only made command prompt programs with the occasional .txt file outputs. I've learned most of the basics of C++, but I have no idea what I can actually do with it. How is this, or I suppose any object-oriented language, implemented in real life projects?
I've had "constexpr variant" in my todo list for 2 years
 
4:51 AM
@Rapptz I have had several todo lists. I have lost them all. :)
 
good thing I use GitHub Issues™!
 
yay it verks
time to launch
i love u reptz
 
I've done nothing productive all day
I didn't even play video games.
If there's a definition of wasted day it'd be this one
 
5:09 AM
Same. I watch Anime all day.
I did spent a couple hours trying to set up a VM to test older Linux distros. Failed miserably.
I might try again later.
 
@Rapptz If you’ve done optional already it’s a bit more boilerplate.
I dislike the recursive union thing too distasteful to bother.
also I figured I need to make the zippy visitation/apply thing public, it’s actually very useful
dang I’ll need a name for that, too
 
The heat is terrible here, send help
@LucDanton How about henry
boost::henry is available
don't miss the great opportunity!
32 degrees, fuck. also 80% humidity
not sure if sweat or condensation
 
So busy now a days ... Start ignoring invitations & messages left right & centre.
I need 'me' time, just me & my apps.
 
5:33 AM
@chmod711telkitty Your apps?
 
My new & existing mobile apps ...
 
You live exclusively off your apps?
 
5:57 AM
RIP John Nash.
6
 
6:20 AM
hello guys
 
Nope @butt
 
Hmmm @Rapptz. Dumping the number 1000000 gives 1e+006, even when I set precision to, say, 10. Any way to change that in the format options?
 
6:42 AM
@buttifulbuttefly std::fixed
 

« first day (1682 days earlier)      last day (3259 days later) »