« first day (1849 days earlier)      last day (3325 days later) » 

23:00
no UB, it's a nice compromise
Ell
Ell
you can write mutable code in haskell if you're a genious
@Lalaland Shiiiiny symbols
I made a lot of changes in my input system and it still works
Too many nonalnums
Shocking
23:00
@CatPlusPlus There's a bug hidden deep within
user406009
@Ell Yes, you can using classes like hackage.haskell.org/package/vector-0.3/docs/…
@Ell Actual projects.
@набиячлэвэлиь Gaussian integers and the related C++ proposal that wasn't accepted for reasons.
I even got the Y axis orientation right on the first go
Ell
Ell
or STBlah
23:01
@Elyse wow that answer
user1804599
@Ell I think you mean "mutating code".
Follow up to this weekend's Extra Life marathon: we managed to grab about 1200$.
5
@EtiennedeMartel Kudos!
Ell
Ell
@Elyse no the code it self changes as you type
@EtiennedeMartel congrats :)
user1804599
@Ell numeric abstractions.
user1804599
Num and related type classes poorly designed.
user406009
@OmnipotentEntity Well, it annoys every stakeholder a little bit. I guess that's part of what makes it a true compromise.
user1804599
PureScript does it way nicer.
heya
user1804599
Hi beautiful.
23:03
@Mr.kbok Hi cutie ♥
what's up?
@EtiennedeMartel woot
run off with the money
user1804599
@Mr.kbok Haskell.
23:04
@Mr.kbok rfold's penis
@AlexM. Kids these days.
Evening
@Morwenn I dunno if I'd bother. Forward iterators are so rare it's hardly worth the bother (and 99% of the time, if you're using them, the best fix is to quit using a linked list to start with).
user406009
@JerryCoffin What about lazy sequences?
23:06
@JerryCoffin I'll probably bother for the sake of it. Mostly because the other things I have planned for the library are tiresome to implement.
user1804599
Linked lists are great.
@Lalaland Those are input iterators, right?
@Lalaland Certainly possible, but also pretty unusual, at least in C++.
@OmnipotentEntity when we discussed it here no one liked it.
user406009
@Morwenn I guess so.
23:07
@Elyse When I was your age, I'd have said the same. In fact, I did say the same (frequently).
@Rapptz, why's that?
user1804599
They're nice and simple and easy to understand.
@OmnipotentEntity I think we all like never-empty-guarantees.
I like intrusive lists
Ell
Ell
ughhhh
23:09
Having a constant performance penalty for accessing is a stupid compromise.
Ell
Ell
fuck I can't even dlete it bcos no mose
Cheers, whoever deleted
user1804599
@milleniumbug What are intrusive lists?
Ell
Ell
The mouse works in 1-2 second spurts
23:09
@Elyse the lists where the links are stored in the data type directly
Ell
Ell
bcos I no into batteries
user1804599
Nice.
Ell
Ell
I ordered some eneloops on amazon, they were supposed to arrive yesterday but they will arrive tomorrow
Fucking submodules.
Next to implement: 50 shades of SFINAE.
23:10
Kill me already.
user1804599
@milleniumbug I do something like that in my AST.
Also git, fucking git.
Ell
Ell
what's up with git?
@Rapptz I can understand that,
user406009
@Elyse They have a couple of nice properties. For instance, given an item, you can easily remove it from its list.
double buffering isn't that bad, but apparently some people were really against it
@Ell I suck.
@Nooble Dude, I can set up submodules for you
they're useful in C++ to join several elements ad hoc, without introducing extra indirection when working with polymorphic types
When someone asked Herb about "what happened to zero cost abstractions?" he dodged the question
23:11
@Elyse yeah something like that
user406009
@Rapptz But isn't the current solution still not zero cost?
user406009
Those invalidity checks take time and space.
user1804599
@milleniumbug This forbids the AST from containing do exprs that end in bind stmts, since bind_stmt::next is not optional.
@набиячлэвэлиь No, I will figure this out. JAHLSKJDFHAKSDJ
23:12
@Lalaland The current solution has costs with memory but no runtime performance penalty.
@Nooble what did you do?
Herb's dodge was that "Zero cost abstraction applies to memory and not runtime characteristics" or something.
Which was a bit weird.
@TonyTheLion Suck at git.
I'll see if I can find the quote.
user1804599
23:13
It also happens to be easier to process.
user1804599
:>
@TonyTheLion He cannot into git
Ell
Ell
that's v weird
and not true
@Nooble You have a lot to learn, young padawan
> Coroutines: a negative overhead abstraction.
23:13
@набиячлэвэлиь How do I set a directory for the submodule to be in?
@набиячлэвэлиь git gud
I have it the other way around never mind.
@Nooble Submodules suck
user1804599
@Morwenn Well, just less overhead than OS threads.
> As for variant, “zero overhead” means at run time — no extra space consumed, and no extra code executed — compared to writing it (correctly) by hand using a raw union and a discriminant tag.
Ell
Ell
23:14
don't use submodules for dependencies if that's what you're thinking of doing
user1804599
Don't use submodules period.
user1804599
They're broken.
@TonyTheLion I implemented that!
When I add a path at the end of the command, it makes the entire directory a submodule.
user406009
@Rapptz Yeah, but that results in UB. And some people hate UB.
23:14
@CatPlusPlus I am aware.
@набиячлэвэлиь I distinctly remember
@Ell Why not?
@Nooble somedir/submod
user1804599
They're ad-hoc crap.
@Lalaland ..?
This is Herb's quote about the new-variant.
Ell
Ell
23:15
that quote isn't that bad actually
@Nooble or run the command in the dir
It was a reply to Nicol Bolas' question.
> Does this not mean that every function that uses the variant must check its validity? How exactly is that “zero overhead”?
user406009
Yeah, that's my question as well.
@набиячлэвэлиь Also git doesn't remember my login credentials anymore.
user406009
23:16
I don't see how the new variant can avoid those validity check costs.
user406009
Unless you start employing tricks similar to the ones used by exceptions.
@Nooble Ыоу неед то сет уп а цредентиал сторе фор тчат
@Elyse Arrays are easier to understand
user1804599
No, they're not.
@Rapptz, seems that you only need to check validity after a copy assignment or move assignment, no?
user1804599
23:17
Understanding arrays requires understanding memory layout.
user406009
@Jefffrey It takes less language constructs to create a linked list.
Ell
Ell
I agree with @Elyse
@Nooble Never use HTTPS, set up an SSH key
user406009
They are possible in "simpler" languages.
@OmnipotentEntity If you take in a variant as a parameter how do you know if it's valid?
23:18
@Rapptz, you don't, but then that's really the caller's responsibility, no?
You hope for the best, because that's zero overhead!!!
@CatPlusPlus Hmm alright.
garbage in, garbage out
user1804599
Whereas a linked list is just either the empty linked list or a (value, linked list) pair.
user1804599
That's all there is to it.
23:19
You are comparing the two at two very different level of abstractions
user1804599
At a high level there's no distinction between linked lists and arrays other than that the former can be infinite.
user1804599
Come any bit lower and you have to realise how array elements are stored in memory.
Understanding the memory layout of an array is much easier than that of a linked list
user1804599
Yes, but for a linked list you don't have to do it.
Neither you do for an array
23:21
@Elyse not true, both can be infinite, just linked lists are 'better' at dynamically growing.
A linked list can be circular though.
user1804599
The performance characteristics of arrays are directly related to this layout.
user1804599
For example, it's the reason you can't prepend an element without copying everything.
Infinite and circular collections is something you can implement with something else
Elyse, you can't directly address an element in a linked list without walking everything. It's the same problem just a different operation.
23:22
@Elyse That's true also for linked lists
@Elyse not true, if you skirt around the issue with allocated things, you just need to know that an array starts at an address and is contiguous from there, why can't you just decrement the starting number, and insert the new element there? (I know why you can't really 'just do that')
user1804599
@OmnipotentEntity No, that's not related to low-level details such as memory layout, but about availability of information.
user406009
@Rapptz Oh, nvm, I see now. You always have to check the state of the variant anytime you perform an operation on it's value anyways.
user406009
So you simply have an additional invalid state.
user406009
There is no additional cost because you have to check anyways.
23:23
(what's the original point? It's lost in the mists of time)
user1804599
@thecoshman something else may be there
I'll take that everyone already knows everything about this discussion but everybody is still arguing for the sake of it.
@Lalaland Not if the invariant of the variant is that there cannot be such an empty state
Maybe if the compromise wasn't so shitty
@Morwenn I don't, but I'll argue any way
23:24
I don't know why everyone is satisfied with it.
:<
user1804599
@Jefffrey Yes, data locality (potentially), but I'm talking about algorithmic complexity.
There are people who talk about trivialities in the English language and people who convey actual ideas in English. In the end, the latter are the only ones that matter, regardless of their efficiency/proficiency in using it. The Lounge spends way too much time being the analogue of the former.
user406009
Still, it would be cool to have a std::variant proposal with an unchecked get function. Where you have UB if the type isn't valid.
@Rapptz, I'm satisfied with it because it got me out of having to be bored this week in class.
@Rapptz Nobody is. Everyone only realized that this won't go anywhere and we won't ever have std::variant in the standard without the compromise.
23:25
@Lalaland like operator[] vs at?
@Nooble You need to set up a credential store for that
user406009
@OmnipotentEntity Yes.
@Lalaland Now there's a compromise.
The compromise is that at least nobody won.
@Nooble just got SSL properly set up on one of my hosts ssllabs.com/ssltest/analyze.html?d=stack.press
23:25
@Lalaland it's seems reasonable that you could statically know what type you have in your variant, but then in that case, just use a union. the idea of a variant is to give back some type safety that you lose from using a union
@Elyse Understand algorithm complexity requires knowing the memory layout of both
user1804599
No.
user1804599
For a linked list it just requires knowing how to get from somewhere to somewhere else.
@Elyse you can say the same triviality about any collection
Which is the memory layout of the data structure
23:26
Same thing for an array
user1804599
Storage of a linked list is completely agnostic to its interface.
same for an array
user1804599
Whereas contiguous memory is actually a fundamental part of arrays.
"Dereference next pointer" and "increment index by 1" is on the same level of knowledge
The fact that each element has next to it (or inside it) a pointer to the next is exactly memory layout.
user1804599
23:27
The sole reason you'd use arrays is because you want contiguous memory.
that's why you call it an interface, because it's not tied (directly) to it's impl
user1804599
Because that's the only nice property arrays have and everything else lacks.
Nothing else matters for most things
@Elyse cough vector
user1804599
Vectors are arrays.
user406009
23:28
@Elyse What about O(1) access and mutation?
@Elyse scala.lang.Vector != scala.lang.Array
user1804599
@Lalaland Those are offered by deques as well.
Resizability of the array really doesn't matter
user1804599
@набиячлэвэлиь C++ vector.
@Elyse Not really. What you usually want are the side-effects of contiguous allocation (such as O(1) indexing).
user406009
23:29
@набиячлэвэлиь The default assumption in this room is C++.
user1804599
@JerryCoffin you don't need contiguous memory for O(1) indexing.
and no, you don't use arrays because want contiguous memory, you use them because you want efficient random access, and that's (generally) best done via contiguous memory.
@Lalaland She capitalized the V, and the language with Vectors is Scala
@Lalaland I thought it was Haskell.
Into the fucking RTF with you
user1804599
23:30
deque has O(1) indexing but lacks contiguous memory
@Elyse No, but it's still the O(1) indexing that you want/care about. Contiguous allocation is only a means to an end (even if it's not the only means to that end).
@Elyse not for random access.
user1804599
Contiguous memory has some nice properties, and some not-so-nice properties.
user406009
What are the "not so nice" properties?
user406009
Hard to make immutable?
23:31
@Lalaland the opposite of the problem
user1804599
@thecoshman Oh, really? Well in that case, Clojure vectors have O(1) access and no contiguous memory.
user1804599
@Lalaland O(n) prepend, O(n) immutable update.
Prepend can be amortised
user1804599
But, back to the point, the properties of linked lists are not tied to its memory layout. Some of those of arrays are.
user406009
23:32
@Elyse Aren't they O(logn)? It's just that O(logn) ~ O(1) with a large enough n.
user1804599
Pedantically, yes. And n in Clojure is of that size for any computer you can ever run it on.
user406009
@Elyse I do agree with you that immutable update is sometimes useful. And that you can't get it from arrays.
hell, you could even store a linked list with contiguous memory block if you wanted. And if you are willing for slightly slower add/remove, you can even have in order access
user406009
@Elyse I actually just had a problem where I really wished I had a decent C++ immutable data structure.
@nick nice job
23:33
You know, there's a difference between O(1) and O(log(n)). And it's not pedantry.
user1804599
Compacting GCs can make linked lists contiguous.
user1804599
@Jefffrey The difference is in this case insignificant.
@Nooble thanks m8
user406009
> slightly slower
@nick stack.press?
23:34
@Elyse Well, actually some of them are (e.g., the ability to insert a node in the middle of a list in O(1) is due to its layout just about as much as the O(1) indexing is related to the layout of an array).
@Lalaland Write one.
user1804599
If it were truly O(1), it would be equally fast.
@Nooble i use it for testing stuff right now
user406009
@Morwenn I have actually been thinking about it. It seems like something that's currently lacking.
@Lalaland well, there would be some moving, opposed to just plonking new nodes in first free slot (or end).
user406009
23:35
And Haskell nicely provides all the documentation for its awesome immutable structures.
@Elyse Then please don't say it's O(1) when it's really O(log(n))
It's deceiving
@Lalaland Or propose a draft to Boost.Containers and let the community do the rest.
user1804599
@Jefffrey I really don't give a fuck
user1804599
Here, I say it again: Clojure vectors have O(1) random access.
user1804599
23:36
Clojure vectors have O(1) random access. Clojure vectors have O(1) random access. Clojure vectors have O(1) random access. Clojure vectors have O(1) random access.
@Elyse No, least not without a pretty strange and twisted definition of "contiguous" that includes "data will be interleaved with links".
fight me IRL
how are clojure vectors implemented
ITT people arguing for one hour but still not giving a fuck.
user1804599
Time to sleep, goodbye!
user406009
23:36
@milleniumbug B trees. They are like log32(n)
user1804599
@milleniumbug Tries with small arrays as leaves.
@Morwenn I'd give you a fuck :\
user406009
One last point is that arrays have relatively small constants for their O(1) updates.
user1804599
user406009
Even though clojure vectors are approximately O(1), that constant is significantly higher.
23:37
@thecoshman You'd give a fuck to my photo, not to me :p
@Morwenn nah, there's better things to wank to :P
So, I have a dumb question: According to the variant specification, when using the type templated assignment operators, the type should be checked if it has a single best type match using "regular overload resolution." Is there any easy way to do this? Or do I need to manually implement these checks? (each of exact match, promotion, conversion; then exact match > promotion > conversion)
@thecoshman like myself
user406009
@milleniumbug youtube.com/watch?v=I7IdS-PbEgI is a decent talk about that type of data structure.
@thecoshman I have to agree.
23:39
I just don't want to reinvent the wheel, but I'm not aware of any built-in facilities to make this easier other than the obvious ones like std::decay.
user406009
Ignore the react parts.
how to use a multithread
@Lalaland I'll save it for later
@GregorMcGregor With a weaver.
what can std::decay do that time can not do at the moment?
23:40
@Elyse That's the trick. Make a false statement, then run away before anybody has a chance to prove it wrong. For those looking on, it would be about equally accurate if I were to claim that std::unordered_map<int, T> gave O(1) access. Yes, you can expect complexity to be about constant--but no, that's not the worst case (and I'm sure we all know perfectly well that big-O is defined in terms of worst case, not expected complexity).
@chmod666telkitty, is that a pun or am I just confused?
@OmnipotentEntity Yeah there is, think some_tag<Type> resolve_me(Type); for Type in Types.... Then decltype( resolve_me(std::declval<Arg>()) ) is either a substitution error in case of ambiguity/no match found, or some_tag<Type> where Type is the solution you’re looking for.
@GregorMcGregor use the stack heap to allocate a multithread
@LucDanton, nice, that makes my life a lot easier. Thanks
hey all
23:42
long time no C
user406009
@GregorMcGregor First you need a good needle and cloth.
user406009
The needle for stabbing your eyes out. The cloth for giving yourself an anesthetic.
glad to see the puns havent stopped
user406009
@JerryCoffin Clojure's data structures are worse than that though. std::unordered_map<int, T> is actually O(1) average case. Clojure's vector is O(logn) average case.
@Lalaland Yes, I realize--I was just giving a quick comparison that (I'd assume) is reasonably familiar to everybody here. For realistic sizes, I'm not sure there's a lot of practical difference anyway.
user406009
23:47
@JerryCoffin Correct. At realistic sizes, it's all going to come down to the constant factors.
user406009
And Clojure's vector could easily beat a bad hash map.
@Prismatic Hey
@Prismatic HI
user406009
I actually find it interesting that Haskell provides a set of special integer based data structures simply for the better constant factors.
user406009
IntMap, IntSet, etc.
23:48
I am using boost libraries to make a TCP Client plugin for some other software. Anyways my TCP client seems to be blocking the execution of the rest of the program. github.com/l0oky/samplify-plugin/blob/master/…
Why is that?
Why is It blocking the rest of the program If I am using boost::asio::async_read_until and boost::asio::async_write?
For my read/write actors..
a) The supplied buffers are full. That is, the bytes transferred is equal to the sum of the buffer sizes.
b) An error occurred.
While my TCP Client recieve/transmit actors are running fine the rest of the program halts until my TCP client stops..
No errors are occuring..
Only when rx/tx actors stop the program continues..

« first day (1849 days earlier)      last day (3325 days later) »