« first day (1015 days earlier)      last day (4158 days later) » 

12:01
@bwoebi I did understand. I was just saying that despite being able to call C functions like that, it's a bad example (and shouldn't be used in a tutorial on how to use c from go, because it will probably lead to people copying it and using it, while it's easy to come up with a sample that doesn't do evil things)
@Starx as for your start() method: don't know what to answer. It's way too hypothetical. If it has an implementation, then maybe Car should be an abstract class. If it doesn't, then maybe Car should just be another interface.
You should probably go out and meet some women, and not be a total @Geek, then you'll know what (\/) is ? — adeneo 4 mins ago
I come back...
@Gordon, All cars no matter what type start with a similar process. So I think it should be a abstract class.
@Starx Only, if it has subtypes and then still only if the abstract type has an implementation it needs to share.
12:05
@Gordon Agreed.
@PeeHaa deleted
@Starx You can even have a Car interface and an AbstractCar abstract class, which will provide a default implementation for something like starting the car. This way if the car inherits from something else for some reason or this is a special car that starts differently, it directly implements the interface and doesn't care about hte abstract class
@bwoebi can you run this code :
#include <stdio.h>
#include <math.h>

int factorCount (long n)
{
    double square = sqrt (n);
    int isquare = (int) square;
    int count = isquare == square ? -1 : 0;
    long candidate;
    for (candidate = 1; candidate <= isquare; candidate ++)
        if (0 == n % candidate) count += 2;
    return count;
}

int main ()
{
    long triangle = 1;
    int index = 1;
    while (factorCount (triangle) < 1001)
    {
        index ++;
        triangle += index;
    }
    printf ("%ld\n", triangle);
@Jasper, I know that why I am suggesting name Car/Abstract.php all along. This class can implement the interface of the car and provide benefit for both when it is implemented.
but now that i think about it, extending the abstract class will limit a lot.
@Gordon :(
12:09
40 mins ago, by Gordon
@Starx putting technical details like Abstract or Interface into the name rarely conveys something useful
Eee it's PHP chat?
@bwoebi solusion for projecteuler.net/index.php?section=problems&id=12 .. i want to see how long it take in your system compared to go
@MaciejCzyżewski PHP == C ;)
ow wait :P
@bwoebi or is there a better solution ?
Yay! It stopped raining. Now I can finally walk to my car to get soem food in the house
12:11
@PeeHaa yeah, but I agree with @MaciejCzyżewski that @Baba and @bwoebi discussion is a bit OT right now. it's not even related to PHP C
@PeeHaa lol
@Baba 5,47 seconds
@Gordon that was a c code :)
@Gordon, Name an interface of class car and another abstract class of class car....
@Gordon Yeah I know :)
12:12
@PeeHaa I'd prefer to stay with my foot in the house
@Starx Car
@Gordon That's true, but basically what you're doing here is working around the fact that you can't (/don't want to) call the interface and the abstract class the same. You could call it BaseCar or something, but it isn't much clearer.
@Gordon here's a lot OT around… not only programming OT…
what is OT?
what is OT?
off topic
@Gordon :-0
12:13
Oh...
@bwoebi yeah, but you're throwing walls of OT C code into on topic discussion, so it probably shouldnt be in here right now
@Jasper @Gordon, Name an interface of class car and another abstract class of class car....
Anonymous
has anyone ever made a full any type of free & working website, which I could download and just see if I am doing things the right way. By checking and comparing the logic & architectures e.t.c...
Anonymous
if so, pls let me know
12:14
@Starx Depends what is being defined in the interfcace
@bwoebi it took 777ms on my end
Simon download laravel
@Simon_eQ Check the github pages of the people in here
@bwoebi printed 76576500
@PeeHaa, Give me an example
12:15
@MaciejCzyżewski Laravel is a static fest
@Starx Why would you have an Interface Car and an Abstract class Car? That would imply that you can have multiple types of Cars, which you clearly don't. You'd just extend your Abstract Car
Anonymous
@MaciejCzyżewski but that is different because its cmf. @PeeHaa I did. most are plugins, not independent projects...
@Baba prints 842161320 here
@Gordon, There can be multiple types of car.
@PeeHaa Yeah-a but i think he want to check logic of big PHP project. I think the best way is read Laravel code. That have controllers & models itp...
12:16
@bwoebi i guess my implementation is wrong ... or the c code .. do you have a solution for the problem 12 ?
@Starx yes, extending from the Abstract Car, so why do you also need an interface for that Car then?
@MaciejCzyżewski @MaciejCzyżewski And then do the exact opposite?
@Simon_eQ github.com/PeeHaa/HexDump should be pretty easy to comprehend.
@Gordon The idea would be that you might have different cars, but don't at the moment. I know it's not always considered the pinnacle of proper design, but the Java system libraries use this a number of times.
@Gordon, But these Abstract type might not implement same interface.
12:18
@Jasper if you have different Cars at the abstract level implementing Car, then they surely differ in some way that you can put into the name of the Abstract types then /cc @Starx
@Baba you just can't copy&paste… You wrote: while (factorCount (triangle) < 1001) while in the problem is asked for 501…
Or perhaps github.com/PeeHaa/Uploader (but there are still rough edges in here) @Simon_eQ
if I change it, it prints what you have
@Baba real 0m0.456s
@PeeHaa sweet ^^ Your github profile...
I star your projects...
@Starx then why do both of them implement Car?
12:20
@MaciejCzyżewski tnx :-)
Can static access non-statics?

Examples:

self::db = new Database();
And then do Controller::db->insert()
They don't, they have two different interfaces.
@JunatanmDegraded Whether you can is not the point. Whether you should is
:)
Lets say another class example "Project"
12:22
@bwoebi thanks ... nice
@bwoebi closer than i expected
Gordon, I use controller to hold the database connection once, so I don't need to create new DB instance on every class.
@Baba closer to what? (btw.: I compiled with gcc -O3)
12:23
I hate chrome not putting http when copying from the address bar
So peehaa, statics are bad to hold db connections with?
@JunatanmDegraded static are bad period
@Gordon hmmm strange. it works for me
Anonymous
@PeeHaa thanks. I like the uploader, as it seems to have diverse functionalities, which I can learn more from, instead of one or two. I hope its completely standalone
@JunatanmDegraded statics are bad to hold db connections with?
I only use statics just to not create a new instance, cause most of my classes are using a constructor to run the main method that will run the rest private methods of the class or protected
12:25
@Simon_eQ Yes all three linked repo's are standalone. (although @Gordon's backlog uses the stack api)
lol
^
@Gordon The idea is you don't. You have an interface that describes what a Car must be able to do, and an abstract class that does the things that any Car you know of implements. It only makes sense in some contexts (such as when you're writing a library that does something with cars and may have the user implement a new Car) but it does make sense. Of course, you're using the abstract class just for code reuse, rather than for polymorphism.
@bwoebi Run on Play
always this racism… statics are part of PHP and you can work well with them - if you only use very few of them.
@Baba why is the time always 0?
12:27
@bwoebi references, gotos, eval and globals are part of php, too
2 messages moved to bin
exactly. and if you have good reason to use them… just use them. But only when you have GOOD reasons.
For most of those things the only reason to use them is laziness
@bwoebi think Google cheated with their powerful servers
@Baba haha^^
12:30
@bwoebi just that most people dont have good reasons and no clue. so you just tell them to paint up and down and up and down like mister miyagi because they are at the Shu level and need to be told what to do before they may even consider breaking the rules.
@bwoebi that is the only logical explanation
@Gordon that is indeed the problem with these things…
@bwoebi you are of course free to explain in great details the pros and cons :)
@Gordon wax on, wax off
12:31
@salathe thanks. didnt know what it was in english
PostgreSQL has so many interface
@Gordon my thoughts-to-words converter isn't good enough… but I promise I will do it someday… (not only in a few years)
You can even build a rest API with nginx ???
Correct me if am wrong .. THIS IS SQL Injection Heaven
@Jasper but it's still a certain implementation of a Car then. It's just difficult to find a good name for it and picking Abstract is cheating your way to think about a proper name. Like you said, Car is the contract while the Abstract Car is all the cars you know. But it's your particular Car type then. Not every Car in the Interface sense.
12:34
@Baba what's the problem? there's always postgres_escape used on the vars?
@bwoebi are you saying this would work in production ??
Anonymous
@PeeHaa Yea, I knew about the backlog. Plus, I'm sure it has nothing to offer about handling user inputs, sessions, file upload... since its purpose is limited. Any more idea though, as to how I may find a package that encompasses many features just in one project?
@Baba never tried such a thing… but I don't see where the problem with sql-inj is here
@Jasper The alternative would be not to name the Interface Car but split it into smaller different responsibilities (cf. en.wikipedia.org/wiki/Interface_segregation_principle) and have that then implemented in the abstract Car type
Anonymous
think of it like a simple social networking project ( because they usually contain more features ) than simple sites. I found some open source, but they were too large, and complex. I found few non open source simple ones, but they were very old and implemented like mysql_* and other poor functionalities
12:36
@Gordon That's an alternative, but far from always feasible.
@bwoebi I would did dipper and let you know if i find somthing
@PeeHaa it works when I copy the current site URL but it doesn't work when I search in the address bar and then pick one of those URLs without calling them up.
@Gordon You're right, it's cheating. It's just that I don't mind cheating in this case. As long as the design is justified.
hmmn, need opinions on a database design issue. i have a products table, but i do not store the price as part of that table, i store the price as its own table which is id, pricevalue. i am doing it because, the type of store that this will be has products that have only a single price, have multiple prices based on a single option, and also have multiple prices based on any amount of multiple options. do i go with,...
multiple tables for, single price with no option, multiple prices for single option and multiple prices for any number of options, or, would i go with a multi table approach for multiple prices for multiple options and merge all prices into that table
Gordon, are statics in java as useless to use as in PHP?
12:37
lastly, how would i go about specifying any number of options and relating those zero to N options in to a price without having a set number of columns with a maximum possible number of options
@Jasper well, yes. Question is, is it? :)
@JunatanmDegraded depends on who you ask ;)
@JunatanmDegraded mostly yes .. also they are as harmful as in PHP. The only significant difference is that you cannot really have "unattached functions". This means, that if you want to create a stand-alone function , it will have to be static.
@PeeHaa I just realized that when you go loo, it's Pee Haa Pee === PHP
@Gordon LMAO or It is Pee Haa Pee == PHP
@Gordon Agreed. Generally, I wouldn't use it, but there are usecases.
@Starx It's === after all, Pee and Haa are just the letters P and H pronounced (in the way you would when reciting the alphabet) in Dutch
12:43
can anyone recommend best place to arrange css/js/images templates in code igniter structure
@Jasper, I was refering to PHP as the language.
@mukund you mean where to place them?
@mukund: create an assets directory in the root of your app and put them in there
@mukund well the templates should be in the views folder, and any files served to user like JS, CSS etc should be in assets folder.
12:45
thanks all and should i define absolute path for it in config.php
See you guys...
@Starx I know, but where an English person would call the language Pee Aitch Pee, a Dutch person would call it Pee Haa Pee (which sounds something like pay hah pay)
@Jasper Only lower class would say "Pee Aitch Pee", everyone else would say "Pee Haitch Pee" ;)
spoken as a true southerner...
@Danack I should have said American, rather than English
12:51
hmm .. you don't have in english such "ē" sound
hey everyone
@Baba "I was thinking about to add sql injection protection in the example but I chose not to to keep it simple. But when I think about it was a bad move. So I have updated the example to include protection against SQL injection."
Still DOS-tastic though.
needing some help w/ getting PEAR wired up correctly
@tereško If I'm correct that it's the sound sheep make (well, the sound people make when mimicking a sheep) è is probably the closest you'll get
possibly followed by an h, for added length
yeah ... something like that .. in latvian we pronounce it as : Pē Hā Pē
13:02
@Danack Did you write that ??
No - hence the quote marks
But he says that it's protected against injection attacks.
@Danack > is markdown for quotes
any pear halp available?
> Discussion for all things PHP - Don't ask whether someone is here to help you. If someone is around and wants to help they will.
@Jasper Quote marks also indicate a quote.
13:06
@Danack <blockquote> does it better.
installed pear, trying to figure out how to add to include path successfully
@Danack just trying to help, really. I feel it's far clearer with > but of course it's your choice in the end
@JohnBlythe os?
mac, mountain lion 10.8.4
it's installed in /users/john/pear/bin/
corollary issue: trying to get the Loaded Configuration deal setup, too
php --ini shows (none) for that
13:10
@MaciejCzyżewski yes
locate bin/pear produces the following results, as well: /Applications/MAMP/bin/php/php5.3.14/bin/pear
@PeeHaa you come back!
@Simon_eQ The one I am currently working on should be a complete site. But I'm not sure whether I will open source it
In your stackoverflow profile i find this: "Check out my personal website (currently being re-installed) if you really feel the need to contact me mail me: {mynickname}@php.net." How to get mail with @php.net?
@Joh
13:11
@Gordon :P
@JohnBlythe run a witch php
@MaciejCzyżewski Yes. Was out to the supermarket
/usr/bin/php/
Anonymous
@PeeHaa Thanks. I will work on it. And will let you know, if I can contribute something (Which should take some years :p)
ok, Mac comes w/ php, and that is what is running when you are executing php -i
13:12
good afternoons!
@PeeHaa supermarket ^^
Anonymous
@MadaraUchiha may I pls borrow your eyes for 1 minute?
Anonymous
I need an opinion on something
@Simon_eQ Sure
if your pear is inside the MAMP application, you will need to run php from inside the MAMP application to see it
Anonymous
13:15
@MadaraUchiha ok, thanks. Let me give you a head start. I am making classes for login, registration, comments... for long term use. instead of having to create for each site. Now, problem is with huge class, when instantiating the object and making queries, the code gets messy.
Anonymous
So, i want to know if this happens only to me or to anyone too
Anonymous
You can check the above for ex.
@moranjk well it's also in /users/john/pear/
Anonymous
It handles user login. But the code got messy, specially for a switch()
13:16
maybe pear comes with MAMP, dunno
or maybe i installed it all over the place last time i tried a couple months ago
before giving up :p
what would be the most sensible way of setting up php and pear? i am completely illiterate to this packaging stuff
@Simon_eQ Just a note, it's considered good naming convention to name your variables in $camelCase and not $CapitalCamelCase
I use macports
As well as methods and functions
(Basically, only Classes should begin with a capital letter)
13:17
@JohnBlythe pear != sensible :P
ha
well at least i'm not hte only one who feels that way :)
Anonymous
@MadaraUchiha Ok I'll keep that in mind. So, It is a good idea to instantiate an object inside a method, just to make the code look less messy or it is perfectly normal to look as it looks.
Anonymous
I just want to know, if I am doing it as everyone else
i'll take another step back rq: i'm installing pear in order to install phing. i want easier, cleaner deployments
so if anyone has other suggestions on that front that allow me to circumvent pear i'm all ears!
@JohnBlythe if you want to go the macports route, take a look @ 2tbsp.com/content/install_apache_2_and_php_5_macports
13:19
@Simon_eQ Instead of having nested if statements, just halt the script on error, and continue normally.
That is, don't do
if (a) {
  if (b) {
    if (c) {
But
@JohnBlythe My only recommendation for pear is: i) Figure out what you need from it. ii) Download those files. iii) Put them in a library folder in your code repository. iv) Include them as you would any other source code from your application.
@moranjk just to install pear? or to do a fresh install of all of those things, mysql, php, pear, etc?
if (!a) { die("error"); }
if (!b) { die("other error"); }
if (!c) { die("just die"); }
die?
@PeeHaa Just an example
13:20
Spending time to get Pear to work when you can just do it a lot more quickly and reliably by hand is not a good idea.
Also, you shouldn't be checking for errors, you should catch them in the form of Exceptions
@Danack really don't know fully what i need from it, just that it's a pre-req for PHING
@JohnBlythe if you are running macports php, you will want to run macports pear as well. If you don't need the MySQL, don't install it ;)
Anonymous
@MadaraUchiha Thanks about the advice. I am enlightened. I don't even know why, I did not use that. But, the errors are exceptions, so it is ok in that case.
Anonymous
}catch(PDOExeption $e){
	return $this->error = '<em> Unknown error occured. Please try again later.</em>';
			}
Anonymous
13:21
Like the above.
@JohnBlythe Are you sure? Can't you just download phing without getting Pear involved? phing.info/get/phing-2.4.13.zip
@Simon_eQ Validation errors are not exceptions (as in, the input turned out to be invalid)
@moranjk ok. but if i have a MAMP install (php/mysql) right now, how does macports fit in with that?
it would replace it
Exceptions are used for Exceptional events
13:22
@dan
@Danack show off :p
For instance, the query's syntax was wrong, or the function got an input that wasn't expected.
@moranjk and this is a good thing.
@moranjk w/ mamp i hit run and then am good to go w/ coding. macports would use terminal i'm guessing, eh?
@JohnBlythe http://www.phing.info/docs/guide/stable/chapters/Setup.html
> Non-PEAR Install
> If you are not using the PEAR installer, you will need to setup your environment in order to run Phing.
@moranjk thanks for fielding all the n00b ?'s
Anonymous
But, why use an exception is users inputs '' inside an email field? It should return just the costume error. for queries, I am use exceptions @MadaraUchiha
13:24
@JohnBlythe depends on who you ask. I have had nothing but problems w/ mamp, so I went the route of macports and never looked back
@Simon_eQ Your isEmailValid method should return true or false whether the email is valid or not.
The custom error message should be generated by some other component
@JohnBlythe TBH I haven't used Phing, so am not 100% sure it can be run without Pear, but I do know that setting up your code to be installable without pear is almost always possible, and removes the dependency on a project that isn't really being maintained any more.
@Danack thanks. so just include this stuff in the repo and i can get goin it seems. schweeet
@JohnBlythe are you set Phing, would ant solve your problems?
@Danack o, i see. seems like PEAR is pervasive with packaging stuff
@moranjk unsure. i just want a good deploy tool. read that PHING has some nice pre-baked stuff that ant doesn't
13:26
Used to be - most people have given up on it now. Composer is what the cool kids are using.
but i'm up for whatever
@Danack noice
i remember trying to get a composer package hooked up one time, also a big fail on my part lol.
@moranjk Until he needs to write a custom task which can only be done in Java for Ant, but can be done in PHP for phing.
Anonymous
@MadaraUchiha I got your idea, but here is why I didn't make it that way. If I return false, then the object wouldn't know what was wrong. Just false isn't enough. I am validating the email if 1) email is empty 2) if email is invalid. So, writting costume msg allows me to send two different messages to the object
Anonymous
function Check_Email($email){
if(!isset($email) || empty($email)){
		return $this->error = ' <em> Email is required </em>';
	}else if(filter_var($email, FILTER_VALIDATE_EMAIL) === false){
		return $this->error = ' <em> Please enter a valid email address </em>';
	}else if(strlen($email) > 40){
		return $this->error = ' <em> Email should be less than 40 characters long </em>';
	}else{
		return true;
	}
}
@Simon_eQ In that case, you should have an Error object that has the ability to describe the error, in which input etc. That object gets returned by the validation function.
Having multiple return types (boolean|string) will lead to trouble down the road.
Anonymous
13:30
Really, didn't know that. But, the returns are caught in check_errors() method, and sent separately to the object.
@Simon_eQ I think I would rather create an Email class with an isValid() and getErrors() methods
Anonymous
@PeeHaa that is what I did.
Anonymous
more or less ...
Anonymous
My biggest worries is that, how messy the object got inside the switch() statement. I was thinking cramping up the object inside a class method, but that would be weird, ... instantiating an object inside a class ... if not impossible.
MOAR STUPID QUESTIONS INCOMINNNNNG
@Danack @moranjk so i should drop the bin file from the phing download into my app's root dir?
13:33
So poeaa said that as an alternative to passing a database handler into every class between the one that initializes it and the one that uses it, I should just use a Registry. Then under Registry it says that Registries should only be used at last resort... =?
@Simon_eQ The Zend/Validator module is actually a reasonably decent (imho) of how to validate stuff in a sane way, and is worth either using or just looking at. How they managed to then fark up the implementations of forms that uses the validation is beyond me though.
nvm, just saw a full and in-depth guide in the download
@tereško Do you usually use a registry or just pass a handler to every class that uses a db connection?
Anonymous
@Danack Thanks but, I get a headache every time I hear the word Zend. I guess, I am too noob for that ... :)
@JohnBlythe Nah download it to it's own folder, then set the path to use for it. That way you can test new versions alongside the existing version.
13:35
@Danack bingo. was just reading much the same. was about to ask, though, what best practice is for something like that. /usr/local? /users/john/? etc?
@Simon_eQ something like this: codepad.viper-7.com/EgT1Bp
and all this 'set the path' that they use and you're saying means...? :|
@JohnBlythe If you can within the project, so that two projects that both use phing but different versions, can be installed on the same box without problems.
BTW @Simon_eQ you should not limit the length of the emailaddress
@Simon_eQ Zend code is split into two parts i) Horribly complicated pieces of not good code ii) Reasonbly well designed modules that can be used in other projects. Zend/Validator and Zend/Permissions-ACL are both the latter.
Anonymous
13:38
@PeeHaa I know. But, I get annoyed for no reason, if a user might input 500 characters and jam something ... I should do maxlength= perhaps, even though it is not realiable..
@JohnBlythe Phing is installable by composer as well. packagist.org/packages/phing/phing That would be how the cool kids install and use it.
Nothing will get jammed. Worst thing that can happen is the user is hit by some PHP limit. I.e. max post size or whetever
@Danack o i see. so the include path in teh app itself, gotcha.
@Danack nice. new problem with that, though: can't install composer ha
need to change my ini file
Really, what breaks? I didn't know composer requires a particular ini setting.
does which php show which one is being used as opposed to locate just showing the 1,000 places it is on my machine?
13:42
@JohnBlythe phpinfo()
detect_unicode = OFF needs to be set. and it says a php.ini file does not exist ha
Or from cli php --ini
`_ENV["PATH"] => /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin
_ENV["PWD"] => /users/john/pear/bin
_ENV["LANG"] => en_US.UTF-8
_ENV["HOME"] => /Users/john
_ENV["SHLVL"] => 1
_ENV["LOGNAME"] => john
_ENV["_"] => /usr/bin/php`
from php --ini:
Configuration File (php.ini) Path: /etc
Loaded Configuration File: (none)
Scan for additional .ini files in: (none)
Additional .ini files parsed: (none)
so /etc/php.ini ?
i suppose
dunno wtf is going on :p
php-fpm.conf.default
php.ini-5.2-previous
php.ini.default
php.ini.default-5.2-previous
php.ini.default-5.2-previous~orig
those are all in the /etc/ folder
no actual php.ini
which is why i guess it says there isn't one when it ry to install composer
13:52
@Jeremy , I never use Registry
@tereško So do you just pass handlers or... what do you do?
doing a phpinfo() call in a file located in the app i'm trying to install phing in: Configuration File (php.ini) Path: /Applications/MAMP/bin/php/php5.4.4/conf
and Loaded Configuration File:/Library/Application Support/appsolute/MAMP PRO/conf/php.ini
this i what you get for using magic canned "servers"
what would be a better solution?
13:56
@tereško How do you then make sure that when you need to access a database, in say class Dog, you haven't already accessed it in class Cat? I see you have the condition checking the connection first, but it's not static or anything
@tereško Because that theory states that any entity moving at c ceases to travel through the time axis and moves only through space, it follows that the time spent travelling between any two given points in space is 0, which we know to be untrue.
(mornings)
Moningr @DaveRandom
@DaveRandom actually we know that it is true.
@tereško Oh actually I kind of see. But then you'd have to pass that instance of StructureFactory around, wouldn't you?
@Jeremy i would pass it to any instance, which needs to create structures that have access to database
14:00
Then how can c have a finite value? That that's a direct contradiction. Either one or the other (or both) is wrong.
@JohnBlythe installing php, webserver and database solution separately
@DaveRandom it's matter of perspective
while object's time is zero, the external observer sees that object moves
no matter how fast the object move, it does not directly affect the observer
@tereško Okay, that makes sense. Now I'm wondering if my understanding of a data mapper is correct: essentially what I'd be doing is for every table (lets call a table dog) that I have, there's a class (lets call this class DogMapper) that inherits common methods (like insert/delete). Then, within DogMapper, I put in table-specific functions like dogBreedExists, etc...?
@Jeremy why would you need dogBreedExists() ?
are you trying to make sure that dog's entry is unique ?
@tereško That's just an example... you're saying no table-specific functions and that all of this should be done straight in the domain model?
domain object contains the logic, while mapper interacts with database
also, data integrity should mostly be ensured by daatabase itself
14:07
@tereško so the only thing that I put inside DogMapper are insert/update/delete-like methods and finder methods?
gotta run for now, thanks for all the help @moranjk and @Danack. will probably be back on later to learn more from you :)
@Jeremy as for the finders i will refer you here
mappers should do retrieval , storage and removal .. and i don't really see why you should distinguish between insert and update
@tereško The (my) problem with special relativity (which is essentially what you are referring to I guess?) is that it's a bit fuzzy regarding the non-observable dimensions, which must play a part in order for that to be true. I cannot get on board with the idea that it is possible to move through a given dimension so quickly that it is possible to break the uniformity of another.
@DaveRandom the point here actually is that your movement is constant
14:13
@tereško Alright. When retrieving from the database, poeaa says that I should make minimal requests. So does that mean get everything at once and filter later? Like if I'm trying to pull user by their ID, do I get all users and filter by the ID later, or filter by the ID in the query?
@DaveRandom, what you perceive as "moving faster" if effectively only changing the angle of the velocity vector
@Jeremy did you read the linked post. It specifically talks about the difference between retrieval of single entity and a collection of entities
sorry I just read the code example and it made sense... my mistake
read the text too >.<
@tereško Yeh I get that, but in order for the observers impression of the motion to become distorted, the angle must be changing in a way that is imperceptible to the observer (i.e. the observer isn't seeing the whole picture)
because what you are observing is a projection
this is also related to why object moving at high speed look somewhat shorter
dunno ... the whole thing seems to me quite intuitive =P
14:22
@tereško It looks like you're still setting a condition to get the user with the name Jedediah, right?
@Jeremy because i am fetching a single entry there .. i guess the choice of parameter is a but unfortunate
can i discuss about yii framework here? or is it have separate room? :?
@tereško so when looking for a primary field in the database, I can just use a condition, but at other times request the information first, then filter?
@ferozakbar well , Yii is quite bad. Close to the levels of badness that are atchieved by Cake and CodeIgniter.
@Jeremy think on how you would fetch elements in practical situation ..
14:25
I wish I'd paid more attention at school tbh, I dropped out and took a bunch of drugs for a few years and since then I've only really been able to take a passing interest in the subject, I don't really have the time for true academic pursuits. If I ever end up in a position where I'm loaded I do plan to go do a degree in particle physics though because I do want to properly get my head around it. I need to do a lot of work first though :-P
@DaveRandom dunno .. genomics seems much more interesting to me as "something to learn when I get lot of free-floating cash"
That's closer to programming in a way. I couldn't even pretend to know anything about it other than a basic overview though
I've got an issue where I'm unable to find names for my classes that aren't confusing, so I thought I'd ask for suggestions.
I have a system that reads files, and each of those files represents a datatype. A datatype consists of a number of "member variables", each of which has a name and a type. A type is either a primitive or reference to another of those datatypes in the same set of datatypes.
This system merely sets this up into a data structure and other parts use this data structure to do different things based on the datatypes, using a visitor-ish structure (it isn't truly visitor because it has an iterator-like component). One of those tasks is creating php classes representing the same data (but whether you like doing a thing like that is another matter entirely)
@Jasper Join the club :-P
Now, the names for classes in the data structure is what I'm having troubles with: First, I need a proper name for a "set" of datatypes. The other problem is that I have DataTypes (on per file) and Types (the type of a member variables; it has subclasses for references and primitives, the latter of which has a subclasses for each primitive type) and I can't think of a naming convention that makes the two clearly different.
Any suggestions on how to name these?
@DaveRandom hehe
@Jasper For datatypes vs types, how about introducing the word "structure" somewhere instead of "type" for the datatypes? "Structure" implies vector
@DaveRandom Hm.. I do like that. I don't know if I'd call the files "structure files" instead of "datatype files" though. I suppose calling them differently at file level and data structure level isn't too bad a price to pay for the added clarity.
<thinking_out_loud>It would of course be "data structure files" not "structure files". I'm not convinced either way about that term either way</thinking_out_loud>
14:51
@Jasper DataStructure comprises multiple DataTypes, and one of your primitive types is Pointer. Forget the word files, it's just DataStorage. You only store DataStructures so redundantly calling it DataStructureStorage is redundant.
And if you need to refer to an individual file, it's just a StorageRecord
Possible to pass booleans to methods?

public function mymethod($param)

$class->mymethod(TRUE);
so $param either be true or false
Have you tried it?
I would know if I did, but not yet.
muhaha
-1
A: A comment box to verify suspected plagiarism when reviewing

Madara UchihaFrom my experience, confirm dialogs are not effective. The ability to instantly undo an action is. But that aside, I don't see what the big deal is. Sure, someone thought you plagiarised some of the content, but it got approved, right? Why do you care?, The golden rule of the internet: Do n...

-_-

« first day (1015 days earlier)      last day (4158 days later) »