« first day (807 days earlier)      last day (4157 days later) » 

user142019
5:00 PM
My documentation extractor documents __int128_t, __uint128_t and __builtin_va_list. XD XD XD XD XD XD XD XD XD XD XD XD
 
user142019
CLANG Y U PUT BUILTINS IN AST YOU FUCKING CUNT
 
@DeadMG guess it's time to change Wide to be an assembly language instead? :S
 
fuck that shit
@Zoidberg'-- Because they're not really builtins
 
user142019
@DeadMG use LLVM. :P
 
I am ^^
 
user142019
5:05 PM
oh xd
 
user142019
Well
 
user142019
Isn't it that you visit each AST node and generate some kind of code for some kind of AST node.
 
user142019
for example
 
think so
I mean, I have an AST and it's fairly simple
 
user142019
For a function call node you generate a function call. Wait a second.
 
5:06 PM
I implemented all the Clang-related operations, at least to begin with.
 
user142019
 
yeah
I need to re-read those.
 
user142019
Value *BinaryExprAST::Codegen() {
  Value *L = LHS->Codegen();
  Value *R = RHS->Codegen();
  if (L == 0 || R == 0) return 0;

  switch (Op) {
  case '+': return Builder.CreateFAdd(L, R, "addtmp");
  case '-': return Builder.CreateFSub(L, R, "subtmp");
  case '*': return Builder.CreateFMul(L, R, "multmp");
  }
}
 
user142019
Pointers. Pointers everywhere.
2
 
user142019
However.
 
user142019
5:10 PM
I have no fucking idea on how you'd tell LLVM about structs/classes.
 
I do.
 
user142019
That's nice.
 
It is.
 
user142019
xd
 
but let me tell you what's not great
fucking Clang.
 
user142019
5:23 PM
lol
 
user142019
clang is great.
 
user142019
But its API is terribru. xD
 
Eventually we will reach a point where everyone on the Internet will speak something vaguely resembling English, but not comprehensible by anyone else.
 
does anyone know if c++ has any presorted structures like C#? I'm trying to migrate some code and I need to find something similar to SortedSet
 
@BenjaminDangerJohnson std::set? std::map?
 
user142019
5:30 PM
std::set is sorted.
 
user142019
std::unordered_set is not sorted.
 
is set sorted upon insert or do I manually have to call a sort funciton?
 
user142019
Insert.
 
I suppose either is fine, but insert is more conveninent
 
user142019
You can even provide your own comparator if you want.
 
5:30 PM
thanks Zoidberg
 
oh I most definately do
 
user142019
HELLO TONY
 
user142019
It's been a long time.
 
what's up?
yes
 
user142019
5:31 PM
@TonyTheLion Fireworks.
 
user142019
Where have you been?
 
I've been around, busy doing all the celebratings
xmas and whatnot
 
user142019
Sounds fun.
 
I've mostly been lurking here
 
user142019
5:32 PM
Sounds even more fun.
 
I think 2013 is going to be the year where I lurk
 
user142019
s/lurk/jack off/
 
lol
I noticed @Cat came out of the closet as a lesbian
 
Well Zoidberg was talking about dry cocks
 
so you want to be a lesbian as a result?
 
5:36 PM
Lounge logic at its finest
 
hehehe
Cat's new Year resolution: get a vagina, become lesbian
7
My New Year's Resolution: 1920 x 1080.
 
user142019
@TonyTheLion My new year's wish: the operation will be performed without anaesthesia.
 
oh gawd
 
user142019
 
user142019
5:42 PM
It's funny how some people think everything will be fine just because a new year starts.
 
@Zoidberg'-- New Year, man! Fresh start! Forget the 8 people I punched in the face and the one person I pissed on. NEW YEAR. It doesn't count. No punch-backs.
 
user142019
They still hate you.
 
No man we'll all go out to Dinner about it later.
And laugh and have a good time.
Because NEW YEEEAR, FUCK YEEEAH.
 
@TonyTheLion You should consider 2560x1600 imo
 
user142019
You should consider at least 200MP.
 
5:56 PM
Not readily available?
 
user142019
Why not.
 
user142019
Of course there are 200MP wallpapers.
 
But hardware?
Jokes aside 30" + 21" is really nice for writing code
Have 24" + 24" at work but that is not even close
 
user142019
I use 15" for writing code and it's perfectly fine.
 
user142019
I also have two 21" screens.
 
6:04 PM
I got a pair of 24" here
 
user142019
My friend has two 27" screens. ಠ_ಠ
 
user142019
You know.
 
user142019
Those Apple Cinema Displays. XD
 
@Zoidberg'-- too shiny
 
user142019
Too expensive.
 
user142019
6:06 PM
I'd never pay a thousand dollars for a monitor.
 
@Zoidberg'-- yeah, they are ok
 
@Zoidberg'-- ... Wat. o____o
 
@JohanLundberg too Apple!
 
user142019
@ThePhD $999.00
 
Wow.
 
user142019
6:07 PM
Lol.
 
user142019
Rs.
 
@JohanLarsson I don't mind that. Apple hardware is usually nice...
 
I will never understand why people throw Money at Apple why they do.
 
but no, not price/spec optimized
 
user142019
@ThePhD Same as why people buy Nike rather than some cheap brandless clothing.
 
user142019
6:08 PM
(Quality is about the same, really.)
 
@JohanLundberg sure the hardware is nice but still Apple imo
 
Meh...
Good thing I've never had anything but hand-me-downs since hte day I was born.
 
user142019
I have a MacBook only because I like the OS and the trackpad.
 
@Zoidberg'-- the two finger scrolling thing? that is nice
 
user142019
And three finger workspace switching.
 
6:12 PM
ok, never tried that
@Zoidberg'-- very surprising that you like something, and even more so that you write it here
 
user142019
huh?
 
user142019
There are many things I like.
 
user142019
Such as Haskell, Erlang, CoffeeScript, JavaScript, C#, F#, tasty food, some music, the Efteling, the Dutch language, and whatnot.
 
ok, true true, I have seen that. For some reason I had you pinned as a hater.
I'm a hater too pretty much, defaulting to that as a general strategy at least
 
Which header has math function in c++ ?
cmath ?
 
6:23 PM
yep
 
6:40 PM
damn
I've completely forgotten all of my expression parsing material.
 
user142019
lol
 
well.
fortunately, my current test case involves only the most trivial of material
as in, I only ever support ident("string").ident.ident << "string" :P
 
user142019
lol
 
user142019
For the first time they did fireworks in North-Korea on newyear.
 
user142019
And now it's the year 102 there. xD
 
6:46 PM
Hi guys
 
user142019
HELLO kbok
 
I have nothing special to say, I just wanted the hat thing
 
user142019
lul
 
I'm off to party now. See ya
 
bb
 
user142019
6:50 PM
Goodbye ghost.
 
alright
where did I put the latest version of the Wide grammar
 
user142019
In your ass.
 
I find that unlikely
 
user142019
Put it on Bitbucket or GitHub.
 
it is
but I also have the local copy on my hard drive which I just found
 
user142019
6:53 PM
It is? :O
 
user142019
Oh private repo.
 
no, it should be public
 
user142019
Is it Source?
 
unless I changed it to private and forgot about it
yes
 
user142019
ah
 
user142019
6:55 PM
Descriptive. :P
 
user142019
Let's clone this gem.
 
user142019
dog
 
parser is so much cleaner when you have a range-based lexer.
 
user142019
I tried writing a parser in C++ once.
 
6:58 PM
well, it's not just a parser, it's an AST generator.
 
user142019
But tree structures with polymorphic nodes are such a pain if you don't know how to best make them.
 
user142019
At least
 
user142019
I tried to make the nodes copyable. xD
 
user142019
Otherwise it was eazy.
 
yeah
that's called boost::variant :P
 
user142019
6:59 PM
I used abstract AST::Node base class and std::unique_ptr<AST::Node> if I needed polymorphism. xD
 
user142019
Or std::unique_ptr<AST::Expression>, you get the point.
 
yeah
is what I'm doing right now
works fine for me
 
user142019
Then class BinOpExpr : public Expression;, class FuncCallExpr : public Expression;.
 
user142019
Ah okay.
 
user142019
Anyway
 
user142019
7:00 PM
I don't see why AST nodes should be copyable besides maybe completeness.
 
user142019
When do you need to copy an AST node?
 
never
 
user142019
I see. xD
 
user142019
ALL THAT EFFORT
ALL FOR NOTHING
 
lol
 
user142019
7:02 PM
Does Wide support TMP?
 
pft
as if I'd make the same mistakes again.
 
user142019
:P
 
hmmmm
note to self: you totally forgot the need to put tokens back.
 
user142019
I once wrote a parser for a lisp dialect.
 
user142019
It's the only complete parser I've ever written.
 
7:07 PM
I did, at one stage, write a complete Wide parser.
but, well, that was a long time ago, and I'm not wholly sure if that code still exists anywhere.
 
user142019
I write my parser in Python. I think I still have it.
 
user142019
 
user142019
> Created in 3 days
 
user142019
I'm from the future. xD
 
lol
 
user142019
7:09 PM
The clock of my VM is not correct. :/
 
hmmm.
if I put back two tokens, which do I read back first?
ah, whatever, I only need to put back one token.
 
user142019
The latest one you put back I think.
 
user142019
Like a stack.
 
user142019
When I write lexers I always have next_token and peek_token.
 
user142019
peek_token is pure, next_token isn't.
 
7:12 PM
I went for something more functional
explicit operator bool for has_next_token, operator() for *lexer++, as it were.
 
user142019
Ah.
 
user142019
That's also possibru. xD
 
works pretty cleanly, actually.
except that it doesn't really handle putback that well
so now I add operator()(Token) to putback
 
user142019
I usually write parsers like this:
 
user142019
next_tok = peek_token();
switch (next_tok.kind) {
    case Kind::Class: return parse_class();
    case Kind::TypeName: return parse_function();
    case Kind::Switch: return parse_switch_stmt();
}
 
7:14 PM
TBH
 
user142019
etc
 
I've been thinking of doing that as range model for Wide.
 
user142019
I prefer writing parsers in Haskell mainly due to pattern matching and algebraic data types. xD
 
"input range" -> explicit operator bool, operator(), "output range" operator()(T t)
then for forward/random access I'll add -- and ++/-= +=
 
user142019
data Node = IfStmt Node Node (Maybe Node)
          | SwitchStmt Node [(Node, Node)]
          | FunctionDef TypeName String [(TypeName, String)] Node
 
user142019
7:17 PM
No wait fuck.
 
lol.
 
user142019
data Expression = FunctionCallExpr Expression [Expression]
                | BinOpExpr Expression Op Expression
 
user142019
data Statement = IfStmt Expression Statement (Maybe Statement)
               | SwitchStmt Expression [(Expression, Statement)]
               | ReturnStmt (Maybe Expression)
 
user142019
data Node = Expression | Statement | Declaration
 
damn, I hate writing left-recursive rules.
 
user142019
7:19 PM
And whop, AST data structure.
 
always ugly while loops
non-left-recursion much simpler
 
user142019
codeGenExpr :: Expression -> MachineCode
codeGenExpr (FunctionCallExpr func args) = something
codeGenExpr (BinOpExpr a op b) = something
 
user142019
Oh I love pattern matching.
 
you can do something similar in C++, if you have giant balls.
 
user142019
actually
 
user142019
7:22 PM
I have once written pattern matcher in C++.
 
user142019
Let's see if I still have it.
 
Pattern matching is like using /etc/fstab instead of mounting with the command line.
Or something like that :)
 
user142019
My pattern matching crap in C++ gist.github.com/4422124. :^)
 
user142019
xD
 
Who here is planning to contribute something to the book?
 
user142019
7:24 PM
Pubby.
 
I'm the only one here with a remotely significant volume of existing material
 
@Zoidberg'-- I also want my personal namespace but I can't think of anything..
 
/jerkoff
 
Eeeuw.
 
user142019
@StackedCrooked gentlib :P
 
7:25 PM
gentlib?
 
user142019
Gent.
 
user142019
XD
 
Ah.
I thought because I was a gent.
 
user142019
namespace $$$$ {

}
 
user142019
clang accepts that.
 
user142019
7:26 PM
AFAIK
 
puro short for puroguramingu. That's how Japanese people typically shorten words.
 
user142019
namespace tori // Or another porn actress' name. xD
 
@Zoidberg'-- Erm, I'll consider it.
porn
 
namespace electronic { namespace supersonic { ... }; };
 
Using porn as your default namespace in all your code. That would look nice if you need to give a presentation for an audience.
 
user142019
7:28 PM
namespace ø {} // Aww, your implementation doesn't support Unicode? Well, fuck you. Haha!
 
lol
 
user142019
Write a C++03 library and call your namespace decltype.
 
kelly
 
lol
but who would want to write a C++03 library?
 
user142019
lol
 
7:30 PM
then you end up with shit like Clang.
 
user142019
Writing a C++03 library
 
I wouldn't lower myself to writing C++ without rvalue references.
seriously, those things are a fucking lifesaver
 
user142019
then just insert namespace decltype {} somewhere, constructed from a million macros and #line directives and whatnot just to troll C++11 users.
 
Would there be a problem with using override and final as namespace names?
I guess not.
 
user142019
No.
 
7:31 PM
no
contextual keywords (they suck)
 
user142019
final and override are identifiers with special meaning in some cases.
 
almost tempted to propose prologue to the Committee.
 
user142019
When I wrote my C++ lexer I had this in my lexer:
 
user142019
Token get_token(bool expect_final, bool expect_override, bool expect_double_gt);
 
user142019
XD
 
7:33 PM
namespace my
 
What's a double gt?
 
>>
 
user142019
>>, which is either one token or two tokens depending on the context.
 
i.e., C++11 right-angle-bracket parsing.
 
right thx
 
7:33 PM
@AndreiTita 2gt?
 
which likes to fuck up lexing
 
user142019
C# also has it.
 
really?
 
user142019
Yes.
 
ah yes, I suppose they do.
 
7:34 PM
Yeah I figured it out. Just had a brain freeze there :)
 
you could do IComparable<IHashable<T>>.
 
user142019
Let's see if I can still find my C++ lexer.
 
user142019
(char '>' >> if expectDoubleGT then return TokGT else ((char '>' >> return TokRShift) <|> return TokGT))
 
hmm
 
user142019
Returns > or >> token depending on a flag. ;_;
 
7:36 PM
shift is left-associative, right?
else cout << noob << ery would not work.
 
user142019
I think so.
 
user142019
You know.
 
user142019
I'm extremely bored.
 
go outside celebrate :D
 
user142019
I'm going to implement Wide for as far as the public spec is complete.
 
7:40 PM
What are your plans for 00:00 I was thikning about throwing an exception, but I dunno
 
...or do that. yeah, next thing off the top of my head, too :)
 
@Zoidberg'-- Er.
 
user142019
@JohanLarsson First orgasm in The Netherlands in 2013, of course!
 
pretty much the only thing you could find which is remotely close to a public spec
 
xpert imo^^
 
7:41 PM
well, actually, you could pull the pages from my repo.
they're a smidge out of date
but just a smidge
 
user142019
That I consider the public spec.
 
quick, update them before 2013 hits :p
 
user142019
Because it's available to everybody. xD
 
lol
well, I warn you, it's not of particularly high quality.
 
user142019
Is writing a lexer doable?
 
user142019
7:44 PM
Because that's the first thing I'll do anyway.
 
I believe that both the lexing spec and the grammatical spec are done.
 
My code's slow. :(
 
user142019
@DeadMG Great.
 
don't remember how much I wrote about the lexer
 
user142019
@Rapptz Great.
 
7:45 PM
exactly
but I implemented both of them, anyway.
 
user142019
 
lol
right
 
It has come to my attention that Windows has no decent profiler.
 
I have a list of keywords, a brief description of numerical literals, a list of punctuation, and comments. That should be enough spec for a lexer, at least to begin with.
@Rapptz I've used AMD's CodeAnalyst and the one that comes with VS, and they both seemed fine. CodeAnalyst didn't handle overloads very well though.
I also have the grammar listed.
 
user142019
@DeadMG Lexical.html, right?
 
7:48 PM
yes
 
@Rapptz I liked the R# plugin but it was too expensive, just used the trial
 
the grammar might be a smidge out of date, but I'm not sure.
if your parser generator generates more than the if/else shift/reduce conflict, tell me
 
Well my code's slow ;_; been running since I went to bed yesterday so it's been running for 9 hours
 
@Rapptz I've used the VS'12 one a wee bit, and it seemed fine. Since that's about my only exposure to profilers ,though, idk :p
 
Euler problem? :)
 
7:50 PM
yes
 
which?
 
408
 
the VS profiler is ok too, usually gives answer pretty quick
 
I'll try it I guess
 
I think it requires admin to run. Also sometimes I have had to restart VS to make it work, apart from restarting as admin
 

« first day (807 days earlier)      last day (4157 days later) »