« first day (450 days earlier)      last day (4498 days later) » 

6:00 PM
lol
 
Sigh, leave it to Haskell to make me feel like an idiot
 
cpx
oh i see
apparently it was renamed from 'DeadMG++'.
 
@Xeo braasterisknfuck?
 
cpx
@FredOverflow When I searched on google it turns out to be a header file for wide characters.
 
@DeadMG so now you're left with an interpreted language with some curious code generation properties. :)
 
6:06 PM
lol
 
@robjb What?
 
no, I definitely cut the interpreted one :P
 
@DeadMG I can still write turing-complete compile-time programs and all that, right?
do I/O and stuff too?
 
@FredOverflow I spent a good 10 minutes trying to figure out how to concatenate an integer to a string
 
And what's the solution?
 
6:07 PM
of course
 
"string" ++ show 5
 
then it's an interpreted language. :)
 
heh, no
 
your interpreter is just able to generate code as a side effect
 
I knew of ++ for list concatenation but I didn't know show :: a -> String
 
6:08 PM
not exactly
we already had this debate once, IIRC
 
How is it not an interpreted language, when it executes your source code directly, instead of outputting an executable file?
@DeadMG yes :)
 
uh, actually, it does both
 
it interprets and outputs an executable?
 
@DeadMG Yeah, but then it's an interpreted language as well :)
 
and also, it's not an interpreted language because the source code that's executed at compiletime is compiled to native code before execution
 
6:09 PM
@DeadMG what, like a JIT?
 
and saved as native code files such as DLLs
 
@DeadMG that's just an optimization :)
 
no, it's not an optimization at all, it's a core feature
 
@jalf The line between interpreted and compiled is a lot fuzzier than it used to be, don't bother
 
Ell
wait - so compile time code is compiled first?
:P
 
6:10 PM
@jalf for instance, javascript. Previously interpreted, is now usually compiled.
 
@MooingDuck yeah, and it's silly to say that a language is either one or the other
anything that can be compiled can also be interpreted, and vice versa
 
you cannot do variable variables, or take a type at run-time and make a variable of it, or anything like that
 
and for that matter, a compiled data-driven program could easily be considered to be a complex interpreter with the data being the program to interpret
 
Does the standard have anything to say about std::map::erase when given a key that is not in the map already, or is that simply UB?
 
@DeadMG So it's not a dynamic language? But that still doesn't mean it can't be interpreted :)
 
6:11 PM
lol
technically, you could do
but then, technically, you could also interpret C++
 
yup
 
that doesn't mean that it's really an interpreted language
 
@DeadMG What is syntax of dynamic code?
 
the fuck is dynamic code?
 
dynamically typed?
 
6:12 PM
what gets interpretted
I don't know what you call it
 
nothing gets interpreted
and the same as regular code
I went the constexpr route of C++11, except everything is constexpr, as it were
 
So it's pure?
 
no
instead of just listing every inane question you might have, why don't you actually wait for me to finish implementing it and then play with it?
 
@DeadMG easier to read a spec
 
it doesn't have a comparison to anything that you've previously used, else I wouldn't need to invent it
 
6:14 PM
so you're saying that I write some source code. This is passed to your compiler, which generates an executable. This executable is then executed, which (in addition to its other side effects) generates my actual program?
 
@jalf Yep.
 
@DeadMG because some of us prefer questions to be answered in our lifetime ;)
4
 
although if you wanted to, you could have those side effects include things like generating other programs
or JITting code
 
Is it recursive? Can the final program trigger another compilation step?
 
right now, the answer is no
 
6:16 PM
@jalf Please don't use up all DMG's patience, I might want some leftover later :D
 
@DeadMG that seems like a silly limitation
 
however, because the functionality is based on LLVM, which ships a JIT, then arguably that would be another compilation step, were you to invoke it
 
Why not merge the two stages together?
so that any stage can choose to compile a new image, which can be executed, and has the full set of capabilities, including the ability to compile the next stage
 
because
it's not designed to be two different programs that happen to compile with the same compiler
it is one program
 
hello
 
6:17 PM
otherwise I'd have to consider your compile-time language to be the "main" language since it's the most powerful. And then you no longer have any compile-time capabilities at all ;)
 
well
 
@DeadMG but why can this program only be made up of two stages? Why not three or seven?
 
because making it N stages was a total mess, in short
 
anyone here who has experience in ANN or AI
or any forms of evolutionary algorithms?
 
and if you want three stages, then invoke the JIT from your first stage
 
6:19 PM
@DeadMG but you could do it by defining only a single stage: a complete programming language with code-generation facilities built in
then I can just call that recursively
and you only have to define one language, instead of two
just seems simpler and more elegant
 
but that's not even remotely the same
and it's not two languages, it's one
 
:)
 
using the facilities provided is not saying GenerateCodeFromString("int main ...")
 
two compilation environments then
 
they're much more tightly integrated
yes, you can execute arbitrary code, but ultimately, it's only designed to be for one purpose- the production of an executable program
 
6:21 PM
and that's where I think you're focusing too much on the small picture. :)
 
I disagree
what's the difference between executing a compile-time program, and executing a run-time program on the compiler's machine?
nothing
 
afk 20 mins :)
 
what you want could be accomplished in C++
what's special is how it integrates to produce a final run-time executable
 
my point is that you're maintaining an artificial separation between the two stages, enforcing that they're different
whether you call them one language or two
 
no I'm not
there's virtually nothing different between them
 
6:23 PM
There are things I can do at compile-time that I can't do at runtime, according to your scheme
I'm arguing that you might as well eliminate this distinction entirely.
 
no, it just offers a simpler interface
the distinction doesn't occur between whole stages
you know
it occurs to me that, logically, the first WideC modules have no obligation to actually be written in C++
 
@jalf I get the feeling there's a bigger distinction between the two stages than has been explained to us.
 
you can have as many stages as you want, I just only provide two by default
can you imagine generating a generic function purely semantically? it would be hideous
I'd much rather do #1 than #2
damn, why does this code make me so unhappy?
 
6:41 PM
#1 is normal function?
 
yes
 
#2 is run-time?
 
well, you'd still have to invoke the JIT
but yes
 
oh you'll have a JIT?
 
why base my language on a toolchain with a JIT and then not offer that JIT?
 
6:43 PM
What is the type system? It seems like the run-time stuff would have to be dynamically typed
 
what is the advantage of JIT anyways?
 
@Pubby No, it's all statically typed.
 
generate_for_each returns a "Function"? And then you call it with normal function syntax?
 
nah
you'd have to ask the JIT to give you a runtime function abstraction back from the regular function that you could call
 
@DeadMG why would I have to do the second version?
 
6:51 PM
because the first version is two-stage, not one stage twice
 
but only because of how you defined the language. There's no inherent reason why defining any new stage couldn't be as clean as that
 
I don't quite think you understand
two stages is "this" stage and the "previous" stage
the actual number of stages is not fixed
damn, you might even be confusing me between my original specification and what I changed it to
probably because I forgot how the original was supposed to work
in any case
they're directly equivalent- the compiler even operates by converting #1 to #2
anyway
I have more imminent things to worry about
like why the hell I still can't be satisfied with this parser code
I need to just include the LLVM headers and damn clean separation of concerns
can write something better when I'm bootstrapped with partial types
 
Tin
7:09 PM
hey guys, if somebody could give a hand, i would be really grateful
0
Q: const correctness with smart pointers

TinI'm trying to understand better how does const-correctness work and more specifically, when dealing with classes whose members are based on containers and smart pointers. I guess that the const-correctness property is the same regardless of the class members. However, since I'm having some diffic...

:-)
 
@DeadMG generate_for_each looks hideously verbose. Have you considered adding quasi-quotation syntax?
 
of course generate_for_each is hideously verbose, it's intended to be written by the compiler
and what do you mean, quasi-quotation syntax?
 
@DeadMG Ah, ok. I misunderstood then.
 
Is this code portable?
#include <iostream>

std::ostream& my_func(std::ostream& out)
{
	return out << "HI THERE";
}

int main(int, char*[])
{
	std::cout << my_func;
}
On VS2010 and gcc461 it calls my_func().
 
Quasi-quotation syntax would be syntax that allows you to create semantic representations of code directly from actual code, instead of building them manually.
generate_for_each(Type type_of_a, Type type_of_b, Type type_of_f) {
    return [|
        foreach($type_of_a a, $type_of_b b, $type_of_f f) {
            do {
                f(*a)
            } while(++a != b)
        }
    |]
}
Just a possible example.
@wilhelmtell Yes.
 
7:22 PM
gee, you mean like, if I just took the types of for_each explicitly instead of implicitly?
 
@DeadMG That you could do as you want. I was more interested in not having to build semantic trees by hand.
 
for_each(Type type_of_a, Type type_of_b, Type type_of_c)(type_of_a a, type_of_b b, type_of_c c) { do { f(*a); } while(++a != b); } }
generate_for_each is purely implemented by the compiler, you only have to build them by hand if you want something more complex
 
@DeadMG Yeah, I see now.
 
man
why is it I hate my parser code so badly?
 
Because it's based on a dirty Linux tool called bison?
 
7:29 PM
no
although I dislike that too
I hate it because if I want to put my AST to any use, it needs to be processed by LLVM
which in reality means either introducing LLVM into the parser's header and implementation, or re-parsing the AST to produce new data structures
 
What kind of things can you feed to LLVM?
 
it takes it's own representation
 
Then you'll have to produce new data structures anyway, no?
 
not really, every WideC thing will have a fairly directly associated LLVM thing
like a type, a value, etc
the structure doesn't need re-creating from scratch, it just needs adding to
but I don't want to start including LLVM headers and code in my parser header
 
PIMPL!
Yeah, C++ sucks.
 
7:36 PM
actually, I have been considering it
the inefficiency would be significantly reduced by using the memory arena to allocate the new structures
 
you can use abstract classes and factories instead of PIMPL
 
so I could go from "bad" to "fucking disgusting"?
no thanks
 
I think pimpl is hideous. It's a hack to work around the crappy translation unit shit.
 
actually, I am pretty unhappy with Bison
but here's the thing: writing my own parser would not be fun or trivial
 
anyway, you can write crappy C++ code now, and then rewrite it in WideC
 
7:40 PM
partial types would be an ideal solution to my problem
what would you recommend instead of Bison?
 
@DeadMG Write your parser in C#!
 
bwahahahaha
that's a good one
 
@DeadMG ANTLR (+java or C)
 
wow, that's even worse
why don't you just suggest Brainfuck?
 
You only need Java to run ANTLR.
But its C or C++ API sucks.
 
7:42 PM
@RMartinhoFernandes and outdated too
 
@DeadMG Nothing I didn't recommend back when you asked this some months ago :(
 
I've probably forgotten your recommendations
wasn't there some byacc thing?
 
lol
@DeadMG That's pretty close to bison.
 
if I was OK with a backtracking LL(*) parser, I could just use my FSM framework
 
I really liked ANTLR when I used it, but I was working with the C# runtime, which sucks a big deal less than the C++ one.
I don't know anything else that works with C++: the bison/yacc family, ANTLR, and Spirit.
 
7:46 PM
I keep considering Spirit
and then I keep remembering that it doesn't want to work with my custom token type
 
Oh, and let me annoy you a bit more by saying my personal favourite is Parsec, but that's Haskell :P
 
lol
 
yes
 
Weird. It doesn't work if I click on it from Google. It does work if I click from here.
 
7:50 PM
@KerrekSB remember fork (on UNIX) is usually completely virtual and doesn't actually copy any memory; it just clones the process and the single thread that called fork
 
that's the page source
 
@RMartinhoFernandes it works from FF 9.0.1, Opera 11.60, Chrome 16.0.912.75 on linux
 
@sehe Can you try googling for it, and going there from Google?
 
@RMartinhoFernandes Done, no problem all three browsers. First hit after googling 'opengl.org sdk docs glCompressedTexImage2D'
 
7:54 PM
Hmm, I guess should update to FF9. I'm still on 8.
@sbi Hmm, that's pretty expensive.
 
sbi
@RMartinhoFernandes And it was even more so in 1951.
 
sbi
My new office is almost directly across the hall from my manager. This is going to make it a tad bit harder for me to take my afternoon nap.
ROTFL!
 
@RMartinhoFernandes Although, admittedly, using links, elinks, links2, lynx or w3m all three propose to download as XML (or offer to display the xml as plaintext)
 
sbi
Note to self: bldg 40 is mostly a mirror of 41, so everything is reversed. Including the relative locations of the men's and women's rooms.
I actually laughed out so loud about this one, my son came out of his bed asking whether I was Ok.
 
7:59 PM
"Hey, what happened to the urinals?"
 
sbi
@gregcons Thankfully I discovered this fact a half second before it became a story. :-D
 

« first day (450 days earlier)      last day (4498 days later) »