« first day (625 days earlier)      last day (4324 days later) » 

12:00 AM
lol
Binary operator >> not declared for ostream and char const* :P
 
@EthanSteinberg Just do a red straight line at the bottom of the graph?
 
@coder: s/>>/<</
 
Console.Write("hello"); //much better
 
print "hello"; # polyglot
 
user406009
@Mysticial The problem is that most of the acceleration is at zero anyways.
 
12:03 AM
someone should make a customizable language.. if it doesn't already exist
 
Haskell?
 
it would make for the most unmaintainable code.. but it would be fun
 
@EthanSteinberg ah...
 
@EthanSteinberg - Insert markers in the data to ensure that you are getting a live feed. Maybe one marker per minute at a very obvious value, such as a value which is precise beyond which the equipment can produce.
It could be a value which is more precise by a certain order of magnitudes but which is based off of the current reporting average so it wouldn't throw any statistics gathered off.
 
@coder ruby is about as close as i've seen yet :)
ruby or forth
ruby's forever being used to build DSLs
 
12:08 AM
It would be cool if google translate could translate my ideas into code
 
DSLs SUCK
 
Ell
no they don't
very useful imho
 
@Travis J that would make me lose my job. :(
 
psh. SQL is a DSL
 
Ell
and ruby is awesome
 
12:09 AM
@cHao Well, SQL sucks too :P
 
as are most template languages
 
@RadekSlupik - Well that wasn't the goal. But then you could be an entrepreneur! :)
 
Ell
I'm writing a webcrawler thing In ruby atm
 
@RadekSlupik k, i'll give you that :) but i've yet to see a better platform-neutral way to get at relational'ish data.
 
LINQ
ORMs
 
12:11 AM
linq sucks too :P
and ORMS suck big fat hairy coconuts. through a 50 foot coffee stirrer.
 
I <3 ORMs
 
at least linq gives you the data you want. an orm just grabs all of it and lets you sort it out yourself.
 
Any decent ORM will let you decide what data you want.
 
it's a horrid way to talk to a relational db.
oh? show me the docs for one.
 
Ell
is ORM like active record where you have a class and a load of belongs_to and has_many and stuff?
 
12:14 AM
show me one that treats data rows as objects, and doesn't just grab all the data it'll ever use when you just want one column.
@Ell yes...ActiveRecord is a kind of ORM
 
ActiveRecord lolz
Most ORMs allow you to specify the columns/fields you want.
AFAIK, even ActiveRecords allows you to do that.
(In the docs I linked, see only() and exclude().)
 
Guess who's back?
 
so, you have to specify the fields you want?
and what happens when you pass the object to someone that wants a field you haven't loaded?
 
By default it picks all of them, but you can explicitly state which ones you want if you only need a subset of them.
It will load the field on-demand, or it will be None. Not sure.
 
kinda matters, don'tcha think?
 
12:20 AM
I never really encountered that problem.
You have that with SQL too. You execute a query and you fetch a subset of columns, then you pass the result and the callee needs more columns, what will happen?
In other words: know the fields you need.
 
i pass that result to someone, they have those columns to work with. I never tried to pretend that a row containing half a Thingie's fields was a real Thingie.
 
Then fetch all fields, I don't see your problem.
 
Problem is, it's either/or. If i have a Thingie, i expect it to be a valid Thingie. Not a half-baked one. But that means loading all the data.
 
i do a query and just pass a list of records, that's what you get.
 
Ell
12:23 AM
so if you don't want a half bake one you are always going to load all the data
 
there's no assumption of what other fields are there. WYSIWYG.
 
Still, I don't see the problem.
How is loading all fields trough an ORM different from loading all fields without an ORM?
 
without an ORM, i don't have to load all fields, and the result will be just as valid.
cause it's not a list of objects; it's a list of records.
 
Use an ORM that loads missing fields on-demand.
 
entity framework
 
12:25 AM
so, yeah. a new query each time i want a field that hasn't been loaded yet?
no thanks.
 
You don't HAVE to load those fields.
 
Ell
or do the clever thing and keep your objects floating around in the ether available for access in faster than light speeds
 
If you don't access those on-demand-loaded fields, they won't simply be loaded and there won't be a second query.
 
And if i simply don't even pretend they exist, there won't be a second query either.
 
Yeah, so what's the problem?
Just pretend they don't exist. Problem solved.
 
12:27 AM
i didn't say "pretend they don't exist". i said "don't pretend they exist".
ORMs either pretend they exist, or break, when you have what you thought was a valid Thingie.
there's not really much in-between there.
 
If you load a subset of fields, and you use fields not in that subset, you're simply an idiot.
Use common sense while coding.
There is a reason you only load a subset of all fields.
 
Thing is, that Thingie is not a collection of fields. It's a Thingie.
 
It's because you don't need the fields not in that subset.
Who cares you have an incomplete object?
 
You can't guarantee someone won't come along later and say "oh, this is a Thingie? I'll just use UnloadedField to do the job".
 
Just don't access the missing fields and problem solved.
 
12:31 AM
Damn, I have some Neil Young stuck in my head.
 
Or even better, just load all the damn fields and optimize when you benchmarked and found a bottleneck.
 
i can, cause i don't pretend those rows are Thingies. Cause they're not. At best, they represent a Thingie.
 
Im back :)
 
You have a bag of data and you have no idea what kind of data it is. GREAT IDEA.
 
Ell
why not pretend? abstraction is good
 
12:32 AM
i have a bag of data and i know exactly what kind of data it is.
you, on the other hand, have to choose between a half-baked Thingie or loading everything.
 
What's this discussion about?
Do I need to slap someone?
 
How do you know? Oh yeah here a query! Oh cool it loads these fields. Now what does the result represent??
 
It represents a list of fields.
that's it. no more, no less.
 
A list of fields. How useful.
 
If i want to use those fields, it most certainly is.
 
12:34 AM
It's like naming your classes MyClass and your variables myVar.
 
no, it's not.
cause i don't pretend they're anything but data.
 
Oh you don't name your stuff at all.
 
i don't give records their own class for each possible combination of fields, no.
 
List<Field> = Query("SELECT foo, bar FROM foobar");
Unnamed variable!
 
...?
now you're just off the rails.
 
12:36 AM
Oh yeah you have a list of fields and it's just a list of fields.
No need for a name.
"List of fields" exactly expresses my intents.
 
the variable has a name, but not its own type. it doesn't deserve a type, cause it's not a logical entity aside from its being a bunch of data.
so it's a Record.
 
Ell
so besides a bunch of data and methods that can be applied to that data, what is a class?
 
Meh no compile-time type checking.
 
a way to enforce invariants on that data.
that's a big part of what i consider a class to be.
 
Ell
invariants?
 
yeah.
invariants.
like "SomeField freaking exists".
 
The object-relational impedance mismatch is a set of conceptual and technical difficulties that are often encountered when a relational database management system (RDBMS) is being used by a program written in an object-oriented programming language or style; particularly when objects or class definitions are mapped in a straightforward way to database tables or relational schemata. The term object-relational impedance mismatch is derived from the electrical engineering term impedance matching. Mismatches Object-oriented concepts Encapsulation Object-oriented programs are designed with t...
I'll just leave that here.
 
Records are not objects. They are, at best, records -- analogous to a C/C++ struct.
To treat them as objects, when they have no real responsibility to behave as such, ends up causing all kinds of ugliness.
 
oh god, I just got an email from someone begging for help on an SO question...
that can't be good...
 
@Mysticial heh. that's why like 5 people have my email address. :)
 
12:46 AM
@cHao I have two emails. A personal and a public/professional one.
Only a few people know my personal one.
I say 2 emails, but it's actually more like 15 of them all forwarded down to one of two emails. lol
 
lol
 
My public/professional email is my undergraduate student email. So it forces all the spam through my school's filter. lol
 
Ell
strings aren't actually strings, there just a list of characters. sorry, bytes. wait no, bits. ha what am I talking about they are little pulses of electricity.
sorry ignore that didn't mean to sound so much like flame bait
 
Lol, i only have 2 email addresses, one is a spam box, and the other one i have important stuff haha
 
0
Q: What is the difference between " " and ' '?

John SmithI've seen some code which uses the ' ' version to subtract character values from each other which I didn't think was possible which got thinking as to what exactly they infer that is different? What is the difference between " " and ' '? (How do they change how the code sees what ever is within ...

I'm tempted to comment: What's the difference between 0% and 100% accept rate?"" But I won't, too snarky.
 
12:50 AM
@Ell a "string" is a logical entity in its own right, with stuff you can do to it that only make sense on the whole thing. more importantly, it can make sure that everything you do with a string, as long as it fits in with the intended purpose, is valid.
and doesn't break the string's stringiness.
 
@Mysticial lol, a simple google search would have gave that person the answer to the question >.>
it amuses me sometimes xD
 
@ITNinja That's actually hard to google for since it's punctuation.
You'd have to use the search terms "single" or "double" quotes.
 
any java tutorial in existence would have covered chars and strings, though.
 
^ agreed
 
Great, now I'm seeing "Branch Prediction" as the answer to everything...
 
12:52 AM
heh
 
@Mysticial Well, well, aren't you one lucky bastard.
 
1
A: Unexpected performance results when trying to toggle a variable

duskwuffFirst of all: The "conditional" and "if" variants of your code are functionally identical, and indeed the compiler is generating nearly identical code for both. Branch prediction is likely to be affecting your results significantly here -- because you're always toggling the value between 5 and 1...

 
Oh fuck.
 
@Mysticial Lucky....
xD
 
I'm pretty sure many people did not even know that branch prediction existed before you release your epic answerfest.
2
 
Ell
12:55 AM
i did! :D
I don't understand how it can work though
 
@Mysticial I sent the answer to my boss, who's quite into x86 micro optimization stuff, and his reply was "ha, of course".
 
Ell
does the processor recognize patterns in the code?
 
going from Python to C/C++ is messing with me >.> especially considering im so used to using ' ' AND " " for strings >.>
 
TND
For me, header files were really annoying at first
 
lol
 
TND
12:57 AM
I was always thinking
WTF is the point of these things?!
But now I understand xD
 
Ell
I do despise the c++ compilation model
 
TND
I just accept it and use it
 
I havent gotten into those yet :P
 
TND
lol you'll see them soon
 
I literally just started learning C/C++ :)
 
Ell
12:58 AM
listening to the lost woods music techno style. I'm so cool.
 
TND
lol lost woods techno?
 
@ITNinja C or C++?
I suggest you pick one, and stick to it.
 
More c++ but ive been looking at the differences :)
 
TND
I was surprised to find out that they were actually really different when I started learning C++ yesterday afternoon
 
Ell
@itninja ...there is hope! run far far away and don't turn back! you can still be saved!
 
12:59 AM
as ive been going along
 
Trying to learn both at once (or, worse, learning C before C++) is going to end with pain.
 
TND
Where's the lost woods music? Is it on youtube?
 
And all of a sudden, "Branch Prediction" becomes the answer to every single performance question... (This is probably the 4th answer I've seen in the last 2 days that contains branch prediction.) But it sounds reasonable in this case. +1 — Mysticial 3 mins ago
 

« first day (625 days earlier)      last day (4324 days later) »