« first day (1491 days earlier)      last day (3450 days later) » 

9:00 PM
do member functions replace, override, or extend?
 
also: type-checking
@Puppy extensions
 
@Puppy I don't think so
 
then extend.
 
AFAIK you can't even extend/inherit structs/enums
 
ah fuck, Rust does that shit?
 
9:01 PM
@thecoshman so no ADTs?
a fucking meh.
 
@Puppy I don't follow...
 
It’s because they’re not sure what they want. There are RFCs in the works.
 
@BartekBanachewicz no idea, what are they?
 
the whole point of replacing C++ is to remove arbitrary crap like that.
not add more.
 
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...
 
9:02 PM
if I wanted more random restrictions I'd just switch to C#.
 
@Puppy does what?
 
@thecoshman Forbids you from inheriting from some types.
 
@BartekBanachewicz oh, Rust has tuples and variants... if that's what you mean.
 
lol inheritance
I love how puppy is close minded
@thecoshman hm, then ok, I guess
 
@Puppy not really. AFAIK there is no inheritance yet.
 
9:03 PM
It has pattern matching too?
 
For 1.0 if they do anything at all it’ll be something very basic (and hence forward compatible), e.g. simple object-based single-inheritance. Not sure about overriding, doubt it’ll make it. Then again I’ve heard they don’t feel they need it as much as they used to because of I don’t remember.
 
fuck inheritance
 
@BartekBanachewicz yeah, you use match
 
fuck mutable objects
 
inheritance is useful
 
9:03 PM
bullshit
 
@BartekBanachewicz things are implicate immutable, but you can explicitly make things mutable.
 
it's useful if you're a java drone.
 
there's a difference between "Don't abuse inheritance" and "Don't use inheritance".
 
@Puppy That’s an ambiguous statement because ‘inheritance’ is a hodge-podge of ill-defined features which has as many definitions as there are implementations.
 
@thecoshman yeah, I hope they won't introduce inheritance of mutable objects
 
9:04 PM
well, it has traits... which I guess does what you want...
"this function takes anything that I can call 'render' on"
 
that sounds like a type class
 
@LucDanton That's admittedly true. If Rust simply hasn't figured out what they want to support exactly as "inheritance", then that's a different bucket to "You can inherit from some types but not others just for lols"
 
and considering that rust designers are smart and know what haskell is, I suppose it actually is precisely that
 
it sounds like common sense to me. You write a function that wants to work on 'things' that have a certain trait, only accept that types with that trait vOv
 
like C# did.
 
9:06 PM
The process is that someone, somewhere notices they need something somewhere to make it more convenient to write their programs, a RFC and written, and many iterations later it may end up in the language (with many prototypes during the iterations).
Surprisingly inheritance has not been one of those features.
It came up once or twice for protocol stuff (e.g. you want a big, flat struct for your messages, but at the same time splitting up in bits is nice), and I don’t know what came of that.
 
I think right now, if you want a common type foobar and two derived types foo and bar... well, that just doesn't exist. Best you could probably do is have a 'trait' foobar that the 'derived' types implement...
 
what the fuck
 
well, it's true that type classes/concepts can offer the same features if you implement them correctly.
 
@Jefffrey yeah noticed it a while back
 
which is what I planned to do in Wide last time I considered it, IIRC.
 
9:08 PM
it's retarded as fuck
 
@LucDanton So rude.
 
John Lakos is not very likeable.
 
@Rapptz I’m the worst.
 
@Puppy and more, because you can write them for existing, external datatypes
 
you could do the same with inheritance of interfaces if you wanted to.
 
9:09 PM
not really
 
Is it possible to pass as an argument in a member function a type of array that was created in main ( no global access but still access) ?
 
er, yes really.
 
@Puppy you can't "reinherit" a class
 
So what exactly is programmers.se for?
 
@Jefffrey bullshit, mostly
 
9:09 PM
oo yeah trait inheritance is a thing now that I think of it; I don’t know if it’s called that
 
you can if you want to and the new base doesn't require data members.
(and the language designers thought it would be useful, obviously)
 
Ell
Work finished woop
 
@Puppy yeah lol not happening in any language except extension methods mechanism
anyway I think that "data and functions" approach is ultimately better anyway
fuck mutable objects
 
eh, that's exactly what happens with type classes.
 
such an honest exchange of ideas ere
 
9:10 PM
aye
 
Does anyone know the answer in my question?
 
Ell
@puppy don't type classes replace concepts?
 
@niCk you must be new here
 
@niCk use std::array
 
nah, they're mostly the same thing.
 
oh, but type classes are both runtime and static interfaces, if I remember correctly.
 
@niCk what is a "type of array that was created in main"?
 
Is this the PHP room now?
 
yeah it is
 
9:12 PM
Summary of efficient inheritance RFCs, from September. tl;dr tbh
 
when you think about it, it always was
 
@Jefffrey It's the MainArraySingleton you silly.
 
I knew it from the tags
 
yeah c++17 missing
 
@Jefffrey its basically an array of class objects
 
9:13 PM
I am also glad they skipped PHP 6 and went with C++14.
3
 
anyway, there are some situations of type classes that boil down to plain interface inheritance- mostly when the compiler can't statically prove which derived class to use.
 
@niCk so the array object was created in main?
 
@niCk there are no objects without a class in c++, so, "class objects" is superfluous
 
not true
 
you can have objects of primitive type.
 
9:13 PM
oh right
 
int x;, x is an object
 
primitives are objects too
 
@BartekBanachewicz you don't know objects
 
or struct/enum/whatever.
 
Mr High and Mighty
 
9:14 PM
well fuck
@StackedCrooked it's not that "class object" conveys anything meaningful either
nerds.
 
it does admittedly convey absolutely zero additional information over just "object"
C++ doesn't do too bad a job of treating primitives and UDTs equally.
 
hola
 
except arrays
 
oh yeah
 
@Jefffrey ok I meant a custom class to be used in an array of objects of its type
 
9:15 PM
except arrays.
 
fuck native arrays.
also references but that's a bit of a special case.
 
@niCk Can you make an example? I have no idea what the problem is.
 
@Puppy references ain't objects so yeah
 
are references even objects?
 
9:16 PM
You have this array in main. Just pass it to your member function. What is the problem?
 
not in C++
 
they are in Wide, however.
 
you can't get their address or size.. unless you wrap them in a struct hihi
 
@StackedCrooked lol
perv
 
9:16 PM
anyone familiar with Boost.ICL that can solve this question? @sehe perhaps?
 
@Jefffrey Sea Map[100][100]; where Sea is a custom class
And **Sea as a passing argument in the member function maybe?
 
int main() {
    std::array<SomeClass, 10> array;
    SomeOtherClass obj;
    obj.member_function(array);
}
 
@Puppy why didn't you fork C++
 
@niCk Use std::array<Sea, 100 * 100> map;
 
If I were to create my dream language, I'd take Idris type system and implement it in Haskell.
and kick off old prelude
 
9:18 PM
@TemplateRex I have used it before yes
 
And remove that fucking :: for "it's of type of"
 
but reimplementing everything from scratch sounds like a lot of effort
 
Fuck that shit
I want :
 
@sehe bloody unintuitive interface
 
@Jefffrey well I've come to like it actually
@Jefffrey Elm has that, forgot about Idris
 
9:18 PM
(I actually don't care that much)
 
prolly too
 
you put in a bunch of intervals, and it will merge/split them and lose all the original data
 
@Jefffrey yeah it's p much irrelevant
what's more important is that Elm has like "fold"
no foldl/foldr/foldl1/foldr1
 
@TemplateRex nothing that is generic enough will be always intuitive
 
just fold shit, yo
 
9:19 PM
well
 
@sehe but I haven't even managed to find an unintuitive solution :(
 
:)
 
what if I need a left fold or non-left fold exclusively?
 
@Jefffrey then this happens
2 days ago, by R. Martinho Fernandes
@BartekBanachewicz ITT Bartek humiliates himself by openly admitting lack of understanding of fundamental Haskell principles.
 
and neither did Jonathan Wakely :0
 
9:20 PM
@Jefffrey would it be void example_member_function(**SomeClass)
Sorry for this question but Its been a while since I wrote C/C++
 
@Jefffrey nice program
 
ikr
 
@BartekBanachewicz Because by the time you stripped out everything that sucks, you have a brand new language anyway.
 
@niCk No, it would be void example_member_function(std::array<SomeClass, 100*100>) or maybe some templated function
 
the things that are worth keeping about C++ are broad strokes of ideas, mostly.
 
9:21 PM
@niCk lol C/C++
 
@BartekBanachewicz I don't get the joke besides the fact I forgot declarations
 
@Puppy keep the container library for the love of god
i absolutely love the container library
 
Ell
@BartekBanachewicz one person forking c++ would be an order of magnitude more difficult that what puppy is doing imho
 
@niCk C and C++ are different languages
 
Using "C/C++" as if it were a language of its own triggers me a small alarm bell. Anyone?
 
9:22 PM
everyone ships wiht a container library and Wide will too
 
@TemplateRex I don't think interval containers support his usecase. He might just want to store std::set<interval> but interval containers have policies for merging/splitting intervals. He doesn't want that
 
@E_net4 yep.
 
@E_net4 Yes, all of us.
 
@BartekBanachewicz I know that I know both (and forgot them)
 
The guy might have meant "C or C++" in that sentence
cut him some slack
 
9:22 PM
@Jefffrey Oh, but it definitely does need tweaking.
 
ranges for fucks sake
start with that.
 
@sehe but it does have an overlap counter, just not an overlap equal_range that gives a pair of iterators
 
not just that
 
Your mom meant "C or C++"
 
but required noexcept move ops.
 
9:23 PM
so.damned.close.to.what.i.want
 
@Jefffrey thanks :P
 
yeah, ranges and no std::vector<bool>
 
and some other thing I forgot
but overall, being able to decide which container to use is fundamental
 
I typically don't oppose syntactic issues but iterators are that squared + more shit
 
9:23 PM
also reducing the number of overloads, tweaks on interfaces, and that kind of thing.
@BartekBanachewicz Iterators are bad; I know it.
 
also make inheritance from standard containers more reasonable
 
iterators are not so bad
 
@TemplateRex the thing is you can't have the intervals in a container as he depicts it, no matter what lookup style (invariants!) boost.org/doc/libs/1_57_0/libs/icl/doc/html/…
 
D chose not to have iterators. There are ranges instead.
 
@BartekBanachewicz Why?
 
9:24 PM
or making adaptors that are your own classes with logic
 
@sehe there is a section in the Cormen algo book on this, to augment a red-black tree, but after reading that, I can't see how one can adapt a std::map to do what I want, short from reimplementing an entire RB-tree
 
@Puppy because that's a common problem
 
@BartekBanachewicz nah
fuck them php guys
or java guys
 
no really
 
@BartekBanachewicz No, the common problem is that people want to inherit from them.
 
9:25 PM
that want to inherit from vector to add some stupid member function
 
well if it's mutable then you might as well do that
 
@TemplateRex Not really, the question is quite trivial and should be. Hmm. What's the problem with just composite key order and lowerbound/upperbound? That's < O(2logN)
 
it's not like Wide is going to be a language with explicit contexts that regulate those anyway
we're not talking those levels of language design here
 
regulate what?
 
There's good reason to make certain type no-inheritable
 
9:26 PM
@sehe I thought about that, using Boost.MultiIndex, one key on LB, one on UB
 
what
 
so stay practical and fix real problems that people have with C++
 
the problem is merging the two
 
the problem is not with c++
the problem is within people
 
@Puppy what can you call on what
 
9:27 PM
what are you what
 
@Jefffrey true.
 
in what exact fashion?
 
man, these pills have such a sweet sugar shell
 
Ell
who inherits from a standard container? o.O
 
but if you could fix people, they would just use haskell
 
Ell
9:27 PM
I've never wanted to do that
 
lol no
 
Ell
Haskell isn't a silver bullet imho
 
anyone know which shader pack this is?
 
Ell
No idea
 
9:28 PM
fancy mc shader
 
wanted to stay way away from Haskell the moment I saw that it had that really dumb Type object thing.
 
Ell
I'm gonna buy factorio 2nd version
 
or something
 
Ell
@Puppy what's that?
 
@Ell but it can solve a lot of issues that we have with common langs nowadays
@Puppy what?
 
Ell
9:28 PM
also you shouldn't dismiss something for one defect
 
where types in Haskell have to start with an upper case letter
 
lol
 
Ell
why didn't you stay away from c++ because it has retarded lots of things
 
at least, I think that was the upper case thing.
I actually don't entirely remember.
 
9:28 PM
well
 
that's like the fucking dumbest criticism of Haskell I've ever heard ever
wait
that's the dumbest criticism of anything I've heard ever
and I'm counting mine "PHP IS SHIT LOL" into that
 
@Ell Yes, but they started from a nearly impossible position.
 
you kinda have to have some kind of convention to keep stuff simple
and not have template<class Type> for example
 
I have a convention; it's called "grammar".
 
seriously you call types uppercase in C++ anyway
 
Ell
9:30 PM
@Puppy have you tried haskell?
 
@Ell of course not
it's puppy
 
Might want to stay away from Rust then :) It’s not enforced, but the compiler also doubles as a linter and will chastise you about it (by default; can be turned off).
 
@BartekBanachewicz Not all of them. And the ones I do I do by choice.
@Ell Did some at university.
 
talk about consistency then
 
meh
 
9:30 PM
Also, your problem is easily solved by never using datatypes!
 
use Bjarne_Case
 
consistency is my choice.
 
Ell
built in linter is a good idea imho
 
Compare: template<class TypeA, class TypeB> TypeB some_func(std::optional<TypeA>) vs Maybe a -> b
 
I choose whether or not it's important.
 
9:30 PM
@Puppy yes why be consistent when programming
 
Ell
A language wide style guide is good
 
nope.
 
Ell
Why not?
 
people have different reasons for choosing different styles, or even using different styles at different times.
 
because he doesn't like it
 
9:31 PM
It’s an interesting, softer alternative to picking the one pythonic way to do stuff.
 
Ell
@Puppy like what?
I mean, give me a for instance
 
simple example: even if I always favoured using PascalCase for types, I'd have to use some snake_case for Standard-compatible typedefs.
 
except when standard types also followed that
hint: they do in haskell
 
@sehe, take his example of intervals [1,3], [3,5], [1,8], [7,8], doing search on UB gives all 4, and search on LB gives the first 3. You'd then have to do some iterator projection in Boost.MIndex to find all elements present in both searches
 
because language enforces that
 
Ell
9:32 PM
then just use snake_case for types. Why would you favour PascalCase?
 
so what?
all that matters is that I want a style that doesn't match the one shipped by the language.
 
@Puppy you have just one convention
 
still O(K + log N) complexity, with K matches found
 
another example: even Google Style Guide gives an exemption from their casing rules for when you're writing code against WinAPI.
 
@Puppy why
 
9:32 PM
@Puppy yeah, sure, you could also write c++ in Haskell
 
@Jefffrey Because it's mine and I like it.
 
but that's ultimately retarded.
 
that's silly
 
language author should not give a shit what identifiers I choose to use.
 
@Jefffrey :)
 
Ell
9:33 PM
@Puppy right but you said there would be a reason for this - why would you want a style that doesn't match the one shipped by the language?
 
preferring something because "you like it" as opposed to "everybody does that like that so I'll do it like that too"
 
@Puppy that can extend to anything. Naming convention is a haskell idiom.
 
because it's mine and I want to do it that way.
 
then you don't get what a language idiom is.
IOW you shouldn't design languages.
 
language idioms are for things observable by language rules.
identifiers should not be.
 
9:34 PM
cease work on wide immediately.
 
jesus christ
 
the only thing languages should do with identifiers is compare them to each other.
 
even in haskell there are people that use snake_case for functions
 
(and maybe reflect on them)
 
9:34 PM
@BartekBanachewicz it's Bjarne_case
 
and i hate them with all myself
 
otherwise, none of their business.
 
@Puppy which sole purpose is fragmentation of conventions
 
@Puppy is that all?
 
Ell
> people have different reasons for choosing different styles, or even using different styles at different times.
give me one of the reasons besides "because I want to"
 
9:35 PM
I mean come on, Puppy's been actually working as a programmer for what, a week now
 
having one common style is good
 
@Ell such wisdom
 
give him a few years of experience and I promise you he'll change his mind
 
@BartekBanachewicz Conventions are for things that actually really matter, and casing does not.
 
i don't know how you can defend style fragmentation over "i like it that way"
 
9:35 PM
everyone was like that at the beginning of the career
 
@Ell Because I'm working with existing code which uses a different style?
 
@Puppy except when you actually cooperate with people
 
Ell
@Puppy this is wide though right, there is no existing code
 
@Puppy that only happens if there's A DIFFERENT STYLE
 
Ell
besides interop with other languages
 
9:36 PM
@BartekBanachewicz Which there is.
 
@Puppy there's none in haskell
 
Ell
got factorio alpha full version
 
all types are uppercase
 
(there is, but it's just from special people)
 
so... you can't interoperate with Windows API functions and POSIX functions in Haskell?
 
9:36 PM
wat
 
@Puppy FFI is a completely different thing
 
it's completely the same thing.
 
no, it's not.
 
you have a function; it has a name.
you're stuck with that name.
 
no, it's really not how it works in haskell
 
9:37 PM
where it came from is immaterial.
 
maybe you should learn about it before you're dumb about it again
 
Ell
@Puppy It's not. We're proposing code written in wide has a consistent style
windows API functions or any foreign code are not written in wide
 
so what?
 
There are languages on this planet that aren't C++, and perhaps you need to realize just that.
 
Wide still has to cope with calls to them.
@BartekBanachewicz There's plenty of other languages that do not do stupid things with identifiers. Lua, for example.
 
9:38 PM
yes, but that's treated differently
 
@BartekBanachewicz Which is also dumb.
 
lol this argument
 
it's less dumb
It's outside of the code, so why should it be treated like it's inside?
 
why do you care if it's inside or outside?
 
it's called FOREIGN for a reason
 
9:39 PM
it's just a function you need to call.
 
no, it's not.
 
inside, outside, from the fourth dimension, who cares?
 
inb4 yes, it is
fuck
 
you don't even understand what a haskell function is
so seriously, it ends here for me.
 
this is it
 
9:40 PM
Either you learn about what haskell really is and how it does things, or just shut up about it
EOT.
 
I know that it does dumb as fuck things with identifier casing.
 
lol
 
being offended by the puppy is also dumb
 
I have tape all over my electric cable
 
Xeo
guuh... ate too much x_x
 
9:42 PM
the one that recharges my computer
is that ok?
 
@StackedCrooked I'm not offended, I just always get into the trap of "this might be a reasonable discussion"
@Jefffrey before or after the power supply?
 
hmm, basically near where you attach it to the computer
 
a desktop?
 
macbook
 
so near the magnetic connector?
 
9:43 PM
here, lemme take a picture
yes
 
should be okay then. It's low voltage at this point.
 
it's also blueish/greenish
I have no idea what's going on there
 
Xeo
sounds like electrics tape
 
^
the macbook connectors tend to break around that area
 
here lemme show you
 
9:46 PM
people use pen springs over that cable to stiffen it
 
is that a bed?
 
no
 
Xeo
okay, that's not electrics tape
that looks.. weird
 
there's transparent tape around
 
9:48 PM
well it's not dangerous certainly
but it looks weird alright
 
I may use white tape
 
might have been damaged in some way
or simply dirty
 
Ell
damn I reseearched electronics 2 by accident
 
in what game?
 
Factorio
 
9:49 PM
funny thing is that in the middle there, there's a perfectly straight cut even trough the tape
 
hmm I should have more followers on Twitter I think
 
4 layers of tape
so yeah, if you suddenly don't hear from me, chances are I was killed by the cable
tell my parents I loved them
 
or that you were imagined by us all along
 
Ell
@Jefffrey don't worry, it won't happen :P
it's 5 volts isn't it?
 
you weren't at the unconference so you don't technically exist
@Ell 20
 
Ell
9:51 PM
ohh it's a macbook one
still 20 isn't much
I wonder how much current that thing is built to supply
 
ah, that game looks pretty ugly
 
couldn't they even licence unity/ue4?
 
Ell
It's so fun
 
@Ell don't get trolled
I just did
 
9:52 PM
what game
 
I'm honestly not sure if it's possible to determine different components.
they all look the same.
 
Ell
@BartekBanachewicz how?
 
@Jefffrey Factorio
 
Ell
@Puppy hmm?
 
9:53 PM
oh
 
Ell
different component?
page not found
 
BTW @Ell dunno if you've noticed but potato empires is way better now
 
i thought it was an intentional misspell of "factorial"
 
@Ell that's the point. I've deleted it
 
Ell
Oh.
 
9:53 PM
@Ell Well, presumably, the entire factory is not one very large repeat of the same thing over and over again.
 
Ell
Ohhhh
Sorry I didn't understand what you meant
 
the only thing I could really see is "Conveyor belt, moving arm, ... some processing.. thing, train".
 
Ell
also it is mostly a lot of similar components
 
I should get one of those "STAGE" buttons.
maybe program it to launch the debugger or the tests or somesuch.
 
@Puppy I recommend Teensy board
 
9:59 PM
nah, there was a Kickstarter or something for programmable big red buttons.
 

« first day (1491 days earlier)      last day (3450 days later) »