Skip to main content
Topic: IRC (Read 107150 times) previous topic - next topic
0 Members and 3 Guests are viewing this topic.

Re: IRC

Reply #165

(07:08:36 PM) emanuele: this morning I was thinking how to allow addons to extend the buttons in the messages (quote/edit/more/etc.)
(07:09:06 PM) emanuele: I tried something a while ago on SMF: https://github.com/emanuele45/playpen/tree/template_quickbuttons_strip
(07:09:39 PM) emanuele: but I was now thinking to do something more similar to the errors class and have a small class to handle that (or all) buttons too
(07:09:44 PM) emanuele: question is:
(07:10:14 PM) emanuele: the "move" and/or possible dropdown on any of the buttons is a source-thing or a theme-thing?
(07:10:28 PM) emanuele: I'd say ...depends... lol
(07:11:00 PM) emanuele: but I would avoid make things too complex...and for me is rather easy to complicate even the easiest task...
(07:11:16 PM) emanuele: so...any suggestion?
The best moment for testing your PR is right after you merge it. Can't miss with that one.

Re: IRC

Reply #166

Just don't ask what we did in Wedge. That crap scares me these days for extending menus. It's very efficient and very compact but hell to figure out if you haven't seen it in a while.

Re: IRC

Reply #167

(05:57:32 PM) groundup: In display.controller.php is https://gist.github.com/joshuaadickerson/5319926 that should probably be moved after everything else with two things - cache it & check if it is needed after all of the other posts are loaded. Chances are, it isn't.
(05:58:42 PM) groundup: The check for $modSettings['oldTopicDays'] should be done before all of that even
(07:03:38 PM) Norv: groundup: right, on oldTopicDays
(07:04:57 PM) Norv: Not sure about the first (don't have all the code in front of me). PRs are gratefully accepted. ;)
(07:06:07 PM) groundup: I don't have a Elkarte Git repo right now
(07:06:33 PM) groundup: I do have a copy of it downloaded which is how I was looking
(07:32:16 PM) Norv: Ah ok.
(07:37:25 PM) groundup: You know what is incredibly annoying about log_errors? It doesn't log the line of the error
(07:37:48 PM) groundup: and for whatever reason, it isn't logging to my normal php error log
(07:38:09 PM) groundup: (only parse errors are logging to there)
(07:39:36 PM) groundup: ah, there we go. My mistake. (playing with things)
(07:39:49 PM) groundup: still... that is very annoying when I do that :P ;)

(06:16:22 AM) groundup: Norv, is $languagedir supposed to be used as a variable?
(06:16:44 AM) groundup: In index.php it is the only one of those vars that is not unset
(12:28:55 PM) Norv: Yes, I think it's still used, or was. It's not supposed to, it's supposed to become replaced with the constant, and used even in places where before, /themes/default/languages was hardcoded. Will check the actual status
The best moment for testing your PR is right after you merge it. Can't miss with that one.

Re: IRC

Reply #168

(01:36:28 AM) emanuele: 78?
(01:36:34 AM) emanuele: arg...no
(01:37:04 AM) TehCraw: 78 what?
(01:38:04 AM) emanuele: ~((0040 + 0x20) + (0b111 << 1))
(01:38:17 AM) emanuele: looks more like a 49
(01:38:59 AM) TehCraw: Say, that familiar. :P
(01:39:28 AM) TehCraw: I don't remember what it is. LOL
(01:39:35 AM) TehCraw: Let me figure it out again.
(01:39:59 AM) emanuele: 42 would be better. :P
(01:40:26 AM) emanuele: darn, it's again a new day...
(01:43:41 AM) TehCraw: You were close to right the first time. It's -79
(01:43:48 AM) TehCraw: Because of the ~ operator.
(01:46:01 AM) emanuele: 0040 => 100000?
(01:46:15 AM) emanuele: 0x20 => 100000=
(01:46:34 AM) emanuele: 0b111 => 1110?
(01:46:44 AM) emanuele: scratch that last one
(01:46:56 AM) TehCraw: 0040 is octal 32, and 0x20 is hex 32
(01:48:04 AM) emanuele: and the last one?
(01:48:20 AM) TehCraw: trying to remember this stuff. It's been a while.
(01:49:38 AM) emanuele: take your time, I'm going bed. :P
(01:49:53 AM) emanuele left the room (quit: Remote host closed the connection).
(01:50:02 AM) TehCraw: Dang it, so close too
(01:51:26 AM) TehCraw: For my own memory refreshing, binary 111 is 7. Bitshifted once left it becomes 14.
(01:52:05 AM) TehCraw: So: ((32 + 32) + (14) = 78
(01:52:24 AM) TehCraw: Add the ~ before it all, and wham, -79
The best moment for testing your PR is right after you merge it. Can't miss with that one.

Re: IRC

Reply #169

(10:32:15 PM) emanuele: http://www.theregister.co.uk/2013/04/18/github_licensing_study/
(10:33:49 PM) emanuele: Mine are probably falling into the 85.1% because I don't have a readme or license in the top-level dir... :P
(10:39:54 PM) Norv: :D
(10:40:37 PM) Norv: Yep, I know it was a concern. Afaik OSI tried to convince github to do something, but failed at least atm.
(10:40:46 PM) emanuele: I still don't understand if at github you can host non-open source projects
(10:41:29 PM) emanuele: all the terms speak about "public", but I can't find any reference to the license...unless I'm completely blind
(10:42:06 PM) Norv: That's what I don't like. It's almost autocontradictory, it can lead people to use code from github freely (fork etc) and yet it has unclear licensing.
(10:42:41 PM) Norv: At least one kind of licenses are clearly possible (since github has no rules actually): non-commercial.
(10:43:30 PM) Norv: (they're non-OSI/free, but yeah you can fork/distribute/etc)
(10:45:41 PM) emanuele: but the funny part is that you can find projects with licenses that explicitly forbid redistribution hosted (publicly) at github
(10:45:50 PM) ***Norv uses the ban hammer, a quick swing.
(10:46:18 PM) Norv: That part is what me doesn't find funny. I don't know why exactly OSI failed yet... but it's not ok IMO.
(10:46:59 PM) ***Norv is more old fashioned and prefers clear open/free licensing.
(10:47:29 PM) Norv: Have you seen also Luis Villa's theory article?
(10:48:01 PM) Norv: POSS world: post-open-source-software world, heh.
(10:49:29 PM) Norv: The thing is, people don't read. (hah). You're giving them a project with all tools to fork/distribute in an environment inviting them to do it; and you license it to forbid it... smells bad.
(10:49:41 PM) emanuele: nope, I found that one by chance... lol (I didn't even realise it was from yesterday until I saw the link in the IRC window... lol)
(10:50:05 PM) emanuele: ROFL The fact that people don't read is nothing new! :D
(10:50:21 PM) Norv: http://tieguy.org/blog/2013/01/27/taking-post-open-source-seriously-as-a-statement-about-copyright-law/
The best moment for testing your PR is right after you merge it. Can't miss with that one.

Re: IRC

Reply #170

(10:10:28 PM) emanuele: upgrade question, I just wrote a comment like this:
(10:10:42 PM) emanuele:  Pick one of the new variables at random and check it: if missing it's SMF and we cannot rely on Settings
(10:11:27 PM) emanuele: In other words we cannot trust Sources for example
(10:11:36 PM) emanuele: is it an acceptable assumption?
(10:12:27 PM) emanuele: Or should we do some more checks to make sure users have moved what we have in sources to Sources?
(10:23:44 PM) groundup: More checking is better than making the user do it
(11:18:59 PM) Norv: >> (10:10:42 PM) emanuele:  Pick one of the new variables at random and check it: if missing it's SMF and we cannot rely on Settings
(11:18:59 PM) Norv: I think it's reasonable
(11:57:34 PM) emanuele: why the upgrade doesn't want to work with js disabled... :'(

(04/21/2013 12:07:28 AM) emanuele: That is funny I'd say
(12:07:36 AM) emanuele: http://www.simplemachines.org/community/index.php?topic=497135.0
(12:08:01 AM) emanuele: I tried the changes proposed and it doesn't work anyway
(12:08:13 AM) emanuele: trying to debug, it apparently fails on that query:
(12:08:19 AM) emanuele: INSERT IGNORE INTO smf_board_permissions (ID_GROUP, ID_BOARD, permission) VALUES (3, 0, 'moderate_board'), (2, 0, 'moderate_board')
(12:08:50 AM) emanuele: now, that query is there since 1.0 and it has never failed...as far as I know
(12:09:20 AM) emanuele: though, is not in the list of caught query errors here:
(12:09:22 AM) emanuele: $error_query = in_array(substr(trim($string), 0, 11), array('INSERT INTO', 'UPDATE IGNO', 'ALTER TABLE', 'DROP TABLE ', 'ALTER IGNOR'));
(12:10:10 AM) emanuele: It shouldn't make any difference because it's not a duplicate entry the error
(12:10:44 AM) emanuele: the column has been renamed to...
(12:14:08 AM) emanuele: could it be that at a certain point some default setting in mysql has changed and before case in table names was not important and now it is?
(12:15:14 AM) ***emanuele tries to find informations
(12:21:21 AM) emanuele: no, wait ID_BOARD has been removed!
(12:21:39 AM) emanuele: or better sort of renamed to id_profile
(12:22:44 AM) emanuele: how the heck this code has worked since now? ???
(12:32:15 AM) emanuele left the room (quit: Remote host closed the connection).
(01:53:58 AM) Norv: lol...
The best moment for testing your PR is right after you merge it. Can't miss with that one.

Re: IRC

Reply #171

(11:28:39 PM) groundup: There should be an IP table instead of storing IPs as characters. I think it would make storing and looking them up much faster.
(11:30:05 PM) groundup: id_ip INT, ip binary(16); then in all of the tables that have an IP, you'd have id_ip.
(11:31:01 PM) TehCraw: I like that. Seems like it would be a bit faster.

(05:23:56 AM) TehCraw: https://github.com/SimpleMachines/SMF2.1/issues/338
(05:41:57 AM) groundup: Let me know if my fix fixes it

(05:59:25 AM) groundup: Why doesn't $modSettings['avatar_default'] relate to a path instead of a boolean? $user_settings['avatar'] = 'default_avatar.png'; doesn't allow you to hook or change the default
(07:45:37 PM) Norv: groundup: Re: default avatar. Looks like you're right, though you can change the image. But please feel free to add a hook too, if you need it.
The best moment for testing your PR is right after you merge it. Can't miss with that one.

Re: IRC

Reply #172

(07:36:01 AM) groundup: Is there any documentation around on how to use GenericList.template.php?
(07:59:50 AM) groundup: Why does List.subs.php contain assert()?

(07:32:15 PM) Norv: groundup: take a look at a file like this: https://github.com/elkarte/Elkarte/blob/master/sources/controllers/Groups.controller.php . It's easy to use. I don't think (that I remember) that List is documented outside code.
(07:33:12 PM) emanuele: you mean createList?
(07:33:44 PM) Norv: yes
(07:33:46 PM) emanuele: http://wiki.simplemachines.org/smf/User:Emanuele/codedoc#createList
(07:33:59 PM) emanuele: not exactly documentation, but quite a bit of description
(07:34:13 PM) emanuele: should include everything available up to 2.1
(07:34:16 PM) Norv: Ohh thank you, how did I forget. I even stole it!
(07:34:41 PM) Norv: https://github.com/elkarte/Elkarte/wiki/Createlist
(07:34:46 PM) emanuele: You didn't write it, that's why you can forget it! :P
(07:34:50 PM) Norv: True!
(07:36:08 PM) emanuele: though I think I added a couple of other things in Elk...
(07:37:28 PM) Norv: Heh, it might be good to write them down... Just think of it as a note, not documentation O:-)
(07:39:44 PM) ***Norv doesn't hope that trick will work for them lazy coders. Ah well. It's always this way.

(11:45:29 PM) groundup: Thanks for that doc emanuele (and Norv heh). Though, I spent a bunch of time
reading the file last night to figure it out lol.
The best moment for testing your PR is right after you merge it. Can't miss with that one.

 

Re: IRC

Reply #173

(06:43:23 PM) Norv: oh yet another awesome refactoring from TE there!

(07:20:43 PM) ***Norv thinks ManageBadBehavior wants a GenericList
(07:23:59 PM) ***emanuele thinks Norv is suggesting someone that likes createList to have a look at some code
(07:24:13 PM) Norv: O:-)
(07:27:20 PM) ***Norv is innocent (except... usually :P) and, knows fans of createList which is awesome for any bit forward! sagenods

(08:04:44 PM) Dragooon_Mac: emanuele: Do you mind if I borrow your mobile device detect mod for my theme?
(08:04:59 PM) emanuele: Feel free!
(08:05:11 PM) Dragooon_Mac: The theme is paid and closed, so I just want to confirm
(08:06:37 PM) emanuele: yep, no problem (just pay attention because I think in the "in depth" detection there is something wrong...)
(08:07:02 PM) Dragooon_Mac: I'll push any improvements if they're good for all, of course. Thanks :)
(08:07:11 PM) emanuele: I didn't debug that part recently because not having a mobile-something is annoying to do... :P
The best moment for testing your PR is right after you merge it. Can't miss with that one.

Re: IRC

Reply #174

(11:50:49 PM) groundup: I am using a highly modified version of SMF/Elkarte (it is actually Elkarte at this point) for a site I am working on.
(11:51:42 PM) groundup: To make it familiar, I will just use the idea of topics and subjects. So the subject would be something like "Hello Compuart, glad to have you around" and I am looking for "hello compuart". How does it do phrase searching? How do I boost exact matches?
(11:52:22 PM) groundup: and how do I do 'hello' 'compuart' as different ones? The only way I've gotten it to work is with a wildcard between each space but what about other punctuation?
(11:54:37 PM) Compuart: I'm actually not that familiar with the full text search capabilities. We use it mostly for structured searches with huge amounts of properties and (single word) filters
(11:58:48 PM) groundup: How does it compare in speed with MySQL for facet searches?
(11:59:01 PM) groundup: Are you running it distributed?
(11:59:08 PM) Compuart: it's in a completely different league
(11:59:34 PM) groundup: You saying better or just different?
(11:59:40 PM) Compuart: yeah, it's just like Sphinx, a thousand times faster than MySQL could ever be with regards to these kinds of searches
(04/24/2013 12:00:06 AM) groundup: ah okay. Good thing I made that choice early on to use it. Now I just need to get this damn FT stuff working
(12:00:17 AM) Compuart: besides, it's specifically made to do facet search. It does it quite good
The best moment for testing your PR is right after you merge it. Can't miss with that one.

Re: IRC

Reply #175

(01:31:11 AM) emanuele: BTW without temporary tables on action=unread it seems really much faster the site now
(01:33:10 AM) emanuele: action=unread;all 2252nd page loads in ~1 sec. before it was...I don't think it loaded at all... lol
(01:33:30 AM) emanuele: (yeah, 67530 unread messages)
(01:33:42 AM) Norv: on which site, cats you were working on? it had a significant load
(01:33:52 AM) emanuele: yep
(01:34:41 AM) emanuele: butch2k suggested to disable the CREATE TEMPORARY TABLE that are used when the forum has more than 100k messages
(01:35:01 AM) emanuele: and now seems to load much, much faster
(01:36:25 AM) groundup: emanuele, did you just add a flag to disable it instead of hardcoding another number for that limit?
(01:36:54 AM) emanuele: I added "false && " in front of the conditions
(01:37:30 AM) emanuele: I think an option to turn them on/off may become useful
(01:37:38 AM) groundup: I am pretty sure it was Compuart that added that in there. Maybe he has some insight (or you could search) why it was limited like that. There was a reason why there are temporary tables.
(01:39:50 AM) emanuele: According to the comments is avoid locks, that's why I think it's not best to just remove them
(01:40:42 AM) groundup: Ah, lock contention is nothing with the use of InnoDB. If people still have those problems, use a better engine.
(01:42:56 AM) TimeVortex: emanuele: sounds like your database server needs tweaking, tbh.
(01:50:00 AM) emanuele: TimeVortex, it's not exactly my db. :P Wouldn't know what to tweak, the issue is that while people are coming, when about 300/400 hundred are on line at the same time, the creation of temporary tables starts to slowdown and with those hanging around, update log_topics slow downs as well and they start influence each other becoming slower and slower
(01:50:22 AM) emanuele: At least that is what you see from the queries
The best moment for testing your PR is right after you merge it. Can't miss with that one.

Re: IRC

Reply #176

(01:18:27 AM) TehCraw: How goes the elkarte development world?
(01:19:09 AM) emanuele: pushing fixes, bugs, from time to time even something that actually works!
(01:20:40 AM) TehCraw: Always a plus when stuff actually works like it's supposed to. :P
(01:20:58 AM) emanuele: usually that is the most scary part...
(01:21:12 AM) emanuele: because it means something else is broken somewhere else and you don't know yet

(01:21:54 AM) ***TehCraw prefers OOP systems for that reason. Unit tests FTW.
(01:22:23 AM) emanuele: that kind of things are for lazy people that don't like the challenge... :P
(01:23:04 AM) TehCraw: Rewriting Elkarte/SMF to be object oriented would be THE challenge.
(01:23:50 AM) emanuele: well, a good part of the admin code is already OO
(01:24:19 AM) TehCraw: Really. I'll have to look at that. ;)
(01:24:43 AM) ***TehCraw goes for GitHub

(01:25:00 AM) emanuele: And Norv should be working on a kind of class to handle forms
(01:25:38 AM) TehCraw: On the request end, or the forms themselves?
(01:26:29 AM) emanuele: Something like settings are handled in admin I think
(01:27:02 AM) TehCraw: I see. Interesting.
(01:29:00 AM) TehCraw: I probably asked before, but what are the minimum PHP version requirements for Elkarte?
(01:30:14 AM) ***emanuele seems to remember 5.1
(01:31:26 AM) TehCraw: Sounds reasonable. Should the class methods have access definitions then (public, protected, private) if for no other reason than added clarity?
(01:33:07 AM) emanuele: yep, most of them should have it
(01:33:22 AM) emanuele: some are missing because are still WIP
(01:33:51 AM) TehCraw: That's fine. I was just wondering, cause I've only checked a couple of files so far.
(01:34:00 AM) emanuele: (or maybe because I wrote the code and forgot to add :P )
(01:34:05 AM) TehCraw: LOL
(01:34:22 AM) emanuele: but usually that applies more to documentation...
(01:34:31 AM) ***emanuele whistles innocently
(01:35:48 AM) TehCraw: Meh, I forget that sometimes too. :P
(01:36:00 AM) TehCraw: (or just don't feel like it)
(01:36:40 AM) ***emanuele always thinks "later", "later", then he pushes and says "...ooops too late"
The best moment for testing your PR is right after you merge it. Can't miss with that one.

Re: IRC

Reply #177

Quote from: TestMonkey – (07:20:43 PM) ***Norv thinks ManageBadBehavior wants a GenericList
Just a quick note: Whoever picks this one, wait please.. I have an overhauled version in queue. (PR expected in a few hours) ManageBadBehavior  is currently broken, the Log doesn't work as expected.. I've fixed various bugs and moved some logic (redirects, session and token validation) back to the controller.
Thorsten "TE" Eurich
------------------------

Re: IRC

Reply #178

Quote from: TE –
Quote from: TestMonkey – (07:20:43 PM) ***Norv thinks ManageBadBehavior wants a GenericList
Just a quick note: Whoever picks this one, wait please.. I have an overhauled version in queue. (PR expected in a few hours) ManageBadBehavior  is currently broken, the Log doesn't work as expected.. I've fixed various bugs and moved some logic (redirects, session and token validation) back to the controller.
Just another example of my piss poor work :P

Re: IRC

Reply #179

(10:27:30 PM) Norv: $ ls -1 sources/admin/ | wc -l
(10:27:30 PM) Norv: 38
(10:27:30 PM) Norv: $ ls -1 sources/controllers/ | wc -l
(10:27:30 PM) Norv: 42
(10:31:04 PM) Norv: Why was I under the impression that the difference is much higher.
(10:32:07 PM) ***Norv ponders whether to pass to objectify the rest of controllers too, along with all the model-side moving out of wherever it still is.
(04/27/2013 12:48:28 AM) groundup: "pass to objectify"?
The best moment for testing your PR is right after you merge it. Can't miss with that one.