« first day (2259 days earlier)      last day (2686 days later) » 

12:00 AM
@JerryCoffin Why is Rust compilation so bad?
 
you know what else I've heard compiles badly
swift
on large projects it chokes bad enough to crash often
I don't think a compiler ever crashed on me
but that's life in C# land :P
ez code ez life
 
@Mysticial Partly because the compiler is basically doing lots of proofs on what you've done, to ensure you haven't broken any of its memory usage rules and such. Some of it is probably also just lack of optimization--for most of its history they've been working much more at completing the language than optimizing the compiler.
@AlexM. If you start with an easy language, it's pretty easy to ensure a compiler never crashes (e.g., I've never crashed a Pascal compiler, and I have a hard time even imagining how one would get to a state that led to an ICE or anything similar).
 
nwp
@RobertHarvey it confuses me greatly that you follow what the lounge says
 
@AlexM. I've had the displeasure of having to use Swift, and I have to say that the lack of decent tooling is only part of the problem; a big part is that the language they're tooling is shit.
 
@Mysticial Keep in mind that this is the same person who said things like:
Jun 8 at 20:27, by rightfold
PHP 7 is great and far more fun to work with than C++.
 
12:10 AM
@JerryCoffin I presume that makes it impossible to implement stuff like memory pools?
@JerryCoffin shhhh I know. :P
 
@Mysticial Umm....not sure. I've never delved into it nearly that deeply, but my immediate guess is that if it's possible at all, you'd have to jump through a lot of hoops.
 
I get this strange feeling that the priority of most new languages now is idiot-proofing. (which isn't wrong, but there's a cost to it)
 
@Mysticial Keep in mind that this is the same person who said things like:
Oct 7 '15 at 17:49, by elyse
@Ell I like my chicken farms like I like my men: with big cocks.
 
@Mysticial I'd tend to agree, but at least in the case of Rust it strikes me as being a little like a car that's putting immense amounts of effort into an AI to ensure that you don't back up across tire rippers and shred your tires. On one hand, it's absolutely true that getting your tires shredded isn't good. On the other hand, it also arises so rarely that effort on preventing it is almost certain to be wasted.
 
Ell
@Mysticial I think you can turn the borrow checker off for blocks of code
So you get safe and unsafe bits
 
12:21 AM
btw there's a discussion on rust going on here about an article news.ycombinator.com/item?id=13230551
 
TBH, when I started this new job, I was quite amazed at the lack of idiot proofing in virtually the entire system. (except for basic fat-finger protection on manual trades and properly controlled production release system)
 
user1804599
@Xeo fireworks is so much better than bow for flying
 
There are no code reviews, you can do whatever you want.
IOW, you really have to know what the fuck you're doing.
Whereas while I was at Google, it was the complete opposite.
@JerryCoffin The other thing, is that no matter how idiot-proof you make something, there will always be bigger idiots. Something I still run into a lot for users of my pi program. Even when I put in technical protections to prevent the user from doing something stupid, they always find a way to do it. And they blame the program. It's almost hilarious.
I put a massive red warning that says, "YOU DO NOT HAVE ENOUGH FUCKING MEMORY TO DO THIS? DOING SO WILL FREEZE YOUR COMPUTER. ARE YOU SURE YOU WANT TO DO IT?" They always say yes and they complain why their computer freezes.
 
12:39 AM
@Mysticial When you have a system that needs to run 24/7 and hire brand new graduates at a rate of thousands per year, that seems nearly inevitable.
@Mysticial Sounds oddly familiar. Years ago (pre-SO) I pointed out to somebody that under Windows NT a thread running at time critical priority took priority over everything else (even memory refresh). Was told that was impossible, so I wrote some code specifically to demonstrate exactly that--and was promptly told that I had no clue what I was doing because running the code crashed the computer (exactly like it warned them it would)...
 
@JerryCoffin Wow. Wait, memory refreshes were controlled by the OS at the time?
It's one thing to do stupid things just to see what happens. It's another to do it and be, "what the fuck" at what happens.
 
@Mysticial More or less, anyway. Refresh was initiated in response to an interrupt, and the OS controls the interrupts.
@Mysticial Depends. If you're exploring unknown areas, there are certainly times you get unexpected results. But yeah, when the results are known and you've been told what to expect, then get upset when exactly that happens. In this case, I think it was pretty much just trying to distract from the fact that he'd been proven clearly wrong.
 
This code must run as fast as possible -- Yet you use new[] that calls the allocator for no reason. — PaulMcKenzie 1 min ago
 
12:54 AM
lack of QA's presence always make me feeling unsafe
users will use your system in the most unimaginable ways
 
1:25 AM
@Borgleader needs more boost::pool
the C++ friendly way to leak resources
@JerryCoffin Do you happen to have the code for that lying around. It would make a good blog post, for the HN audience.
 
@Mikhail I'm not sure. This was 20 years ago or so. I'm pretty sure it won't work on modern hardware anyway (refresh now normally handled entirely by the memory controller--no CPU participation needed).
 
@JerryCoffin I've also played with Windows priorities a lot but never had anything crash on me... What did you do? Elevate the priority and then _sleep(10000)?
We're not talking about Windows 3 are we?
 
@Mikhail No--NT (3.5 or 3.51, if memory serves). The OS knows that a Sleep blocks the thread, so it lets other threads run. I just wrote an infinite spin loop.
 
I want to believe
 
1:41 AM
To put the time frame in perspective, the conversation arose because somebody proudly proclaimed that with the wonderful new Windows NT, it was impossible to do anything in user-mode code that would crash the OS.
 
Well it should be impossible, modern version actually require you to have some kind of super user permissions to elevate thread priorities.
Also NT > DOS
 
yes, it uses more memory
fatter OS
 
brb, binding r-value to l-value reference
 
Woman arrested after 93-year-old grandma bashed in 'feral' attack
that head line
 
1:56 AM
yo wassuuuuuup
 
@Telkitty an excellent and adorable picture indeed
 
 
1 hour later…
3:31 AM
Hi
8
 
3:52 AM
@MarkGarcia oh my god I almost cried
 
I'll wait for the update when the contraption is laser-cut.
 
are all her posts as hilarious?
 
I think I've seen the blog crop up from time to time. I don't follow it though.
 
no, but they all look interesting.
Looks like she typically just goes through her projects step by step with helpful tips and such
 
4:41 AM
So, I frequently deal with DLL that do terrible shit like divide by zero, especially when the hardware that they control is removed. I'm wondering how one could implement a hypothetical language feature that solves this problem...
Maybe some kind of mechanism that does function calls in a different process space?
 
user406009
@Mikhail The programming language could require the programmer to prove that no such action will occur
 
user406009
Similar to Rust requiring lifetime annotations.
 
user406009
You could also use an interpreter to deal with these issuse.
 
That is a good idea when you have have the source, but I don't think its applicable to binary blobs
also that is a terrible idea
 
@Mikhail You can still do it if you want (with a properly crafted virtual machine).
 
user406009
4:47 AM
Your separate process idea is interesting. You would have to use some IPC to shuttle all DLL calls and results back and forth.
 
Yeah, it needs IPC, but I'm wondering if this kind of IPC is possible with C++ template magic. Maybe something like std::async
The real problem I guess is pooling the IPC, don't want to be making a new process every function call...
 
user406009
The way I would do it is to create a program which creates a wrapper DLL.
 
Browsers somehow do these kinds of tricks.
 
user406009
Read the symbol table of the DLL you are trying to wrap and "manually" do code generation for the wrapper.
 
The key thing is the process space isolation
 
user406009
4:50 AM
@MarkGarcia Yeah, by using an interpreted language.
 
So, back when the earth was without form, and void, people used COM
8
 
@Mikhail Leads to a false sense of security and COMplacency.
 
@Mikhail There's no void. Only HRESULT.
 
@Mikhail How about just an easy way to catch the exception thrown by the hardware on the (we hope) fairly rare occasion that it happens?
 
Its hard to throw across MSVC RTs, but divide by zero, specifically isn't a catch-able exception.
I'm just here to muse about language features we should have :-)
 
5:13 AM
@Mikhail Making it a catchable exception strikes me as a fairly reasonable language feature.
 
What would Admiral Ackbar say?
Although, if we returned division objects instead of doing actual division we could check for it in _DEBUG builds.
 
5:29 AM
Admiral Allahu Ackbar
 
6:18 AM
@Rapptz ( ͡° ͜ʖ ͡°)
 
Also somebody send me a free copy of PVS studio
 
best xmas present it must be ...
 
Also Hex-Rays
We love to develop software and do it well. Read more...
 
looks like I am maintaining my windows app next
 
Lets play "identify that video game"
 
6:32 AM
do abused cats bite human more, I would think so
 
@Mikhail why, that’s the quite famous wp-content
 
WordPress?
 
sorry, I meant uploads: the game
 
good, now you ask one, and we're keep this going until my code compiles
 
6:39 AM
oh, wasn't prepared for this
I'm on mobile which makes things difficult
 
damn I knew I was close
 
@Mikhail you could watch the review in the meantime
 
I have the game :-/
 
6:53 AM
 & Publisher
(biz name)
Not interested in receiving occasional updates about (biz name)? Opt
out of our mailing list.
 
 
sent that using a script in dos mode?
or from linux shell
 
7:14 AM
Cats bite their owners to demonstrate affection, colloquially known as a love bite, but also to warn that they are becoming over-stimulated and want to be left alone. Some cats are also more physically sensitive than others, becoming agitated from too much petting.
not sure first link on google results should always be trusted ...
 
morning
 
morning ... noming nom nom
 
7:28 AM
@LucDanton that's what she said
Raté mon RER à ~20 secondes prêt. Quelques minutes plus tard, annonce : "suite à un mouvement social, les trains sur la ligne B sont retardés de 20 minutes". /cc @Rerito
Je suis bien en France
 
bienviendu
 
gesundheit
 
arbeit mach frei
Probably the first open-source motto when you think about it
 
7:46 AM
huh. I don't follow. Also, I don't think it's anti-capitalist, so it should just be Arbeit
> dos mode
 
On a Microsoft Windows computer, DOS Mode is a true MS-DOS environment. For example, early versions of Windows, such as Windows 95 allowed the user to exit from Windows and run the computer from MS-DOS. Doing this allowed older programs written before Windows or computers with limited resources to run a program.
 
Try TRES Mode, its 50% faster
 
who needs more fast needs to download more ram, trollololo
 
huh, maybe calling that function difference(ctx, a, b) when it’s an equivalent of b - a wasn’t the right thing to do
 
std::minus
 
8:06 AM
oh right, an std::vector<T> takes std::initializer_list<T> exactly ._.
 
2
Q: Check if std::function is std::plus or std::minus

Tips48I have a function: bool basicArithmetic(std::function<int(int, int)> func) { } It should return true if func is an instance of std::plus or std::minus but I have no idea how to check. I can't use dynamic_cast because it's not a pointer.

lol
 
@Mikhail ...seriously
3
Q: For loop appears to be practically infinite

Michael BullockI'm debugging some code at the moment and I've come across this line for (std::size_t j = M; j <= M; --j) (Written by my boss, who's on holiday). It looks really odd to me. Can anyone shed any light on what does? To me it looks like an infinite loop.

> Written by my boss, who's on holiday
 
Bullocks
 
good job, boss. you probably don't do code reviews either
 
> Maybe it should be called Professor Quinn’s Fantastic Patented Cat Confabulator.
lel
> Boss replaced by lazy-web
@Mikhail Next question: "Where does that smell come from when I open my code base?"
Please don't add "thank you" as an answer. Instead, accept the answer that you found most helpful. - From Reviewmorgul 7 hours ago
@morgul This is that answer. — sehe 49 secs ago
 
8:36 AM
I don’t know if there’s still time for inclusion or if it’s even on the agenda, but as usual the standard library will lag behind with respect to some language features: no guide for std::array (cc @MarkGarcia you asked for cool things to do with guides, here’s not one of them)
 
Xeo
@MarkGarcia That's just beautiful.
 
@rodgertq @mclow @zygoloid because of Richard, I now add a caveat to "no one is a C++ expert".
 
@CheukKinSing Lol, le classique "mouvement social" de Noel
C'est tellement cliché, tous les ans c'est la même :')
 
@sehe Fair enough.
 
> error: cannot deduce template arguments for 'annex::optional<T>', as it has no deduction guides or user-declared constructors
huh, taking that a face value that would mean inheriting constructors are even more second class—but I’m not double-checking that
 
9:03 AM
In CEdit MFC. When i add * is always on left side?
 
9:14 AM
So, GCC7 only lacks variadic using to fully support the core language part of C++17.
 
user1804599
@Mikhail bad code
 
@Morwenn Did they fix the lambda pack bug? :P
(I'd've known if they did, since I'm CC'd on it :D)
 
@Griwes No idea, I don't use lambdas as much as you do, and I don't follow bugs.
 
@sehe wow that's some overzealous moderating
 
@LucDanton oooh that looks awesome to me.
 
9:26 AM
@Morwenn My point being, without that fixed it's hardly "full support".
 
@Griwes Full buggy support.
 
9:57 AM
> Complexity: Makes only N calls to the copy constructor of T […]
spec for the range constructor of std::vector<T>
it’s curiously out of date, taking e.g. std::move_iterator into consideration
 
It will probably be reworded when ranges make their way into the collections.
 
10:16 AM
$ file annex-range/include/annex/range/consumer/fold.hpp
annex-range/include/annex/range/consumer/fold.hpp: C source, UTF-8 Unicode text
I couldn’t resist putting an ellipsis (…) into the comments, GCC’s pretty cool with it
 
@TutorEugen Definitely disgusting. Those are right-to-left scripts. This is typesetting terror.
 
Anyone here familiar with linear algebra libs in C++?
 
typeupsetting
 
Ell
11:09 AM
@Rerito I've only ever used glm to do opengl related matrices stuff :V
I think eigen is the goto otherwise
 
@Rerito What sort of linear algebra applications?
 
why do you have to ask, put 2 and 2 together
 
11:35 AM
Alright here we go: a first peek at annex-range documentation. I may or may not be considering a 0.1.0 release targeting GCC 7.1 depending on things, some of which I haven’t even begun to think about. So no promises.
I’m mostly interested in knowing whether the reference is readable at all. The rest is a long-winded WIP.
I wish I could showcase the rtd theme but it borks up, bad. I can generate other themes (+ google for third parties) on request.
cc @Rapptz come see my Sphinx skills
oh yeah and don’t go around sharing URLs, I haven’t decided on a proper home for these so it’s all in a /tmp black hole
 
11:52 AM
@Rerito Boost.uBLAS or such?
 
12:25 PM
Robot's self-nerd-bait for today:
Snowclone is a cliché and phrasal template originally defined as "a multi-use, customizable, instantly recognizable, time-worn, quoted or misquoted phrase or sentence that can be used in an entirely open array of different variants". It is a neologism suggested in 2004. A typical example snowclone is the phrase "grey is the new black" (a form of the template "X is the new Y", in which "X" and "Y" may be replaced with different words or phrases—for example, "Orange is the New Black" or even "comedy is the new rock 'n' roll"). == History == The term snowclone was coined by Glen Whitman on January...
 
@R.MartinhoFernandes what is that for?
 
It's like a earworm, but for the brain. Like when I get stuck for days thinking about metalogical words.
 
no, the self-bait bit
 
Because I did it myself, to myself.
 
what, and you think you’ll bite? don’t you already know that stuff?
 
12:43 PM
owch, that italic
 
doesn’t look like that on my end, there’s more spacing around the i. are you zoomed in?
 
Xeo
looks fine for me as well
 
not as far as I can see
I'm using Firefox on Win10
 
@R.MartinhoFernandes Bilinear forms, cholesky decompositions mainly
 
no
 
12:47 PM
@Puppy oh I’m dumb, but which style is that? I just realised the for is red-ish
 
what do you mean, which style? I just clicked the link you posted
 
@Puppy change the 'rtd' part of the URL to 'default'
I guess that’s one more strike against rtd cc @Rapptz
 
@Ell While browsing I looked upon eigen, blitz++ and boost::ublas
 
ah
 
12:48 PM
And eigen seems like a good piece of software
 
rtd looks much better all around, but that i is just a bit nasty
 
Good doc and promising benchmarks
 
@LucDanton Sometimes I wonder if we're overdoing this.
 
@Puppy yesh, I wish I could use it but right now it doesn’t quite work out :( on other pages there are tables that simply don’t work. not to mention all the wasted screen estate
 
afaik IEnumerable is forward-only but I haven't really noticed any loss in C#
I wonder how much bidirectional and random-access ranges are really useful
 
12:50 PM
I think @sehe has expressed frustration towards the fact that 'forward-only' silently leads to materialization for random-access stuff (sorting IIRC?)
 
p.sure you need to materialize to sort anyway
 
@Puppy any such concept must be supported by an algorithm, otherwise it’s pointless
which is why I’m likely going to give double-ended the axe
 
but generally speaking, as far as I know, nearly all the use cases don't really give a shit about materializing something
 
usually sorting is enough justification for random-access, wouldn’t you agree?
 
nope
random-access gives you sorting in-place, which is substantially less useful than just sorting
 
12:53 PM
@Puppy just to be clear, I think the frustration is towards the silent, hard-to-notice part of the act
 
and sorting after e.g. filtering or mapping is probably going to be more complicated because the results won't be lvalues
 
@Puppy 'in-place' doesn’t really make sense, unless you’re bringing containers into it
 
well, since sorting requires knowledge of the whole sequence, it's got to be put somewhere.
unless you want to do a repeated min or something but I think that the complexity eliminates that problem
I don't know of any way of yielding a sorted sequence without knowing the whole sequence
 
okay so there’s more than one kind of sorting
because I decided to keep the scope narrow (i.e. no containers), in this context the only thing that really make sense is mutable assignment through a range
it’s not a reordering of positions, think std::iter_swap instead
 
so what happens if the user first calls map and then sort?
 
12:57 PM
@Puppy keeping in mind this is speculative since I have not tried it, it maps and it sorts
 
can't do that
 
@Puppy depends, but yes I understand where you’re going with this
 
the results of the map are not necessarily lvalues, so you can't assign to them
 
yup
 
and even if you selected an lvalue, it would be pretty fuckin' surprising to start mutating them
 
12:59 PM
there’s simpler though: can’t sort an immutable view. same situation as std::sort on const_iterators
@Puppy is it? you ask for a sort, you get a sort
 
you can, just materialize the sequence first
@LucDanton Yes, it is
 
@Puppy sure but that’s not really map + sort then is it?
 
I expect the sort to return a sorted sequence, not to start mutating the original sequence
 
it’s map, collect, view into (which might be implicit), sort
 
which is fine
 
1:00 PM
Is the binary representation of a double standardized? I mean, can I memcpy a double to a network packet and expect the other end to read it?
 
of course
 
T needs to be movable which it pretty much must be anyway, the only things lost are some performance and maybe stable references but you probably don't want to guarantee that anyway
 
@StackedCrooked Maybe endianness normalization before?
 
@StackedCrooked That's a clear and obvious no.
 
@StackedCrooked Nope.
 
1:01 PM
I suppose.
 
Who knows what's on the other end.
 
pretty much all hardware these days is IEEE754 but C++ does not require it
 
I see.
 
When designing a protocol, you should define the formats explicitly yourself.
 
^^^
(including endianness of course)
 
1:02 PM
so I guess what I'm saying is that not materializing the sequence before sorting can lead to all sorts of unpleasant side effects and requirements
 
Note that explicitly requiring an existing standard is explicit enough.
 
the case where you can not materialize is the edge case
 
@Puppy I should add that using 'sequence' like suggests you’re looking for something else
 
And no, ASCII representation of numbers is not a good practice /cc @CheukKinSing ( ͡° ͜ʖ ͡°)
 
@LucDanton Could you expand on that? I don't quite understand
 
1:07 PM
I have a struct with a lot of fields and the writing the serialization manually is burdensome. So I was hoping I could make it a POD and use memcpy. I can even automate the endianness conversion for integers.
 
@Puppy when you talk about sorting it makes sense in the context of a container. or like a line of buckets where you can swap any two buckets
 
But one of the fields that represents "jitter" is a double. Maybe I should just somehow find a way to represent it as an integer. Or perhaps even a fixed-width string.
 
when I say I’m focusing on ranges, that means you can’t reorder the buckets. what’s at logical offset 0 stay at logical offset 0
in that meaning 'sorting' really means emptying buckets and filling them up again. which can go horribly wrong in more ways than one, but what can you do? the buckets can’t be moved
 
what does that actually mean? I don't understand the difference
in both cases you're saying "The value at index 0 is now this other value, and the value that was at index 0 is now over here"
 
@Puppy let’s talk references
if you have a range of references (e.g. element_t<ctx> is int&), the reference at position 0 is not going to change identity no matter what
that’s essentially it
@Puppy another way to put it (but not a very fair or complete one) is that the value_type/reference dichotomy of iterators is a carry-over from containers I’d rather not have
 
1:15 PM
ok
so in that case, I'd probably just say that I don't see the value of that at all
 
@Puppy 'that' being what?
 
guaranteeing no identity changes
which is basically what I said before but rephrased
 
@LucDanton frustration, mmm. No. It's unfortunate that it's to silent, though, because I've seen it lead to bad code
 
in fact I'd probably go further and say that I don't really know if ranges of references is all that useful
 
@Puppy keep in mind that’s a consequence of the API (i.e. how I have drawn up the concepts). I came to that design by starting from essentially 0, and only adding things which I could justify (well, broadly speaking). there are no things that are 'there' because I felt like they would have to out of principle.
@Puppy they’re all 'ranges of elements', abstracting over the fact whether those elements happen to be references or not
and just to be sure: std::sort works like that, too, since it operates on iterators and not containers
 
1:21 PM
yeah, but std::sort is just super annoying to actually use
 
@Puppy in this instance and for our purposes of talking about sorting, similar design choices lead to similar results
 
@LucDanton Which is why I think that the design choices are questionable
 
@Puppy which one?
 
well, I guess you said that no identity changes was a consequence rather than a choice
so which choices are the choices you made?
 
1:26 PM
when it comes to positions you can move them, compare them, or read them, and that’s it--that works out the same as what you can do with iterators
 
I guess that I would have said that the notion of positions on the whole is just not very useful
when you produce a new sequence, you can produce the elements in whatever order makes you happy, and that's enough
 
@Puppy as to the justification for positions, it makes up the most of the Motivation page :) it’s a rough read though
 
gotta say that I did not see a motivation for having positions in the first place
it mostly seemed to be motivated by other people doing positions badly
not a motivation for why they're even useful in the first place
 
@Puppy they arise naturally from bidi and up so they are justified by e.g. bidi and random-access algorithms/use-cases, they are not needed for single-pass, forward-only
 
yeah, but I am not even remotely convinced by bidi and random access algorithms/use cases, really
 
1:32 PM
can’t recall off the top of my head if it’s needed for multi-pass, forward-only atm
 
for things like sort just don't do it in place
 
iirc they’re not, just don’t quote me on this
since you mentioned producing a new sequence in a different order out of another one, how do you figure that’s implemented?
 
Wrapping up Christmas gifts is absolute PITA.
 
meh, that's the implementer's problem
or more generally, since the implementer materializes into a container, he only needs to write an algorithm that works on that one container, not a super-generic one
 
@Puppy no, because if it turns out to be impossible (without breaking something else) then we gain insight into the matter
in this case you’ll end up with a container, not a range (in the meaning I’m interested); or you’re pulling from something random-access
 
1:36 PM
...and thumb. It is all cut up from the... what is it called?
The thing that cuts the sticky tape (?)
 
containers are ranges in every meaning that I know matters
maybe you know something I don't in this case
 
@Puppy see, materializing/collecting is linear. for me this is a litmus test that means this is container-like, not range-like
 
thought you said you didn't do things on principle?
 
@Puppy just to be clear: I’m not saying you’re wrong. these are thoughts I’ve thought. but I’m after something particular with respect to composition and complexity, and wedging in a container right in the middle does not play with the rest
@Puppy the API design/concept writing
 
sorting is super-linear time anyway
taking an extra linear time to shove it in the container as an implementation detail is fine
 
1:39 PM
of course
 
I don't see why chucking a container in the middle doesn't really work
 
@Puppy copying vs 'aliasing' is another good litmus test
 
it gives the sort function the generic relaxed interface you need and prevents any sort of horrible mutation
 
@Puppy 'doesn't play nice with the rest' meaning 'it’s hard to foresee the complexity of the pipeline that I, the user, am writing'
it’s a pit of success thing
 
yes, but I the user don't tremendously care
 
1:42 PM
scratch that, I don’t want to think about containers
 
chucking it in the container doesn't change the complexity anyway, it's n log n
 
time-wise yes, space-wise no
 
meh
if I want the absolute best performance in every case, I would expect to need to handwrite some things
but more importantly, I would expect that the 90% case where the performance doesn't matter is the easy case
 
1 min ago, by Luc Danton
it’s a pit of success thing
 
yeah, but what is success?
 
user1804599
1:44 PM
@Ven GCGCGCGCGC <3
 
user1804599
GC IS AWESOME
 
is success saving space in a case where most of the time it doesn't matter in the slightest?
 
making it hard to write a surprising program
 
2 mins ago, by Puppy
yes, but I the user don't tremendously care
 
@Puppy That's what "pit of success" means at all.
@sehe This is it.
 
1:45 PM
or is success having easily written, easily maintained code without super surprising mutations?
 
Ell
^"thats [not]"?
 
I'm afraid at this point Puppy is a loss :(
 
@sehe sure but it’s my library :D
 
@Puppy The point is that you don't care, and you get the good result.
 
someone else can provide an easy-to-misuse library to Puppy
 
1:45 PM
Instead of you don't care and then you'll be debugging the bad result.
 
the good result is not a trivial space saving with random bonus extra mutations
 
@Ell Ooops, yeah.
 
the good result is that my code did what I expected it to and if it turns out I need to, I can apply profiler later
 
honestly you don’t need a range library then, keep using containers
 
Ell
@Puppy the library is the one that should be doing the profiling, right?
 
1:47 PM
well I believe that was my original point
that I don't really see the point of a range library as opposed to a C#-style forward-only-sequence jobby
 
@Puppy that is a range library and a relatively well designed one
 
really? cause I couldn't help but notice that when you call Sort on an IEnumerable, it does not randomly mutate the original sequence
 
IEnumerable is not a range, the analogue is IEnumerator -- well, that’s not the whole story
 
@Puppy There's no Sort.
 
can you really sort an IEnumerable? I would have to look up what that does
 
1:49 PM
No.
 
not even sure if C# defines a sort an IEnumerator
 
Sort is in containers.
 
@LucDanton Yes, you can, and it does what I described- produce a new IEnumerable with a sorted result.
the fact that it may or may not involve a temporary container is immaterial to the user
 
Enumerables have OrderBy, which is the materializing one.
 
@R.MartinhoFernandes indeed
 
1:50 PM
oh right, yeah, it's called OrderBy
same principle
 
it’s sort + group_by all in one to be specific
 
haven't had th eneed to use it extensively but I don't remeber it grouping
 

« first day (2259 days earlier)      last day (2686 days later) »