« first day (1281 days earlier)      last day (3669 days later) » 

user1804599
9:00 PM
It depends completely on how weak they are.
 
user1804599
Implicit conversion to Boolean is generally useful IMO, if not too far-fetched.
 
implicit conversions in general can be really bad
but yeah, the boolean one is acceptable in some cases
 
gosh. have an opinion :)
 
I'm pretty confused as to what I believe in right now.
 
Implicit conversions are just bad. What makes a || b work is to make it a boolean context. Like if(x) or while(x): they're boolean contexts and can trigger the explicit conversion to boolean. More than enough IMO
@Jefffrey In C++, the implicit conversions are a pain because some of them do surprising things (like sign extension or losing precision) or thwart overload resolution (especially with templates).
 
9:06 PM
Like, I simply can't see how dynamic typing can even be a thing. Yeah, duck-typing is cool, but with dynamic typing you are basically working with runtime polymorphism everywhere. What's good in that?
I know I'm too blind to see the overall picture, but I just can't understand how languages can even proudly support dynamic and/or weak typing.
 
quick prototyping
also in most dynamically typed languages you have a smaller set of types and type size
i.e. there's no uint8_t, uint16_t, uint32_t, uint64_t, etc only int
 
@Rapptz s/set of types/set of primitive types/
and seems irrelevant, since, in most of them, you can make your own types
 
my point is
you don't get the a lot of the "bad" things of implicit conversions.
like unsigned -> signed and loss of precision
it's easy to use and quick to prototype and in your mind you're already expecting a specific type anyway
 
what do you mean by quick prototyping?
 
what else would it mean?
 
9:12 PM
I'm the back
hey rapptz
 
hi
 
bought some beer today
then realized amitriptyline says "We advise you not to mix alcohol and amitriptyline".
wankers
 
> we advise you not to wank and use amitriptyline
 
heh
 
@Rapptz I'm talking about using these kind of languages for end software products; the fact that they are easy to write on because they allow a lot of things, that statically && strongly typed languages don't allow, just don't matter; therefore it seems that I'm missing something in the definition of "quick prototyping"...
 
9:15 PM
it's just one of the reasons why it's helpful
not the only one
I have no gripes with dynamic typing
 
@Jefffrey java has most of these benefits, so the things listed aren't really reserved for "dynamic" languages only
 
@sehe I've only listed 1 benefits of dynamic typing: they allow more types per "object" (variable, function parameter, whatever). And I'm not sure what Java has to do with that benefit.
s/1 benefits/1 benefit/ of course (don't want to edit because: double ping is annoying)
 
@Jefffrey I meant "the things he listed" sorry.
 
You mean quick prototyping?
 
everything
dynamic typing isn't even that bad
 
9:21 PM
it kinda is.
 
not really
 
and smaller sets of primitive types, and lack of weird things with implicit conversions in C
got it
 
but really there are some tricks you can do with a dynamic type system to make it better
Lua's dynamic typing isn't that bad.
 
JS/PHP are probably the only ones that have terrible dynamic typing
Python and Lua's dynamic typing isn't bad
 
But those are just marginal. The overall picture I see is this: static && strong typing -> at least type safe functions; weak && dynamic typing -> far west mode;
with all the shades in between
 
9:23 PM
dynamic and weak is just asking for pain.
IMO if you're dynamic and strong and you have relatively few, flexible types, then you're not too badly off.
 
user1804599
I like Perl’s type system.
 
I still cringe whenever software is translated
 
Ok, let's set some points. I think we all agree that a medium-to-high strong typing system is required. Right?
 
lol DOS progress bar
 
I'm also surprised where Unetbootin would have picked up the idea I want Dtuch
@Jefffrey We can all agree on fuzzy nonsense. "medium-to-high strong typing system is required". Wut
@DeadMG "DOS" ?! Perhaps you're thinking of Win95
 
9:27 PM
Win 3.1 is as far back as I go
but that was only for a short time.
 
Weak typing basically means no typing at all. Incorrect?
 
Hint: DOS was textmode only...
Dos 4+ added "DosShell.exe" - which did task-switching (alt-tab!) but in text mode, as I remember.
 
ISTR some utilities like, er, defragging, or something, that when launched displayed such progress bars.
 
Yeah. Of course, but that didn't look like that. Also, not defraggers from MS. But yeah, all tools like Norton Utilities or Turbo-Vision based GUIs (e.g. Borland IDEs) would have this, yes. And QuickBasic, let's not forget.
 
Nevermind.
 
9:33 PM
I wrote my first program in QBasic
when I was like, four.
 
IMHO, "quick prototyping" is mostly done in dynamic languages not because of their dynamic nature, but rather than much lighter syntax. I would say, that most of variables are not really make use of dynamic stuff - they have single type for lifetime. If compare some typical Python function with function template+auto counterpart in C++ - they have little of conceptual difference, C++ version just has noisy syntax.
I think that real dynamic stuff, like Python meta-programming is not widely used in "quick prototyping".
 
@DeadMG That wasn't too bad
 
all it did was insult you if you identified yourself as a sibling of mine.
 
At least it had named "Sub"s and distinguised functions too.
 
but I figure that wasn't so bad for a four-year-old.
 
9:34 PM
@DeadMG What an apt response
 
@EvgenyPanasyuk dynamic typing has lighter syntax than static typing
 
^
 
user1804599
Yay.
 
@EvgenyPanasyuk Ohai!
 
9:37 PM
@Rapptz Yes, but my point is that statically typed language may have similar syntax for most of cases. Just compare - template<typename T> void foo(T x) {return x+1;} vs def foo(x): return x+1, C++ version can be generated mechanically from Python version.
@sehe Hi!
 
well
I figure that over the next couple days, Wide will have virtual function implementation, including implementing virtual functions from C++.
then "all" I have to do is EH and I'll be mostly done for this ABI stuff.
nom nom druggles
 
@Rapptz By the way, I remember Facebook had translator from PHP to C++, I guess that it was possible because most of their code really did not use features specific to dynamic languages. And ordinary PHP function can be mechanically translated to function template+auto.
 
@EvgenyPanasyuk Although I think C++ has come a looooooong way:
0
A: Reverse a string in place in C++

seheHere's one for fun: You will NOT want to turn this in as your assignment :/ See it Live On Coliru #include <string> using namespace std; std::string rev(std::string x) { auto a=x.begin(); auto b=x.rbegin(); while (a<b.base()) swap(*a++, *b++); return x; } #include <...

Hold tongue firmly in cheek there!
@EvgenyPanasyuk Huh? You are aware of the Turing Completeness theorem, right?
 
I love how you using namespace std; and then std:: everything.
 
@DeadMG Oh yeah, I had that using still in my edit buffer from another SO answer
> Well, we've realised that conventional wisdom around high performance programming is... a bit wrong. We've come up with a better, faster way to share data between threads, and it would be selfish not to share it with the world. Plus it makes us look dead clever.
hehe
 
9:49 PM
link?
 
@sehe Of course program in every turing complete langauge can be translated to another. My point is that most of typical code in dynamic languages can be translated to static language with type deduction very easily (I am not sure how to define "easily", but I think you get what I mean).
 
@EvgenyPanasyuk Okay, that's a different claim, and yes I get that.
I'm pretty awfully sure that's NOT what the HipHop compiler did, though
 
@sehe I have to admit, that I do not know details, it is just speculation.
@sehe It was before virtual machine.
 
same deal, I suspect
 
huh. I bought some DVDs at Christmas and just now discovered they're case locked
 
9:53 PM
"HipHop (known as HPHP) is an execution engine for PHP. Beginning in 2008, Facebook engineers began working on HPHP. The original release of HPHP was as a PHP to C++ compiler, known as HPHPc. PHP code was written and, when run through HPHPc, was transformed into C++, compiled into a binary and run as an executable (as opposed to being compiled to opcodes and interpreted). At the peak of HPHPc, PHP code showed dramatic performance improvements (up to 6×) compared to Zend PHP."
HipHop for PHP (shortened as HipHop) describes a series of PHP execution engines and improvements created by Facebook. The original motivation of HipHop was to save resources on Facebook servers, given the large PHP codebase of facebook.com. As development of HipHop progressed, it was realised that HipHop could substantially increase the speed of PHP applications in general. Increases in web page generation throughput by factors of up to 6 have been observed over Zend PHP. A stated goal of HipHop is to provide a high level of compatibility for Zend PHP, where most Zend-based PHP programs r...
 
> "PHP code showed dramatic performance improvements"
I was expecting more than 6x there
 
yeah
kinda like saying, "Eating is dramatically better than starving".
 
It is! More than 5x better, actually
 
trust me I noticed
 
@EvgenyPanasyuk Reminds me of this episode. That was funny, though rather unrelated:
 
9:56 PM
@sehe I think they are constrained by PHP semantic in many places. For example cant use "flat" array of structs, etc.
 
Jan 3 '12 at 16:35, by sehe
@IntermediateHacker There. I reimplemented your compiler (sic) thingie. In about 20 lines of perl, plus the TOP/BOTTOM templates. See it live: http://ideone.com/H5z0d
@EvgenyPanasyuk Still... 6x is measly. It actually means it's completely unoptimized, except for compiler optimizations of the c++ compiler... :( Low bid
Of course, no sane person would go to more lengths on behalf of PHP
 
Hey
 
hi
 
ho
 
10:03 PM
man
I'm gonna have nightmares about virtual function offsets.
 
I thought Hi Hey, hi ho, was another holiday.
 
Easter bunnies have been protesting that
 
I just glanced through your comment on C++ being a frontend to C. I seem to recall that it was mostly macro magic in the beginning, and Bjarne published a version of those early macros, but I can't find them anymore!
 
So sad!
 
@CaptainGiraffe Hi Hey, IO
 
10:17 PM
@sehe Why sad?
 
> I just now started googling for the term "postmodem era" as a pun on the end of dialup, and it's remarkable how many hits there are in old documents, including those that predate the personal computer entirely. Apparently this kerning-based pun is overshadowed by the fact that an awful lot of text on the web got there by a process that began with OCR, resulting in that kerning-based error.
@Borgleader I'm not, it is. MACROs are CUTE()
For a moment there it seemed that Xubuntu's install wizard didn't allow keyboard-only installation. :shock:
I just had to alt-tab. For whatever reason. There's a single (visible) window
 
@sehe I think this illustrates my point - a lot of syntax noise in statically typed languages is not necessary, and can be factored out - resulting in code which is much more similar to what we see in dynamic languages.
 
@EvgenyPanasyuk The semantics of that code would still be statically typed, though. The syntax of it would be mostly irrelevant as usual.
 
@DeadMG Yes, but real dynamic features are not so often used. Like many variables in dynamic languages have one type for lifetime.
 
... which is utterly irrelevant from this perspective.
 
10:31 PM
I need 1 more rep :)
 
user1804599
Why? 111999 isn’t even prime.
 
True. It's neither even, nor prime.
 
user1804599
Are you even serious?
 
user1804599
So … it is Sunday. What shall I write?
 
Hm? Yes. I though 111999 was a nice configuration of digits
@rightfold A poem to the easter bunny
 
user1804599
10:34 PM
Are there any interesting new talks that will influence my coding and architecting significantly?
 
@rightfold Your architecture is mostly decided by your diet.
 
user1804599
My architecture is irrelevant.
 
user1804599
What are they about? Why should I watch them?
 
user1804599
The guy makes me very nervous.
 
10:37 PM
@rightfold I'll do 5 minutes of footwork for you then report back.
 
user1804599
@EvgenyPanasyuk I’m not going to watch this, sorry.
 
user1804599
They guy is too annoying.
 
It is your choice. I learned a lot from his lectures, papers and book.
 
tomorrow I'm sleeping in.
 
Is DS9 supposed to be boring as fuck?
 
10:43 PM
some episodes are.
also the first couple seasons before the war with the Dominion gets started.
 
They have an extremely dismissive tone of our current tools. Describing them as "idiots". Examples such as integer division is not expensive. I can't find anything sensible for a programmer here. IMO they deal with Knuth as God, no supportive evidence. You can pay me with a ham sandwich@rightfold
 
user1804599
What the fuck?
 
but overall I didn't find DS9 to be appreciably worse than TNG
 
@rightfold I gave you my best quick rundown of the video posted. ?
 
10:47 PM
@DeadMG Hmm, I can't see I am a big fan of TNG anyway so that doesn't help my confidence :S Someone told me DS9 was similar to B5 so I thought it might be worth a shot, but it's been quite disappointing so far.
 
10:59 PM
@R.MartinhoFernandes S1-2 was a bit corny. S3 picked up. S4 was good. S5-7 were awesome.
Stick with it.
 
@LightnessRacesinOrbit what about it. It's not you
 
> I just created an account fffor you. You will receive a separate email
with your user name and a randomly generated password. Fffor added
security, you may want to change the password after logging in at
https://www.haskell.org/haskellwiki/Special:Preferences

Some inffformation for fffirst-time wiki contributors can be fffound
at: https://www.haskell.org/haskellwiki/HaskellWiki:Contributing
^ email for account creation on haskell.org
 
@Jefffrey Brilllliant
 
That's awesome.
@LightnessRacesinOrbit I'm too old for this shit.
 
11:04 PM
I like the staff already.
 
0
A: Replace std::deque const element

basicpb20If you don't want to use heap allocated objects, you can define an assignment operator in ConstClass that uses a const_cast class ConstClass { public: explicit ConstClass(int variable) : variable_(variable) {} ConstClass & operator=(ConstClass && that) { std::swap(const_cast<int&>(varia...

@sehe two of my favourite people ever. together.
 
who'd they be...
 
That's not me.
 
Sorry. I wondered whether I had posted it. Thankfully you're a robot, and obviously you immediately alert me :/
 
Xeo
 
user1804599
11:08 PM
> C++ is a man’s language.
 
user1804599
> There is testosterone running through ever line of that code.
 
user1804599
lol
 
> this picture explains what I want done lolwut!!!?
"If you use a global static class, you will be tempted to add stuff to it" - this is completely based. That's like saying, if you have some code, you'll be tempted to write more code. Yes, it's a slippery slope :/ — sehe 3 secs ago
 
except i asked yesterday, dont comment unless you have an answer please, when I asked as a question the morons that browse this site didn't know what to do. — user3550278 43 mins ago
gold
 
11:12 PM
@LightnessRacesinOrbit why
 
OK, I might be drunk, but the Lounge has a weirdness field surrounding it. The range seems to be global.
 
yes
 
because it's not true and you're not being constructive. You could just flag his comments as rude/unconstructive
 
11:13 PM
(you are drunk)
 
lol
 
@sehe I did that too.
If you have a problem with my comment, just flag it as rude/constructive. And move on. Quietly.
 
or post another rude comment
 
@LightnessRacesinOrbit Fuck that. That's for pussies. That's even less constructive. Instead, I wanted to ask you why you would be flagging comments, and adding unconstructive ones yourself :S
@Jefffrey Dammit. Too late for that now
 
@sehe I really don't have time for your bullshit tonight. Try someone else?
 
11:15 PM
Hey, you can just not answer. It's not bullshit either.
I just asked, you returned the question and I explained. Had you not, I wouldn't have had to explain. It's you who drew it out
 
Since your element type is neither CopyAssignable nor MoveAssignable, presumably you can't use it in a std::deque. — Lightness Races in Orbit 13 mins ago
Is this true?
I cba to look it up
Seems to be a lot of misinformation on that question in general actually
 
Yeah, but thank god for shared_ptr :S
 
11:29 PM
Hey quick question, is anyone here familiar with setting up OpenGL? I've been having some issues trying to get this beast working with Windows and could use some help if anyone has the time/interest.
 
I've never noticed "Size does matter" in Godzilla's (1998) poster
 
@LightnessRacesinOrbit I'm pretty sure noncopy/movable objects can't be used in any sequential collection
 
@BenjaminDangerJohnson that's what I thought too
 
they can in std::vector at least IIRC
 
but nobody else has descended on that Q so I began to wonder
 
11:31 PM
since C++11
 
@Jefffrey um how?
 
mostly since it would need to reposition everything when you reallocate a new block of memory
 
hmm, wait
 
I'm going to give this a test while I wait for hopefully some knight/ladyknight in shining armor to see my OpenGL question
 
they just need to be movable:
> The requirements that are imposed on the elements depend on the actual operations performed on the container. Generally, it is required that element type meets the requirements of MoveConstructible and MoveAssignable, but many member functions impose stricter requirements.
 
11:32 PM
okay that would make sense
 
but a noncopy/nonmovable object I couldn't see as being possible
 
but a non copyable object is possible
 
there should be plenty of alternatives though
 
11:34 PM
list would be the easiest if you don't mind the slow iteration
 
const members should prohibit both in the default case, no?
 
const should be fine if you have a copy constructor
and assignment
I believe
move shouldn't work, but I'd think copy would
 
> const members
 
@R.MartinhoFernandes in case you're (still) bored (again):
'The Student' is one of my favourite Chekhov stories. It's about Easter, and it's rather short. http://www.eldritchpress.org/ac/jr/173.htm Happy Easter!
 
right, const members. You aren't actually changing the data inside the vector
you are just creating new const members out of it
 
11:35 PM
that would require vectors to reconstruct every single element if you deleted the first one
but it actually moves them down by assigning
 
well it's going to have to do that anyway if you don't have move semantics
I believe it is possible, just not a good idea
 
@LightnessRacesinOrbit I know I had to look that up once, for an answer, but I don't remember as of right now.
 
dam, it seems Visual Studio 2013 insists on creating a precompiled header for every project
 
@BenjaminDangerJohnson Dunno much myself, sorry.
 
@BenjaminDangerJohnson whut
move or copy it doesn't matter. it's an assignment and a mutation.
 
11:39 PM
yeah but it does assignment through copying right?
that should be the default operation used in a vector when changing size
 
moving if it can, of course
this is all by the by. the point is that you can't do it if there's a const member
(unless you overload assignment to ignore the const member)
 
implementation wise it won't compile anything in the form of std::vector<const T>()
but it will actually complain only because the destructor is called
 
@BenjaminDangerJohnson just disable it
 
not sure how to disable
 
the constructor by itself will allow const members
 
11:42 PM
but yeah I'm giving the const member a quick test
because now I am curious
also it's good practice
 
@BenjaminDangerJohnson just go into the compiler options, precompiled headers and change the dropdown to "Not using precompiled headers" for all source files
 
need moar lounge descent
To be absolutely clear: this is dangerous code that results in undefined behaviour. Do not do this!Lightness Races in Orbit 19 secs ago
also, lol?
 
dam, yeah can't get it to work
 
Just curious, does anyone work on projects that use or allow C++11?
Projects can be outside of work as well.
 
11:49 PM
I try to use c++11 exclusively
big fan of all the stuff added with concurrency
 
That would be thoughts exactly. You just run into the problem of existing projects.
 
right, but most of my work is in C#
C++ is just a hobby for game programming
which sadly is stalled right now due to my inability to setup OpenGL in Windows 8
 
I read stackoverflow.com/questions/13134186/…, std:thread should be for Linux applications were pthread is more portable.
Ah. I primarily use Max OSX and Linux.
 
yeah it's not really well supported in Windows due to their own threading mechanisms
but I try to use the STL as much as possible as these things should be available at some point (I'm not under time constraints) and it means less rewriting when doing ports
 
Yeah. I just feel as if, if you started a new project in C++11 that had to be cross platform.
 
11:55 PM
what about it?
 
@BenjaminDangerJohnson Hmm is that a PEBKAC issue or is there a fundamental problem with OpenGL and Windows 8? Wouldn't surprise me
 
Would it be smart to go ahead and use std::threads and use Microsofts win32 threads for support for Windows?
In the future, if std::threads did support Windows effectly, you could easily just use std::threads for all platforms.
 
@LightnessRacesinOrbit honestly I have no idea. Microsoft likes to make it difficult on purpose to push DirectX
 
@JaredBurrows std::threads is not supported on Windows?
 
as far as I know I just can't get a couple c++ libraries I need working in a project
@Jefffrey Supported but buggy
 
11:57 PM
I see
 
@Jefffrey See the link I posted? It is but not fully supported. I was just wanting other people's inputs on support and implementation on future projects.
 
dunno much about concurrency in C++ unfortunately
 
Topical question for Easter: What would matlab do? — sehe 24 secs ago
 
if possible I'd just use some ifdefs to make alternatives you can easily pull out to remove windows threading when the STL is fully implemented
 
Exactly. That is what I have done in the past. I was just making sure other's had similar ideas for cross platform support.
 

« first day (1281 days earlier)      last day (3669 days later) »