« first day (1789 days earlier)      last day (3149 days later) » 

12:01 AM
@AlexM. > 57 68 69 73 70 65 72 69 6e 67 20 48 69 6c 6c 6f 63 6b 2c 20 77 68 61 74 20 64 69 64 20 79 6f 75 20 70 69 63 6b 3f
 
user1804599
ok so
 
user1804599
I want to compile lambdas.
 
another birthday to go to ...
 
@chmod711telkitty ??????????
you talk in more riddles than sehe
 
I went to 2 friends birthday brunch last weekend, have another one to celebrate this weekend
 
user406009
12:14 AM
@Prismatic Perhaps her chickens are now one year older.
 
@chmod711telkitty brunches are the best
you can justify pigging out because you didn't catch breakfast
 
user3047181
what did the russian programmer say when they asked him if he wanted an anonymous sheep for dinner?
 
user3047181
lamb? da!
 
user3047181
lambda
 
user406009
Nice one.
 
12:16 AM
@MeltyButter were not stupid
 
Oh, there you are.
 
user406009
We have to make sure to repeat then if Vlad ever shows up.
 
Wow the blog posts from December 2014 are totally outdated too.
How fast does libclang change
 
user406009
Pretty fast. Their original API had a lot of problems.
 
this new Python API is actually not terrible
it's using exceptions and everything
where are the docs though
 
user1804599
12:20 AM
I have a type inference problem.
 
user406009
Is your type inference turing complete?
 
xcxcxcx
 
user406009
Cause that would be rather hilarious.
 
Hello World
 
user1804599
let x: Int = f(1) infers f to be of type (Int) => Int, but if f is actually of type (byname Int) => Int then it fails to typecheck.
 
user1804599
12:21 AM
So you can never call functions that have by-name parameters.
 
is someone testing their bot in the loungee?
 
user406009
@Michele Helle. Welcome to the Lounge.
 
@elyse What's "byname"?
Also I'm drunk
 
Finally i have enought reputation
 
I feel so great
 
12:22 AM
to type there
 
user1804599
A programming language uses an evaluation strategy to determine when to evaluate the argument(s) of a function call (for function, also read: operation, method, or relation) and what kind of value to pass to the function. For example, call-by-value/pass-by-reference specifies that a function application evaluates the argument before it proceeds to the evaluation of the function's body and that it passes two capabilities to the function, namely, the ability to look up the current value of the argument and to modify it via an assignment statement. The notion of reduction strategy in lambda calculus...
 
@elyse In short?
With your own words?
 
user1804599
The argument is evaluated by the callee instead of the caller.
 
user406009
So basically, the argument is lazily evaluated?
 
And that's what "byname" means?
 
user1804599
12:23 AM
Yes.
 
user406009
I don't think such a feature is that useful.
 
user406009
Keyword arguments is a much more useful feature.
 
user1804599
It is very useful.
 
Why isn't there an implicit conversion between byname T and T and viceversa?
 
user1804599
How else would you implement if and && and ||?
 
user1804599
12:24 AM
@ʎǝɹɟɟɟǝſ byname T doesn't exist.
 
user406009
@elyse Macros.
 
user1804599
Function parameters can be marked byname, not types.
 
Then what's the issue?
 
user1804599
That (Int) => Int does not unify with (byname Int) => Int in the type checker.
 
user406009
Clearly we need new type.
 
12:25 AM
Why? They both have the same type
 
user406009
(bynameorbyvalue Int)
 
user1804599
No.
 
user1804599
They are types.
 
The type of both functions is (Int) => Int
 
user1804599
No.
 
user1804599
12:26 AM
One is of type (Int) => Int and one is of type (byname Int) => Int, like I just said.
 
You just said that byname does not interfere with types
 
user1804599
No, I said that byname T isn't a type.
 
user1804599
It can be a parameter of a function type.
 
So it is part of a type
 
user1804599
Yes, of the function type.
 
12:27 AM
Then why isn't (T) => R implicitly convertible to (byname T) => R?
 
user1804599
In (byname Int) => Int, the parameter type is Int and its evaluation strategy is by-name.
 
user1804599
@ʎǝɹɟɟɟǝſ Because I haven't solved this problem yet.
 
Also why are you exposing byname in the type of the function? It's implementation detail.
 
user1804599
Doing that would indeed be a possible solution, except it may have other problems.
 
user1804599
@ʎǝɹɟɟɟǝſ No, it's not an implementation detail.
 
user1804599
12:28 AM
It's part of the function type.
 
How you are going to evaluate parameters does not matter when checking what type the arguments you passed in are.
 
user1804599
Indeed.
 
user1804599
But it does matter when you pass functions around.
 
And the need for evaluating something lazily is only defined by the implementation of said function
 
user1804599
Consider sub f(x: (Int) => Int): Int { f(1) }.
 
user1804599
12:29 AM
Now imagine you pass (byname Int) => Int) to f.
 
No idea what that is
 
user1804599
f does not know that it must not evaluate 1 before calling f.
 
user1804599
You need to know the expected evaluation strategy when you want to call a function hth
 
What's that syntax?
 
user1804599
12:30 AM
It's a function definition.
 
Yes, thanks.
What is it defining?
inb4 a function
 
user406009
Why not just make everything lazy evaluation then?
 
user406009
Go full on Haskell?
 
user1804599
A function f, which takes a parameter of type (Int) => Int, and returns a value of type Int which is x(1).
 
@elyse Except that the body of the functions appears to be f(1)
 
user1804599
12:32 AM
@Lalaland Because universal laziness only works if every function is pure.
 
Not x(1)
 
user1804599
@ʎǝɹɟɟɟǝſ Yes, that was a typo.
 
user1804599
It should have been x(1).
 
user406009
@elyse Make everything pure then.
 
user1804599
No.
 
12:32 AM
I see
Makes sense
@elyse You would have to infer f to be of type(maybebyname Int) => Int
 
user1804599
:p
 
user1804599
I dunno
 
I think that byname will complicate a whole awful lot of things
 
user1804599
It's extremely useful.
 
user406009
Do your generics allow you to generalize beyond byname?
 
user406009
12:35 AM
So you can have one map() function?
 
user1804599
No.
 
@elyse What about being lazy by default and allow eval(exptr) to explicitly evaluate something?
 
user1804599
That requires an incredible amount of indirection in the generated code.
 
user1804599
Lazy by default doesn't work with side-effects.
 
user406009
@ʎǝɹɟɟɟǝſ That's what Haskell does.
 
12:36 AM
@elyse Why not?
Haskell seems to be doing just fine
 
user1804599
Because, well, f(); g(); would potentially not call f at all.
 
user1804599
@ʎǝɹɟɟɟǝſ Yes, by lacking side-effects.
 
user1804599
Maybe I'll require explicit annotation when passing arguments by name.
 
We both know that side effects are very present in Haskell code
 
user1804599
E.g. by prefixing them with => or a colon or something.
 
user1804599
12:37 AM
@ʎǝɹɟɟɟǝſ They're not.
 
user406009
@elyse is correct.
 
user1804599
So f(1) is inferred as (Int) => ? whereas f(:1) is inferred as (byname Int) => ?.
 
Yeah, IO is not side effect bla bla bla
Heard this theory crap shitload of times now
 
user1804599
Makes if ugly though: if(foo(), :f(), :g()).
 
12:39 AM
Point is that you cause side effects with Haskell code
 
user406009
@ʎǝɹɟɟɟǝſ But IO is side effect free. Evaluating Haskell code is always side effect free.
 
user1804599
And && in particular: f() && :g().
 
user406009
Running the IO action causes side effects, but that's done completely outside the Haskell language.
 
@Lalaland Not really. It would be pretty useless if it was side effect free
The reason why you can start a window with an Haskell program is exactly because it's not side effect free
 
user1804599
Haskell programs return a description (of type IO a) of what I/O to perform.
 
12:40 AM
@Lalaland Yes, you can tell yourself that story
 
user406009
The result of a Haskell program involves side effects, but the Haskell code itself doesn't involve side effects.
 
user1804599
Whatever the caller does with that description is up to the caller (usually the runtime system, which performs the I/O).
 
user406009
@ʎǝɹɟɟɟǝſ You might want to try out Haskell again if you don't see the advantages of a side-effect free language.
 
Who says I don't know the advantages of side effect free code?
 
user1804599
12:41 AM
Yes, I will go with explicit argument prefixing.
 
user406009
@elyse What's the use case for lazy parameters though?
 
user406009
Other than implementing if, and, or.
 
user1804599
They're by-name, not lazy.
 
@Lalaland Just because I don't agree with you, doesn't mean I lack knowledge.
 
user1804599
Lazy parameters would be evaluated at most once.
 
12:43 AM
That would be pretentious
 
@ʎǝɹɟɟɟǝſ lol
 
user1804599
By-name parameters can be evaluated any number of times.
 
user1804599
@Lalaland implementing while(byname Boolean, byname ()), getOrElse(Option[T], byname T), assert(byname Boolean) (no-op in release mode), lots more.
 
user406009
Most people would just take a function.
 
user406009
getOrElse(Option[T], () -> T)
 
12:46 AM
Everything is just functions
 
Whoa.
 
SCHOOL TOMORROW
 
Including your mother.
 
:(
 
I almost have a full iteration of OpenGL running for this.
ONE WHOLE RENDER LOOP, NO THROWS.
 
user1804599
12:47 AM
@Mysticial Sorry. I like my functions small and to-the-point.
 
Look ma, nothrow
 
user1804599
What is nothrow?
 
Nov 29 '13 at 10:46, by Mysticial
In C++, everything is throwable. Including your mother.
 
user1804599
nice
 
user406009
12:50 AM
Sometimes I wish C++ didn't have exceptions.
 
What would you use instead
 
@Lalaland Why.
 
The only viable alternative to exceptions IMO is Result<T> with exhaustive matching, which C++ doesn't have.
 
user1804599
12:51 AM
You need exceptions in C++ because C++ has constructors.
 
user1804599
Constructors suck.
 
If constructors were free functions one could use Result<T> for them too
Oh well
 
user1804599
I like error handling in Go.
 
I wish we had exhaustive matching
rip
 
user1804599
12:53 AM
template<typename T, typename E, typename F, typename G>
auto handle_result(Result<T, E>&&, F&&, G&&) { ... }
 
user1804599
Exhaustive matching.
 
lol
auto result = someOpThatMayFail();
I want the user to be forced into matching result
 
Hrm. my extent and rank respond to std::array
 
Otherwise no compile bby
 
inb4 rightwards indentation drift, do-notation, monad stacks, and effect systems
 
12:58 AM
don't forget the in-type-system encoding of lifetime
 
typestate pisses me off so much
 
why is that
 
it feels like it taxes a lot of the attention from the programmer when it comes to emulating things that I would just like to work
Then again, I don’t have much first-hand experience with it. I’ll probably give it a try to get a more thorough impression.
It’s just that I’ve kinda been looking around for interesting type-safe things and how people encode them in Haskell. Every time it’s typestate.
That’s region programming, linear/affine typing and those effect systems namely.
 
that sounds really neat
let's make a new language
 
Think of your average program in do-notation except every line has its own type and the compiler will yell at you if you do something wrong. Which is kinda what you want, but still.
 
1:04 AM
does that mean the type system can determine what is worth heap-allocating and what can stay on stack, by the way?
 
@AnastasiyaAsadullayeva Yes. Or defer each region to an allocator—you can stack allocate everything if you so choose and there will be no use-after-free.
 
libclang actually seems decent
python version anyway
index = clang.Index.create()
tu = index.parse('test.cpp')

print('Number of errors found: {}'.format(len(tu.diagnostics)))
for diagnostic in tu.diagnostics:
    print(diagnostic)
or maybe I'm easily impressed considering last time I tried libclang it sucked bad
 
naw, looks good
 
libclang is very powerful but the docs are very scarce
 
user406009
1:15 AM
We should do a clang vs gcc vs MSVC poll
 
Lol MSVC.
 
user406009
That would be entertaining.
 
I'm only finding out how to do this
 
Do you mean by usage or preference?
 
via reading the source
 
user406009
1:16 AM
@Nooble preference
 
@Lalaland No one would pick MSVC
 
all the blog posts on libclang python bindings are from the dark times I used it which was just a very thin wrapper around the C API
 
@Rapptz Perfectly captures the essence of a compiler: "a program to turn source code into error messages."
 
lol
I got a lot of errors actually
because I forgot to pass -std=c++11
 
@JerryCoffin or warnings
 
1:24 AM
@Rapptz Should be the default by now (though you could argue that -std=c++14 would be a better default).
 
this is clang 3.7 and it doesn't seem to be the default (oddly enough)
 
@chmod711telkitty Brevity is the soul of wit (and lingerie).
 
Next GHC will be GHC 8.0.
 
@JerryCoffin -std=c++17 would even be better :P
 
1:31 AM
oh it's like i'm invisible here
 
Maybe with modules support too
 
lucmodules will revolutionise C++.
 
lucwhat?
 
lucmodules
 
1:32 AM
Haven't you heard of lucmodules?
wow
 
someone lives under a rock
 
it's very comfy
 
@VermillionAzure Oh--are you trying to claim you're not invisible?
 
protects me from the bad wether too
 
1:34 AM
@JerryCoffin therefore am i not invisible -> yes
NOOOOOOOOOOO
 
well lucmodules is one of the things that I'm really excited about, personally
 
user406009
@Nooble We need to do the judging for the Jam.
 
I doubt lucmodules is even a thing
No results in this chat except from this conversation
 
p sure it's been talked about before
 
user406009
@ʎǝɹɟɟɟǝſ It exists just as much as real C++ modules do.
 
1:36 AM
also lol SO chat search
 
@Lalaland That's my point :P
 
so what's been happening with eveyrone
 
these guys don't know what lucmodules are
kek
 
i've started school for less time for stuff
@Rapptz what's lucmodules?
 
don't even bother
they are doing that thing
 
1:38 AM
meh
i'm currently downloading matlab for class right now
They have this interesting feature to create symbolic mathematical expressions and do manipulations on them
 
that's quite an interesting feature for a math software
 
@AnastasiyaAsadullayeva I wonder how they do simplification
Perhaps its a node-edge thing and stuff
 
it’s not simple
 
@VermillionAzure rule matching
>It is not the intention to go into detail here about how and whether Rust is better than C++.
nice try
 
@AnastasiyaAsadullayeva Mmmm yeah I su... wait what do you mean "rule matching"
 
1:41 AM
@VermillionAzure Pattern matching if you want
 
@AnastasiyaAsadullayeva hmmm but it's a lot more than just the method
 
For example you could have a rule such as: if Expr matches "A * B / B * C" simplify as "A / C"
 
it's also the representation of the data and such
 
It works the same way as theorem proving, which is AFAIK matching patterns and applying rules
 
@AnastasiyaAsadullayeva Yes but also representing the types of expressions may get complex considering we can do a lot of different things with math
 
1:43 AM
I know this because I have developed math software for several decades
 
user406009
@AnastasiyaAsadullayeva Correct.
 
@AnastasiyaAsadullayeva Mathematica?
 
user406009
Although, you only really do the actual pattern matching in formal logic.
 
@VermillionAzure No I was just kidding
 
user406009
Which is a pain.
 
1:43 AM
But software proof does work that way though
AND MY FEMININE INTUITION SAYS that math simplification is a similar problem
 
@AnastasiyaAsadullayeva "software proof" huh?
 
Proof assistants
@VermillionAzure Still just trees
Find me a math expression that can't be represented as a tree
 
> With -XStrict the ~ is used to recover ordinary patterns, to build an irrefutable pattern ~~ is used.
 
Hint you can't
 
prepare your syntax rants
 
user406009
1:45 AM
@VermillionAzure Try to learn some formal logic.
 
@Lalaland That's what I'm in right now
...To think, I was thinking about trying to reduce designs down to logic so that I could rate them based on how deterministic they were
 
tfw iterating over AST
how do I cursors
 
user406009
I think my favorite part of formal logic is how you can get information out of the weirdest things.
 
Is there some sort of report that's determined the strength of programming languages objectively through formal logic?
 
1:46 AM
Yes C++ is bad
 
user406009
For example: The barber in the city shaves every man who does not shave himself.
 
But PHP is worse
 
user406009
From that statement, you can formally derive the gender of the barber.
 
user406009
@VermillionAzure No.
 
user406009
I guess Turing Completeness is one way to rate to logically rate programming strength.
 
1:48 AM
@Lalaland I'd figured it would be useful to designers to objectively determine the amount of determinism a program has
 
user406009
But most programming languages are Turing Complete.
 
@Lalaland Depends on your system. With the appropriate one, you can indeed extract a lot of information from the smallest thing.
 
e.g. if I can always conclude that set of type A is in set of type B, that's a stronger guarantee
 
Falso best system
 
Falso?
Is it... good?
 
1:50 AM
See link above, it's by far the best
 
@VermillionAzure There’s a table you can scroll down to that gives a good summary of its properties.
 
>Can prove its own consistency
this is a key feature
 
Goes hand in hand with the resistance to Gödel attacks.
 
Then... what?
 
user406009
@VermillionAzure It's a joke.
 
user406009
1:53 AM
As in an actual joke.
 
user406009
Poking fun at formal logic.
 
@Lalaland Prove it. Wait, no.
 
It's a joke website, right?
I'm literally at basic logic, man
Modus tollens man
 
user406009
@LucDanton I'll just use Falso then.
 
user406009
Haha, either Falso is nonsensical and my proof is invalid, or my proof is valid and Falso is nonsensical.
 
user406009
1:54 AM
Victory is mine.
 
pls gödel no
 
@Lalaland Therefore we can establish that the relationship between Falso and your proof's invalidity is bidirectional and iff
 
@Lalaland That’s not an axiom in Falso.
 
But back to my topci
 
user406009
1. Assume Falso makes sense.
 
1:56 AM
I thought it would be an interesting idea to explore C++ using formal logic to destruct its language structure and compare it to other languages
 
user406009
2. Prove that Falso is nonsense using the Falso system.
 
user406009
Contradiction.
 
user406009
Either step 1 or step 2 must be incorrect. Victory!
 
@Lalaland Again, that’s not an axiom in Falso.
The 'either X or Y' part.
 
@Lalaland Ok.
How?
 
1:57 AM
@Lalaland Therefore, both are incorrect.
YAY!
 
user406009
@Nooble Google poll. Pinned on the starboard.
 
user406009
Give a timelimit of like 3 days.
 
user406009
Order the games from best to worst on a couple of things.
 
user406009
I wouldn't worry about cheaters too much.
 

« first day (1789 days earlier)      last day (3149 days later) »