« first day (1551 days earlier)      last day (3619 days later) » 

15:00
    `Glisha' is an instance of Monad but not Applicative - this will become an error in GHC 7.10, under the Applicative-
Monad Proposal.
hihi
@MyDaftQuestions You don't need to know the perfect search term. You just need to be able to think logically and not narrow down your searches to terms that you don't know are relevant. I just explained why.
user1804599
I'm a damn genious.
3
Why do newbies keep confusing "you can search better by doing x, y, z" with "you can search better by already knowing the answer" .. the two are not the same
@MyDaftQuestions haha :)
no, but, it helps to have a better understanding
> (caveat: I am not a gamer, and, as mentioned below, stylii are best for drawing / writing.) ux.stackexchange.com/a/71936/22677
15:04
For @Puppy
this man knows his plurals
@AlexM. Well if you want an audit log you can't always physically delete rows. Marking them as logically deleted is common then.
@LightnessRacesinOrbit you can do a lot better by knowing the answer, though
@LightnessRacesinOrbit not sure if they're logging anything here but that makes sense
isn't moving history somewhere else also an alternative?
user1804599
What symbols would you use for set intersection and set union if you were constrained to ASCII and you can't use & and |?
15:05
e.g. in my system I have devices and config jobs and I want a history of config jobs forever. I can't have that history get nuked when someone deletes those devices (and later adds them back), but I also want the foreign key relationship. I end up not ever actually physically deleting them
@AlexM. it doesn't have to be "logging" per se
@AlexM. yes but that's not very relational. ON DELETE MOVE SOMEWHERE ELSE THAT HAS NO RELATIONAL INTEGRITY
whoah
that being said
user1804599
Maybe I should make them & and |, and use && and || for logical AND and OR.
I think my whole rank-n machinery is actually going to work
fuck. I'm getting better at this language
@рытфолд I'm not aware of any which is widely recognised, sadly.
So stick with function names
@рытфолд Maybe those low ascii symbols? Eg, smiley?
15:09
@sehe woof woof
@рытфолд "intersection" and "union"
hmpfh
import Control.Applicative ((<$>), (<*>)) should be in Prelude
user1804599
> } catch (InfectionException $e) {
user1804599
That doesn't sound good!
user1804599
A variable that holds the exception.
15:13
hello all i wish to what does the following statement mean.
  Ptr<Node> node = *i;
user1804599
It creates a new variable.
Nobody knows. Ptr<> isn't a thing
user1804599
Maybe it assigns something.
inb4 template<typename T> using Ptr = T*;
user1804599
Ptr and Node are obviously values, and < and > compare them.
15:14
@рытфолд there's no assignment there
user1804599
= is an assignment.
yeah, assignment with rvalue on left hand side
i am actually using it in ns3, they have a concept of smart pointers. so
congratulations leftfold
user1804599
dat pun
15:15
@BartekBanachewicz Rvalues can totally be assigned to.
which totally makes sense
eh. nvm.
@R.MartinhoFernandes Depends on the type.
primitives ban it and UDTs can also ban it if they choose to in C++11.
user1804599
Overlapping instances for MonadState
                            SampleState (Glisha SampleState libs)
no, I am
15:18
The r/l in the name hasn't been the side it appears on forever
@Puppy 'Can be' vs 'must be able to be'
GOOD MORNING GENTLEPERSONS
uhmfmfmfm
there's no way those instances could conflict
they could only if user state was equal to my inner precious library state
@BartekBanachewicz Stage 1, I see.
> We do not support building systemd with uclibc, only against glibc. If you want to build systemd against uclibc you get to keep both pieces. The burden is really on the uclibc guys to be compatible enough with glibc, so that it works, not on us to support any libc around.
hihihi standards
15:20
@EtiennedeMartel Stage 3 of what?
Brain damage
I'm not debugging. It's haskell. It's not compiling (, duh).
Has anyone considered Egypt for the unconference 2.0 ?
instance MonadState us (Glisha us libs) where
    ...
instance MonadState libs (Glisha us libs) where
    ...
15:21
@LucDanton Sure, but it's not really correct to say that rvalues can be assigned to when you can't know that rvalues of the type in question can be assigned to. The relevant factor simply isn't expressed.
@Cat how bad of an idea that is ^?
at first glance it shouldn't catch fire and kill me
getters and setters?
but now I'm not sure
@user2532296 This is a possibility: coliru.stacked-crooked.com/a/6ad88e56cceeea87 /cc @рытфолд @BartekBanachewicz @R.MartinhoFernandes
I don't know, you use Haskell more
15:22
what happened to "OMG haskell so high level"?
@Puppy that's monadstate instance
@Puppy uh what
@R.MartinhoFernandes meh. It compiles. No declaration involved. Just a void expression
@Puppy out of curiosity, what's not high-level in that for you?
15:24
@R.MartinhoFernandes It's not including any standard library header, though. It was about deconstructing the analysis that "obviously" a declaration was involved, Node and Ptr "obviously" were types/template argument etc.
@EtiennedeMartel Hi, quick question. What do you think about ice cider?
@рытфолд yeah. meh posted that a while ago right
@BartekBanachewicz Getters and setters.
user1804599
Yeah.
15:25
It's the same concept, only I did it without training wheels :)
@Rerito It's incredibly good.
Next question.
> Certain sets of names and function signatures are always reserved to the implementation:
— Each name that contains a double underscore `__` or begins with an underscore followed by an uppercase letter (§2.12) is reserved to the implementation for any use.
@sehe I don't know where people got this idea that names are only reserved if including headers.
Sparkling or not sparkling?
@Puppy pardon me, but what's the high level equivalent of operating on state then?
@Rerito Not sparkling.
15:27
@sehe Thank you.. I shall have a look
I'm not a fan of bubbles, usually.
@BartekBanachewicz x.member and x.member = value, clearly.
user1804599
COOPER WHAT ARE YOU DOING
15:28
I'll let this slide even though it's animated.
what's up with the sparkling bjarne
I never got that
It's fabulous.
user1804599
Sparkly Bjarne is the only allowed GIF.
3
it's ridiculous
@Puppy once you define a monadstate instance, you can use lenses to use that syntax if you wish. Or any other monadic operation that can utilize state.
15:28
this isn't though:
@martineau If you are concerned about people associating your name with the use of spaces between words, you can always make such answers Community Wikis. — TylerH 1 hour ago
except lenses define assignment as .= but that's of course a minor issue
you mean, "Once you define a whole bunch of getters and setters, you can think about using actual syntax"?
that's super high level, bro.
@LightnessRacesinOrbit You just say that because you're racist.
@Puppy there's no "whole bunch". You define it once, for a particular context.
@рытфолд So classy, so shiny
15:29
I did it twice to simulate having two contexts from one. (using one in two ways)
the guys with the glitter letters were the first I thought about after seeing the bjarne
doing it once is bad enough.
you should be able to either use the syntax off the bat, or be able to reflect on your data thingie and generate all the getters and setters.
manually enumerating all the stuff and spelling out every getter and setter is C primitive.
user1804599
You can have the getters and setters generated.
fuck yeah this thing compiles
user1804599
It's just $(makeLenses ''T) per type.
user1804599
15:30
Or something like that.
I was thrown into an alien codebase and a deadline
@Puppy I am not enumerating stuff. It's done once per the context handling state.
I have no idea what goes on around here
but I seem to be doing ok
user1804599
In Scala it's similar: @Lenses case class T(...).
@BartekBanachewicz It seemed to me that you basically enumerated all of the members.
15:31
@Puppy My data thingie specifically holds some things that I don't wish to expose in that stateful context.
OK WE'RE OUT OF ORBIT
so private: then
@Puppy It. 'There exist rvalues for which…' vs 'For all rvalues…'.
@Puppy there's no concept of "private" in haskell, because once you are given data, you're free to do with it whatever you wish
right, which you are hacking on by only generating some getters and setters, whereas everybody else just has a keyword they use.
15:33
@Puppy Nah, you don't have to do that. Typically it's just one monadstate instance (that can be automatically derived IIRC). I did it manually because I needed a way to separate user contexts from library contexts
@LucDanton Well, I think that if you say "Rvalues can be assigned to", then I think that implies all rvalues, unless you emphasise "can".
also ugh, I was mislead by the existing code
@Puppy that keyword works in a different way to what I'm doing.
there's this pointer to something that is only valid on the thread it was created on
and I was trying to use it on another thread, since it was nicely cached for me
and I could generate that code using TemplateHaskell of course, but it's hardly a problem to do it manually because it's so scarce
15:34
turns out they made it global just to avoid passing it as a parameter to their methods -_-
so because lazy
in short, creating contexts like that is way more powerful than simple access specifiers; that's why it can be more verbose
on the bright side, I'm going beyond the call of duty to fix this mess
@Puppy No, they don't...
15:36
inb4 sacked for not doing the job you were hired to do
I am doing the job, I'm just removing the global crap mess :P
@R.MartinhoFernandes Why do you take the bait after all these years?
@LightnessRacesinOrbit been there... done that
@Mgetz lol
must've been a sucky workplace
here you're free to fix other people's code as long as you explain in an email why you did it
15:37
@Puppy Random news headline from the Health section: "Patients Seek ‘Right to Try’ New Drugs".
@LightnessRacesinOrbit absolutely, I was managing SCM because nobody else would and got sacked because I couldn't keep up with the dev schedule and keep the builds going
@AlexM. it was horrible, it was a dying company. It had the feel of an execution squad where you're never sure who's going to die next
@LucDanton If there were any new drugs for my condition perhaps I'd want to try them.
@Mgetz gutted
@Mgetz are they still in business?
@AlexM. "Subject: Because you all suck"
@LightnessRacesinOrbit somehow, all the good devs left within 6 months of me getting fired
basically an offshore shop now
the product sucks and crashes a lot
@Puppy That's irresponsible. You are not qualified to decide that drug X is a good one for you, especially if it's new. Then the health system needs to take on the burden of looking after you when it goes horribly wrong.
A "right" to try drug X is insane.
@Mgetz offshore shop, like, a supermarket on a boat?
15:41
@LightnessRacesinOrbit "Don't work too hard, you'll make us look bad"
@LightnessRacesinOrbit india
5 mins ago, by Lightness Races in Orbit
@R.MartinhoFernandes Why do you take the bait after all these years?
@Mgetz hello sir please kindly review my code attached best regards shamil gupta
3
15:42
maybe I could help it by defining my instance of AppRuner
if I used TypeFamilies
@R.MartinhoFernandes I didn't, actually. I just said I didn't care for this sample :)
shit. it's getting dark and dangerous
@AlexM. not quite, but you do have a lot of people that don't understand RAII and exception safety... or memory safety
@Mgetz ITT india is "offshore"
@R.MartinhoFernandes Hah! I knew you'd call me out on that!
I'm not using the library state at all and that might be causing the ambiguity
let's try with Int
15:43
@Puppy Data types in Haskell are either completely opaque or completely transparent, depending on whether you expose the constructors or not. Getters and setters enable selectively exposing certain members without exposing the constructor. They're also easily composable; using patterns and constructors isn't.
are you saying that the accessibility of the members is based on the accessibility of the constructor?
The constructor is the members, in a way.
if you don't have a constructor, you can't pattern match on it
but yeah, the constructor defines what's actually going to be held in the value
consider dunno, data Puppy = Numeric Int | Stringish [String]
Well, I guess you can make a type half-opaque by exposing only a subset of constructors. That'd be rather weird, though.
Doesn't Haskell offer representation-independent pattern matching like Scala does with unapply?
15:48
I don't think so.
A constructor used is an important part of the value.
discarding that information seems scary, dangerous, and hardly useful
unless
you actually pattern match on it, get the members out and unify operations on all possible constructors
data Mesh =   Mesh { vao :: GL.VertexArrayObject,  vbo :: GL.BufferObject, vertNum :: Int }
            | IndexedMesh { vao :: GL.VertexArrayObject, vbo :: GL.BufferObject, ibo :: GL.BufferObject, vertNum :: Int }

instance Drawable Mesh where
    draw (Mesh _vao buffer n) = UnsafeGlisha $ liftIO $ do ...
    draw (IndexedMesh _vao _vbo _ibo _) = UnsafeGlisha $ liftIO $ do ...
in that case, you can draw mesh and not be concerned whether it's indexed or not.
@FredOverflow There's a pattern synonyms extension that is similar, but no.
personally I don't see what's so special about the constructor
I mean, constructors are important things, but I don't see why it should be the determinant of accessibility for all members.
6 mins ago, by R. Martinho Fernandes
The constructor is the members, in a way.
that simply does not make sense to me
"C++ was built specifically for platform independence and as such is found on every single operating system in existence." <--- Isn't this a false statement?
15:53
The constructor provides construction and destructuring. There's no other way to access the members. (well, except if you add getters)
@Puppy can you read and understand the example above?
@BartekBanachewicz lol?
@Puppy because in case a function is called within the class, it needs to have defined variables and a constructor does this.
@R.MartinhoFernandes I think it's a good example and I thought there might be something unrelated blocking him in understanding it.
@DonLarynx uh no. it's not equivalent constructors and classes from other languages.
@BartekBanachewicz Somewhat. Are you saying that when you're pattern matching, that actually invokes the constructor?
15:55
No.
But you can only do it if the constructor is accessible.
pattern matching is reading an existing object.
what the fuck does the constructor have to do with that?
The constructor is matched as well.
It is part of the object.
@Puppy consider data T = A Int | B Int. You're given a value of type T.
a constructor is just a function that produces an object.
there's no reason for an existing object to care in the slightest about how it was constructed.
@Puppy but the objects produced by different constructors aren't equivalent
can't be
15:58
The constructor is the tag in a tagged union.
well I can see why you might want tagged unions, but making the constructor the tag sounds insane.
actually I've never seen a need for tagged unions but I guess it might be hypothetically useful.
(Almost) Everything is a tagged union in Haskell.
it's extremely useful in practice, actually.
15:59
@R.MartinhoFernandes Firstly, maybe I'd like untagged unions? Or tagged with something else?
and secondly
@Puppy You can have a data type with just one constructor, and then you're free to implement whatever number of construction functions you want.
the most obvious problem with that is that I find having objects with inaccessible constructors but public getters is fairly useful.
@Puppy "Tagged with something else" doesn't make a lot of sense.
in fact I coded one less than ten minutes ago.
@Puppy and that's where monadstate or monadreader instance comes in
user1804599
16:00
lol unarguing with puppy about haskell again
@BartekBanachewicz Right, so what you're saying is, "By default, the language does something totally insane, and then maybe later, you can go and fix it up manually"?
@Puppy That's no problem at all... Expose getters, don't expose the constructor.
@BartekBanachewicz That makes no sense.
(not that I'm claiming that manually gettering everything in C# is necessarily so much better)
@Puppy you're assuming that the "insane" thing is what you don't want, and in practice it's actually what you do want.
you're probably still thinking about Haskell data as OOP objects, and they're really not used like those
16:02
well, it probably helps that I don't care in the slightest about pattern matching.
so the whole constructors-for-pattern-matching thing grants zero desirability for me
user1804599
That's because you've only ever used one programming style and never consider trying something else.
6
@FilipRoséen-refp hail, stranger
@Puppy Pattern matching is the low-level feature to expose a type's internal structure.
@R.MartinhoFernandes I'm perfectly happy with object.member really.
what bringst thou
16:03
it's direct and to the point.
@Puppy That's what getters do.
right, so burn pattern matching in the Sun and just use getters in the first place.
@AlexM. I've just been offline a lot. I'm still the same old (kinda annoying) prick as before
how do you use Wide's Option type? (or whatever you call it)
16:05
haven't really decided.
C++'s optional isn't that bad but there are definitely some places where I'd like usage to be easier.
Gotta love how people start trolling really hard once a thread is moved into a board I don't have moderation rights in -.-
assuming you don't have a default value replacement, how do you extract a value from the Option?
for variant I've already decided to bring that into the language so perhaps optional will go the same way
@Puppy That would impact readability in many scenarios.
@Puppy okay, and how do you use your variant? Let's say I got a variant as a parameter. How do I act basing on its value?
16:06
In computer programming, particularly functional programming and type theory, an algebraic data type is a kind of composite type, i.e. a type formed by combining other types. Two common classes of algebraic type are product types, i.e. tuples and records, and sum types, also called tagged unions or variant types. The values of a product type typically contain several values, called fields. All values of that type have the same combination of field types. The set of all possible values of a product type is the set-theoretical product of the sets of all possible values of its field types. The values...
@R.MartinhoFernandes In a highly positive way.
So Wide will be awesome in each and every aspect. Big whoop.
Oh well, hold on to your ingrained ignorant opinion, then.
@R.MartinhoFernandes ouch.
@BartekBanachewicz At least on the top level, the compiler generates overloads for each type in the variant, so there's no need for you to check what type it has at all.
16:08
@Puppy overloads of what?
the function accepting the variant.
And how do you write the function's body?
how does it generate them, if their bodies might be different?
as if it were not a variant parameter at all (because it isn't).
16:09
why is mysql workbench so sexy
I don't get it
@Puppy wait, so your variant actually isn't a variant? what it is then?
if the bodies are different then use overload resolution.
that's what it's for.
So you do pattern matching in the signatures...
not even microsoft seems to get the visual appeal of their tools this good
16:11
hint: pattern matched functions in haskell look just like overloads (except the type doesn't change)
You know, kinda like pretty much the exact same thing you do in Haskell.
maybe I shouldn't say that, but it's pretty hilarious
well, here's one obvious difference
Yes. Haskell also provides syntax to do it inline.
16:13
if you have a T, you don't need constructors to match overloads.
You need some way to destructure the variant, and it's going to end up being some kind of check against a type or a tag or whatever. It's silly to claim you don't have one just because you moved it.
@Puppy that's because haskell constructors are also used as a tags, whereas your constructors are just constructor functions, and the tags are stored in the variant
the mechanism is really pretty damn similar
@ÓlafurWaage was it @LightnessRacesinOrbit who wrote that?
@Abyx Probably.
16:16
and let's not forget that Puppy both claimed he absolutely hates and despises pattern matching and mentioned that he implemented it in Wide not being aware of it
I wish I did the things I don't like to do without being aware of it
for fuck's sake selecting the debug option in this wizard doesn't autodefine the debug flag
FUCK BAD TOOLS
FUCK
this thing is huge so I always go around looking for what I think is more likely to be wrong
but it's always some shitty reason like this
fuck all this wasted time
@Puppy Perhaps confusion stems from the fact that "constructor" means something quite different in C++ and Haskell. A constructor in Haskell determines the structure of your object, while in C++ it only determines its state. Just my two cents. If this was already obvious to you, don't mind me.
k, enuff work
time for ice skating
@ÓlafurWaage Agile is another example of cultural Marxism I guess
@AndyProwl basically (pretty much) all haskell types are implicitly variants (ADTs)
all if you count Bottom.
16:26
@BartekBanachewicz yeah, I guess one could say so
not that I'm an expert in the subject. I just felt the whole discussion was undermined by the ambiguity of the term "constructor" (in a cross-language conversation).
@AndyProwl You should discuss return next.
@FredOverflow I'll leave that for the next discussion :P
And after that, const ;)
@AlexM. plot twist: bad tools are actually sex toys
1 hour ago, by user2532296
@sehe Thank you.. I shall have a look
Poor thing ^
16:43
@ÓlafurWaage What a selfish prick.
@рытфолд gist.github.com/Geal/540ddd745045e7335c0d (/cc @BartekBanachewicz)
@EtiennedeMartel yup
@thecoshman Meh, I guess.
Well, damn, Tingle's going to be in Hyrule Warriors.
16:46
@рытфолд If I could only learn one more programming language, and that programming language should totally blow my fucking mind, which one should I learn?
@ÓlafurWaage blyat!
inb4 elixir
@FredOverflow Japanese?
@AlexM. suka blyat
@BartekBanachewicz Missed that one apparently :/
@рытфолд Gut

« first day (1551 days earlier)      last day (3619 days later) »