« first day (1820 days earlier)      last day (3123 days later) » 

7:00 PM
@FilipRoséen-refp his bad tooling confuses him because it shows another random name for the same type
 
@milleniumbug people should not be using tools
:(
 
@ʞɔᴉN It was a single star before.
 
I'm numb I just got fillings AHHHHHH
 
haskell's syntax is so weird
like a puzzle
 
@VermillionAzure enjoy those pain-killers!
 
7:11 PM
I really dislike working with layout-based syntii
 
is there anyway to change the default view on the front-page to always be "favorite tags"?
 
I've tried to use lenses to work with my 3-tuples more easily and now it's gotten even more puzzle-ish
matchingFunction = find ((==funcName) . (\(name,_,_) -> name)) funs -> matchingFunction = find ((==funName) . (^._1)) funs
 
There isn’t much syntax at play, although that’s a lot of library-defined operators (which is a fair criticism).
 
does it not keep the spirit of haskell tho
the thing with the terse syntax
it looks terse to me
 
There isn’t just one idiomatic Haskell, there are several currents.
@AlexM. It’s certainly what some people would write, yes. What’s with the second equals though?
 
7:16 PM
what second equals?
 
Some people mistake "undecipherable" as "tense" yes
 
@LucDanton I meant the operators defined by Lens
when I said terse
 
How does English even
 
@AlexM. lens always generates tons of discussion. I would not use it as a poster child.
 
@LucDanton nah the first thing is what I used to have and the 2nd thing is what I have now after using ^._1 to access the first thing in the 3-tuple
 
7:17 PM
(I mean the API, not the functionality it brings or the notions behind them.)
 
before I used the lambda doing matching (name, _, _)
 
Avoid point-free style
 
@AlexM. Seeing as -> is a valid Haskell token you really have to squint and notice the font difference :D
 
sorry bout that :P
 
Ell
does point-free mean without function composition? o.O
 
7:19 PM
Compositing sections might save you some typing but it really makes your code much worse to read
 
I haven't encountered composed functions that were hard to read yet
 
@Ell Other way around.
 
Lenses help with updating nested structures but the mental overhead is quite big for just accessing tuples
 
Ell
oh
that's unintuitive
 
I’m not sure I like sectioning/partially applying view myself. Or maybe just sectioning the operator.
 
7:23 PM
That matchingFunction name gives you an idea what that sectioned thing does, but find (\(name, _, _) -> name == funcName) funs is not only shorter but also self-explanatory
 
it's actually longer
I really should have used the record syntax thing there from what I see
but I was annoyed that I had to prefix the names because conflicts
 
Eh maybe couple characters difference at best
Who cares
 
does haskell only have one namespace
 
are people still using that IRC channel?
 
No, it just does the stupid flat import by default
Which is probably due to fondness for custom operators
(And the fact that instances are broken and always imported no matter what you do)
 
7:25 PM
I think I initially added lenses to turn
(_, funParams, funExpr) = (\(Just x) -> x) matchingFunction
funcResult = if okToCall matchingFunction
             then evalExpression funExpr (zip funParams (map (\(Just x) -> x) evaluatedParams)) funs
             else Nothing
into
 
lol 410 commits on the CoreCpp Guidelines repo. I bet 80%+ of those are really minor things like fixing typos and tabs
 
justFun = (\(Just x) -> x) matchingFunction
funcResult = if okToCall matchingFunction
             then evalExpression (justFun^._3) (zip (justFun^._2) (map (\(Just x) -> x) evaluatedParams)) funs
             else Nothing
 
@CatPlusPlus I doubt it. More to do with its academical roots. Taking the right decision when it comes to e.g. scaling with the size of the project takes a practical mind.
@CatPlusPlus It’s actually a feature. Because type-classes are not practical :v
@AlexM. You can use fromJust.
 
TIL
now I notice that it was mentioned here too but I missed it :< stackoverflow.com/questions/4940349/…
I suck
 
user1804599
class Monad m => MonadDiagnostic m where
    emitDiagnostic :: Diagnostic -> m ()
 
user1804599
7:28 PM
not sure
 
Typical advice is normally 'why are you using fromJust' though.
 
user1804599
maybe I should just use MonadWriter, but then I have to wait for everything to finish before I can print the diagnostics
 
@elyse Needs IO anyway
 
user1804599
No, not necessarily.
 
user1804599
Maybe someone wants to read them into a list and process them somehow.
 
user1804599
7:30 PM
E.g. unit tests!
 
lol digg
@elyse Uh huh
 
@LucDanton because I'm using something inside the thing that's inside the Maybe as param
what's the alternative, to turn evalExpression :: Expression -> Variables -> Functions -> Result into evalExpression :: Maybe Expression -> Maybe Variables -> Maybe Functions -> Maybe Result
actually that wouldn't work either
 
@Borgleader I entered digg because I got curious how it's doing these days... holy shit this layout
 
@AlexM. It’s hard to tell because it’s a small picture vs big picture thing and we’re only seeing the small picture.
 
7:32 PM
@LucDanton yea, I guess that's true
these are the things relevant to that snippet: pastebin.com/yuBn7jDY
if you think I can do that better...
I set out with this to learn about the state monad (the interpreter needs to keep state) and I guess I added lenses in too
 
Ell
filter predicate myfunc(is_this_application_or_what_m8) -- type error, probably cause: myfunct applied to too few args
 
CoD:UO with 40 players is really fun
 
Result is Maybe Double, sorry about that
I'll turn it into Maybe (Double, Variables) because I want to evaluate assignment (has side effects) with the same function
 
hmm.. I wonder if I should talk to my students about tail-recursion optimization or not
 
Yes
It's cool and p. simple
 
7:36 PM
visual studio community. what you recommend instead of?
 
> Mix of blocking and non-blocking assignments to variable <inc_data_int> is not a recommended coding practice
Very good code you are providing there, Xilinx...
 
@Jaden Hi Master Yoda
 
the problem is that we teach C++, not optimizations that compilers might add
 
Talk 'boot it anyway because it's cool
 
@Borgleader its just a question to tease out some opinions
 
7:37 PM
tail-recursion is not special
 
Ell
Man I am so confused now/
 
@Jaden More like tease out a Lee-Enfield bullet to your head
 
it's just the optimization opportunity that is trivial to notice even by trivial compiler
 
@Jaden The sentence structure is backwards, hence "hi master yoda"
 
@AnalPhabet ya,but,howd you come up with that alias?
 
7:38 PM
anyone else would have said "what do you recommend instead of VS community edition"
 
@Ell If you’re trying to call myfunc then it’s (myfunc a b c).
 
@Borgleader I caught on.
 
then i dont get the point your response
 
I'm studying templates today.
@Borgleader given the responses, I don't see the point to my question.
 
Ell
@LucDanton thanks. I was actually looking for myfunc a (b c) but I just fixed as you suggested yours :V
I'm still getting used to the syntax
 
7:41 PM
Is there an SO question about why template <typename... A> void f(A......); is valid yet?
 
@Columbo o.O
 
@Columbo yes
 
Dammit.
 
@melak47 tip: there's an implicit comma there
 
7:42 PM
@Griwes eww.
 
@ScottW lol
 
I have no idea why.
I mean, whyyyyyyy
but that's how it works
 
@Griwes Ask Ritchie
 
@Columbo yes, that's soooo doable these days
 
@ScottW and she hasnt noticed yet
 
7:43 PM
Next try: Is there an SO question about why int a[[]]; is valid?
 
@Griwes I think I know
 
@AlexM. Just as you needed more than just Functor at one point and moved on to Applicative, you might want to try out instance Monad Maybe.
 
@Columbo ...this one even I didn't know
@Columbo did you know you can call a destructor with ~auto()? just asking since you are throwing obscure features around
 
the question can be reduced to: why is comma optional before ... of varargs
 
@Griwes C holdover that pre-dates variadic templates.
 
7:44 PM
@milleniumbug yeah, only ...... is far more WTF inducing
@LucDanton the whyyyyyyyy still stands
 
@Griwes You can't.
 
Same rationale as any other holdover. And see the C people as to why they put it in.
 
and the comma is optional because C++ needs to be able to declare extern "C" void f(...)
 
@milleniumbug That could've been solved in other ways
@Griwes GCC bug
 
7:46 PM
oh. that's a bummer
 
@Griwes what does that do?
 
how can you implement a feature such as this as a bug, though...?
Alright, I guess this is slightly less obscure, but still.
 
@Griwes That I knew.
 
> I think we have a new winner for worst pseudo-operator ever.
 
7:49 PM
> Discovered by Larry Wall
Your language is really fucked up if stuff needs discovering
 
> C++
 
user1804599
=( )= is my favourite.
 
@Griwes They probably forgot to properly forbid placeholder types in pseudo-destructor-names. Then the comparison of the declared and given type was done via some internal routine that performed deduction, because hey, we're using auto.
Every compiler has bugs that make me think about how it was possible in the first place
 
Still, even if this isn't legal C++, it should be :/
 
7:53 PM
I think that ~auto is great.
 
> Discovered by
@AnalPhabet That apparently also needed discovery
 
@Puppy I'd write a proposal, but I can't think of a persuasive motivation section.
 
motivation: it's fucking awesome.
 
@Columbo Generic lambda contexts!
 
not having to name the type in a manual destructor is just as useful as not having to name it elsewhere.
 
7:54 PM
lol Unity keeps detecting hover when window is not on top
 
foo.~auto(); beats using foo_t = decltype(foo); foo.~foo_t();
 
foo.~decltype(foo);
 
struct A { int a; auto() : a(5) { } ~auto() {} }; should also be legal
 
I would argue that it should be, yes.
 
@AnalPhabet now go and try to compile that (I'm going to ignore the missing set of parens)
 
user1804599
7:56 PM
In D you write ctors and dtors as this, e.g. class C { this() { ... } }.
 
@Puppy "Yo CWG homies! Lemme propose somethin' real nice today. pseudo-destructor-calls with placeholder types. Thaaat's right! They're fucking awesome. Acknowledgements: Puppy for helping me with most of this proposal. Peace!"
 
@elyse ...which is wonderful
 
user1804599
I wish C++ did this. It would make refactoring easier, and allow anonymous classes to have user-defined constructors.
 
@Griwes Or just use destroy(foo); or sth
 
not quite
 
user784668
7:57 PM
folks
 
user1804599
And foo.~that(). :P
 
there's a bit of an ambiguity there w.r.t. this being a legal expression.
in Wide I chose to use the type keyword instead
 
user784668
@Puppy But not a legal declaration or whatever this shit is called, so how exactly is it ambiguous?
 
user1804599
Explicit destructor calling is terrible in C++ anyway.
 
@Fanael Well, for example, ~this() could be a destructor call, but you could also be trying to invoke an operator() on the type and then negate the outcome.
 
user1804599
7:58 PM
template<typename T>
struct identity { using type = T; }

template<typename T>
void destroy(typename identity<T>::type&& value) {
    auto x = std::move(value);
    (void)x;
}
 
@LucDanton what's the practical choice?
 
user1804599
safer
 
I'm curious because I find the name clashes to be a pretty serious problem in anything bigger than this
 
user784668
Is there any decent Rust IDE?
 
user1804599
Emacs.
 
7:59 PM
ST3
 
user1804599
Vim.
 
Your mom
 

« first day (1820 days earlier)      last day (3123 days later) »