« first day (1617 days earlier)      last day (3314 days later) » 

4:04 PM
lol writing the VM in C++
@thecoshman server is ded
 
so then
in this D&D session: we sold one of our party members into sexual slavery.
 
4:26 PM
sounds fun
 
12 hours' sleep yeahhhh
 
With the proviso that some (but not all, the last time I checked) of these have been fixed in the time since.
Most of the underlying problems haven't been fixed though (and, indeed, most can't be without re-designing JS from the ground up).
 
"friend"
 
4:43 PM
"arm"
 
"cat"
 
"when"
 
"moment"
 
"hairy"
 
4:44 PM
Her response is great
 
"that"
 
> Von D also claimed anyone who read the name and “automatically jump[ed] to a disgusting conclusion” should instead question how they arrived there.
She'd do well in the Lounge
 
user1804599
uh, can lambdas have template parameters?
 
user1804599
test/../src/object_file.hpp:19:23: error: expected body of lambda expression
        auto ri = [&] <T> {
                      ^
 
user1804599
Bleh.
 
4:46 PM
/cc @pantoona
 
@райтфолд You could try calling operator () explicitly
 
user1804599
test/../src/object_file.hpp:22:13: error: templates cannot be declared inside of a local class
            template<typename T>
            ^~~~~~~~~~~~~~~~~~~~
 
Oh wait
 
user1804599
C++ is absolutely retarded.
 
Nevermind
I'm so sick
I'm afraid I'll have to skip the marmelade too
 
user1804599
4:48 PM
Alright then, #define it will be.
 
You could make the lambda take an argument just for the sake of carrying the type
 
@райтфолд It was to support export.
 
user1804599
Great. #define INT(T) baka::read_integer<T>(reader, baka::byte_order::little_endian)
 
"Aren't arrays equivalent to pointers?" NOLightness Races in Orbit 5 secs ago
 
@райтфолд Sucky workaround: coliru.stacked-crooked.com/a/f40d1b498e778f33
 
user1804599
4:54 PM
@AndyProwl Even a macro is more readable than that!
 
Probably
Hence the "sucky" :P
 
@AndyProwl It's like Java all over again.
 
@milleniumbug Java?
 
@AndyProwl There's a function there that returns an untyped array of Object, or T[] which is deduced by the type of array passed as an argument.
 
4:57 PM
f(new Whatever[0]) returns Whatever[] and f() returns Object[]
 
Not sure I follow
(I don't know Java)
 
user1804599
@milleniumbug In Go's reflection library you can only get RTTI of an object, not of a static type.
 
user1804599
So if you want the RTTI of T, you have to pass *new(T) to it.
 
My point was that it's the closest you can get to [] <T> (...) { ... }
Have a dummy function argument just to carry a type argument
 
@AndyProwl And that's what they do in Java too. It's a sucky workaround. Both there and there.
 
user1804599
4:58 PM
If you want RTTI of an abstract type, you have to construct a pointer to that, get the pointer RTTI, then get the pointee RTTI out of that.
 
@milleniumbug Ah, all right
 
@райтфолд or just typeid(T)
 
user1804599
Uh, no?
 
user1804599
Go doesn't have typeid.
 
oh
well, I already knew Go was a dumb language, now I just know that better
 
5:00 PM
@райтфолд Not sure if hilarious or just simply retarded.
 
@orlp You surely meant NSFL.
 
@orlp she hasn't been using her mouth for a while (this sentence doesn't have to be NSFW at all costs)
 
user1804599
I need like a stack trace except the order and duplicates are insignificant.
 
user1804599
5:06 PM
But even in the case of TCO, the entries have to be there.
 
i wanna dualboot win7 now
wine is shit
 
so have the themes been picked yet? :D
 
@райтфолд I'm missing some context here, what duplicates are missing that you'd like to see?
 
user1804599
Insignificant, not significant.
 
@melak47 I propose the theme
oh
@райтфолд read it the other way around lol
 
user1804599
5:08 PM
This is useful for exception contracts.
 
what is TCO?
tail call opt?
 
user1804599
Tail-call optimisation.
 
user1804599
I want to make it so that you can say func map(xs, f) throw from f { … }. This means that map can only throw exceptions thrown by f.
 
user1804599
Any other exception results in a contract violation exception in debug mode.
 
user1804599
In release mode it's just UB.
 
5:09 PM
your language is statically typed?
 
user1804599
No.
 
user1804599
It's dynamically typed.
 
ah, otherwise I would scald you for doing what C++ would do :P
(I'm still very salty over what noexcept could've been)
 
user1804599
Hence I the argument against exception specs that unlike other checks they're at runtime doesn't apply. :P
 
that sentence hurt my brain
 
5:11 PM
suppose I should make some lunch
 
when you say that map can only throw exceptions thrown by f what exactly do you mean?
 
map can propagate the exceptions
map can propagate and throw them itself?
map can only throw, not propagate those exceptions?
 
user784668
@MartinJames lol
 
user1804599
 
5:15 PM
@райтфолд so throw from only refers to propagating exceptions, and disallows propagation from other sources?
 
@Fanael Yes, we both got stuft:(
 
> let mutable result := list(); // exception thrown here is not OK
 
user1804599
So any exception that didn't come from f will be considered a contract violation.
 
user1804599
@orlp Yes.
 
^^ Huh?
 
5:15 PM
@StackedCrooked memory allocation can fail
@райтфолд does throw from create a contract that disallows throwing from the function itself?
 
user1804599
No, it creates a contract that verifies for every exception leaving map that the exception originates from f or something called by f.
 
user1804599
Hence it needs to inspect the stack trace.
 
user784668
@MartinJames You're 10th if the Hammers win
 
ok, then during your exception handling, when you're about to leave the map frame you should check if the previous frame on the stack is f
 
user1804599
Yeah.
 
5:17 PM
I don't see the need to mess with duplicates or ordering though
 
user1804599
No need to mess with them, since they're irrelevant.
 
@Fanael mehhhhhhhhhh... :(
 
@райтфолд then why your original question? statement
 
user1804599
I'm rubber duck debugging.
 
Hi folks. I'm about creating a delimited field record reading stream (e.g. suitable for .csv formats). Grrrr that shit doesn't work (don't ask) ....
 
5:20 PM
then don't tell lol
 
I got a bit drunk.
Now it's the time to write some good code.
 
user784668
@MartinJames I'd love to have your problems!
 
user1804599
Ahhh std::string::data() y u const.
 
@райтфолд bwuahaha
 
@MarcoA. Not gonna happen. You're already above the Ballmer peak.
 
user784668
5:22 PM
@райтфолд Histery.
 
@JerryCoffin shtd:;cout << 2there wa s an eror";;
 
@райтфолд Doesn't really. You know when you create the invoke handlers what you're calling.
 
user1804599
Yeah.
 
user1804599
But TCO makes it tricky.
 
user1804599
5:24 PM
A call to f by something else called by map also applies.
 
user1804599
Otherwise HOFs would make this technique a PITA.
 
have a .iso that's bigger than my USB. RIP.
 
user784668
@Blob Buy a bigger USB drive
 
@Fanael :|
 
user784668
They're like $1 for bajillion TB
 
5:25 PM
@райтфолд That's broken semantics, then.
 
wonder if i can install windows without usb
 
user1804599
Why?
 
@райтфолд then all you need to do is check if f occurs at all in the stacktrace before map occurs
 
user1804599
@orlp Yes, I know.
 
user1804599
But with TCO this is very difficult.
 
user784668
5:26 PM
@Blob DVD?
 
@Fanael don't have
 
user1804599
It's possible, though. I know how.
 
@райтфолд I fail to see why
 
user784668
@Blob Then buy a goddamn bigger USB
 
or are you referring to non-recursive TCO?
 
5:27 PM
@Fanael plis.
 
user1804599
@orlp Because you don't want the stack trace to grow indefinitely if there's an infinite recursive TCO'd loop.
 
user1804599
@orlp I always refer to all TCO when I say "TCO."
 
@райтфолд Because map should list exclusions for the other stuff it calls as well, then.
 
user1804599
If I want to refer TRO specifically, I say "TRO."
 
user1804599
@Puppy No.
 
user1804599
5:28 PM
If f or anything called by f throws X, then it's f's fault and not map's.
 
I have the declaration explicit SquareMatrix(int dimension = 1); but apparently I only get the warning C4244: Conversion from double to int; possible loss of data whenever I type SquareMatrix(4.3) on my driver.cpp. Any way to only take in integer values?
 
user1804599
If the caller of f throws, but not f, then it's a different story, of course.
 
right, except map doesn't give a shit about what f calls.
 
user1804599
It doesn't have to.
 
@DonLarynx driver.cpp?
are you trying to re-live java?
 
5:30 PM
> i'll use the default of 51 whatever that means
heh
 
@райтфолд you could instead take the opposite approach, and maintain a stack of contracts
 
user1804599
I know how to do it.
 
@orlp Just letting you know about my current mood :-/ ...
 
user1804599
I keep a normal stack trace, except duplicates are elided. At throw from clauses, a flag is set at the current stack frame so that duplicate checking for the given function doesn't reach further than that flag.
 
@πάνταῥεῖ What's wrong?
 
5:32 PM
@райтфолд eliding duplicates is expensive
 
user1804599
Contracts are only verified in debug mode, so that doesn't matter.
 
16 hours ago, by Luc Danton
You can add explicit SquareMatrix(double) = delete; and similarly for float.
 
@DonLarynx I'm suspecting wrong template type deduction for operator>>() though I have a specialization for string. But I'm actually not asking about these problems. As mentioned, just to provide a grip to get my current mood.
 
@райтфолд You could also have an map of counters, one per function, when you enter a function you increment the counter, and vice versa. Then you always know if your current trace includes that function in O(1).
and without blowing up memory
 
user1804599
@orlp Right!
 
user1804599
5:35 PM
That's much better!
 
user1804599
You are awesome!
 
:P
 
user1804599
Noexcept is nice. You just specify throw Nothing. Nothing is a type that has no values. :D
 
@райтфолд such type is called Void
 
Such type should not exist
 
5:36 PM
sure as hell should
 
user1804599
@Jefffrey Absolute bullshit.
 
Null, Void, None, Nada, etc
 
user1804599
Such a type is incredibly handy.
 
user1804599
For example, for specifying that a function never returns, you make its return type Nothing.
 
Use Set instead
 
5:37 PM
@orlp I like Nada.
 
Nobody ever creates Set values anyway
 
ehmaged, im gonna switch to using libclang for parsing c++ code for my visual studio plugin, so ironic
 
or, with dependent types, you can do things like (Phi -> Void) and then prove contra-positive
 
@StackedCrooked Niente
 
user1804599
Returning from the function will always return in an error, since there's always a type mismatch, since no value has type Nothing and returning is always done with a value.
 
5:37 PM
@orlp That's a good one too.
 
user1804599
Which reminds me, my compiler should emit a PushUnit instruction for a MAIN block. :v
 
nani mo
 
Niente exit(Numero code);
 
I find it retarded that you can have a value of type void in C++
 
Void is terrible for generic code. As explained many times in here.
 
5:39 PM
@ScarletAmaranth uh....
 
@LucDanton Thanks! it worked.
 
map :: (a -> b) -> [a] -> [b] breaks with Void for example.
 
@ScarletAmaranth It’s Void that takes its name (although not the concept obviously) from void, not the other way around.
 
Use unit and () for returning values that you don't care about.
 
void is more like () than Void, although there are some similarities, too.
 
5:40 PM
What about unit (), that can only take one value, unit ().
 
@LucDanton yes, they confuse units and voids, even tho they're entirely different
 
@ScarletAmaranth you can? since when
 
soooo… it’s only natural there is a void value then isn’t it?
 
I don't think anyone is claiming unit and void are the same.
I think people claim unit is better suited than void for purposes.
 
5:41 PM
@LucDanton if by void they mean Void - a type that is inhabited by no / 0 values, then it's not too natural
 
user784668
@melak47 return void();
 
@ScarletAmaranth They don’t! void predates Void (the type name)
 
user1804599
> kind of you know
 
user1804599
He says that all the time.
 
@LucDanton aaah, I see - my bad! then, of course, if it was supposed to be a unit, it had better have one value :P
 
5:42 PM
His Dutch is just seeping through his speech all the time.
 
@Fanael but you can't capture that return "value"
 
@melak47 but it is still a value of type void
 
user1804599
@StackedCrooked lol async I/O
 
user1804599
The worst API ever.
 
anyone owning a BlackBerry (running BB10)?
 
5:45 PM
@melak47 you can also do x, void(), y to prevent comma overload shennenigans
 
user784668
@FilipRoséen-refp I painted a strawberry black once, does it count?
 
@Fanael pics?
 
user784668
@Blob Don't have it anymore, sorry.
 
user1804599
  REQUIRE( main.body == std::vector<unsigned char>(data.begin() + 88, data.end()) )
with expansion:
  {  }
  ==
  { 0, 0, 17, 0, 0, 0, 1, 1, 0, 0, 0, 2, 2, 0, 0, 0, 3, 1, 0, 0, 0, 4, 5 }
 
@Fanael not really, but I'd be very interested in a black strawberry running BB10
 
user1804599
5:47 PM
Catch is nice.
 
@ScarletAmaranth hmph :/
 
user1804599
I can see how this is probably implemented.
 
user1804599
With operator overloading!
 
@райтфолд nice try
 
user1804599
dat pun
 
user1804599
5:49 PM
Alright, object file parsing now works.
 
@StackedCrooked I don't understand that guy
 
It's one of the few videos where he's thoughtfully wording his thoughts.
 
user1804599
Dutch people are naturally bad at it.
 
user1804599
Dutch people tend to call each other teringlijers far too quickly.
 
kankerjong
 
user1804599
5:58 PM
OK, time to implement the object model.
 
user1804599
Or maybe the bytecode decoder first.
 
user1804599
Problem is that Boost.Variant has a bug so that it does not use variadic templates when used with clang.
 
@ScarletAmaranth The gist of it is that you expect void f(); to return.
 
user1804599
So I have no idea what to return from readInstruction.
 
fix boost :p
 

« first day (1617 days earlier)      last day (3314 days later) »