« first day (918 days earlier)      last day (4039 days later) » 

8:00 PM
@R.MartinhoFernandes I tried things like having clients inherit a base, like std::iterator and querying std::is_base_of. It feels dirty though, std::is_base_of is kinda magic.
 
@R.MartinhoFernandes :)
 
allocate, deallocate, conversion constructor, and op==?
 
Xeo
@R.MartinhoFernandes The actual source wouldn't count as a sequence, though, if it was e.g. std::vector, no? Say, some class takes a container / range in the ctor, and works with that. And you want to pass it a reversed vector you have: make_foo(retro(std::move(myvec))) - you're not interested in myvec afterwards.
 
@LucDanton I have a seq::true_sequence base that provides the member directly, but it is not required..
 
That does sound minimal.
 
Xeo
8:01 PM
AFAIK, retro wouldn't store the vector, or would it?
 
No, but why should it?
 
btw, robot, did you finish reading the new draft of the Unicode paper?
 
There is no place to move the vector to.
 
Xeo
So how do I pass someone the reversed vector, without unnecessary materialization of the view?
 
@sehe Mostly it was tongue-in-cheek. I was guessing that "bliako" is you since you posted the link.
 
8:02 PM
do ranges replace iterators or are they built on iterators?
 
Xeo
replace
 
so if I have ranges I need no iterators?
 
Xeo
Boost.Range is built on iterators, and it sucks beyond basic things
 
@DeadMG Not yet. I have to finish replying to some e-mails and I will finish reading afterwards.
 
@Code-Guru Makes sense. Keep up the guessing! Someday you might get better at it
 
8:03 PM
ok
 
@sehe maybe guessing isn't the right word...implying certainly
 
@R.MartinhoFernandes Since it's possible to have a base conditionally I think it's redundant that the member type be an integral constant.
 
@Xeo If you want to operate on the vector, use vector operations...
 
@Code-Guru Oh. Thanks for doing that. It amused me a little.
 
@sehe lol
@sehe good...it was meant as a joke. Maybe not a good one...
 
Xeo
8:04 PM
@R.MartinhoFernandes ?
 
tonight is the night where I will finally make my computer experience perfect, starting with a good browser (uzbl (-tabbed)) is teh shit!
 
@Xeo Make a better one :P
 
@Xeo Consider a longer chain of transformations with a vector at the source. Do you expect me to write code that does the right thing on the vector itself?
 
@Borgleader the whole std library is built on iterators, doubt it can be done differently.
 
@rubenvb And SG9 are completely floundering at ranges, too.
 
Xeo
8:05 PM
@R.MartinhoFernandes I don't think I follow, but my answer for now would be "no".
 
Ell
Slender is such an incredible game
 
@rubenvb right because boost is the std library, also, i didnt say dont use iterators, i simply said make one that doesnt suck
 
@Borgleader The first and the second are the same statement rephrased.
 
bleh...not boxed ;-(
 
8:06 PM
> Try again. Fail again. Fail better. Samuel Beckett
:) soooo meta
 
Lol.
 
@Xeo If you already have a vector, and want to avoid creating another one, do your manipulations on that vector directly and pass it along. That's not a scenario I really care to support.
 
@Xeo Could try to write a sequence-container that would be compatible.
 
(Or maybe your function should take a sequence argument and not a vector?)
 
@DeadMG how is "make a new range that doesnt suck" the same as "dont use iterators" ? unless its somehow impossible to make a range that is good with iterators
 
8:07 PM
@Borgleader It is impossible to make a decent range with iterators.
 
then say that, dont say my statements are the same.
 
@Borgleader He's trying! Well, he's helping out at least.
 
@sehe zactly
 
@Borgleader They are the same. All ranges based on iterators suck.
 
Xeo
@R.MartinhoFernandes template<class Seq> foo<Seq> make_foo(Seq s){ ... } -- auto f = make_foo(retro(std::move(myvec)))
 
8:08 PM
well...enough chatting for today. Gotta run errands and do some other more productive stuff /bleh
 
You cannot pass vectors directly to retro anyway.
 
I guess ranges need to be fleshed out more until they work better,
 
I guess you could do like Luc said and write a special sequence that owns a container and can mutate it.
 
Still, perhaps it's just my feeble mind, but really, what can a range express that iterators can't/
 
But that would be expensive to copy.
 
8:10 PM
@ThePhD It's a tricky design to get correct. C++'s ranges will be far in advance of what other range designs do.
 
They'd work better if they were the primitive
Instead of iterators
 
@R.MartinhoFernandes Isn't it a goal to copy sequences only as much as needed ? As it has some semantic meaning anyway?
 
input and output ranges are easy
but once you get past that, it's trickier
 
Xeo
@LucDanton I thought it was the other way around
 
@LucDanton Copy constructible separates single-pass from multi-pass.
 
8:11 PM
So at most one copy per extra pass, no? It's a matter of QoI though, not correctess. I think we're on the same wavelength here.
 
Xeo
Sequences (atleast the RTL ones) might get copied alot, because of the destructive iteration.
Perhaps the vector should be moved into a shared_ptr ... hm
 
@Xeo Dear god no.
Here's why you should not do that: Boost.Range does it.
 
Xeo
haha
 
It does...?
 
@R.MartinhoFernandes Actually, I'd say that the much more meaningful difference is recomposability.
 
8:13 PM
@LucDanton But I don't expect algorithms to exhaust the sequences I pass in, so, like iterators, I expect pass by value to be common.
 
Xeo
It would solve the copy "issue". The thing is that then, you can't destructively iterate the vector - you'd have to keep track for each sequence wrapper where you are.
 
@R.MartinhoFernandes By value doesn't mean copy. I'm okay with that.
 
@CatPlusPlus Well, how do you make ranges "the primitive", then?
 
Won't lie, it has always felt weird to write Range&& range :s
 
8:14 PM
I mean, even in the case of a contiguous memory model (RAM), you still need 2 things to operate on it: where the memory starts, and where it ends.
I guess a Range can encompass both those things, but...
 
You are thinking of ranges wrong.
 
yeah
 
Implementation details are not really relevant
 
Who cares about memory?
 
the problem with ranges, if I recall correctly, is recomposition.
 
8:15 PM
I was just using memory as the example.
Since that seemed to be the easiest and most trivial.
 
Xeo
@DeadMG Define "recomposition"?
 
@ThePhD It isn't. The most simple is an always empty range.
 
So I could see the utility of a container sequence -- it's probably as hacky and icky as move iterators, but if you know you're going to thread it through something appropriate, could be nice to have.
 
@R.MartinhoFernandes always-empty?
... Hm. Wait a second.
 
Ell
@ThePhD are you making a game?
 
8:16 PM
@Xeo If I have fwdit1 and fwdit2, then I do fwdit3 = fwdit1++;, then now fwdit3 and fwdit1 are a fresh new range all of their own.
 
^ This is a range, right?
Technically.
No? Yes? Maybe?
 
A C# range design, yes.
 
@Ell Yeah.
 
template <typename T>
struct always_empty : seq::true_sequence {
    using value_type = T;
    bool empty() const { return true; }
    T front() const { throw "fuck off"; }
    void pop_front() {}
};
 
Ell
@ThePhD is it open source?
 
8:17 PM
@Ell No.
 
Ell
is it your own project?
or are you employed doing it?
 
It's a personal project. I don't need to open-source it.
Yes, it's my own project.
No, I'm not employed doing it.
 
Ell
Right
Do you keep a development blog?
 
Xeo
@DeadMG Ah, range difference maybe?
 
@Xeo I've been thinking about it and it's not as trivial as it could be.
 
8:19 PM
@Ell No. I'm not doing anything worth blogging about.
Or, so I think.
 
I think am going to need seq::merge(s, r) in ogonek, btw. I think I know what to make it work, at least for the use case I need.
 
@R.MartinhoFernandes wot
 
obtw robot
you were talking about Java's ranges and C#'s ranges
what kind of ranges did you implement using them?
 
@LucDanton What about it?
 
@R.MartinhoFernandes What's that?
 
Xeo
8:21 PM
@DeadMG fwdr3 = take(1, fwdr1) :D Of course, fwdr3 doesn't reflect updates to fwdr1 now
 
@R.MartinhoFernandes Nevermind, probably missing some context.
 
Xeo
@LucDanton simplest range
 
@LucDanton If r and s are "contiguous", it returns a sequence that encompasses all their values. Same type.
Non-contiguous "merging", which I don't think I'll need, will be called concat, and return a different type.
 
Does the contiguity give some benefit?
Oh okay, return type. Got it.
 
8:24 PM
@Rapptz Good luck to them.
 
@R.MartinhoFernandes Tbh that sounds hackish. Will you make it an actual requirement? Or no plan just yet?
 
Xeo
> Nice cover. Show your wife this thread, no further questions.
lol'd
 
I have a readme!
Yay for me.
let the bashing commence, again.
 
@LucDanton No, it will be an optional feature.
 
why ruben
 
8:27 PM
But I am not tackling it until I get to that part in ogonek.
 
@Rapptz lolcatz
 
Renamed the readme to .md so it gets rendered as Markdown.
 
> "Son is that a transporter beam I hear at night? It's totally normal for boys your age to be hiring prostitutes, even your father does it. But you need to know some basics, and don't go hiring those really nasty prostitutes from the dark corners of the transporter network"
lol
 
Roflmao
 
@R.MartinhoFernandes Ya, I was too lazy to check what the markdown was again.
 
8:28 PM
Shady corners of the transporter network.
 
I'll fix that next update.
 
@Rapptz Anyways, "1. The computer is being moved to the common area. This was already on our agenda, we're just prioritizing it now." - classic cart before the horse scenario: It should never have been anywhere else in the first place
 
@R.MartinhoFernandes Meh. Do you think that having e.g. client (of Taussig) algorithms be written in terms of MultiPassSequence<T>, HasOptionalFeatureFoo<T> is healthy?
 
I can't really make it a requirement, and I can't build it in terms of the primitives :S
 
@sehe Indeed.
 
8:30 PM
@R.MartinhoFernandes I suppose I couldn't pluck ogonek and insert it into my library without changing most core parts?
 
@rubenvb yup. It'd need a whole bunch of great devs/reviewers for me to trust that for anything serious.
 
@sehe I don't blame you.
Once I have something to show, you're welcome to try and break it.
 
@rubenvb What would you implement with it?
 
I'm sure there's a niche for this. tinyC is still used, too
 
@R.MartinhoFernandes a decent string class.
 
8:31 PM
I'm not sure what that means, but if it means ogonek::text there's nothing to implement.
 
You guys
 
@R.MartinhoFernandes it uses no other C++ std:: or boost:: stuff?
My battery's dying. I'm gonna be outta here soon.
 
It has a couple stuff from wheels, but it comes in the repo.
 
@R.MartinhoFernandes wheels uses no boost?
 
Yes, there's a dependency on boost.
 
8:33 PM
Don't you use Boost.Range in ogonek?
 
boost uses the rest of the existing cruft.
 
Or did you throw it all out the window ?
 
Though on ogonek it will soon be minimal because suckage.
@ThePhD Currently in the process.
 
Ah.
 
lol boosted suckage
I'm outta here
Thanks all for your infinite patience and aid!
cheerio!
 
8:34 PM
This is what I am replacing it with: github.com/rmartinho/taussig.
 
Hm.
 
the robot has by far the most original names for his projects
 
Taussig sounds like some kind of party game.
World Inverse Transpose...
So I guess I have to .Invert() and then .Transpose() to reach that
 
2 days ago, by R. Martinho Fernandes
It's an obscure reference to a joke in a book by Iain M. Banks.
 
Hmm, I don't think I understand boost::threads. I thought you could just "send them work" =/
 
8:41 PM
@Borgleader That was GCD and blocks. :P
 
GCD?
 
Grand Central Dispatch. :D
 
user1174868
Whats your favorite library?
 
Ell
does anyone here use CodeLite?
 
@DomagojPandža I'm trying to make a threadpool with them =/ Seems like I'll have to read the boost documentation a bit more
 
8:45 PM
@Borgleader When you write that ThreadPool, let me know.
I've got my own "Dispatcher" class, but not a "ThreadPool"
I'm making mine out of a wrapped std::thread, for the time being.
 
Xeo
Be on Windows, use std::async, love ConcRT
 
ConcRT?
 
A new brand of concrete
 
Xeo
MS's concurrency runtime
With black jack and hookers
 
Be on Windows realise it's not worth it
 
8:48 PM
I've never got the hang of std::async...
 
@ThePhD it's broken std::thread on steroids
 
Be a cat, have 9 lives, realize you've been screwed because being a cat sucks. Proceed to make others miserable.
 
It sure looks like it's on steroids.
 
@srf you know, you seem to have added that to /dev/null. Also, that doesn't really make this a useful question :| — sehe 10 secs ago
 
It doesn't look very organized, either.
Yeah, I'll just use std::thread ...
Actually, I'll probably write my own wrapping thread so I can get a little better control than what std::thread offers.
 
8:52 PM
@ThePhD don't, std::async gives you exception safety
 
... Soo.
=l
I'm confused.
I guess I'll just use std::async, then.
... Except that won't work, because from the docs it looks like std::async tries to fire immediately, rather than queue up work.
 
sounds like you want a thread pool, or something?
 
Yes, I'm trying to make a ThreadPool.
 
@melak47 yes the debate is indeed on top of what to build the threadpool class.
I,m going for boost::thread, @ThePhD is confused :P
 
8:57 PM
Is boost::thread different from std::thread in any significant way?
 
@ThePhD A) thread does the same B) that's exactly the functionality you have to implement?
 
why don't you build it on pthread_t
:D
 
user142019
Fuck.
 
user142019
Fuck R. Piece of shit.
 
user142019
Worst language ever.
 
8:58 PM
@bamboon I can spawn a thread and leave it dead until I give it work to do.
Rather than spawn a fresh thread per unit of work.
 
@ThePhD hmm no, you can't.
 
user142019
Use libdispatch.
 
wait, how do you mean that?
 
@Zoidberg Does such a thing exist?
 
user142019
Yes.
 
8:59 PM
On... windows?
 
user142019
It's a thread pooling library for Linux and OS X.
 

« first day (918 days earlier)      last day (4039 days later) »