« first day (1092 days earlier)      last day (3873 days later) » 

11:03 AM
Not to me - a function is reentrant if it can be interrupted, called again in the interrupt context and then return correct results for both the interrupting and interrupted calls.
Is there another definition somewhere?
 
Ell
That's what I thought it was but
A computer program or routine is described as reentrant if it can be safely called again before its previous invocation has been completed (i.e it can be safely executed concurrently). To be reentrant, a computer program or routine:

Must hold no static (or global) non-constant data.
Must not return the address to static (or global) non-constant data.
Must work only on the data provided to it by the caller.
Must not rely on locks to singleton resources.
Must not modify its own code (unless executing in its own unique thread storage)
 
the interrupt-handler definition is probably not very useful anymore.
the concurrency definition would be way more useful.
but in my experience, so many people have so many different definitions of re-entrant, it's a bit of a meaningless term.
 
Xeo
@DeadMG Both definitions basically amount to the same, though.
 
I disagree.
I'm pretty sure that interrupt handlers have some seriously funky rules that are way more than just correctly synchronizing any shared state.
 
Ell
I was just wondering because I was thinking how one would write a reentrant recursive descent parser
 
11:10 AM
you'd have to be a fucking moron to write a non-reentrant parser.
 
Ell
as in, can be interrupted and resumed
Really?
 
How would you write a non-reentrant recursive descent parser?
 
Xeo
@Ell I think you may misunderstand the meaning of "interrupted"
 
well, the core issue about being re-entrant is "Don't use globals, and don't assume unique access to shared data".
that's Programming 101 these days.
 
Xeo
@ScottW huh?
 
Ell
11:11 AM
I think I am misunderstanding
I was imagining parsing stream data where I dont want to block so the parser can pause when no data is available then resume when there is
 
that has jack shit to do with being re-entrant.
 
Ell
Oh right :P
 
if you want to be re-entrant, that doesn't mean you have to provide any non-blocking facilities or any interrupt mechanism or anything like that.
it's your phone lagging.
and secondly
unless you have a language which can be analyzed as it's parsed, like C++, there's absolutely no point whatsoever in such a parser structure.
for the vast majority of languages, half an AST is worthless.
you can use a pull parser to only request each token as you need it, which goes some way towards not blocking when you don't have to (assuming the source string is not in-memory)
 
@ScottW Well....
 
Ell
It was mainly for curiosity. But if you're parsing a not so difficult file format it could save a little time if you're transferring over network
 
11:21 AM
@ScottW Damn dude. Still up
Well.. I got my Pokemon game at midnight... so I've been playing
 
Ell
X?
 
yea
 
Xeo
Too many
 
If you have a big nested object structure like for example an application window which contains subwindows, which in turn also have sub components (which are maybe active in async jobs like playing videos, internet, event passing etc..). Each parent object owns its child objects, so if the root goes out of scope the entire structure goes down.
Would you think a two-phase destruction is bad?
 
@ScottW 700+
 
11:28 AM
@StackedCrooked Probably.
 
The root would signal an event which allows the sub components to cleanup their interactions outside of their destructor.
 
why can't each object destroy itself in one phase?
 
1
A: Speed comparison with Project Euler: C vs Python vs Erlang vs Haskell

Connor HilaridesYour Haskell implementation could be greatly sped up by using some functions from Haskell packages. In this case I used primes, which is just installed with 'cabal install primes' ;) import Data.Numbers.Primes import Data.List triangleNumbers = scanl1 (+) [1..] nDivisors n = product $ map ((+1)...

^ that looks nice (to me, as a Haskell outsider). @R.MartinhoFernandes @not-rightfold and other Haskell buffs?
 
If an object goes out of scope then each of its members are destroyed sequentially. And this partial state can be dangerous is there is still event handling going on.,
I'm not defending the idea. Just wondering.
 
(a 427x speedup, in the same number of lines. Not bad)
 
11:32 AM
Wouldn't that be a form of deinitialization (i.e. two phase destruction).
 
@StackedCrooked Then you need to stop the event handling first. Have an atomic flag, for example.
 
I often find that joining a thread member variable inside the destructor sometimes leads to deadlocks or crashes. Often it is caused by wrong order or member variables. (Thread object should typically be last.)
 
@sehe wooo
 
However, it's a bit anti-rai to do stuff in your destructors.
 
hoorai
 
11:35 AM
@DeadMG Yeah, I'm also trying that.
 
> Conclusion: Haskell is awesome.
 
simple fact is
an object which cannot destroy itself in it's destructor won't fit anywhere in C++.
 
It can destroy itself. But it's the society of objects that is messy :)
Mass death always fails early :D
 
@sehe Out of interest, my solution was 21ms.
 
My solution didn't compute :/
@ScottW Has been done
 
11:40 AM
Everyone's solution is surprisingly slow :s
Here's the one I measured ^
It can actually be sped up a little.
okay it's getting late
or early.. I don't know.
 
er, I think it's getting pretty early.
 
user1804599
@sehe Using existing libraries is always better.
 
must be what, 4-6am where you are?
 
@not-rightfold I know right. Still, getting this new answer on a really popular question makes me wonder
 
Scott's up too.
 
11:43 AM
mooooooooooo rning
 
I have a faulty microswitch
 
user1804599
What should I learn? Common Lisp or Scheme?
 
@not-rightfold from these two, Scheme
 
I'mma make a radical suggestion
 
CLisp is FUBAR
 
11:43 AM
and say that maybe you should learn to make things with a language you already know
 
user1804599
@BartekBanachewicz Which implementation is good?
 
@not-rightfold I have no idea. I've never written anything in Scheme.
 
user1804599
:V
 
you'll never finish zoidlang or gear or holyshitihavetheworstlanguagenameever or whatever was latest at this rate
 
Xeo
Maybe he doesn't want to
 
11:44 AM
@ScottW I did one structural change: struct root : root_members, scheduler {}; (scheduler is destroyed before root member objects are). This kills the communcation.
 
@DeadMG that never was a goal
 
I thought zoidlang and gear were the same thing.
 
omg fuck you chrome you are so BUGGY
 
Does anyone know whether I need a license/activation thingie to install VS2013RC Ultimate?
 
user1804599
I’m installing CHICKEN.
 
11:47 AM
@LightnessRacesinOrbit What happened?
 
user1804599
@sehe Microsoft Visual Studio 2013 RC Ultimate?
 
@Jefffrey Chrome got buggy
 
@not-rightfold Yup. Testing on my new laptop. Wanna try out new hell :/
 
user1804599
#;1> (print "Hello, world!")
Hello, world!
 
user1804599
My first Scheme program! Yay!
 
Xeo
11:49 AM
@sehe The RC is free
It's RTM which is not
 
@LightnessRacesinOrbit I went back to FF for like 8-10 days and I switched back to Chrome :( it was too bad.
 
@Xeo should I anticipate it being 'centrally killed' at the time of RTM?
 
Xeo
@sehe ya
You can get the Desktop Express version for free again, though
 
@ScottW In the next 10 years, I think most guys will be doing just that! :P
 
@Xeo thing is, they tend to include gratuitous problems uninstalling, free of charge :/
 
Ell
11:54 AM
I prefer ff
 
I never liked FF.
 
You know, this 16Gb, quadcore HT, 64bit Win8 17" laptop is behaving quite nicely. The 'smart pad' (multitouch) touchpad is a nice surprise. The keyboard is something special. And there's a fullwidth "dolby"(har har) soundbar that is quite nice too.
I never used FireFox (except when I had to test a site in it)
 
Firefox freezes occasionally on my PC.
I remember my uncle having Netscape navigator on his PC
 
Xeo
I used FF, and I still do.
 
Allthough I've had 6 or 7 system hangs (some after suspend/resume) and a failure to shutdown already. I think there's some acer crapware I'll have to try and hunt down
 
Xeo
12:00 PM
At the very least, FF doesn't suck when it comes to font-fallback :>
 
Yay. 1 point scored
 
Xeo
@sehe Eh, the first thing I did when my friends got themselves a laptop is wiping it and making a fresh Windows installation.
 
@Xeo Downloading ultimate now. You know, I'm going to try REST/Casablance/C++cli with OData. I reckon there will undoubtedly be tools that make OData easier in Ultimate (especially since I have little affinity with webservices)
 
you can practically download official images from Microsoft.
 
@Xeo I haven't checked whether the OEM OS disk is included. Probably is.
 
Xeo
12:02 PM
@sehe Even if it isn't, there should at least be a key on the underside of the laptop
And then you can just download the image from MS
 
@ScottW it is. It is limited to a hardware id. Once activated, i.e. But that's ok, since the hardware won't change if I reinstall
(I think you can reactivate 2 times if you have major hardware upgrades?)
@Xeo I'm going to try that once. But for now, I'm taking the opportunity to liberally "pollute" the machine with direct installs (as opposed to VM installs) - knowing that I'll probably wipe it all once in a month or two
Urrgh. VS2013RC downloading at only ~600kb/s
58 minutes remaining :(
I'll go collect my daughter's repaired flute instead
And then groceries.
Life always getting in the way
 
@sehe I dream of speeds like that :P
 
I am just mildly annoyed it's not taking full advantage of my 20mbits/s connection
 
@sehe When do you ever need that kinda speed.
20mbits/s is just too much bandwidth, you could never use that much.
 
@GamesBrainiac I didn't claim I need it. I'm used to it. And it is sure nice. I won't die from waiting an hour or 2, you know
 
12:10 PM
@sehe lol, here I'm just happy if I can get 150+
 
@GamesBrainiac Get out. You're bad at trolling. You fail at off-site backups, for one thing. And you don't run servers much
 
@sehe Why would I want to run a server from my PC? I got rackspace for that.
@ScottW lol
 
@GamesBrainiac that tooo
So, transferring data from one VPS to local is never an issue for you then?
Nightly backups? Local development versions?
 
hmm
I find myself clicking on the same websites over and over, hoping for new content.
 
@DeadMG Enable desktop notifications
 
12:22 PM
naw
the real issue is that I don't feel like working on Wide right now, so I'm looking for content to consume, but I can consume way faster than people can produce content I'm interested in
 
Your interest is too narrow
(This wasn't news)
 
It's too broad a topic.
 
Ell
I love watching creepy shit like this: youtube.com/watch?v=oYjny4qNy24
 
Maybe he's trying to compensate for something narrow?
 
well, I'd be interested in stuff like decent C++ articles or even cheap laughs
 
12:31 PM
@sehe Nope. Not really. I never have to deal with anything nearly as messed up as you do, so no! :P
 
but most C++ articles are written by morons
 
@DeadMG And they don't do any updates on the articles either ;)
 
@GamesBrainiac That wouldn't be a subtle stab at me, would it?
 
Xeo
@DeadMG Make a blog about your Clang-hacking for Wide.
 
honestly, it would mostly be full of how badly Clang sucks.
and I doubt that anybody wants to read that
 
12:38 PM
Omg I am in a cave in the middle of no where (national park) n I got the reception
 
Xeo
Then, about your design process for Wide?
 
could do.
I could also write some documentation for the implementation.
 
The first thing I post ... & last one 4 da day is ... In here :')
 
since let's face it, there ain't nobody here who understands it except me, and even then, only half the time.
 
@DeadMG what ever could you mean ^^ :P
 
12:41 PM
@GamesBrainiac The only people who ever read those articles are people who could just ask me if they want an update.
simple fact is, those articles are going nowhere unless I can figure out how to make them more widely used.
else it's just not worth my time.
 
@DeadMG I see. Well with the rise of cppreference, its kind of pointless. I mean cppreference is pretty aweseome if you want to learn about almost anything.
 
to be fair, they only have reference material, not tutorial material.
 
@DeadMG They're working on the tutorial material.
 
on the other hand, they also didn't have an online IDE, until they just asked StackedCrooked for his.
@GamesBrainiac Maybe I should just offer to let them borrow mine.
 
@DeadMG Hey, could work. Just link them to your site.
Thats what luffy did, I think.
 
12:45 PM
luffy?
 
@DeadMG stackedcrooked
@StackedCrooked how ya been luffy?
He let them use his compiler, in exchange, they put a nice link to corilou.
 
Not bad. I'm working on interesting projects at work.
 
@StackedCrooked Do tell.
 
They've been ongoing for over a year now.
 
In the cave, can see the moon, & camp fire in the distance. Have a bit whiskey, ready 4 bed ... I mean sleeping bag
 
12:50 PM
TCP/IP protocol stack and a RPC system.
 
Life is awesome as always
 
DyP
@DeadMG Just found a dead link here: codepuppy.co.uk/cpptuts/default.php (Get Started)
 
Although I sure hope wildlife is not going to come 2 steal all my food 2nite ... My hunch says they Would be tempted to ...
 
cheers
 
@StackedCrooked Sounds complicated.
 
12:53 PM
It it was easy then it'd be boring :)
 
@StackedCrooked One day, we are going to sit down, and have a conversation about all the things you want to build. And how you might go about doing it.
I think that would be a fun convo! XD
 
A porn imperium?
 
no, what would be fun is if Rightfold was in it.
 
@StackedCrooked I think we already got one of those.
 
Right.
 
12:55 PM
I don't watch, so yea, but hell just google seach without the filter on... :P
 
user1804599
No, C++.
 
Ell
Oh gawd. Is this a code smell? coliru.stacked-crooked.com/a/1057a69cbe805cb3
 
not necessarily.
it just means you have some complex code.
 
Ell
1:04 PM
Ah that's good then :)
 
I'd put them all on separate lines though, like an enumeration.
 
Ell
Good idea
 
can typedefs violate ODR?
 
user1804599
They are not definitions.
 
I don't think so
 
1:14 PM
@not-rightfold ah, right. thanks
 
but ODR is a fickle, fickle beast.
the issue is, if you have a typedef that's different, virtually any code using that typedef is going to be different and therefore violate ODR.
 
user1804599
> )))))))
 
user1804599
This code is funny.
 
1:29 PM
 
user1804599
lol
 
just saw the filename :)
 
perfect music
 
@FredOverflow all of those imports on the beginning
 
my .cpp file has ~400 LOC and it's bad =(
 
1:34 PM
I tend to start feeling bad at 100 lines per file.
 
user1804599
@FredOverflow I bet the equivalent Haskell code would be 3π lines worst case.
 
it also has a Heisenbug =(
 
@not-rightfold Not with all those string literals in there.
 
user1804599
@Abyx Attempt to study it and it will disappear! Problem solved!
 
user1804599
Just tell your customers to attempt to study it too.
 
user1804599
1:36 PM
@FredOverflow The equivalent Haskell program isn’t stringly-typed. :)
 
@Abyx concurrency-related?
 
@FredOverflow yep
 
user1804599
Use Erlang.
 
no way
 
user1804599
At least you’ll be poking your eyes out because of the syntax, instead of conquering concurrency.
 
1:36 PM
I don't want to have another problem
 
user1804599
> instead of
 
You know what's wrong with C? a) It doesn't have a proper bool type. b) Declarations must come before the first statement. c) Oh yeah, and everything else, of course. But I can cope with the rest.
4
 
have a star
 
I can has void star?
 
(void)star;
 
1:39 PM
But seriously, not being able to write for (int i = 0; ...) is so god-damn annoying.
 
user1804599
@FredOverflow Eh, use fucking C99.
 
yup
 
@not-rightfold Visual Studio still does not support C99.
 
user1804599
Use proper tools.
 
Of course I could just compile as C++. I call the resulting language "C with classes without classes".
 
1:41 PM
@FredOverflow but still C is way better than Pascal.
 
user1804599
> I’m using a horrible tool so the language sucks.
 
@not-rightfold What are you implying? That C doesn't suck? :)
 
If you are seeing random crashes it's easy to become anxious and randomly start adding checks and "safety measures". Always keep your cool and try first to understand the core issue.
 
user1804599
@FredOverflow correlation does not imply causation.
 
@not-rightfold Your smart words imply a tent in my boxers.
 
user1804599
1:43 PM
@StackedCrooked Never add checks and safety measures.
 
Understood!
Anything else?
 
@Abyx I wrote some fun projects in Pascal back in the days. What do you think is wrong with Pascal?
 
@Abyx Eh? No strict type-checks, no nested procedures.. Even 'classic' Pascal, without the Delphi-OO, is better than C. A blocked drain is better than C.
 
user1804599
@StackedCrooked Yes. Write me a Sublime Text 2 plug-in that does rainbow parentheses.
 
@FredOverflow the var section
 
1:45 PM
Pascal even had malloc and free, right?
@Abyx Oh yes fuck, I totally forgot.
 
user1804599
C has lambdas if you use clang.
 
syntax?
 
_Lambda(((()))) ?
 
user1804599
@FredOverflow void(^my_lambda)(int) = ^(int x) { printf("%d\n", x); };
 
oh sh...
 
1:46 PM
@not-rightfold What does ^ mean?
 
user1804599
@FredOverflow similar to * for function pointers.
 
@Abyx What's wrong with the var sections?
 
@MartinJames uhm... everything?
 
Do C lambdas capture surrounding state? Are they closures?
 
user1804599
1:47 PM
@FredOverflow Yes. You can control behavior to some extent.
 
user1804599
I never use them except in Objective-C.
 
user1804599
And they are non-standard in C.
 
@MartinJames no really why should I help compiler to find variables/constants/etc?
 
@Abyx So there'ssomewhere to put globals. Wots wrong with that?
@Abyx Maybe because the modules compile/link MUCH faster?
 
> The code was real, though obfuscated. It was two tightly coupled classes. Total about 30KLOC.
 
1:49 PM
I need a global place to put my async blocking futures.
 
@Abyx Because the Pascal compiler is single pass ;-)
@StackedCrooked AsyncBlockingFuturesSingleton?
 
@FredOverflow ..which means no macros :))
 
user1804599
PL/pgSQL is the only real procedural programming language.
 
@MartinJames It does? Couldn't they expand in one pass?
 
@FredOverflow You forgot the factory, silly.
 
1:50 PM
@MartinJames yep. they do compile faster. most of the time I read and write code, not compile it.
 
@StackedCrooked and the manager
 
user1804599
You forgot the kiss.
 
@Abyx Oh - you are so good that you never need to debug stuff?
 
user1804599
lol
 
1:51 PM
There's this song in my head where they say: he's going the distance. he's going for speeed.
it sounds cool in my head
 
@MartinJames yes.
 
@Abyx Heh - now I KNOW you're trolling!
 
@MartinJames Depends on what you mean by debug stuff. Use the debugger? Nope. Stare at the code real long until you find the bug? Hell yeah.
 
@FredOverflow You stare at code until the bug drops out?
 
user1804599
@FredOverflow Here is an example. gist.github.com/rightfold/5126a635281f2559767b
 
user1804599
1:56 PM
I can’t get it to work on Coliru since libobjc isn’t installed.
 
What exactly made the clang guys design lambdas for C? What was their motivation?
 

« first day (1092 days earlier)      last day (3873 days later) »