« first day (850 days earlier)      last day (4090 days later) » 

10:00 AM
Ow.
 
Xeo
lawl
 
Is it a signal of bad code?
 
In the Community: Meet PJ Naughter - I thaught this was a very bad play on PJ Plaugher at first
 
user142019
@Mysticial lol
 
10:01 AM
20 messages moved to bin
 
user142019
nice
 
@jalf How. Does. One. "Accidentally" ?
 
Sorry, guys, I'm just trying to clean up to make a bookmark. Don't mind me.
 
Xeo
@R.MartinhoFernandes Wut.
 
@Xeo Joke
 
10:02 AM
imokaywiththis.jpg
 
Xeo
For the (cata, ana, bind) thing?
 
@thecoshman meh
 
@sehe Apparently, CMake takes it upon itself to decide that "all the MSVC project files I generate should have lots and lots of stack space"
 
It's rather fun.
 
10:03 AM
@jalf lol
 
@jalf Lol. Well, that's a reasonable excuse :)
 
@sehe > Then once you know the basics, I would start working through the STL library and perhaps some Win32 specific coding
...
 
Ok, I'm done.

"bind+cata+ana" or "Why Boost.Range sucks"

1 hour ago, 46 minutes total – 144 messages, 8 users, 0 stars

Bookmarked 16 secs ago by R. Martinho Fernandes

Yeah.
(And by "sucks" I mean "is not very generic")
 
@R.MartinhoFernandes To be fair to the library I'm not sure why you had the expectation of Boost.Range being that way beyond the name alone!
 
10:04 AM
@LucDanton Precisely
 
Boost.CoatOfPaintOverIterators (and here I mean Boost.Iterators)
 
@LucDanton I expected to be able to do all kinds of shenanigans with ranges! (keep in mind I have been spoiled by LINQ, Haskell, and all this theory of morphisms)
@LucDanton Nice one.
 
Darn edits
 
@R.MartinhoFernandes I'm afraid Boost.Range was thought up before LINQ caught the eye of the public. I'm thinking 'Modern C++' timeline; is that somewhat before LINQ?
 
LINQ popped up with C# 3, so ~2008
 
10:07 AM
Damn, it's Boost.Iterator. I always want to say Boost.Iterators.
 
@LucDanton Yeah I think so too. I never got the impression that Boost Range wanted anything resembling Linq, really. More like, inspired on Boost IOStreams
 
Yaaaaayyyy.. Spotify launched in Poland, and it's cheap! 2.5 Euro / month for Unlimited, 5 Euro for Premium
 
Copyright notice from 2003, released with 1.32. 'Modern C++ Design' published in 2001. I'm damn accurate for things that happened way before I even knew what programming was about!
 
Dum dum dum
 
@LucDanton Two words: Haskell 98 :P
 
user142019
10:09 AM
LINQ is great.
 
I'm joking.
 
@LucDanton I'd date Modern C++ Design before that. Damn, I'm younger than I think. Oh wait
 
Yeah, the library is old. But what has it gained since 2008?
 
I still accounted for that, hence 'caught the eye of the public' :) No doubt the fundamental concepts are old, and were implemented in every lisp ever (with unpronounceable names).
 
Also, I can't believe LINQ isn't five years old.
It feels almost as if I had always been using it.
 
10:11 AM
@R.MartinhoFernandes I'm afraid things like iterators are a hotbed for generic programmers (or perhaps used to be), and are very convenient to their users, but I think the intersection between the two is narrow.
 
user142019
I have used LINQ once and it was a wonderful experience.
 
user142019
I was extracting information from a HTML document. :P
 
@LucDanton What do you mean by "hotbed"?
 
@R.MartinhoFernandes Perhaps you did some DBy things before? Yeah like that sounds likely...
 
Xeo
LINQ is nice, although the names are kind of a pain.
 
10:13 AM
@R.MartinhoFernandes I was thinking in the line of '[writing string classes as a sport]'.
 
It's a bit before my time, so it's not unlikely it's just my perception of things :/ I'm still perplexed by how so much effort was spent on iterators for what little that brings.
 
@LucDanton Hmm, no. But I was first exposed to Haskell isotopes in 2004, so when LINQ hit I was already wired in terms of maps and filters and so on. I guess that made it seem like it wasn't new.
 
Xeo
ahaha, our codebase uses OurRand() % 101 for 0..100% probability... too bad it's not uniform. Which is sad for the players.
 
Uh, is isotopes a thing? Or metaphor?
 
10:14 AM
Metaphor.
lol
 
Same elements, but heavier? :p
 
@Xeo usually, that's just nice for the users who are smart enough to exploit it?
 
At first it acted as radiation poisoning (I hated the damn thing), but then it turned into a superpower.
2
 
Aw man filter and maps rock. I know you know that, but still.
 
Hear hear
 
10:16 AM
You know what, that whole iterator taxonomy is perhaps my big hang-up as to why I don't want to write a range library. It's boring, as an implementer and user.
 
user1357851
I knew you did it sehe!
 
'I know a range when I see it'.
 
@LucDanton I have been contemplating sticking to forward iterators/ranges every freaking where on ogonek, from inputs to outputs.
From there up, only bidirectional ones are useful.
 
Mmh, I hope you don't get in trouble when you have to consume them, what with some of the algorithms needing output iterators.
 
I need to check if ICU provides backwards iteration, and if so, where.
 
10:19 AM
@R.MartinhoFernandes output iterators aren't forward iterators, right?
 
@sehe I don't have ouput iterators. All ogonek algorithms return deferred evaluation ranges for composition!
 
@R.MartinhoFernandes Why would you look at the 'competition'. Can't you decide whether it is a useful feature for ogonek?
 
@LucDanton I don't have output iterators!
 
I'm guessing you only ever consume ranges with containers and range-for?
 
@sehe If it isn't ICU, I can be sure it isn't important.
 
10:20 AM
@LucDanton and std::copy to output iterators
 
@R.MartinhoFernandes I know. But e.g. boost::transform still expects one.
@sehe Well yeah but that would be problematic.
 
@R.MartinhoFernandes well, is std::string::find_last_of important? or std::string::rbegin?
 
Bad example, there is of course a transformed adaptor. I too have little faith in the library lol.
 
@LucDanton huh. How would range-for work, but std::copy not?
 
@sehe No idea. But those exist. Note how I did not mention any conclusion I would draw from the feature existing. I only mentioned the conclusion if it did not exist.
 
10:22 AM
@sehe It's not so much a straight matter of 'working' but of convenience.
 
@LucDanton IMO the adaptors aren't well covered. I keep missing the obvious ones and there are some ... curiosity adaptors
 
I don't understand people following 55k of random ppl on Twitter
 
@sehe Ha! So you at least superficially share my gripes with it.
 
Yeah that's how we ended up here :) Boost.Range has little to no primitives and sucks at composing them.
 
@LucDanton You mean writing into my iterators?
Impossible.
 
10:24 AM
@R.MartinhoFernandes I like the concept. I hardly use it (C++ is not my dayjob, again) ...
 
The only ones that could ever be considered feasible are the encoding/decoding ones.
 
@BartekBanachewicz I don't understand twitter at all :)
 
Making any other iterators support output would border insanity. From the "in-" side.
 
@R.MartinhoFernandes Is it the case that your ranges are the end goal and you don't even need to consume them anyway?
 
Xeo
@LucDanton The list of adaptors is really just too short: boost.org/libs/range/doc/html/range/reference/adaptors/…
 
10:25 AM
@melak47 twitter is nice.
 
Let's stop with the echo chamber guys lol. Let's agree to agree.
 
Xeo
Also, some adaptors just plain suck - e.g., indexed
 
user1357851
@sehe I hope you get abducted by obese female gorillas on ecstacy
 
Xeo
Instead of returning a pair<T, size_t>, you get a method on the iterator...
 
@LucDanton Yeah, you don't write to a word_break_iterator. It's fundamentally a readonly concept.
Doing otherwise... I don't even want to contemplate it.
 
10:27 AM
1 min ago, by Telkitty
@sehe I hope you get abducted by obese female gorillas on ecstacy
^ WTH
 
Xeo
Wut
 
@Xeo It's not like they couldn't anticipate range-for -- none of the algorithms work on the iterators, which is kinda the point.
 
Though writing into an encoding_iterator<utf8> makes some sense.
 
@R.MartinhoFernandes Uh oh
 
But Boost.Range covers that nicely.
 
user142019
10:27 AM
 
Xeo
@LucDanton Yeah, every fucking algorithm gives you the values.
 
Instead of std::copy(source.begin(), source.end(), encoding_iterator(destination)) you write boost::copy(ogonek::encode(source), destination). I think that's perfectly acceptable.
 
Ya know, there is no scan in Boost.Range, but there's adaptors::adjacent_filtered.
 
@Zoidberg that's like 9th time I see that in the past few days
 
That's something. But it's too specific :(
 
user142019
10:31 AM
 
user142019
New pope.
 
who is that
 
@Zoidberg should we recognize faces here?
 
No, wait, you can just pass a constant true filter.
 
I don't get it
 
user142019
10:32 AM
@sehe Skrillex. :|
 
user142019
I think. xD
 
@Zoidberg Also, incredibly, his middle fingers are equal length to the rest!
 
@sehe they fit for his mac keyboard
 
@R.MartinhoFernandes Goes to show how ad-hoc the library it is. It's less a matter of "let's build some strong bases, based on some preexisting concepts", but more of a "I've needed that before and it was useful, better put it in" I think.
 
@LucDanton So, scan = adjacent_filtered([](...){ return true; });
 
user142019
10:32 AM
@sehe No, they're bent.
 
hehe
 
Wait, where's the mapping.
Yeah, that's not a generic scan.
 
Well, the predicate gets the pairs :D
 
@LucDanton Yeah, it can be abused with captures, but doesn't compose.
 
To give you an idea of what I think of the adaptors, I use transformed and then I wrote my own slicing lol.
I think I've used reversed as well.
 
10:35 AM
To be honest the one I have been pining for most often is really bind.
I would not need to carry track state myself in UTF-x encoding iterators.
Or the decomposing ones.
Just boost::imaginary::bind(source, decompose), done.
 
I'm thinking about what an implementation would look like. Challenging.
 
Xeo
@LucDanton What was wrong with adaptors::sliced?
 
Requires RandomAccess.
 
Xeo
@R.MartinhoFernandes Bind sounds so strange for that...
@LucDanton Oh, right
 
concatMap!
 
Xeo
10:38 AM
Just call it flatten. :|
 
concatMap is better.
 
@Xeo ¦| <-- even flatter
 
I would expect flatten :: [[a]] -> [a].
 
Xeo
Hmm, true
 
It maps decompose to all elements, and concatenates the results.
 
Xeo
10:40 AM
Fff.... I lost my taskbar again.
 
Noob
 
@LucDanton C++ makes it rather complicated, yeah. A GC helps a lot.
 
Mmmh, didn't I stash those Boost.Coroutine fix somewhere?
 
@Xeo Ctrl-Shift-Esc, File/Run/explorer.exe
 
Xeo
I have it on auto-hide, but sometimes it likes to hide too much and hides behind other windows for realz. In Win7, I could just press Winkey to get it back, but Win8 doesn't have something like that...
 
10:40 AM
@LucDanton what did you fix?
 
Xeo
@sehe It's not like it's dead.
 
@sehe Range-for doesn't work out of the box.
 
@Xeo Oh. Then it's just a feature
 
wat
 
@Xeo yet another reason to wait for Windows Amoeba
 
10:41 AM
@LucDanton Oh, you are going to use coroutine? That's cheating! ;)
 
@LucDanton On a coroutine?
 
@R.MartinhoFernandes I know it is. It looks like a good excuse to practice some skills though.
@sehe Those of the kind T(), yup.
 
user142019
What project is that?
 
dat github guessing
 
10:42 AM
@LucDanton I hardly ever need anything beyond filtered | transformed
 
@Zoidberg Pure C++, of course. My Minicraft.
 
Oh yeah, filtered! How can I remember my map but not my filter.
 
user142019
@BartekBanachewicz It needs to guess .h files, which can be C, C++, Objective-C or Objective-C++. It does this with a naive Bayesian classifier.
 
user142019
Use .hpp or .h++ anyway.
 
My engine is detected as 40% of C
Yeah, I'm going to use .h++
 
10:43 AM
@Telkitty lol (SFW)
 
@Zoidberg Isn't Objective-C++ informal term?
@sehe is it @sbi?
 
user142019
@BartekBanachewicz no it's a language.
 
any opinions on this book? yay/nay? C++ Concurrency in Action
ffs link syntax, y u no stay in my head
 
What's the trait for the range value_type? range_value?
 
@melak47 It's good. Ask the robot and... Abyx IIRC. Also, the author is a user on SO
 
10:47 AM
He should print his rep on the cover
 
@LucDanton iterator_value<decltype(begin(range))>?
@BartekBanachewicz Why? He writes a book. He doesn't need toy rep
 
Oh, there is a boost::iterator_value, I guess that's where the name range_value comes from. I've always found it sucky.
 
@sehe Like writing a book automatically elevated you to god status. Look at Bullshildt for example. If someone has, say, 200k rep on SO, it's at least a hint he can explain something nicely.
 
Xeo
@LucDanton Better than range_traits<R>::value_type. :/
 
@BartekBanachewicz isn't he a pretty good example of that? He wrote some books: instant authority. Actual qualifications are irrelevant. ;)
 
10:49 AM
Oh boy, I can't perfectly capture.
@Xeo I don't see why. You need typename regardless.
 
@jalf that... well.. uh.
 
Xeo
@LucDanton Every other trait evar uses ::type. Only the iterator_traits don't.
 
std::allocator_traits, std::char_traits.
 
Xeo
Then those suck too!
 
@Zoidberg also don't look at this code please.
 
Xeo
10:50 AM
char_traits? Seriously?
 
Just alias the damn thing.
@LucDanton Does char_traits have nested types?
 
@Xeo The metafunctions that only ever compute one type are newer :|
 
Oh, int_type.
 
>::type is only a convention. It's not the defining feature of a trait.
 
According to the standard it is!
 
10:51 AM
You UnaryKnow it isn't :D
 
...don't hit me...std::string is probably not well suited as a byte buffer for downloading stuff into? seems to mess everything up with extra '\0's :p
 
@melak47 vector<char> for text, vector<unsigned char> for binary
 
@BartekBanachewicz yeah..but then I have to like, append chunks myself, no .append ._.
 
@melak47 It can work but then again std::vector<byte_type_of_your_choice> is usually cromulent.
 
@BartekBanachewicz Why not std::string for text?
 
10:53 AM
Or std::deque etc.
 
Oh yeah, I decided to be lax about what a "byte" means in ogonek.
 
Xeo
@melak47 v.insert(v.end(), first, last)
 
@Xeo oh. derp.
 
@R.MartinhoFernandes I'd use stl::rope<char> actually. I dunno, I am used to pretty short strings.
 
Oh wait I need range_reference.
 
10:55 AM
Any encoding form that produces 1-sized code units is a valid encoding scheme (aka serialization format). I was requiring them to be unsigned char, but that kinda conflicted with having UTF-8 as char.
 
Do you really need append? Can you get away with a vector of vectors?
 
@MartinJames I could, but it's kinda meh, and insert works :)
 
user142019
@BartekBanachewicz lol
 
Hmm, Thunderbird seems to be eating my spaces.
"John Smithundalle" is not a proper way to tell me who is in some e-mail conversation.
 

« first day (850 days earlier)      last day (4090 days later) »