« first day (1830 days earlier)      last day (3133 days later) » 

8:01 PM
@PravasiMeet The answer is yes and no (but mostly no). In a case like this where the source (3, in this case) is the same type as the target (a), then it's just a rather wordy form of direct initialization. If, however, there's a conversion involved, such as a class with a ctor that takes an int, then it (theoretically) constructs a temporary from the passed parameter, then copy initializes thea from that. In reality, it almost always optimizes out the extra steps.
Nonetheless, it's at least supposed to enforce the requirement that the copy (or move) ctor be available--if it's deleted or private, then it shouldn't work (even though it might not generate code to actually invoke it).
 
Ell
I need to make my new function allocate memory now :3
I feel like bjarne ;)
 
@Ell You mean your ::operator new?
 
Ell
@JerryCoffin I'm writing C99 unfortunately :(
 
@JerryCoffin He's using C
 
user1804599
Don't use C++ keywords as identifiers in C.
 
8:06 PM
@Ell Oh. My condolences. But give it some other name.
 
Ell
construct
which takes a char* to fill up maybe.
 
cuntstruct
 
I should really get more ram
if I had 64GB then a leaking driver would be like a lv1 character taking on an end game boss
 
Ell
speaking of lvl1
lvl3 goblin
 
user1804599
gvg3 loblin
 
user1804599
8:13 PM
oh hi @sehe
 
@Ell y
 
Hi. I'm gonna car on home now
 
Ell
ave sum fuk bby
 
user1804599
:o
 
user1804599
8:14 PM
Livestream it.
 
I used to be like that
 
Ell
It still happened to me at lvl 72
 
Then you took the proverbial arrow to the knee?
 
@Puppy I have a separate API that does which supports various backends: No threading, thread spawning, std::async, Windows Thread Pool, and Cilk Plus.
 
black helm, steel kite, mith scimi, iron vest and legs
meanwhile guy 20 levels below me with full dragon
 
8:16 PM
@Elyse but that makes your code future proof! nobody will ever elevate it beyond C :p
 
@AlexM. Think how much worse it could be. Instead of a full dragon, he could have a hungry one.
 
@melak47 for file in $(find src -type f); do sed -i s/new/newterize_dat_ass/g $file; done
 
@AnalPhabet lol $fuke
 
@Griwes I suck pytong at typing
inb4 horrible cock joek
 
sup guise
 
8:28 PM
sup tony
 
@TonyTheLion 'Sup mate
 
not much
 
Been suckin' cock lately?
 
Eat my shorts
 
@AnalPhabet I prefer pussy :)
@Columbo Haven't heard that in a long time
 
8:29 PM
@TonyTheLion $(google "pussy jokes")[0]
 
lel
I was looking at the US power and gas markets
 
@TonyTheLion Probably because it's fucking shit
 
Beer time was good. Now I'm back for Tony :3
 
8:31 PM
lol
 
@Mr.kbok How's that comic series called
@TonyTheLion Also, you probably meant long time
A long long time
 
SO ded
 
@Columbo Saturday Morning Breakfast Cereal
No, actually I don't know hether it's SMBC or not.
 
@MartinJames evening fine sir
 
I checked. It's indeed SMBC.
 
8:33 PM
@TonyTheLion It's back up..
 
@MartinJames you hunting for bad questions again?
 
@TonyTheLion Not so much hunting as 'walking along and continually tripping over them'.
 
:26401678 sounds like a lot
Try cookin' meth
 
C is more Marxist than C++.
 
@AnalPhabet lol
 
8:35 PM
@Morwenn That series is fucking hilarious!
:D
 
for Halloween
 
@Columbo A std::numeric_limits<long double>::max() time to be more exact.
 
SYB
apparently it isn't so easy to use
 
8:38 PM
I see how it could be used to change all a's in a b
 
/cc @AlexM.
 
but it only changes a->a preserving the outer b
 
@Jefffrey what
 
We're making some adjustments to tag length on certain sites and will be causing a few database locks. We'll try to keep impact minimal.
 
@JerryCoffin std::numeric_limits<long double>::infinity()
 
8:38 PM
@AlexM. You don't get the reference?
 
aah
I had to scroll a bit
 
also extT is cool because it allows to combine things
 
yea I get it now
 
but composing still preserves outer b
I want something like lens really
STAB
 
> Files in a project must be ordered by dependency, so you need to put bar.fs above foo.fs in the project so that foo can see bar.
... I have to manually move files in the project... according to dependencies
like, in the tree
with my hand
WHAT THE FUCK
 
8:42 PM
what.
 
@AlexM. what IDE is this
 
What "tool" is this
 
F# under VS
it's an F# thing
 
> VS
 
what if files depend on each other? :D
 
8:43 PM
@AnalPhabet it's F# specific not VS specific you kindergartener
 
@AlexM. I'm still confused as to how are you going to force NTFS to preserve a custom file listing order
 
@AnalPhabet it's a project thing
VS is not gonna show you the files how they are on the disk unless you absolutely ask for it :p
 
Even worse
 
> In all fairness, in F# there's at least one very obvious reason why the compiler takes that linear approach: type augmentations. They basically mean that depending on the position in code, a class might have a certain member or not.
 
@AlexM. that sounds C-terrible
 
8:45 PM
I want all files to be in 8.3 format
 
@AnalPhabet BUTWHY~1.TXT
 
@melak47 Nailed it
 
Also, that's a hack used by that extension
 
Ell
@BartekBanachewicz seems like optimization would be difficult in "nano-passes"
 
8:48 PM
> Nanopass com-pilers
 
@Ell it depends.
 
@AnalPhabet it's working reliably on production systems so it's not horrible
 
@Ell but it's concurrent so it doesn't matter! more cores!
 
@milleniumbug You saw nothing
 
well, as far as you can call FAT32 "reliable"
(not very far)
 
8:51 PM
what the fuck
 
> such as everywhere
Hmm
 
void everywhere() { do_everything(); }
 
auto yolo = []{ everywhere(); };
I like that with lambdas you can easily alias functions.
 
Guise.
 
I guess you can actually do auto yolo = everywhere;
 
8:55 PM
except you can't reliably because overloading
> C++
 
explicit operator bool () const { return is_valid(); }
operator bool () const { return some_stuff; }
How legal?
 
Ell
looks fine to me
 
Why wouldn't it?
 
E.g., I want the first one to proc for if ( x ), but the second one to proc for bool a = my_thing;
Would I get overload resolution derps?
 
oh no PhD strikes again
 
8:56 PM
@milleniumbug but you can overload lambdas! :D
 
AFAIK those two examples are both cases of non-explicit to bool conversion
Explicit would be like static_cast<bool>(my_thing) or (bool)my_thing.
 
@ThePhD Whatever you do, you'll always get such derps :p
 
> We have used Haskell to implement a nanopass compiler for the occam-Ï€ concurrent programming language. Our new compiler is both flexible and maintainable: multiple frontends and backends are supported, new language features can easily be added, and the codebase is smaller, easier to navigate and easier to test than the existing occam-Ï€ compiler.
The use of Haskell’s powerful type system along with test-driven development and automatic property checking helps to prevent several common types of programmer error during Tock development.
this is encouraging but
 
it's encouraging butt
 
I think the part after "but" is more important than you formatting that properly :P
 
9:00 PM
it still doesn't help in how to change from one AST to another
 
user1804599
@Jefffrey its encouraging butt
 
Does anyone get this answer?
36
A: c# - Return the fifth element from the tail (or end) of a singly linked list of integers

John RaschPseudocode: function GetFifthElement(LinkedList list) { return ; }

idgi
 
@ThePhD Ill-formed.
 
I get it
It's a movie reference
 
@Mysticial you need to watch the movie
 
9:04 PM
oh
 
ahahaha
I fail.
 
what if had a type family of asts
uh no there's no 1:1 mapping
expToEvalExp :: Expr -> EvalExpr
expToEvalExp (Lit a) = EvalLit a
expToEvalExp (If a b) = EvalIf (expToEvalExp a) (expToEvalExp b)
expToEvalExp (Call a bs) = EvalCall (expToEvalExp a) (map expToEvalExp bs)
expToEvalExp (OperatorCall a b) = EvalCall (expToEvalExp a) [expToEvalExp b]
this doesn't look so bad really
 
You won't see posts from <...> in News Feed, but you're still friends.
Most excellent.
 
@Griwes how does that work with overloading again?
 
user1804599
9:13 PM
 
@ThePhD At least with most compilers, the attempted implicit/explicit overload won't compile at all, so you'll never get to the point of seeing ambiguity and such in calling them.
 
@JerryCoffin Ooh. Well, alrighty...
Guess I'll just have to stick with one behavior or the other, and tell everyone else to go shove it.
 
@ThePhD ...and much better that way. What you suggested would (IMO) be an abuse of overloading anyway.
 
I also think so.
 
Oh, PhD is not ded!
 
9:17 PM
Might as well be.
Another final in a day.
 
Yeah, I thought he was for a few days :D
 
And I don't feel ready for it at all.
 
Granted, people seldom feel ready for anything. Except for the next Star Wars, my body is ready.
 
Ell
oh man
 
Overloading should be reserved for cases where all the overloads are functionally equivalent, but (for example) you need to carry out an operation on several different input data types. If a person reading your code has any real reason to care about which overload is called in a particular situation, you're probably abusing overloading.
5
 
9:22 PM
Okay, but how does overloading help with ASTs :S
 
@BartekBanachewicz When you're building an AST, you often want to be able to add symbols of various different types to the AST. It's perfectly reasonable to use overloading in a situation like this.
 
what I'm having problems with in particular
is converting from one tree to another
where I want to make only some transformations matter
@Griwes seemed to suggest that overloading can make that easier
but now I think he meant parametrized datatypes
 
Seriously, my Windows 10 is sometimes so unstable that I want to cry.
 
such as AST ifStatementT callStmtT etc
 
@Morwenn Use XP
 
9:25 PM
in that case you'd need an n-functor instance to cater for every possible statement type
 
@Morwenn The only good point about Windows 10 is that it appears that switching to 10 then back to 7 can fix some problems that 7 has difficulty dealing with on its own.
 
I wonder if I could make an AAST
Abstract Abstract Syntax Tree
used for conversions between ASTs
 
Annoyingly Abstract Syntax Tree
 
I'd load code into a lexical-AST, then deserialize into AAST, the load back as say eval-AST
 
@JerryCoffin Cargo cult OS-ing. :P
 
9:27 PM
this assumes AAST is flexible enough to support the conversion
or, in other words, dynamically typed.
 
IOW OneMoreLevelOfIndirection saves the day
 
@AnalPhabet yes and no
 
@ElimGarak Not really cargo culting--just an unexpected (but happy) observed result.
 
having intermediate dynamic type means losing type safety at that point
all other static methods preserve it.
IOW I could just deserialize to a string
and then parse the string
 
@JerryCoffin You plan to ride out on Win7 until support runs out?
 
9:29 PM
but ofc
 
@ElimGarak *cough* looks in another direction
 
AAST could be a bit better
 
Well, as Jerry isn't really a gamer, he doesn't really lose anything (right now). So it kinda makes sense.
 
@ElimGarak I don't make plans for nearly that long a term, but see no advantage to Windows 10 for me at this time.
 
I think I'll write the transformation by hand right now
and see how well it holds up
with some luck the maintenance of it won't be a killer.
 
9:30 PM
@ElimGarak s/kinda/really kinda/
 
Personally, it's been working perfectly. The only issues were/are with Nvidia's drivers, but that can be said on every iteration of Windows. Except with the new graphics API architecture, they haven't really got down TDRs often resulting in hogging the system and crashing.
 
I remember Nooblel crashin' 'is Garbage Collector drivers once
 
@BartekBanachewicz wat why
 
@ElimGarak I've tried it on both my laptop and my desktop. The problems I've seen are probably all driver related, but rendered them unusable in any case. On the laptop, the wireless connection went from rock-solid under Windows 8 to dropping (literally) every 5-10 minutes under 10. I should probably give it another try on the desktop--I had a dying hard drive which I've since replaced, so perhaps the problems I saw there were really related to the HD rather than the OS.
 
@BartekBanachewicz If you overload a function for all every of the types that reside in the AST, you can keep every of these implementations somewhere near the type itself, not in a master transformFunctions module. Also expanding that means just adding one for every type, instead of adding additional pattern-matched cases to the single one that transforms AST (instead of its members).
I believe this kind of boils down to the traditional problem of easiness of adding new functions vs extending those functions for new types. What was that called? I can't remember, but I do remember it had some clever name.
 
9:38 PM
it does have some name.
 
@Puppy to make maintaining the transformation easier
 
@BartekBanachewicz Let me rephrase that. Why in hell do you even want more than one kind of AST.
a lexical AST? that doesn't even make sense to me.
 
@Puppy For example, in a lexical AST I might want to difference between a = function() ... and function a(). In an eval AST, it's meaningless.
 
Well, there's abstract syntax tree, then there's annotated syntax tree, ...
It's obvious that they are not always isomorphic.
 
@BartekBanachewicz I have a funny feeling that there's a semantic subtlety there, actually. But that might just be my bad memory. Or perhaps it's only for the local equivalents?
 
9:40 PM
@Puppy I think only for local.
 
@Griwes It's obvious that it's horseshit.
 
lel
 
@Puppy what?
 
let me put it this way
if you're not maintaining the original syntax of the code, then it's obviously not a syntax tree anymore.
 
@Griwes one for every type... of what, exactly? I have very few types in my AST.
 
9:41 PM
ITT @Puppy Obviouslyâ„¢ is the master of all compiler practice and theory
 
but more generally speaking, it's simply not true that the various trees and graphs are isomorphic.
 
@Puppy okay, then it's A Code Tree, ACT. Doesn't matter. It's a tree, I want to convert AST to it, it's very similar, there's a lot of writing
@Puppy some are.
some are not
 
if your ACT is so close to your AST that you're getting bored transforming them, then just don't bother.
 
@BartekBanachewicz Of every type in the AST. Also it makes it easier to do some "groundbreaking" changes - like allowing new types in some place.
 
eval the original AST directly.
just because the AST treats a = function() and function a() differently doesn't mean that eval(node) has to behave differently.
 
9:43 PM
transformExpression for example - if you allowed something new, that wasn't an Expression before, to be one - you'd need to add another case to that (in the "traditional" Haskell way of doing that in a single pattern-matched function).
 
@Griwes let's do some dumb example. Assume data ASTElem = Literal String | Add ASTElem ASTElem | Loop ASTElem [ASTElem]. Can you show me what's overloaded on what here?
 
in Wide you can declare modules as module A { module B { } } or module A.B {}, which I maintain in the syntax tree, but basically every operation on the AST completely ignores the difference.
I think that I only retain it for one intellisense function
 
got a question for anyone here about C++11
 
But if you just called fmap(transform, foo), it automatically works, since transform for expression should be defined already.
 
@NoseKnowsAll Go to Stack Overflow
 
9:44 PM
It's just a 1-liner answer @AnalPhabet :D
 
@Puppy Okay, but that means I need two patterns now - one for AssignmentStatement and one for FunctionDeclStatement, when one would suffice
 
@BartekBanachewicz You have overloads of transform (generic operation on that) for Literal, Add, Loop and ASTElem.
 
@NoseKnowsAll Go to Stack Overflow
 
-- this is essentially the same as regular call
-- TODO should it even be a difference in the AST?
eval (AST.BinOp name lhs rhs) = eval (AST.Call (AST.Var name) [lhs, rhs])
eval (AST.UnOp name expr) = eval (AST.Call (AST.Var name) [expr])
 
Same way you pattern-match on them.
 
9:44 PM
you already need two patterns to transform them back into the ACT thingie, right?
 
@Griwes Can you overload on data constructors? In what language?
 
but more generally speaking, if this actually occurred frequently in your AST ops, you wouldn't be complaining that the ACT and the AST are too similar and you're getting bored transforming them.
 
it's not about being "bored"
 
ok, I shorthanded it
 
it's about the cost of propagating every change to every transformation
never write code if you can not-write it
 
9:46 PM
@BartekBanachewicz None that I know of - of course I'm not speaking literally. In C++ those would be structures, ones that can exist without ASTElem. I don't know if that's the best approach or not - I just like it slightly more for this specific case.
Alright, got to wake up in less than 6 hours :/ G'night, guys.
 
what do you mean?
 
@Griwes Also Overloading implies that it could be easy to make patterns incomplete, no?
@Griwes damn. I hoped we'll get to something with this. Gnight, we'll talk later about it hopefully.
 
@BartekBanachewicz In C++ you can check that at compile time :P
@BartekBanachewicz Yeah, I hope so.
 
if you need to transform your AST into an ACT, that's just a case of visit the tree once, and spit out another tree.
 
yeah I'm kinda thinking that
hence the example I made
data Expr = Lit Int | If Expr Expr | Call Expr [Expr] | OperatorCall Expr Expr deriving (Show, Eq, Data, Typeable)

data EvalExpr = EvalLit Int | EvalIf EvalExpr EvalExpr | EvalCall EvalExpr [EvalExpr] deriving (Show, Eq, Data, Typeable)

expToEvalExp :: Expr -> EvalExpr
expToEvalExp (Lit a) = EvalLit a
expToEvalExp (If a b) = EvalIf (expToEvalExp a) (expToEvalExp b)
expToEvalExp (Call a bs) = EvalCall (expToEvalExp a) (map expToEvalExp bs)
expToEvalExp (OperatorCall a b) = EvalCall (expToEvalExp a) [expToEvalExp b]
this doesn't look bad at all.
I can easily match on nested nodes as well
say
expToEvalExp (If (Call x xs) b) = ...
 
9:50 PM
don't do that.
 
Shpongle is love, Shpongle is life ♥
 
for some things it could be nice I thought
the paper I've mentioned mentioned that as well
 
if you have to do that, you've broken something. Or Lua is broken. Or both.
 
I don't think Lua makes it a necessity at any point
 
each expression should be pretty much independent of the other expressions around it or subexpressions
I cut every Wide feature that involved looking at subexpressions
 
9:51 PM
true enough.
@Puppy interesting. Could you provide an example of something like that that got cut out?
 
I used to have an implementation of QuickInfo that inspected the AST to find identifier (...) and matched it specially so that when you hovered over identifier, it would tell you what overload was being called.
 
Ell
gah
redifition somehow
 
there were a few similar features w.r.t. calling identifiers and resolving overloads specially
 
Ell
my includes must be not guarded for some reason
 
I had one about, er, explicit template arguments?
it was a long time ago.
oh, I also had a feature about overriding type inference.
instead of having a dedicated syntax for specifying the type, I simply used var := T(...) to override it specially so that var was always T.
which involved looking at the initializing expression and if it was a call to a constructor type, I would specially override the type.
I cut them all
 
10:04 PM
Kojima didn't get fired... He's on... "A long vacation". States Konami.
 
I'm sure that the removing of his name from the game was a complete coincidence
 
That's pretty much the explanation you give to kids when someone dies. :D
 
Nope
That's when you want to give them trauma's and really weird phobias
 
I think I'm going to learn Haskell
 
Sorry. I just wanted to join the chorus. Night all
 
10:07 PM
So, you'll go to bed in 2 hours, given the announcement of good night now. :P
 
@sehe nite
 
@sehe G'night.
 
@sehe Sweet dreams of cupcakes.
 
Ell
what is the opposite of "opponent"?
I'm thinking of a variable name to represent the player running this programme
(the programme being ran currently)
 
er, player?
 
Ell
10:12 PM
meh player is taken
 
current player?
 
I've managed to add code highlighting to snackchat
anyone interested in that
 
Ell
@Puppy I s'pose it'll do
 
I prefer to call it hilite, after hilitecolor
 
10:13 PM
@Ell owner? ally?
 
yeah whatever it's called
it's just we post code here and it's just meh to watch it unhilited
I need to make a proper addon though
because managing all those shitty "custom css" and "custom js" plugins is meh
 
Ell
ally is good
 
I'd rather have something I can readily install just for SO
 
@Ell The word you're looking for is "loser". :-)
 
Ell
:3
 
10:16 PM
@Puppy interesting nevertheless
 
@BartekBanachewicz It was a dumb feature.
 
soo I have an addon
how do I make it run my js
 
how does haskell do the big num
 
@VermillionAzure Integer
 
HI
 
10:22 PM
@Nooble Hi :)
 
C:
 
@Nooble Hi
I am currently sick
 
@VermillionAzure Much the same as when I do you big Mum. Oh wait, the quota of Yo Momma jokes has already been used up for the day. I apologize for my previous outburst of fact nonsense.
 
@VermillionAzure Aww poor you.
Get better right now.
Whoa was that true.
 
10:23 PM
...
I don't know ;~;
 
@JerryCoffin But it's only 00:24 :(
 
@VermillionAzure Okay, now I feel like an evil asshole. Oh wait, that's not really new.
 
I just really hope I don't have the uncurable one
 
@Morwenn But the earth revolves around me, so it's now 15:25.
 
@Morwenn European Problems
 
10:26 PM
@JerryCoffin Is that why you're so hot? :D
 
@Morwenn Not sure about that, but looking at it again, maybe I should spend less time watching the GPS display as I drive.
 
@JerryCoffin Correction- 23:29.
 
@Jefffrey The Mad Scientists Club isn't quite as impressive as it was when I read it as a kid. Or maybe it's more impressive, considering that it was all almost believable then, but has taken so long to actually happen (much).
 
@JerryCoffin Hmm. What?
 
10:42 PM
@Jefffrey Read it. Then you'll understand. Best read as a teenager (or so), but worthwhile at almost any age.
 
I got a a bit set.
This is wonderful.
 
10:56 PM
@ThePhD :D :(
 

« first day (1830 days earlier)      last day (3133 days later) »