« first day (2176 days earlier)      last day (2775 days later) » 

9:47 PM
@Borgleader
-3
Q: How to compile a mixed file (C and C++) with C++ compiler

Денис КотовI need to compile an old C program with a C++ compiler, because I have added some new features that are supported by C++ (operator overloading) and I need to recompile all files with a C++ compiler. Actually I did it, but in the old C program, there are lots of implicit conversions from void * t...

It is not true complitly. C is a subset of С++ and Visual Studio have a lot of flags. I thought that maybe there is some one — Денис Котов 2 days ago
^^ As much as as I hate it when someone says that C and C++ are completely different languages, they aren't exactly subsets either.
 
Anybody have any tips on msvcr100D.dll missing errors when I try to build? This only happens with one particular project AND, I've re-installed the C++ redistribs to no avail
 
no.
 
@Mysticial I like that, had a discussion about that recently with the Handmade Hero guy Casey Muratori
 
@Mysticial auto_cast to the rescue :D
 
C2x is trying hard to become even more of a subset. There are proposals for constructors, destructors, inheritance, attributes (including four C++ attributes), public/protected/private, and the ability to specify the underlying type of an enumeration.
 
9:50 PM
laffo
 
@Morwenn Heh.
Well, ctors/dtors would be a game changer.
 
Not really since conservative code guidelines would forbid them :p
 
they'd reinvent C++, by rebasing from C11 instead of pre-standard C :D
 
Moreover, some C++ changes (preprocessor, short float...) also target C.
 
@Morwenn Well, even just dtors for automatic variables would be a huge improvement,
 
9:53 PM
@Morwenn short float seriously
make std::is_same<long float, double>::value == true then :D
 
@milleniumbug That... was also part of the original proposal.
 
@ДенисКотов If you insist that C is a subset of C++ , then you are the one who needs to learn one or the other. Indeed C and C++ are very related, and C is a near subset of C++. But it is not a subset as Olaf has demonstrated. More examples here: en.wikipedia.org/wiki/…Mysticial 36 secs ago
^^ Flamethrower ready.
Did I succeed in offending both the C == C++ and the C != C++ camps?
 
Xeo
A subset of C is a subset of C++. :D
 
Amazon Game Studios reveal projects they are working on
@PatrickM'Bongo here we go
> including deep Twitch integration
now they can never fail
 
Xeo
10:11 PM
@Morwenn Linus hates them!
 
> Be me
> Standing outside my group member's door because tehy told me they didn't want to meet in the usual place
> knock once, no answer
> knock twice, no answer
> go outside, sit on bench, contemplate why I'm in a uni group project
> group member passes by "oh hey, did you get lost? building is over there"
> just knock, my roommate (our other team member) will let you in
> knock three times, loudly, no answer
Fucking done.
 
:D
That's why I prefer collaboration over the internet. :D
 
@ThePhD Well, I want to know how this story ends. Were they stoned from smoking weed or were they slaughtered SAW style? :)
Or just drunk?
 
@Borgleader
-11
Q: What language is compatible with C++ but have better and more elegant syntax?

Artur WójcikI want to programming in more intersting language than C++, but using it's librarys: Qt, UE4 (engine), SFML and all others. Is D good choose? I thing that it is not becouse it is not as interesting and C++ is more modern now than when D was created. Maybe Haxe?

 
Interval notation is unwieldy... To say an element is contained within an interval, the interval has to be defined as (a, abs(b)). An ordinary interval makes no semantic sense when (1, -1) means 1<x<-1, yet it makes intuitive sense...
 
@Griwes fuuuuuuk
 
IOW, I'm not liking mathematics because I'm a lazy programmer
And my professors expect me to use their clunky definitions and notations.
 
11:00 PM
@Aaron3468 Umm...this makes no sense to me either. If the end of the interval is given as an absolute value, that leaves no possibility of defining an interval like (-10, -5), which at least offhand seems like a valid interval (unless you're also dealing with something like modular arithmetic).
 
How foreseeing.
Since of course it would be put on youtube. But I wouldn't have that mindset when giving a speech to audience.
 
@JerryCoffin Fair point, I made a mistake in my effort to provide a definition. A better one would be (a, b)={x|min(a, b)<x<max(a, b)}. I'm trying to figure out why interval notation isn't reversible-by-default. The concept of an interval conflicts with the definition: (b, a) is intuitively the same as (a, b)
 
that's not what my intuition says
I'm totally good with (b, a) not being the same as(a, b)
 
user1804599
Cool, Emacs highlights unsafe in bright red.
 
@Puppy So then what does the interval (2, 1) mean that the interval (1, 2) would not mean?
 
11:15 PM
int() = 1; // why is this an error? rvalue isn't const iirc
 
@StackedCrooked There's been a few talks where the speaker said something like "if you did not get this, go back in the video and watch this part again". :D
 
@Griwes nice
 
There was a lightning talk from the Metting C++ guy where he noted that there will be more people watching any given talk on YT than in the room.
And I think that's a very trivial, but non-obvious for many speakers observation (it was definitely not 100% obvious to me).
Also JF is pretty good at giving talks. :P
 
@wilx They let me in, finally. :I
@Everyone ^ Discuss syntax and help me beat it up /cc @rightfold
 
user1804599
Do proper multidimensional arrays, not arrays of arrays.
 
user1804599
11:28 PM
It's simpler.
 
@rightfold Proper as in, [, ] ?
 
You'll be dealing with multidimensional arrays quite often in image processing. Having a simple iterator for them (with the ability to find neighbours in any relative coordinate) would be very powerful.
 
user1804599
That kind of syntax is gonna result in headaches, too.
 
user1804599
You need a lot of lookahead.
 
user1804599
You encounter foo[42] and you still don't know if you're parsing a type or an expression.
 
user1804599
11:31 PM
Also you don't want constructors. They're way too complicated. Add struct literals and functions
 
user1804599
Start with something super simple and well-understood, like the simply typed λ-calculus, then add things on top of that.
 
You can't put simple and lambda calculus in the same sentence
 
user1804599
What? It's one of the simplest Turing-complete systems.
 
user1804599
You can write the syntax and β-reduction rules down on a napkin.
 
user1804599
You can write an interpreter in like six lines of code.
 
11:37 PM
Sob.
 
user1804599
Type checker: three lines of code.
 
user1804599
You can add GPU-specific stuff. To prevent the need for heap allocation, you can prohibit lambdas with non-global free variables.
 
Ven
:p
 
@rightfold You're always parsing an expression. :P
 
user1804599
Or make lambda terms with free variables be of unique types, like in C++. Then you can statically resolve everything.
 
11:40 PM
(If you can use types in expressions freely.)
 
user1804599
@Griwes foo[42] x;, until you see the x, you don't know if you are parsing a type (as part of a variable declaration) or an expression.
 
@rightfold that's the fault of the declarator syntax.
 
user1804599
As I noted.
 
Ah.
Sorry, misread what you said.
Or did I do that now and not back then?
Blergh. type[42] being a type and variable[42] being a value is fine if your declaration statement isn't as retarded as C's.
Just trying to be unambiguous.
 
user1804599
let variable: type[42] = foo;
variable[41]
// master race
 
11:44 PM
yes
 
user1804599
Programming languages that are not a lot like λ-calculus suck.
 
So right-affixed type annotations?
 
though I'd write that as let variable : type[42] = foo;.
Pornhub or it didn't happen
 
user1804599
Just start with λ-calculus.
 
I can't start with lambda calculus, people here don't know lambda calculus.
 
11:47 PM
So you're saying it's very important to have λ be the lambda introducer? :D
@ThePhD that'll teach them!
 
Sob.
 
user1804599
If you don't start with λ-calculus then you're heading for disaster.
 
But I also don't know lambda calculus.
 
user1804599
Lambda calculus is simple.
 
@ThePhD Might I remind you that you are a wonderful human being <3
 
user1804599
11:49 PM
A term is either a variable (e.g. x), a lambda function (e.g. λx. f x i.e. [=] (auto x) { return f(x); }) or a function call (e.g. f x i.e. f(x)).
 
user1804599
That's lambda calculus.
 
user1804599
It's Turing-complete.
 
Oh.
Well, okay.
 
user1804599
You can add numbers and matrices and sequencing and I/O to it as additional terms.
 
When I write the language spec I can start from that and try to add terms.
Plus it looks like the parser and lexer must be written in OCaml, so.
 
11:52 PM
I need some simple algorithmic problem to solve with Haskell (not really for myself, but I need it nevertheless). Any ideas?
 
user1804599
for example, a function that scales a vector could be: λ(v : f32[3], s: f32). v * s (where : is the typical syntax "has type")
 
@ThePhD You can write the parser and the lexer with anything.
 
user1804599
@Griwes Powerset, travelling salesman, linear search, binary search, sort, Paxos.
 
@rightfold That's virtually Vapor's lambdas once I get it somewhere, just replace the dot with =>. :P
TSP might actually be a good idea.
 
user1804599
λ(v : f32[3], s: f32). v * s is well-suited for GPUs because it has no free variables.
 
11:54 PM
I agree that lambda calculus is powerful and extensible. I like the idea of including AST macros so you can express lambda in words when required.
 
user1804599
And it is very easy to inline lambda expressions.
 
user1804599
@ThePhD use ocamllex and menhir
 

« first day (2176 days earlier)      last day (2775 days later) »