« first day (2193 days earlier)      last day (2746 days later) » 

12:27 AM
Awesome, it's one of the few routers with in-built repeater functionality so the most difficult part of configuring it was finding a 12v wall-wart that could handle 1 amp. I found an old one rated for 1.6 amps that was easily 3 or 4 pounds of weight
 
Whoa. These boys use a lot of power.
 
Their job is to scream at computers all day, but both the wall-wart and router seem to be quite over-spec'd. Looks like the average is 12v @ 0.5A
 
1:01 AM
That's still quite a lot. I like "screaming at computers" :)
 
screaming at computers are for newbies, real computer literates usually just hit keyboards really hard :|
 
1:20 AM
@Telkitty I prefer sudo rm -rf /usr then give it away to goodwill. That should show them.
 
146
Q: How to handle a senior developer diva who seems unaware that his skills are obsolete?

MainMaA colleague is working in a small software development company (twenty employees). He's a part of a team of five developers who work on the leading product of the company. For a few years, the founder was unhappy about the technical skills of the employees, and he recently hired a senior develop...

The problem here is certainly not the (obsolete) skills. The problem is with the attitude
 
This question seems really contrived. It seems like you carefully combined every popular stereotype of an experienced hacker unwilling to change his ways into the perfect software super-villain. I don't believe the employee in question exists. — Tom Dworzanski yesterday
 
@CaptainGiraffe only possible if 1)you own the server, 2) you are 1337 hacker or 3) you are sys admin
senior developer diva with obsolete skills?
doesn't seem diva like
 
1:53 AM
> Ontario Superior Court Justice Robert Smith told the accused: “I’m not agreeing to allow you to whip it out.”
 
Hello, please help :)
I have 1 application, and use COM in process. I have server.dll and a.dll and b.dll. Is there a way that both a.dll and b.dll can get same instance of one object from server.dll?
This is scenario: a.dll sets value to int field in server.dll, and b.dll needs to read that value from server.dll
a.dll talks to server.dll over COM, and also b.dll talks to server.dll over COM
 
2:29 AM
I succeded :) If anyone is interested: when COM loads a dll, it remains in memory until there are references which are used. So, it is only important to make sure that you have at least 1 reference to a com object during operation. Then you can share data inside server.dll using global variables (should be possible with static fields also, but i haven't tried it), so IClassFactory can return Singleton object in CreateInstance.
Cheers
 
isn't nature awesome?
 
it's indeed ...
when fungi becomes you ...
 
 
1 hour later…
3:57 AM
 
that’s something
 
lol
 
@jaggedSpire have you hiked any mountain over 3500 meters above sea level in Colorado?
 
@Telkitty maybe? Didn't do much mountaineering, but I distinctly remember the foot of the trail being at 3050m and it leading up to a mountain top.
and taking a few hours to get to the top
Don't think it was a 14er though
but that leaves lots of peaks above 11k feet
hm
I did the bottom quarter of the trail up Pike's Peak when I was a kid, but I don't think that's what you're looking for :P
 
4:33 AM
@jaggedSpire if it is, you might suffer slight altitude sickness
 
@Telkitty eh, never really did.
living at 7,000 feet and drinking lots of water generally meant I didn't suffer from it terribly much
I do remember going on trails at 9,000 feet on a number of occasions, and I generally scampered about on those
 
I find it exhausting to walk quickly at 3500 meters above sea level
took break every 20 minutes or so
 
yeah, you want to take it easy up there, especially if you're coming from lower altitudes
 
I guess if you lived at 7000 feet, you are probably less susceptible to altitude sickness
 
@PatrickM'Bongo well now I kinda regret not pursuing this legendary staff
 
4:49 AM
@Telkitty it's quite a nice advantage. I wouldn't have it now since I've lived the last two years at about 500 feet, but it was really quite nice while it lasted
 
 
1 hour later…
5:55 AM
Life is hard. And by life I mean waking up and getting my ass to work.
 
Sam
Hello folks...!!
@wilx ha ha!
 
6:14 AM
What if our memory of work was whipped like a dream every time we went home for the day?
 
6:27 AM
*wiped
 
I was crossing a tiny bridge in a small park, then I saw a rooster in the middle of the bridge.
As I proceeded, the rooster retreated. After I crossed the bridge and was 10 meters away, I looked back. The rooster walked across the bridge.
I also saw a dog walking across pedestrian crossing alone a few week ago
 
Ven
6:45 AM
Hi
 
@Mikhail lol
 
7:31 AM
@Borgleader There's actually a less used unit between yards and miles, chains. IIRC it's three yards to a chain :P
oh no, it's 22 yards :P
 
user1804599
7:45 AM
Hello.
 
7:59 AM
goot in targ
My fruit is disappointing :(
 
8:17 AM
Morning folks
 
user1804599
@sehe the nasal demons run faster
 
Ven
8:40 AM
 
user1804599
@Moesquito16 Oh no, what problem are you having? We can help here. ^FEM
 
user1804599
SQLite doesn't support more than 999 parameters in a query. :/
 
user1804599
That'll be escapefest
 
So I brought into the Asgardia project idea. I doubt it will turn into a real nation. But I think it has nice ideals, and it hopefully will help lobby for improvements in a very hippy like (but actually effective) way. maybe...
 
Ven
@rightfold just why
 
user1804599
8:54 AM
vOv
 
user1804599
I need about 20000 of them.
 
9:05 AM
@rightfold lol, WTF are you doing? :)
 
Ven
@rightfold I asked why
 
user1804599
I thought you asked why this limit was there.
 
user1804599
@wilx Well, Web SQL transactions are fucking broken, and autocommit is fucking slow, so I'm doing all my inserts in a single query.
 
user1804599
That way it's fucking slow only once, instead of for each row.
 
@rightfold Well, you could batch things up in smaller packages.
What's "Web SQL transactions"?
 
user1804599
9:09 AM
function escape(str: string) {
    // sqlite.org/lang_expr.html
    return str.replace(/'/g, '\'\'');
}
 
user1804599
:F
 
user1804599
@wilx The Web SQL transaction API.
 
user1804599
The API is synchronous, but queries are asynchronous, so it's completely useless.
 
user1804599
This is probably due to a combination of incredible incompetence and the abandonment of the Web SQL spec.
 
user1804599
Unfortunately, because of more infinite incompetence, the Web SQL API is the API implemented by Cordova-sqlite-storage.
 
user1804599
9:11 AM
Instead of a decent API.
 
@rightfold Can't you just funnel the data to the server side and deal with the transaction there using "normal" ODBC or some such?
 
user1804599
The DB is local.
 
user1804599
The customer is paranoid about losing {3,4}G connection, so half a GB of data has to be downloaded and indexed on the device itself.
 
user1804599
(Periodically.)
 
0
Q: INCLUDING GMPLIB IN MY C++ LIBRARY ARCHIVE

Fred WealthmanI am creating a static c++ library which makes use of mpz_class from gmplib. I am at the stage of archiving the object files but I don't want to include everything in the gmplib in my library archive because I want the size of my library to be as small as possible so can some one help with the fi...

all caps badness @Mysticial @Borgleader
 
user1804599
 
user1804599
2016, when you livestream war.
 
user1804599
lol that chat
 
I'm sorry. I didn't know that — Fred Wealthman 3 mins ago
was this guy born yesterday or what
 
9:49 AM
@Ven see? also, make foo static
@rightfold That's chump change. Also, incrementals?
@thecoshman That's what she said?
 
@sehe perhaps she did
 
user1804599
@sehe The problem is implementing this on a broken platform (HTML5) on a broken platform (Cordova) on a broken platform (Android).
 
user1804599
On a pretty nice platform (GNU/Linux). :D
 
@rightfold oh very nice
 
IRAQ: UN says Mosul operation in a "worst case" could be the largest humanitarian situation in the world. https://t.co/QfOH97MYsL
 
user1804599
10:02 AM
Also, AJAX sometimes doesn't work on Cordova, so if I don't get a response within 30s, I automatically retry.
 
> 1.2-1.5 millions of people could be affected
war on terror, lol
 
user1804599
It says "in the world", not "ever".
 
user1804599
Very misleading. It should explicitly say "at the moment".
 
10:14 AM
ergh... variable injected with the name 'logic'
2
and no, it's not used sensibly
 
@thecoshman :D
 
10:39 AM
@sehe I don't remember having ever had such a conversation.
 
I'm sorry I must have had it confused in my mind
 
No problem :)
 
@wilx :D
So I just took on a task at work that I have almost no idea about :S
 
It seems that there's a standard proposal to introduce char8_t.
 
Stupid UI
this is not the place you are looking for
 
10:55 AM
 
sbi
11:15 AM
Hi.
Apparently GCC allows you to provide superfluous function parameters in function types. Is that covered by the standard?
@thecoshman So it's used illogically?
 
@sbi You mean the names?
yeah I think that's legal
 
Clang is also ok with it.
 
sbi
@AndyProwl void(int foo, int bar, char* baz, char* grql)
 
Yes
The names, not the parameters
 
sbi
Ah, indeed, I meant to say "parameter names". Sorry.
 
11:19 AM
No prob, I guessed so. Yes it should be compliant
 
sbi
@Morwenn GCC being OK with it is a pretty good indicator for me that it's standard. I just want to know for sure before I do this.
Well, if you guys agree with GCC and clang, then that's certainly good enough for me.
Thanks!
 
I can't find which part of the standard specifies it but I remember being surprised by this too and figuring out it's allowed
nothing like when Luc told me virtual does not have to be the first token in a virtual function declaration
but it still surprised me
 
sbi
@AndyProwl It makes sense. Here I am asked to document the parameters for a std::function definition.
@AndyProwl Wow. That is weird. The thought that, after 25 years of C++, you can still learn something that fundamental (even though it's also a totally irrelevant grammar detail), almost makes me despair.
 
@sbi Yeah. For me it went together with int typedef Y;
 
11:26 AM
C++ is odd terrible
 
sbi
STOP IT!
Leave me some professional pride, will you?!
:-(
 
Ell
@AndyProwl woah
 
@sbi Wait, a professional Lounger? Does such a thing exist?
8
 
Ven
Those two words seem at odd with each other.
 
@AndyProwl as opposite to feral loungers of course
 
sbi
11:31 AM
@Ven You mean the first two words here?
 
there are a couple of feral loungers around and about
 
Ven
@Telkitty Cat is not feral. Or barely feral.
 
Fecal loungers are also suspected to exist
 
sbi
The opposite to a professional lounger would be an amateur lounger, wouldn't it? But if you have survived a few weeks in the lounge, there's just no way you could be an amateur at lounging.
 
Job vacancy: 'feral programmers needed'
 
11:38 AM
@LucDanton subtle
@Morwenn Got any example of this?
nvm, scrolled down :D
 
One of the most amazing videos on the internet
 
12:05 PM
@sbi it's not a generic functor style object, a specific function is called. Ergh...
@sbi no
 
Ven
12:19 PM
Deleting code over composition over inheritance.
 
wait java has no operator overloading?
like no op[] for ArrayList?
 
Ven
of course it doesn't
 
4 mins ago, by nwp
this is depressing
 
Ven
Guy Steele didn't manage to get that :-).
 
@BartekBanachewicz lol
 
12:38 PM
Jul 18 '14 at 9:01, by Bartek Banachewicz
> I think Java has a really sensible approach to that problem. Not just forbidding operator overloading, but forbidding free-standing functions also helps readability
my brain shuts it off
prog.java:57: error: unexpected type
            PriorityQueue<int> q = new PriorityQueue<int>();
                          ^
  required: reference
  found:    int
what is it trying to tell me?
 
oh lol
 
Xeo
Integer?
 
primitive types cannot be template params
 
nwp
@BartekBanachewicz you need something derived from Object
 
what
@ratchetfreak what
 
12:40 PM
@BartekBanachewicz that Java is broken
 
nwp
and int is builtin, thats why it doesn't work
 
Ven
:-)
 
type erasure, java's generics all revert to Objects and casts at call site
 
@BartekBanachewicz It doesn't acceptt primitive type int it accepts only object type e.g Integer
 
nwp
12:42 PM
just use PriorityQueue<Integer> and pretend this never happened
 
@nwp though that opens up issues with auto-boxing
aka == will not always work
 
user1804599
Every queue is a priority queue.
 
user1804599
With normal queues, the priority key is just the time of insertion. :F
 
nwp
You may even get a memory allocation for each Integer.
 
though if the values are between -127 and 127 it's cached
once outside that range each Integer.valueOf called behind the scenes will allocate a Integer object
 
Ven
12:45 PM
good thing you don't care anyway if you're using Java :P
 
@ratchetfreak right
that makes sense
NOT
 
nwp
Value-dependent storage, nice. Small string optimization kinda does the same thing.
Small Integer optimization :D
 
@BartekBanachewicz the java compiler will automatically box up the ints into Integers by using Integer.valueOf(int) where needed
that function uses a cache for the small ints (from range -127 to 127)
 
Ven
(which you can modify, using reflection, if you "see fit")
 
@nwp lol dat guy on global warming
 
Ven
12:50 PM
@AndyProwl you're gonna die someday anyway lol
{
  return _emptyString;
}
WAT
 
prog.java:90: error: non-static variable this cannot be referenced from a static context
        Graph g = new Graph();
                  ^
what now
 
what is Graph
 
nwp
maybe better "Where is g"
 
non-static inner class?
 
@milleniumbug wtf is a "static class"
 
Ven
12:57 PM
@BartekBanachewicz of course it can't.
 
Xeo
hahaha
 
Ven
you're in a static method, you don't have this
 
@Ven I am trying to create an instance, not use this
 
Xeo
Braket learning all the fun Java-isms
 
Ven
12:58 PM
@BartekBanachewicz is Graph a class inside the one you're currently in?
 
an inner class by default has a reference to the enclosing object
you need to add static to the inner class declaration to avoid that
 
@Ven yes?
@ratchetfreak what
 
Xeo
1 min ago, by Xeo
Braket learning all the fun Java-isms
 
Ven
@BartekBanachewicz so it has a reference on its enclosing class' this
unless you use a static-class
blabla path-dependent types
 
@Ven why the fuck would it have it
where does it have that reference
 
Xeo
12:59 PM
> Java
 
@BartekBanachewicz so it can access the enclosing object for various reason, common use is event callbacks
 
@BartekBanachewicz poor man's closures
 
Ven
@BartekBanachewicz so that class Parent { class Child {}; }; new (new Parent()).Child(); doesn't have the same type of another one
 
you can do all kind of fun stuff with inner classes
 
@ratchetfreak but that should be bound to the instance, not the type :/
 
1:00 PM
well it does bind to the instance
 
why the hell would you force me to bind the instance to a class
@Ven ugu
 
that's why you can't instantiate it with binding to this inside a static method
 
Ven
@BartekBanachewicz that's actually useful at times :-)
 
@BartekBanachewicz use JNI if you are C++ guy :D
 
> C++ guy
 
1:01 PM
Bartek is definitely a C++ guy
 
@BartekBanachewicz "non-static variable this cannot be referenced from a static context" means that it tried to insert this into the new expression but then failed because this is only available in non-static methods
 
@ratchetfreak I figured that new for a non-static class wants to pass the outer this behind the scenes.
it's the "behind the scenes" part that gets me
 
only if you are in a non-static method
aka if there is a this to pass along
 
well, duh.
 
the error message could be way better for that one
 
1:03 PM
yeah it assumes you know what you just told me, really
 
Whenever you see a video of birds doing something weird, remember: Birds are a small subset of dinosaurs, so the weirdness of birds is a small subset of the weirdness of dinosaurs.
5
 
@Feeds heh
 
@Feeds oh dear I just had an image of a T-rex with a big bright inflatable bladder to impress the ladies...
 
ergh... I'm having to learn about the shitty struts framework ¬_¬
 
@Feeds oh man
 
nwp
1:28 PM
gah, learning JavaScript and do a 4 months project thing in 3 days is (surprise!) not working out so well
 
Ven
well, as for us, we'd know about spider webs from all the stuff we wrote down
 
maybe when aliens see the word 'internet', they think that it got all started by an internal spider
rofl, not much use being a hacker without internet, is there?
 
sbi
@thecoshman Fuck you!
 
1:49 PM
@Ven bollocks, no one reads that shit
@sbi your mumma too, and your daddy!
 
oh well
so my java program exceeded the time limit
who would've thought
 
Ven
me
 
nwp
> patience exceeded
 
so how do I compare integers in java again
I need a stateful comparator
 
Ven
@BartekBanachewicz ==
 
1:54 PM
myInteger.equals(otherInteger)
@Ven lol, nope. That'll only compare references, not values
 
Ven
@thecoshman oh he has Integers
 
@BartekBanachewicz what do you mean exactly?
 
oh right I can't even do that for int in the first place
I've no fucking idea what I have
this language is a pile of crap
 
Ven
@BartekBanachewicz you can use == for ints.
 
@Ven even for int it's only safe for small values :P
 
1:55 PM
stop writing it
???
profit
 
@BartekBanachewicz what exactly do you need?
 
Ell
@BartekBanachewicz it's not as bad as JS
 
@thecoshman I'm writing Dijkstra
@Ell it's massively worse than JS
@Griwes uni shit
JS is simply much less of a language, so the potential for crap is also lessened there
Java is massive and it's a massive pile of crap
 
@BartekBanachewicz so why do you need stateful comparator?
 
@thecoshman for priority queue?
 
2:00 PM
fuck, cs is really annoying for someone who has troubles spelling in the first place
 
@BartekBanachewicz for the boxed integers objects it's Integer.compareTo(Integer)
 
I'm keeping a queue of city numbers and I need to compare on the length to them.
 
@BartekBanachewicz so you can't use JNI to get this shit done?
 
@BartekBanachewicz a comparator just compares two objects, if you want to track some state about that comporision, use something else to do that
 
comparator objects are meant to be stateless
 
2:02 PM
@thecoshman uh no you don't get it
 
@BartekBanachewicz so you want a comparator that compares length of strings? or size of queues?
 
        static class LenComparator implements Comparator<Integer> {
            Integer[] d;
            LenComparator(Integer[] d) {
                this.d = d;
            }

            @Override
            public int compare(Integer a, Integer b) {
                return d[a] - d[b];
            }
        }
@thecoshman what? no. Do you even know what a Dijkstra's algorithm is?
 
Ven
:')
 
@BartekBanachewicz not a Comparator<Integer>
 
yes it's clearly a potato
uh it's still too slow
this is so fucking dumb
 
2:03 PM
one thing to note though is that there isn't a way to signal to a Priority queue that a certain object changed priority
 
you should retrieve the elements from the array then compare, you can't do that in the comparator
 
@thecoshman why?
@ratchetfreak ugh right
 
@BartekBanachewicz because that interface is stateless
well, meant to be
 
and?
who cares?
 
Ven
approximately no one
 
2:05 PM
@thecoshman Immutable state is fine
 
welp I'm going to need a class for that then
 
@milleniumbug well yeah, it'd have to be static
@BartekBanachewicz sure, but it's not going to be a Comparator
 
well no why
 
not in the sense of the standard interface
 
@thecoshman no?
2 mins ago, by Bartek Banachewicz
who cares?
I think you're making an assumption that I care about the quality of this code
 
2:10 PM
        static class ComparatorWithDirection implements Comparator<Integer> {
            private int direction;
            public ComparatorWithDirection(int direction) {
                this.direction = direction;
            }

            @Override
            public int compare(Integer a, Integer b) {
                return (a - b) * direction;
            }
        }
@thecoshman look ma, STATE
and yet it's all fine
 
So I have been accused of mansplaining to an apparent feminist. lol
I am proud of myself. :D
 
since that state never changes
might as well precompute stuff
 
@milleniumbug that's basically exactly what bartek is doing
 
dunno if he changes state or not
 
oh wait... is Bartek trying to sort a list by using that same list as part of working out the ordering?
bah
he'll not listen to help with out being a douche about it
 
2:15 PM
13 mins ago, by Bartek Banachewicz
@thecoshman what? no. Do you even know what a Dijkstra's algorithm is?
 
I've got my own real world shitty code to deal with :'(
 
I just need a "dynamic" priority queue
 
> without being a douche
On the brighter side of life, I discovered these delightful chaps
 
@BartekBanachewicz maybe cheaper to use a sorted array and do a sort that is cheaper for almost sorted data?
 
user406009
@BartekBanachewicz For interest's sake, what's the issue with using the builtin Java one (docs.oracle.com/javase/8/docs/api/java/util/PriorityQueue.html or whatnot)?
 
2:22 PM
@Lalaland when you update the priority it won't (necessarily) update the internal order
 
user406009
Yeah, you are supposed to remove and then reinsert the item.
 
and there is no way to say that it should do so
 
user406009
Almost no data structure allows mutable keys. Madness lies there.
 
but for dijkstra (and related searches) it's necessary
 
user406009
For dijkstra you simply insert the element again at the lower cost.
 
user406009
2:25 PM
As you are always inserting a lower cost item, you will run into no problems.
 
user406009
(You don't need to remove the high cost one)
 
@BartekBanachewicz do you have to implement dijkstra exactly, or just you've chosen to solve a problem with that algo?
 
except memory costs
 
@Lalaland not much of a key if it's mutable, isn't it?
 
@ratchetfreak not a problem until they are :P
 
2:27 PM
and it requires a good cycle detection to avoid going into those cycles
 
@BartekBanachewicz That you suck? GenericsByErase imply that the type MUST derive from Object
 
bear knows so much java, maybe bear becomes a java developer >_<
 
You're late
 
2:45 PM
If you listen really, really closely? That sound? Just on the edge of your hearing? That's the sound of history rep… https://twitter.com/i/web/status/787922122026979328
 
@EtiennedeMartel Omg, lol, maybe
 
Jan 24 '13 at 0:43, by sehe
@DavidFrank in case someone didn't break it down for you: the VM doesn't have a notion of List<Integer>. It can only deal with List<Object>. Which is why 1.5 code could (largely?) be run on 1.4 VMs, code is always shared, no type safety exists at the VM level and containers of value types will never exist. Java has no generics. It has type hints for the compiler/lexical analyzer
serendipitously ^
in Java::chat ><> & Chips, Feb 8 '13 at 23:09, by sehe
Neutral to defensive of Java:

http://chat.stackoverflow.com/transcript/10?m=3768210#3768210
http://chat.stackoverflow.com/transcript/10?m=6707614#6707614
http://chat.stackoverflow.com/transcript/message/3560575#3560575
http://chat.stackoverflow.com/transcript/10?m=3059494#3059494
http://chat.stackoverflow.com/transcript/message/2755718#2755718
http://chat.stackoverflow.com/transcript/10?m=3620854#3620854
http://chat.stackoverflow.com/transcript/10?m=7259622#7259622
http://chat.stackoverflow.com/transcript/10?m=2301336#2301336
 
@sehe What do generics have to do with lexical analysis?
Will value types make it into Java 10?
 
Generic implies objects
 
@Telkitty Project Valhalla will make List<int> possible.
 
2:52 PM
@fredoverflow I guess my younger self wanted to say semantic analysis. In some languages they'd overlap/interfere (not Java, I guess)
 
@fredoverflow C# already does ;)
 
huh
ArrayList<int> under the hood just allocates int[]
 
You can't do ArrayList<int> in Java, IIRC. It gets turned into ArrayList<Integer>.
 
@sehe The type system is a huge part of semantic analysis, so yeah, Java generics definitely play a role there.
 
But if you're right, and you probably are, it means they do compiler-level special case hacks to compensate for the bullshit in their type system.
 
2:56 PM
@sehe You mean in Java 10? Yeah, that's gonna be pretty awesome.
 
meh, a bit dumb that compareTo doesn't do native comparison on primitive types such as int
 
@EtiennedeMartel No, ArrayList<int> simply doesn't compile today.
 
@fredoverflow Yeah.
 
@Telkitty Integer.compare(a, b)
 
Integer != int
 
2:58 PM
Integer.compare takes 2 ints.
 
Integer is an object, int is a primitive type
 
public static int compare(int x, int y) {
    return (x < y) ? -1 : ((x == y) ? 0 : 1);
}
^ implementation on my platform
 

« first day (2193 days earlier)      last day (2746 days later) »