« first day (263 days earlier)      last day (4687 days later) » 

1:31 AM
Hi -- emplace anyone? :-)
 
 
4 hours later…
5:12 AM
i'm ill today -.-
coryza
sips his tea
 
 
3 hours later…
8:00 AM
morning
 
indeed it is
 
8:33 AM
Morning
 
so they say
 
S
So when I leave for the day, you guys just post videos of monkey sex?
 
isn't that the purpose of the internet?
 
 
2 hours later…
10:45 AM
morning
 
sup
 
10:58 AM
Nothing, it seems.
I'm bored.
 
Xeo
Mornin'
Somehow, if @sbi isn't here, the room is quite quiet.
 
Quite what?
 
Xeo
Typo
Five minutes after looking at the Vision SDK source, I already don't like it.
 
11:20 AM
lol
I could always rant about something random
 
Please do. This Visual Studio installation won't be over anytime soon.
 
ok
even though I think that logically, it should be quite trivial for me to come up with structures that describe the semantics of my language, types & etc, it's actually just not happening for me
 
What's wrong?
 
I dunno
I have struct Type {}; and don't actually know what to put in it
 
Members.
 
11:23 AM
I dropped member functions, actually
but they still have member variables
 
What, no member functions?
Only free functions?
Or something else?
 
well
I added extension methods, like in C#
and then I basically said fuck it, what's the point?
in my current vision of compile-time functions, it's actually quite difficult to design an extensible syntax for adding a member function to a type
so they're just free functions, elevated privileges, special syntax, which is what they were all along, now it's just more flexible
no, wait, only members can be virtual
ok
now I know why I couldn't come up with these structures
how can you define a function class and a type class? types have member functions.. but functions need types..
fuck want to buy multi-pass compilation right nao
 
@DeadMG You mean, how do you work around the circular dependency?
 
yes
right
 
The simplest way is to use pointers.
 
11:31 AM
free fuckin' functions it is
 
How do you access private data from those free functions?
 
no, semantically, I'll still have member functions
they'll just be free functions Under The Hood™
man
this was so simple when I had it in my mind :(
 
Ok, so you have special syntax to associate some free functions with a type so that it acts like a member function.
Is that it?
 
well, it'd pretty much look the same as C++ member functions
ok
I'm gonna get some food and then come back to it
 
11:40 AM
arrrgh, why can't people just read the goddamn question they're commenting on?
 
@jalf: link?
 
Was just about to comment on that.
2
Q: Debug features on libstdc++ in Linux?

piotrI was running my code under debug mode in VS2010 and it catched a nice error about invalid operator< which wasn't a strict weak ordering. Is there a way to catch these errors in libstdc++ on Linux or such conservative checks are only a feature of visual studio 2010?

 
2
Q: Debug features on libstdc++ in Linux?

piotrI was running my code under debug mode in VS2010 and it catched a nice error about invalid operator< which wasn't a strict weak ordering. Is there a way to catch these errors in libstdc++ on Linux or such conservative checks are only a feature of visual studio 2010?

 
Hi all
 
"who are you to tell me what operator< should behave like"
 
11:42 AM
Gd evng all
no reply??
no body her!!
 
We don't murder anyone here.
 
I definitely didn't body her!
 
I don't even want to know what that means.
 
me either
but I didn't do it!
any rumors to the contrary are FALSE!
 
@CatPlusPlus that should be the room tagline.
 
11:46 AM
room topic changed to Lounge<C++>: We don't murder anyone here. We consider it polite to do that kind of thing outside. Like smoking
 
"Murdering is considered bad etiquette"
 
Murdering considered harmful.
 
Not if you wash your hands afterwards.
 
@ÓlafurWaage "Considered Harmful" sentences are over-rated.
 
11:49 AM
Aye, I've read Considered harmful considered harmful
 
that's the problem with catchy phrases. People overuse them all the time
 
Aye, the issues of being catchy. Perhaps we should create un-catchy sentences that have great deep meaning.
 
if you want to annoy me, ask a question with a title of "To <insert term here> or not to <insert term here>"
 
Fallout: NV led me to belief that murder is okay, as long as you're [HIDDEN] and using a silenced sniper rifle.
 
So she went to the grocery store and bought some apples.
 
11:51 AM
@MartinhoFernandes who? The person who were bodied?
 
No idea. I was trying to create an uncatchy sentence with deep meaning.
I'm still working on the deep meaning part.
 
You'll get there.
LUNCH!
 
@jalf: Owch, that's bad.
 
-12
Q: How this works?

anonimchik(pointless question, profanity removed)

Is it possible to block such people by their IP address?
 
12:07 PM
Yes, it is. Flag for moderator attention and explain.
 
That question just vanished btw
 
Oops, I accidentally clicked on undelete... Can I undo my vote?
 
I don't think so.
Don't worry, no one else will make the same mistake.
 
Actually, there was already one undelete vote
 
12:08 PM
Yup :)
Maybe people want to undelete it to downvote it further :)
 
almost at rep cap. Nice
 
Lunch time. Seeya.
 
12:54 PM
hello everyone
 
hey
 
how are you doing today?
 
grumpy
tired
 
bummer
 
eh, it's Teh Usuals for me
 
1:07 PM
I'm not grumpy. Just moderately annoyed
 
program no cooperating?
 
you know
I could, instead, implement my own form of kind-of garbage collection
that would make it much easier to manage the type objects
 
@Collecter nah, it's not my code I'm annoyed at. The moving company who have all my stuff in storage won't bring it out to my new apartment until monday
was hoping to get it over with during the weekend
@DeadMG what's it for?
 
well
 
@jalf that sucks.
 
1:10 PM
I've been thinking about how to manage objects that represent types
the problem is that a type can directly or indirectly use itself
so I can't just share the ownership by reference counting
but I also can't just store them, like, as a position in a namespace or something
I mean, what about anonymous types and stuff
especially since I'm allowing stateful compile-time functions, with objects and stuff, so there's no guarantee at all that any type T is the same just because I called the same function with the same arguments
unlike templates
maybe I should just write it in C#? :P
maybe I should make the users of the functions manage the memory
I am a fkin' Genius ™
no, wait, that can't work
 
sounds like something that could use a garbage collector, yeah :p
 
1:35 PM
is it going to be an interpreted language?
 
2:07 PM
no
I had an idea whilst I was in the bath
maybe I would just never de-allocate them during compiling, I mean, the compiling take several passes anyway and I could just ditch them at the end of the pass
maybe I could make them ordinary value types and managing the memory of types is the user's problem, like any other
I had a third one too but I forgot what it was
 
the book C++ Primer it's good to a people that already know the basic of C++ (Functions, Class, Namespaces)??
 
cpx
545
Q: The Definitive C++ Book Guide and List

grepsedawk This question has historical significance, but is not a good example of an appropriate question. Read and learn from this post, but please do not use it as evidence that you can ask similar questions. See the FAQ for more info. Provide QUALITY books and an approximate skill level. Add ...

 
But i don't know what level i am
 
Check out some of the books, you can "Check Inside" many of them on amazon and you can see if anything there is something you're interested in
 
2:23 PM
If you only know functions, classes, and namespaces, I'd say you're at beginner level. If you like learning I have good news: there's still have a lot for you to learn.
Pointers, references, RAII, templates, ...
 
What is RAII?
 
Resource Acquisition Is Initialization. It's one of the unique things of C++, and something that should be ubiquitous in your code.
41
A: RAII and smart pointers in C++

Michael WilliamsonA simple (and perhaps overused) example of RAII is a File class. Without RAII, the code might look something like this: File file("/path/to/file"); // Do stuff with file file.close(); In other words, we must make sure that we close the file once we've finished with it. This has two drawbacks -...

 
techical mumbo jumbo made my some danish fellow.
 
Also know as Scope-Bounded Resource Management.
@ÓlafurWaage Syntax error.
 
2:30 PM
scope based, not scope bounded
 
I knew there was something wrong there.
 
after all, the destruction of the resource may not correspond to the bound of the scope, if for example an exception is thrown
 
No, wait.
28
A: RAII and smart pointers in C++

Johannes Schaub - litbRAII This is a strange name for a simple but awesome concept. Better is the name Scope Bound Resource Management (SBRM). The idea is that often you happen to allocate resources at the begin of a block, and need to release it at the exit of a block. Exiting the block can happen by normal flow con...

 
and?
 
I can point to several other mentions of SBRM as Scope Bound Resource Management.
I can't track the source though.
But I can also find lots of Scope Based ...
Who invented this?
 
2:38 PM
I never really heard of SBRM, it was always RAII to me
 
But RAII is a terrible name.
 
meh
 
I read it as Ra the second
 
2:57 PM
Hardest question ever
1
Q: Jquery Ajax方法提交给后台后,若该request超时,则会在Ajax方法的error回调函数中捕捉到该超时

风不息使用Jquery Ajax方法提交给后台后,若该request超时,则会在Ajax方法的error回调函数中捕捉到该超时,但是当捕捉到超时之后不管做任何操作IE渲染的页面都会报JS错误[],暂时还未能解决???

 
3:19 PM
ok
was there anything ambiguous about my question? it clearly relates to memory management
why did I have so many people going to name resolution?
4
Q: Memory management for types in complex languages

DeadMGI've come across a slight problem for writing memory management with regard to the internal representation of types in a compiler for statically typed, complex languages. Consider a simple snippet in C++ which easily demonstrates a type that refers to itself. class X { void f(const X&) ...

 
> I'm going to guess that you are really asking about name resolution, which has nothing to do with memory management.
Hah.
 
yeah
like, wtf?
 
I witnessed something like that last week. Someone asked about stack underflows in C++, and a guy decided that he was asking about stack overflows, and exemplified a stack overflow, with code that really didn't exemplify it. In Java.
 
actually, I realized that I might have a much, much bigger problem
 
Also, a memory leak implies losing the ability to release the memory, which is not the your case (hopefully). Having a large footprint may be a problem, but it's not a leak.
 
3:28 PM
which is that compile-time functions are no longer necessarily referentially transparent
 
I'm used to memory management being done behind the scenes as extensions.... instead of built into the language... so it never occured to me that memory management would have to parse object.
 
@DeadMG You said they were stateful. That is exactly the opposite of referentially transparent.
 
could be stateful, could be :P
anyway, I realized that this might present a massive problem for me, which is that I could no longer guarantee that, for example, std::vector<int> == std::vector<int>
 
I don't understand
 
Can you change types that are already compiled?
 
3:30 PM
if you have a type table, templated objects would simply be another entry in the table.
nested doesn't matter
 
I don't have a type table
 
cough
 
or rather, there is a type table, but there's no guarantee that any specific type exists in it
 
Hmm....
You are making it hard on yourself on purpose?
 
@Martinho: You can change types that exist in the current pass, yes
no, I wanted to make it easy on the programmer
 
3:31 PM
@DeadMG In that case you can make those guarantees only at the end of passes.
 
how would not having a table make it easier on the language user
 
there are plenty of types in C++ that don't exist in the global namespace
like anonymous types, for example
 
fine.... type tree
 
ideally, I had a type as an object, just another object
 
I hope you don't plan to support "auto"
 
3:32 PM
but defining equality could be tricky
actually, I planned on not only supporting auto, but significantly extending type deduction facilities
just, it hadn't really occurred to me what having stateful compile-time functions could actually mean :P
 
anywhere where auto showed up, you wouldn't be able to resolve until the final pass, which would kickoff another pass, and you could deadlock
 
no
 
yes
 
auto is resolved in the prev pass, just like any other type feature
 
but you can change types on a second pass
you CAN deadlock
 
3:34 PM
not the same types
 
ok, fine....
 
if you mutate a type, that doesn't survive across passes
 
How about this....
 
you can't get a std::vector<int>, instantiate and call function that uses it, go back and change it and have the changes reflect it
prev-pass and this-pass is similar to compile-time and run-time, just run-time might be some other function's compile-time, as it were
 
That would get fugly pretty fast.
 
3:36 PM
I don't think it actually would
 
Going back to change types from the previous pass?
How not?
 
oh that
I was talking about the other bit :P
yeah, that would be WTF
i.e., impossible
 
main.h
templateint<type>;

using namespace templates

main.cpp
main() { auto GetSomeTemplate(); }


methods.h
namespace templates {templateint<type> {...}}

templates::templateint GetSomeTemplate() {...}
whoops
 
what I could do is just ban stateful functions
@Xaade: Just write it up on pastebin or ideone or something, it's not worth it
 
That would help lots.
 
3:38 PM
and then if you wanted to return more than one type, you could just return a container of them
 
ok, now what does auto resolve to.
 
my only examples of stateful functions were things like, connect to database, ask it for table structures, generate equivalent classes
 
I'd rather have that in external tooling.
 
but I figure that instead of polling each type individually, you'd just connect once, generate all the types at once, and then return a container of them
honestly? It really pisses me off, the ORM designer for LINQ, because you have to manually update it every time the DB changes
 
that might work better.... but then you're really just returning a container of types rather than looking up in a table.
 
3:40 PM
@Xaade: Yeah, that's fine.
 
What I meant was, you'll have to keep a list of current types somehow
table or not.
 
My vision involved types as objects, just like any other object. They don't have to be specially looked up, or given names, or anything else
 
so you resolve type by checking its address
but what's the type of the type object...... type?
 
sure, absolutely
 
@DeadMG Yeah, that sucks. But then you'd have to write the generate procedure yourself.
 
3:41 PM
internal
 
interesting...
 
@DeadMG So, you're reinventing Python? :P
 
@Martinho: Yes, it was intended that you could do something like that within the language.
 
you could have your language build the same objects at runtime, and get runtime type checking..... with dynamic types....
 
no
whilst there's nothing stopping you manipulating types at run-time, there's no way to actually do anything with them at run-time
maybe I should have typeid() return a type
 
3:43 PM
if you can return a type object, you can change the type
 
@DeadMG But you can already do that. You write the code generation procedure in any run-of-the-mill language, and you put that in your build script.
 
uh, yeah, because I can't return a copy or const ref?
 
although..... it would make meta-programming compile faster.... update the type as you resolve the object's final type
 
@Martinho: That's not cross-platform, and you'd have to write the translation code again and again for every IDE and every platform
whereas if you wrote it with the language, it'll compile cleanly on any platform, with any IDE
 
why are you creating your own language....
 
3:44 PM
You can make code that does code-generation cross-platform.
 
because I'm sick of C++?
 
It is cross-platform if your build system and tools are. IDE doesn't really matter here.
 
So you obfuscate C++?
 
@Xaade for fun and profit
 
I'm sick of declarations and definitions. I'm sick of the special treatment of inheritance, I'm sick of crappy metaprogramming, etc etc
 
3:45 PM
sick of declarations
seriously
 
I can have modules, and concepts, and a whole bunch of other stuff that you could never even dream of in C++
 
I would have thought one would learn from Visual Basic that declarations are a "Good Thing"(TM)
 
Well, declarations do suck.
 
Do they
 
yes, they do
 
3:46 PM
To be somewhat in control of type resolution is a bad thing?
 
declarations don't help with that at all
 
int i;
 
there's nothing you can do with a declaration that you can't do with a definition
 
now it's an int
 
i = 42;
Now it's an int.
 
3:47 PM
It's a bad thing that you must do type resolution yourself.
 
maybe
 
That's what compilers excel at.
 
@CatPlusPlus maybe not
 
Type inference ftw.
 
yeah
 
3:47 PM
Unless you have some hidden code that makes magic numbers doubles
 
I was going to cut explicitly stating the return type for any function where all paths return the same type
 
And if you reaaaally love declarations, you can have both.
 
so, what would you do for templates?
 
Go has var x type and x := something.
Or something like that.
Type variables.
 
@Xaade: what do you mean?
 
3:49 PM
I thought auto was the bridge between declaring and defining... that you didn't have to declare everything, but could if you wanted.
 
also, I was going to add a memory type, to replace the old char* crap
a pointer to a character points to a damn character
 
auto i = 42;
Now it's an int.... no declaration.
All you're doing is making auto implicit.
 
@DeadMG You mean characters are not integral types?
 
oh
@Martinho: Where did you read that?
 
@DeadMG Now THAT would be worthwhile.
 
3:50 PM
@Xaade: Yes, I am making auto implicit. That's a great thing.
 
@DeadMG I agree.
I misunderstood what you were trying to do.
 
any place where I can feasibly add type inference, I will
 
I mean... I still want to be able to do: double i = 42.
 
You can do type inference almost everywhere. Look at Haskell.
 
Are you going to keep the ; character.... it looks weird.
 
3:52 PM
honestly, I might ditch it
depends on how the grammar works out
 
You won't beat Haskell type system, so you should just go and copy everything that's possible for an imperative language. :P
 
lol
 
Semicolons suck, also.
 
I hate braces more.
 
So basically, you're stripping C++ of all the archaic requirements it doesn't need.
 
3:53 PM
They're a pain to type in my keyboards.
@Xaade And slapping a bunch of other features on top.
 
Good name for a band there, Keyboards of Pain.
 
Would you rather the reverse..... do like macros do, endline is implicit ; put a / at the end to escape the implicit ;
 
@Xaade: You could put it that way.
 
Very rarely do I have code that continues to the next line.
Most often and endline is the end of my code line
And I usually put the open bracket with the previous line.
 
Whatever you do regarding optional semicolons, don't do it like JavaScript does.
 
3:55 PM
So, making ; implicit and escaping it would be easier to type for me.
 
Do it like Go does.
Or Python. Or Ruby. Anything. Just not like JavaScript.
 
lol
in Chrome, you can actually comment out implicit semicolons, I think
 
If you wanted to put more than one codeline on a line, simply type the escape character
int i = 42
i++
i = i + 5 \ i++ \ i = i + 10
 
@DeadMG I think Chrome is not conformant in that aspect, and instead behaves sanely.
 
I'd prefer that
 
3:57 PM
@Xaade Or, you know, ;.
One-liners suck, anyway.
 
Or don't put more than one statement per line.
 
Yeah, they never pick up chicks.
 
Language using \ as a statement separator would look just weird.
 
@CatPlusPlus fine... then change the or operator and use |
 
nothing wrong with using newline or semicolon, imo
 
3:59 PM
I'd vote for § as a statement separator.
 
no, wait, that wouldn't work
 
or .
int i = 42.
 
Damn MarkDown, always fighting me back.
 
anything but annoying unshapely ;
 

« first day (263 days earlier)      last day (4687 days later) »