« first day (2054 days earlier)      last day (2889 days later) » 

9:00 PM
@QPaysTaxes Here's the not terrible piece I made: soundcloud.com/austin-t-938108000/havenpiano
 
@QPaysTaxes there's only one really awesome puppy and we know that coughs, splutters and spits out his mouthful of tea :p
 
nwp
@QPaysTaxes you add a virtual do_something(){} to the base class and override it in the type you care about and just call do_something() which either does the thing or nothing. No try/catch, not dynamic_cast.
 
firepuppy disagrees
@nwp That's not always the best behaviour.
 
@JonClements WHAT WHERE ARE YOU
 
nwp
@Puppy yeah, my preferred method is to not put objects of different types into one container throwing away type information and later on attempting to recover it with dirty hacks
 
9:03 PM
dynamic_cast isn't a dirty hack.
it should be used judiciously, but it's no dirty hack.
 
nwp
@Puppy I disagree. If you need dynamic_cast you are doing it wrong.
 
not always
 
Not always. Duh. Entire language float on this feature. It's useful some of the time
 
it really depends on what the fundamental contract of the base class is.
oftentimes dynamic_cast just means your contract is broken.
see, this raises the question as to why you need to give a shit about that.
 
emulation of double dispatch with dynamic_cast is better than the alternative of making a map from types to functions because it can handle derived classes
 
9:08 PM
@Morwenn I don't think I get it
 
@milleniumbug The map is a dynamic data structure that scales better, IYAM
 
Ah. Context
 
also it can do single dispatch too
 
@Puppy The map approach has the advantage of not cluttering the class interface, so yeah. Pick your poison.
 
I think that the dynamic part pretty seals it in favour of the map
with the dynamic_cast you have extra-contract semantics but it's never extensible for any other derived class
with the map you have extra-contract semantics, but anyone can register their own classes for it
 
9:11 PM
@QPaysTaxes What are you doing anyways?
 
yeah, but still, you have to define the functions, even when it's clear that the "base" function can take over
 
@QPaysTaxes Which one?
 
i.e. (SpecialShip, Asteroid) can be handled by (Ship, Asteroid) function
 
yeah
it's a weakness of std::type_info
 
@QPaysTaxes So what are you trying to do with inheritance?
@QPaysTaxes And what did you use to build everything? How does it work?
Because my project is to build a programming language, dammit
kappa
@QPaysTaxes No, I mean what sort of parser did you use, what's its features?
What kind of parser
That's not what I meant
Recursive descent?
 
9:14 PM
people waste way too much time on parsing and lexing.
 
@Puppy Oh yeah, you built one too; what do you mean?
What should people be spending more time on?
 
semantic analysis
converting to intermediate code
optimization
 
I haven't reached that chapter yet though
:(
 
i.e. doing your actual work as a compiler, not preliminaries
 
optimizing you can just delegate to LLVM
 
9:17 PM
@QPaysTaxes Why don't you go through the dragon book too?
@QPaysTaxes It's pretty good
@QPaysTaxes google.com/…
 
yeah
that's a super dumb thing to want to do.
 
@QPaysTaxes You'd probably benefit from reading the standard textbook on it
@QPaysTaxes It really doesn't matter.
@QPaysTaxes It covers all parts, and an interpreter is a translator as well.
 
why did cinch suddenly stop using arrows, I wonder
 
@milleniumbug Wait what
what you talking about
WHAT ARE YOU TALKING ABOUT I MUSTA NO
 
nah
I wouldn't bother with that
 
9:19 PM
@QPaysTaxes It's literally free. Just Google it
 
lexing and parsing are super boring and easy, you don't need any IR or optimization, and you're gonna make your user define all the semantics, more or less.
 
so there's really little to it
although I'll repeat again that rewriting basically everything on the fly is a super dumb thing to do.
 
@QPaysTaxes lol you go to amazon
you funny
@Puppy What do you mean by "super boring and easy?" It's not easy to use newbies :(
@QPaysTaxes Why don't you explain the langauge? What kind of language is it?
 
that... does not require any sort of on the fly rewriting.
also Python is pretty terrible.
@QPaysTaxes In my language you can treat it the same as every other method with 0 lines of code.
 
9:23 PM
@sehe Do you know chriss kohlhoff ? I mean you even talked with him ?
 
@Ramy I'm not gonna tell you. You're only going to use it to spam him
 
I will not spam. I want a code rewiew.
xD
 
Nothing stops you from mailing him
 
Ell
@Puppy woah puppers
Main() {
    std.cout << "Why Main()? :(";
}
 
9:26 PM
what
 
Ell
no function or fn or somesuch?
what do other decls look like?
 
type t {} for instance
 
@Puppy Sooo. "Compile" runs it?
 
@QPaysTaxes Thanks for saying me.
 
@QPaysTaxes Unforunately I do not Python
@QPaysTaxes So where did you learn to do this
 
9:28 PM
yeah.
it's backeded by coliru
 
@QPaysTaxes Also, I am behind since I am still stuck on predictive parseres
So have fun
 
@QPaysTaxes It has the slight problem of being shit, though.
 
@sehe Just take a look, what do you think. I started 1 day ago coding in asio prntscr.com/bas2nb )))
 
> usable
@QPaysTaxes You funny.
 
C# also has generators but it is not shit
 
9:29 PM
Oooh C# I'll be doing htat
oh by the way I just got my internship back
They fit me in
hard
@QPaysTaxes do you english
 
@QPaysTaxes Yes
 
@QPaysTaxes wakata
 
nwp
I'm watching trump almost every day, but I swear it's not as bad as it sounds.
 
@nwp lol but this card is trash
 
4 languages
You can compile perl
 
9:48 PM
C# is only partially compiled
 
@QPaysTaxes What exactly does "compiled language" even mean? Oh, and what does it do more easily? I've used it, but not for very long--essentially every time I turned around I had to use P/Invoke, which made it much more difficult than C++ (but for other things, it could be much nicer indeed).
 
depends on how you define executable file really
 
@QPaysTaxes the difference is small really
 
@QPaysTaxes They're packaged separately in this case.
 
.NET Framework
 
9:52 PM
C# compiles to CIL which is run in a VM.
 
Also nobody cares about interpreted/compiled really
lol
 
@QPaysTaxes .NET itself is a library, but the CLR (common language runtime) includes both the library and a virtual machine to execute an intermediate code.
 
@QPaysTaxes It's not extra syntax fluff, it's pretty serious core language improvements.
 
@QPaysTaxes Well, not just syntax stuff--a fair amount of extra semantic stuff.
 
well, having lambdas for the past decade instead of the past year is a big improvement.
 
9:54 PM
Because you can ship the code that uses it reliably
 
@QPaysTaxes Because how much shitty Java code do you think got written without lambdas?
 
see Android and its inability to support Java 8, unless you have Android 6, which is like 1% of the market
 
how many shitty Java projects are out there using 3-year-old Java versions?
 
@QPaysTaxes I'm not sure it's ever actually interpreted. For years Java has had a "Hotspot" compiler that could compile byte code at runtime. I haven't reverse engineered it to be sure, but I believe the CLR does pretty much the same, but does it to all code instead of just "hot spots" like the HotSpot VM does.
 
everybody supports C# with lambdas, and most critically, basically every API ever is written to support and use them properly.
then there's generics, which in C# are substantially less shit than in Java.
 
9:55 PM
@QPaysTaxes u w0t m8
also it doesn't really matter
it's Java code and needs to be supported so no lambdas for you
@QPaysTaxes !!!
you can't use lambdas if you need to support Android
 
@QPaysTaxes Yes. I'm saying that's true with Java, but I believe it's false with C# (though I'm not entirely certain of that).
 
yes, but not everybody is.
@JerryCoffin The JIT aspect is a bit of an implementation detail, really.
 
not many people should care about the difference between interpreted/compiled
 
I merely stated that C# had some pretty serious core language improvements.
that pretty much makes it generally better, though.
 
and you asked what were these improvements
 
9:58 PM
@Puppy At least in theory, it's completely an implementation detail, at least as long as everything works right, so there's no difference in behavior between the two implementations (which wasn't entirely true back when I was stuck using Java for a while, but I'd guess that was fixed years ago).
 
Because they require Java 8 compiler which outputs Java 8 bytecode
 
@QPaysTaxes Nope.
 
user1804599
Perl is awesome
 

« first day (2054 days earlier)      last day (2889 days later) »