« first day (55 days earlier)      last day (838 days later) » 

1:20 AM
0
Q: Xcode/Obj-C: Static variable in static library

poundev23We are linking a static library (cocos2d) in a Mac desktop Cocoa app. Everything is good but we are noticing that we are getting 2 instances of a static variable ... a singleton down in the static library. We see its nil .. then we see it initialized and used for a few calls. The singleton see...

 
 
1 hour later…
2:39 AM
0
Q: Singleton NSMutableArray does not hold values

Glen BrauerI know there are many questions out there like this one and I have thoroughly searched through them, however, none of them seem to help with my situation. I am writing an application in which I need to pass data to a custom tableviewcell. I created an NSObject class for the data (TrailData, and...

 
 
6 hours later…
8:55 AM
1
Q: "Your Second iOS App": How do I implement a Singleton?

RNelkeI am still trying to improve "My Second iOS App", which is a tutorial provided by Apple. Here is a picture of the storyboard with added commentary of what should happen. When the done button (step 3) is clicked, the actual screen should return to the main menu (3.a) while the finished BirdSigh...

 
 
6 hours later…
2:50 PM
0
Q: View not drawing when using singleton pattern

FelipeDev.-Am drawing a UIView in a navigationController and I need to see that view even if the user push the back button, so I make the method that create the View in the AppDelegate to share it between the app. When I use (AppDelegate *)[[UIApplication sharedApplication] delegate]; and then use the meth...

 
 
2 hours later…
4:55 PM
0
Q: Dependency injection and/or factory pattern

JohnNot sure if my title is correct cause I am not even sure I am using the correct terms. I have a class that has a property that is an object. When setting this property the object has to be created. My question is how do I do this without tight coupling? Example: class A { protected $_depen...

 
 
2 hours later…
6:58 PM
@Zoidberg Today I was bored and installed vanilla Ubuntu. Immediately, the first software update failed :)
 
user142019
Ubuntu. :(
 
What would you recommend? It must be extremely noob friendly!
 
user142019
Arch Linux with xmonad.
 
user142019
Oh noob-friendly.
 
user142019
6:59 PM
Uh, OS X. :P
 
No Mac here.
 
user142019
Android!
 
Java
 
user142019
Okay.
 
user142019
Uh.
 
7:00 PM
I guess Ubuntu is not that bad, I just have to get used to it.
 
user142019
Linux From Scratch!
 
user142019
Gentoo!
 
user142019
Go hardcore!
 
user142019
I just found the SQL library I always dreamed of.
 
namely?
 
user142019
7:02 PM
Sequel.
 
user142019
A query is just @db['SELECT Name FROM Wikis'] where @db is the connection.
 
user142019
@db['SELECT Name FROM Wikis'].map{ |x| "<a href='/wiki/#{x[:name]}'>#{x[:name]}</a><br />" }.join
 
user142019
SQL is great.
 
user142019
Transactions are @db.transaction { … }.
 
user142019
I love things that just work.
 
7:04 PM
like Ubuntu? ;)
 
user142019
My experience with Ubuntu consists of pain and sorrow.
 
user142019
Latest versions in package repo were ancient, GNOME is annoying, buggy and glitchy and it came with a clusterfuck of programs I would never ever use.
 
Ubuntu hasn't used Gnome in years, has it?
 
user142019
I don't like Unity.
 
user142019
And I haven't touched Ubuntu in years either (except for the two minutes with Unity after I uninstalled it). :P
 
7:08 PM
@Zoidberg Why not?
 
user142019
It's weird and ugly.
 
user142019
Give me xmonad already.
 
user142019
Or OS X.
 
@Zoidberg In what sense?
 
user142019
 
user142019
7:08 PM
What the fuck.
 
user142019
I couldn't find apps I was looking for.
 
user142019
But yeah I used it for like two minutes.
 
Just put the name in Dash.
 
user142019
These days I only use Z shell to launch applications.
 
user142019
lol
 
7:10 PM
Is that a terminal?
 
user142019
Z shell is a shell.
 
A console?
 
user142019
Usually used i.c.w. a terminal emulator or SSH.
 
user142019
@FredOverflow I think that's the correct term.
 
user142019
It's an alternative to Bash.
 
user142019
7:14 PM
 
Did you draw that? :)
 
user142019
With a trackpad.
 
user142019
Do you ever use databases?
 
What? Why?
 
user142019
I always have difficulty with separating database interaction logic (SQL) with other parts of my application.
 
7:26 PM
@Zoidberg My personal projects haven't been big enough yet to warrant data bases :)
 
user142019
oh :P
 
user142019
Ruby is so great.
 
user142019
get '/index' do
    wikis = @db[%{
        SELECT Name
        FROM Wikis;
    }].map(:name)

    haml :index, :locals => { :wikis => wikis }
end
 
What's the .map(:name) part for?
Also, what does line below that do? :)
 
user142019
.map(:name) is the same as .map { |x| x[:name] }, think of it as map (\x -> Map.lookup "name" x) in Haskell.
 
user142019
7:32 PM
haml renders Haml to HTML. Haml is a templating language. wikis is passed as a variable named wikis. :index denotes the filename index.haml.
 
@Zoidberg But why do you need that map application, anyway? Doesn't the query already return a list of names?
 
user142019
The query returns an enumerable of hash tables, where each hash table is a row.
 
Oh, so you just "flatten" that.
 
user142019
This query will return an enumerable of { :name => (whatever the Name attribute in the row is) }s.
 
user142019
Well I take the :name out of each row, yes.
 
user142019
7:35 PM
In C# it would be something like this:
 
x[:name] is a map lookup? WTF is :name? Why not just name?
 
user142019
from xs in db["SELECT Name From Wikis;"]
select xs["name"]
 
user142019
@FredOverflow :name is a symbol.
 
user142019
Symbols are just cached immutable strings.
 
user142019
name would refer to a variable named "name".
 
7:36 PM
of course lol
 
user142019
Ruby doesn't support bare words.
 
I thought it did according to that video?
 
user142019
If you implement method_missing in a certain way on Object, you can simulate bare words.
 
user142019
Free functions in Ruby are actually just methods on Object.
 
user142019
7:38 PM
When you call a method and it cannot be found, Ruby calls method_missing. The default implementation of method_missing raises an exception but you can override it.
 
user142019
That video is awesome.
 
According to the guy who invented JavaScript, the presenter is not always 100% correct on the technical details.
 
user142019
Yeah, but JavaScript's implicit conversion rules are braindamaged and complicated as fuck.
 
Why are they so complicated?
 
user142019
var obj = {};
var arr = [];
obj["hi"] = 42; // property "hi" on obj is 42
obj[8] = 42; // property "8" on obj is 42
arr["hi"] = 42; // _property_ "hi" on arr is 42
arr[8] = 42; // _element_ 8 (not "8") on arr is 42
 
user142019
7:41 PM
This is wat.
 
The picture with the sowing machine @ 2:53 is so fucking retarded :)
 
user142019
On non-arrays, JavaScript calls key.toString() on keys before assigning. On arrays, it performs parseInt(key.toString()), then checks if that works and assigns an element, but if parseInt fails it assigns a property named key.toString().
 
user142019
@FredOverflow :P
 
user142019
[] + [] is also a result of conversion to string. [] has no + defined, so JavaScript converts both to strings and then does +.
 
user142019
And [].toString() === ''.
 
7:44 PM
I don't think I'll ever like JavaScript.
There this web developer that I know, he's been doing it for years, and he didn't even know JavaScript has a === operator...
 
user142019
LOL
 
user142019
I'd never want to touch JavaScript either.
 
user142019
Give me CoffeeScript at least. :P
 
Does TypeScript have ===?
 
user142019
I don't know what TypeScript is.
 
user142019
7:46 PM
Ruby does have === but it's something completely unrelated.
 
user142019
=== in Ruby can: check if element is in range, check if string matches regex, check if object is of certain class or a shitload of other things.
 
user142019
I think it should've been something like ~=.
 
user142019
Or ≈≈.
 
@Zoidberg A statically typed language from Microsoft that compiles to JavaScript.
 
user142019
Oh another language that compiles to JavaScript.
 
7:52 PM
TypeScript is a free and open source programming language developed by Microsoft. It is a superset of JavaScript, and essentially adds optional static typing and class-based object oriented programming to the language. Anders Hejlsberg, lead architect of C#, has worked on development of TypeScript. TypeScript extends JavaScript syntax, so any existing JavaScript programs work with TypeScript without any changes. TypeScript is designed for development of large applications and when compiled it produces JavaScript to ensure compatibility. TypeScript supports header files which add type in...
 
user142019
There's also CoffeeScript, IcedCoffeeScript, CoffeeScript Monads, Fay, LLVM bitcode and LiveScript.
 
user142019
And probably a shitload of other languages.
 
Should we make a separate room for each of those languages?
 
user142019
No.
 
user142019
The only one of those that's actually being used is CoffeeScript.
 
7:55 PM
Should we make a combined Java/JavaScript room? :)
 
user142019
Which, IMO, is awesome.
 
user142019
room topic changed to Java and JavaScript suck: Suffocating from the stench of a thousand singletons. [abstractpissingstrategy] [java] [singletonfactorymanager] [uml]
 
user142019
JJSS room!
 
I don't know, it doesn't sound as catchy as it did before.
 
user142019
Indeed.
 
7:58 PM
But I really like the room description, it's a nice blend :)
 
user142019
:P
 
user142019
I'm suffocating from the stench of a thousand singletons.
 
Does it link here? :)
 
user142019
No.
 
Good. Or else we would have suffocated from the stench of a thousand noobs.
How many people follow your tweets?
 
user142019
8:03 PM
Twenty-five.
 
A square number. Nice.
It's 9 down to 16 or 11 up to 36. 9/11. Spooky.
By the way, I couldn't find a calculator in Ubuntu, so I installed ghci :)
 
user142019
GHCi is the only reasonable calculator.
 
user142019
And maybe R's REPL if you want statistics.
 
user142019
If I cannot easily map over lists in a calculator, it's junk.
 
user142019
If I cannot easily use big integers in a calculator of any size I want, it's junk.
 
user142019
8:08 PM
If I cannot easily write functions in a calculator, it's junk.
 
I guess a calculator without Monads is also junk? ;)
 
user142019
Yes.
 
user142019
Give me list monad already.
 
user142019
Oh and list comprehensions.
 
Do calculators also need database connections and a query language/library?
 
user142019
8:10 PM
No, of course not.
 
user142019
When I get my Google Glass, I'm going to install GHCi on it.
 
user142019
It's called Google Glass instead of Google Glasses since it has only one piece of glass. :P
 
user142019
I wonder how much the number of traffic collisions will increase after Google releases Glass.
 
user142019
Is gay marriage legal in Germany? I heard there were debates about it in the USA.
 
9:34 PM
@Zoidberg I think it is, but I'm not sure. I'm not into marriage ;)
 
user142019
 
user142019
lol
 
user142019
North Korea and South Korea.
 
user142019
The only bright spot is Pyongyang.
 
user142019
And the other slightly bright spots are probably internment camps. :v
 

« first day (55 days earlier)      last day (838 days later) »