« first day (755 days earlier)      last day (4179 days later) » 

7:00 PM
@EtiennedeMartel lol
@EtiennedeMartel also, "codes".
But well, at least he didn't write "teh codez".
Time to go back to boring topic of ISRs on x86 ;D
 
I wonder what sort of compressions work best on code, like C++?
 
@Griwes I told him to RTFM. But I told him where to look :P
@MooingDuck pretty much anything?
 
@KeithLayne Nah, RLE will suck balls.
 
@MooingDuck What kind of compression? And for code, you mean the source, or the compiled stuff?
 
@EtiennedeMartel I was imagining a cvs. I read about how perforce works and it's just stupid.
 
7:03 PM
Because source is text, so just gzip (or any DEFLATE, really) the thing and you're golden.
 
@Borgleader you can't just stick 3 letters together! That's cheating.
 
Huffmann might suck as well (IIRC it's best when some characters come back more often than others but code is pretty uniform)
@KeithLayne Run Length Encoding, look it up.
 
@EtiennedeMartel yeah, I was thinking a specialized variant of Huffman would work miracles
 
Don't need to.
 
@MooingDuck Look at what 7zip uses. I've seen that do miracles on certain types of files.
 
7:05 PM
As I said, DEFLATE. It's a mix of Huffman and LZ77.
 
That's a lot of LOC if you're worried about file size..
 
I just used 7zip to compress a 97kb boost file (crc.hpp) down to 15kb
 
Ell
Can you all wish Georgia a happy birthday then I can take a screenshot and send it to her?
 
sbi
@Ell The Georgia in Russia or in the US?
 
@sbi his friend I presume
 
Ell
7:09 PM
Correct :)
 
@sbi Hahahahaha xD
 
There's a song I know called Georgia.
 
@Ell you'd have to convince a lot of people to do it with little intermittent chat. You might want a custom room.
 
sbi
@MooingDuck Oh, I'd never...
 
Ell
@MooingDuck I don't think I have the power o.O
 
sbi
7:09 PM
@Rapptz Baccara, wasn't it? From the 70s.
 
Nah.
 
@Ell I'd be surprised if you didn't
 
sbi
Be rational, @Ell. What will she think about a bunch of unknown-to-her geeks having been told her age and randomly shouting "Hippo Birdbath" in a chatroom? Nothing too good, I'd think.
 
Ell
7:11 PM
@sbi how will they know her age?
 
@Ell she's 17, name is Georga, lives in the UK
 
Ell
they wont know her name or age
 
@sbi "It's the thought that counts"
@Ell Her name is presumably Georgia.
 
sbi
@Rapptz Exactly. I was referring to her thoughts on that.
 
Ell
@Rapptz presumably is the key word :P
 
7:13 PM
@sbi She might enjoy the thought of the gift, is what I mean. I really can't be sure.
 
user1182183
 
sbi
@Ell Then add to that: "Who's this _Georgia girl he's made them congratulate?"_
 
@GamErix -1
 
user1182183
@Rapptz meh
 
just ask
 
user1804599
7:18 PM
 
Does regex have any sort of system for nesting regexes?
&double& = "d+[.d+]*"
&id& =" [A-Za-z0-9_]+"
&expr& = "double &id& = &double&;"?
I guess would could "extend" the [:alnum:] syntax...
 
I smell "Parser" here.
regexes can be in theory nested indefinitely but never recursive.
 
I was thinking about rewriting the iostreams, and suddenly thought "screw that, what I want is a regex with types.
 
user1804599
std::string double_ = "d+[.d+]*";
std::string id = "[A-Za-z0-9_]+";
std::string expr = "double " + id + " = " + double_ + ";";
 
@Aardvark So 5.5.5.5.5.5.5.5.5.5 is a fine double?
 
7:21 PM
@DeadMG he copied from me, and I don't know regex very well.
 
user1804599
@DeadMG do I know. Mooing Duck wrote the regex.
 
Ell
d+/.?d+
 
if you want to deal with expressions, you need a real parser
 
Why would you use regex?
 
regular expressions can't handle it
 
Xeo
7:21 PM
Okay, the little diaper-wetter is in bed now. Finally.
 
It kind of depends on the situation.
 
@DeadMG intent was less about expressions, and more about IO
 
This is awesome.
Operator overloading at it's finest.
 
bye bye codedumper
 
Consider a of type pair<pair<pair<int, int>, pair<int, int>>... and syntax abuses like a... ... ... :D
 
7:23 PM
lol
or just define operator... so it returns *this
sigh... ... ... ... ... ... ... ... ... ... ...; // NOW VALID C++
 
:D
 
user1804599
sigh......; wouldn't that be valid as well?
 
I think so.
 
Xeo
@Griwes Oh hey, he finally made it.
Wait, that's not Richard Smith's proposal
Ah, but rsmith commented.
 
The amount of possible syntax abuses is going to be extremely high if that ever makes it to the standard :D
 
7:27 PM
wait
abusing syntax? in C++? never!
 
yesterday, by Tony The Lion
If you're new here, read the newbie hints. Thanks!
 
Xeo
I like the one from Richard more. It's much more flexible, imho.
 
Nobody would ever abuse syntax in C++.
4
 
:6168979 if you have a code question, it belongs on stackoverflow proper, not in a lounge where people are talking.
 
Good Guy DeadMG
 
7:28 PM
Violent Puppy
 
@MooingDuck Too slow.
 
@DeadMG You crazy.
 
wat should i read there?? someone said i could ask something on c
 
@EtiennedeMartel analog literals anyone?
 
7:29 PM
@DeadMG a real parser is complicated though. What I want is type-safe regexes to be able to parse simple to medium input.
 
@MooingDuck Regexes can't parse, end of.
 
@DeadMG Those are awesome!
 
@DeadMG they're fine for parsing simple to medium things.
 
thanks nyways... i understand what u say.... i don't have time to read hints....
 
@MooingDuck Regexes can't parse anything. It's in their concept and definition.
 
7:30 PM
@MooingDuck you said no boost, right?
 
they are FSMs and a parser is a PDA.
 
@DeadMG fine, whatever. They still appear to be incredibly helpful for many tasks
 
lex and yacc could be pretty simple & quick.
 
@KeithLayne yes
 
@blackbee Bye.
 
7:31 PM
eh
regexes have ridiculously arcane syntax, shitty type support, etc.
I wouldn't use one
 
The usual approach is to go with a regular expression, or regex. But you know what they say about that? At first you have a problem, then you use a regex, and now you have two problems. — Etienne de Martel 52 secs ago
 
@DeadMG I think that overloading both operator...() and operator,() for types used with that ... could qualify as syntax abuse.
 
user1804599
@blackbee You don't seem to have time to use proper capitalization, punctuation and not abbreviating "you" either.
 
Ell
regexs are very useful imho
I have used them extensively in my pokedex gather-er :L
 
@EtiennedeMartel It feels like you went to the first question where this is relevant and posted it. It's strangely relevant here.
 
user1804599
7:32 PM
@Ell what is a Pokédex gatherer?
 
Ell
@Aardvark gathers all the data about all gen 1-5 pokemon
 
@Rapptz It's an accident.
 
sbi
@blackbee You won't take the time to read the rules of the room, but you want the room's inhabitants to take the time to look on your code? Doesn't that strike you a little, um, cheeky?
 
@Aardvark He datamined websites for information on Pokemon's to populate his Pokedex (iirc)
 
user1804599
Why would you use data mining for that?
 
Ell
7:33 PM
It was just a project really
 
@Aardvark because he doesn't already have the information he needs obviously.
 
Because 'data mining' sounds awesome.
 
Ell
and in addition to that, I don't know of a freely available database of pokemon
that I can download
 
user1804599
You use data mining to find patterns in large amounts of data.
 
Ell
7:34 PM
@Aardvark Sorry, I used the wrong term then
 
@EtiennedeMartel At the beach. Awesome.
 
Actually I did but whatever
 
It's okay, he just hasn't been assimilated yet.
 
@KeithLayne ohai - long time no seen
 
@sehe yeah, no kidding.
My discipline from massive time wasting broke down today :P
 
7:36 PM
<Ts&...> operator...() & { return { *static_cast<tuple_elem<...sizeof...(Ts), Ts>*>(this)::value... }; }
Oh God.
 
user1804599
C++ has enough operators already.
 
Nah.
It needs more.
 
user1804599
Then I want the ! operator from Erlang in C++!
 
It also needs to force Unicode as the input charset, and now we could have a operator 💩.
 
We need operator...->*()!
 
user1804599
7:38 PM
I want custom operators. :P
 
@Aardvark no you don't
 
(Note: the ! isn't part of operator there.)
 
@Aardvark you want lisp
 
user1804599
How about sarcasm. ":P," anyone?
 
Xeo
7:39 PM
@Griwes Wait, wha?
@Aardvark x <your_op> y. :3
 
user1804599
x `elem` xs
 
Though I think operators for @ and $ wouldn't go amis
 
% is modulus
 
@Rapptz oh right
 
Perl++?
 
7:40 PM
@#$ is ugly, like I said yesterday.
 
No wait, # can't be an operator either
 
user1804599
@MooingDuck $ operator? jQuery in C++!
 
@Rapptz No need to curse.
 
@Xeo Imagination :D
 
That's what this chat needed. Moar jquery.
 
user1804599
7:41 PM
clang allows you to do this:
 
<T&,U&> operator...() & { return < first, second >; }

or maybe

...{T&,U&} operator...() & { return ...{ first, second }; }
 
user1804599
class jQuery {
public:
    jQuery operator()(std::string const& selector);
    void bar();
} $;

$("#foo").bar();
 
Featuring pain.
 
The second one is EVIL.
 
@Aardvark huh
 
user1804599
7:44 PM
@MooingDuck clang allows for $ in identifiers, but it will emit a warning when you do so.
 
user1804599
I think it allows that because of the Objective-C ABI, but I'm not sure.
 
GCC seems to allow that as well.
 
Xeo
The standard only demands support for the basic character set, which excludes $,§,#,@, and similar, but the implementation is free to support a wider set of characters.
 
@Xeo # is included
 
user1804599
7:51 PM
template<class F, class... Args>
auto $(F f, Args&&... args) -> decltype(f(std::forward<Args>(args)...)) {
    return f(std::forward<Args>(args)...);
}
// function application!
 
Xeo
Right, I forgot preprocessor for a moment.
 
@EtiennedeMartel Wow. ugh.
 
Xeo
Did I mention I hate function pointers? Fuck them.
 
Reminds me I need to gtfo of this country
 
Xeo
@Aardvark So, what does that give you over just calling f(args...), outside of $?
 
user1804599
7:53 PM
@Xeo you can pass $ as an argument to other HOFs.
 
Xeo
Meh, name it call and be done.
 
user1804599
But mathematics! :P
 
user1804599
 
@Aardvark Wth notation is that?
 
user1804599
7:56 PM
@robjb mathematical notation.
 
user1804599
$ means function application.
 
Yea, I get that it's mathematical. Was just wondering if it had some specific context ... never saw $ used for function application throughout my math minor.
 
Reighly
It's the J'Ecquerie Transform
 
user1804599
@robjb a(b(c(d(e(42))))) versus a $ b $ c $ d $ e $ 42 or a ∘ b ∘ c ∘ d ∘ e $ 42
 
user1804599
The latter is much more readable, but yeah, readability is for programmers.
 
user1804599
7:58 PM
I have never used $ in maths either, only in Haskell.
 
@EtiennedeMartel Sweet :)
 
@sehe Thanks for the insight :)
 
user1804599
means function composition.
 
Yep, am aware
 
@Aardvark seen that one
 
user1804599
7:59 PM
f ∘ g = (x) ↦ f(g(x)), if I get the syntax correct.
 

« first day (755 days earlier)      last day (4179 days later) »