« first day (1454 days earlier)      last day (3541 days later) » 
01:00 - 21:0021:00 - 00:00

9:00 PM
rather annoying when your < 1 year old $1000 printer acts up
 
@AJHenderson I would be a little upset by that
 
@Ampt luckily it started working, the problem was it was in a bad state after having the power cut off unexpectedly from a power outage
and I've already gotten my money's worth from it or pretty close to it atleast
<3 gallery quality 13 by 19inch prints for $6
 
user20683
@Ampt It is just me or do Python's lambdas seem kind of half-assed?
 
@WorldEngineer if you want to want to stab yourself in the face, Scheme is always a better first step
 
user20683
@AJHenderson Nah, APL is way more face stabby
 
9:06 PM
fair enough
I'll make sure to add that my list of things not to touch
 
user20683
@AJHenderson It's very, very powerful but it's literally Greek to most people
 
user20683
 
@WorldEngineer I've only dabbled in them. never used them for anything in an actual project, so I don't think I've played with them to judge
 
@GlenH7 just tossed that together real quick offhand. Notice how the GetPerson method allows the type system to resolve it so given a PeoplesPhones or PeoplesAges both get mapped to the right MappingFunc for them
 
user41796
@JimmyHoffa thanks! Too many new aspects of this for me. Starting to pull my hair out.
 
9:14 PM
@GlenH7 yeah, encoding logic in the type system seems strange the first time or two you do it, but after it clicks it'll stick. Remember this: A static class which is generic, has a static instance per type of T it's instantiated with
the static constructor on my PersonGetter creates the static mapping instances that exist for the lifetime of the application - and as with all things that exist for your process lifetime it should be instantiated as near to the process start as possible
which is why I use the static constructor for it
 
user41796
I think I'm getting it now.
 
user41796
Through some voodoo magic I don't get, GetPerson<T> is available for any / all classes where a function is defined within PersonGetter(), right?
 
@GlenH7 well, in my implementation I didn't constrain the T so it's for all types -> though I only set it up for a small set. In your code you can add the generic constraint of where T : IEnumerable<U>, where U : SomeEfBaseClassYourTablesProbablyInheritFrom
 
psr
@JimmyHoffa That trick is nicer than what I would have done. I knew the static instance per type thing, but I haven't used it to encode logic in the type system that way.
 
if I called GetPerson<T> for a type of T I didn't instantiate I'd just get a static reference to a null pointer
 
user41796
9:24 PM
@JimmyHoffa I'm willing to deal with that risk at the moment.
 
user41796
Unfortunately, I have to come back to this tomorrow as I have other commitments. But for whatever reason, my equivalent line of "public static Person GetPerson<T>(this T target)" says it can't resolve T.
 
@GlenH7 aye, is harmless. You can always make it a lazy property too that checks for a private property value and if it's missing does some defined behaviour that you might want - logging to know some code is referencing it wrong, or throwing a better error than a null reference etc
@GlenH7 that paste is a straight copy of a console application. Nice trick I like for when I'm piecing together something new in a system that already exists - create a console app and reference the assemblies of the system I want to work with, then in the console app I can go nuts creating all the scratch space classes I want to and just run the app over and over until I get the whole mechanism right, then transplant it back into the main code base it's meant for
 
user41796
Found it, was missing my <T> on GetPerson<T>
 
When you're getting weird behaviour like you just described, a technique like that gives you an easy way to get moving through those initial barriers in new techniques
 
user41796
Quite true!
 
user41796
9:32 PM
And Sweet! I managed to wrap it into a .Select correctly.
.Select( rec => rec.MyMapperFunc())
 
@GlenH7 what's the sig of the Func<> you passed to .Select() ? What's the sig of MyMapperFunc() ? (note they're the same -> .Select(rec.MyMapperFunc) should work)
that's like someBool = myPredicate ? true : false
just an unnecessary extra wrapping
 
user20683
 
user20683
Conway's Game of Life in Conway's Game of Life
 
user20683
warning: annoying sounds
 
9:48 PM
dates/times in python are obnoxious to deal with
 
@whatsisname you need to stop being ratchetfreak
@ratchetfreak you need to stop being whatsisname
 
is ratchetfreak a grouch
 
user20683
@whatsisname No more than average for this site
 
@whatsisname no, I asked his opinion of something in JS earlier because I think I was confusing him with you
 
lol
 
9:50 PM
that's not to say I'm accurate in recalling you know anything about JavaScript, you might just be an assembly programmer - the things rattling around in my head aren't always cohesive...
 
I don't really do anything in JS or assembly
 
@whatsisname see what I mean.
 
I avoid assembly as much as I can
 
user20683
@whatsisname Assembly's kind of fun in a "party like it's 1985" sort of way
 
@WorldEngineer I had an old boss who had his CE degree - even after 7 years in C# (good high level coder too) and a couple years earlier in Delphi he said he still would prefer to be coding in Assembly
some people just have the mind for those rigid systems
 
user20683
9:55 PM
@JimmyHoffa It's a lot like being a watchmaker or a mechanic. You know what all the tolerances are and how to use them.
 
user20683
Programming in Java or C# is a little like being a Professor with an army of grad students at your command.
 
it's nice being able to have a consistent mental model of nearly everything involved that you are working on
your average Java stooge right out of college often doesn't even really understand how much of anything actually works
 
user20683
@whatsisname yeah
 
user20683
I credit this place with curing me of any notion to do that
 
to be the Java stooge?
 
10:00 PM
@whatsisname which is why lambda calculus is awesome.
nothing wrong with a Java stooge, just look at @MichaelT. Ok, good point...
 
user20683
@JimmyHoffa @MichaelT is more like a Java Groucho Marx
 
@WorldEngineer I blame perl
 
user55340
The problem with Java school fresh grads is that they don't understand whats really going on...
 
user55340
HashMap works for everything - so thats what they use. Need it sorted? Well, get the key set and sort it...
 
user55340
There are really big hammers in the Java library that people can use to smash at problems without understanding that a different tool may be better... but that big hammer works 80% of the time.
 
user20683
10:05 PM
I was pondering the idea that Regex might be basically equivalent to building a prefix forest for a given text and then navigating through it and wondering if that might speed things up for massive texts given that ropes are good for huge strings.
 
user20683
need to do more research before I actually ask the question
 
user55340
You need to give @amon a poke there...
 
wut
 
user55340
You might also like to look at perl's study function.
 
user20683
@MichaelT Why's that? I tend to forget everyone's exact specialty most of the time
 
user55340
10:07 PM
@WorldEngineer he's got a very strong academic background and we've had discussions about levenstine automata in the past...
 
user20683
@MichaelT Ah
 
user55340
Glance at...
 
user55340
18
A: Searching integer sequences

amonHmm, I can think of two possible algorithms: A linear scan through the A sequence, or building a dictionary with constant-time lookup of the indices. If you are testing many potential subsequences B against a single larger sequence A, I'd suggest you use the variant with the dictionary. Linear ...

 
@MichaelT Perl's study function has been a no-op for quite some years now. It turns out that it's unreasonably to perform on Unicode strings, but previously indexed the first occurrence of each ASCII character in a string in a table for fast lookups of constant strings.
 
@amon are you the local transient who knows JavaScript? I've made 2 mis-guesses today already
 
user55340
10:09 PM
@amon yep... but its the theory... and back in days of old, it was clearly helpful in certain circumstances.
 
user55340
I recall a perl script that I had that greped a very large file for specific patterns that ran faster than egrep... back on a... oh ghads... Digital dec station... I'm old.
 
@amon is it terrible of me to never use 'this' in JavaScript? I exclusively use things defined either within a clear ancestor closure or things passed in through parameters (at times I use an ancestor closure to take the parameter to bind it into the executing scope) - just because I find it always too ambiguous, even with the var that = this or self shortcuts
 
user55340
perl + study was faster than egrep was faster than perl without study... but again, that was LONG ago.
 
user20683
@MichaelT back when debugging involved actual lightsabers
 
user55340
 
user55340
10:13 PM
To which one should reply with...
 
user55340
 
@JimmyHoffa this in JS is weird, but you do need it when doing OOP (open recursion, access to instance variables). Unfortunately, I'm not the resident JS wizard you are looking for.
 
user20683
O'Reilly has a book exclusively on this and prototypes
 
user20683
that should indicate how weird it is
 
@amon eh... I'm not convinced you need it, but then I wholey avoid "OOP" in JavaScript..
am I really the only JavaScript person who frequents here? @MichaelT you remember stuff, do any of the other regulars here particularly know it well?
 
user55340
10:17 PM
@JimmyHoffa I can figure out things about it... its not a first choice... and I tend to write other languages in javascript rather than javascript in javascript.
 
user20683
@JimmyHoffa fairly decently
 
user20683
enough to read node js books and not miss much
 
@WorldEngineer do you know the JS persons prerogative on this? Shit screw it, I bet there's a JS room on SO. @RobertHarvey is SO's JS room like their C++ room? I assume not...
 
user20683
@JimmyHoffa No but I believe you said it was full of people who use JS as an OO language
 
10:38 PM
@WorldEngineer Btw, that's an interesting thought. There is a theoretical similarity between Tries/Prefix Trees and Regular Expressions in that Regexes are DFAs, and Tries are DFAs without loops (i.e. match the subset of finite-length regular languages). It might be possible to exploit this relation somehow, but there is no equivalence as far as I can see. For a definitive answer, please ask a proper question, I'm not quite sure what you're getting at :)
 
user55340
(... as I said, @amon is the one to ping when you enter that realm of computation)
 
@WorldEngineer that's the industry norm it seems, which makes me think by not doing so I might be missing something the rest of the industry experts know...
 
user20683
@JimmyHoffa both Crockford and Eich write functional JS
 
user20683
so no idea
 
user20683
@amon maybe there's a good CS grad degree in there somewhere
 
user20683
10:42 PM
need to bulk out my math I think
 
how can I automate this process: The process of grabbing all the soruces ( news websites ) a news website sourced ie infowars.com
 
user55340
Too broad... you fetch the page, parse it, do stuff to what you got, and put that in an automated process.
 
Could perhaps if I contacted the staff, they might be able to get me a list of all their sources or the process which they scan and choose news sites?
Before digging in and inventing the wheel
 
some news sites have an API
 
infowars is big but not cnn big
Don't know if they are at that level
to have an API
 
10:55 PM
you don't need to be big to have an API
 
Yeah if they buy iut
*it
 
it could be introduced by a dogfooding dev
 
dogfooding
 
user55340
Eating your own dog food, also called dogfooding, is a slang term used to reference a scenario in which a company uses its own product to validate the quality and capabilities of the product. == Introduction == Dogfooding can be a way for a company to demonstrate confidence in its own products. The idea is that if the company expects customers to buy its products, it should also be willing to use those products. Hence dogfooding can act as a kind of testimonial advertising. InfoWorld commented that this needs to be transparent and honest: "watered-down examples, such as auto dealers' policy of...
 
using your own APIs
 
10:57 PM
Awww
would their be parsing code and application that could do a lot of this for me
 
user55340
@ChrisOkyen There are libraries that will parse the html, but it will just give you back a tree structure of the document rater than text. You will need to handle what you get back from that.
 
Is there software out there that can do the task I want?
 
user55340
Probably not.
 
some companies may have their own internal programs for that but they'll never release them
and new sites tend to renew their layout about once a year requiring a rewrite of the parser
 
user20683
Data and the techniques for its processing and selection are among the most valuable things on the planet right now
2
 
user20683
11:04 PM
any halfway smart company will keep that under lock and key
 
How much are people charging on them pay a code monkey websites for a task I am asking ( find what news sources a website uses ) ?
 
one thing I should note is that the known newsites likely use a central news agency that collects the news and the sites make a selection out of the stories available
 
investigative reporting by a newspaper has become a thing of the past
 
user20683
@ratchetfreak There's one such company in atlanta
 
user55340
11:12 PM
Depends on who you hire and what you actually want them to do... if its possible at all.
 
@JimmyHoffa Every room has a different culture, IME. The PHP room spends most of their time closing questions.
 
user55340
Read the robots.txt of the site to make sure that you aren't going to be stepping on toes trying to do it - cnn.com/robots.txt and infowar.com/robots.txt
 
user55340
btw, @RobertHarvey an I in line with reasonable thought here:
 
user55340
0
A: Should I vote to delete low-quality answers that I don't like?

MichaelTThe "its an answer" is irrelevant - the queue isn't the "not an answer review queue" - it is the low quality review queue (this is different than the criteria for the very low quality flag which has a much higher standard - that the VLQ flag feeds this queue doesn't mean that only VLQ is in the q...

 
user20683
infowar looks like it's actually a wordpress instance
 
user55340
11:16 PM
@WorldEngineer yep. Should be easier to parse then given its a known templating system... still work to do.
 
@MichaelT Yeah, that's a fair assessment.
 
11:54 PM
@WorldEngineer www.infowars.com right?
 
01:00 - 21:0021:00 - 00:00

« first day (1454 days earlier)      last day (3541 days later) »