The web in a box - a next generation web framework for the Perl programming language

IRC log for #mojo, 2016-07-31

| Channels | #mojo index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
01:47 ningu joined #mojo
02:28 zivester joined #mojo
02:35 noganex joined #mojo
02:37 Kripton joined #mojo
02:50 kid51 joined #mojo
03:40 ababu joined #mojo
03:53 ababu joined #mojo
04:05 ababu joined #mojo
04:26 asarch joined #mojo
04:30 ababu joined #mojo
04:36 ningu joined #mojo
04:40 ababu joined #mojo
04:41 ababu Hello Guys
04:42 ababu I am not very good with Mojo or perl. Just a newbie
04:42 ababu I have this weired problem, which I can’t get over
04:42 ababu http://138.68.11.176:3000/checkSessionStatus
04:43 ababu http://pastebin.com/er7rWnuP
04:43 ababu that is my application file
04:44 ababu http://pastebin.com/1H2pKasr is my model model
04:44 ababu can any one help me out ? any help would be appriciated.
04:44 ababu I am pretty stuck
04:46 ababu I guess I got it
04:53 ababu joined #mojo
04:57 ababu joined #mojo
05:00 ningu joined #mojo
05:07 kaare_ joined #mojo
05:08 ababu joined #mojo
06:08 ababu joined #mojo
06:16 ababu my $ctx = Digest::MD5->new;
06:16 ababu my $md5password = $ctx->md5($password);
06:16 ababu i am not getting md5 results in password
06:16 ababu any clue what I amdoing wrong
06:21 omega ababu: you seem to be mixing the object oriented and functional interface to the module?
06:21 omega looking at the synopsis here: https://metacpan.org/pod/Digest::MD5
06:27 ababu joined #mojo
06:46 ababu my $id = $self->sqlite->db->query('SELECT id AS user_id FROM userlogin WHERE user_name = ? AND password = ? AND status = 1', $username,$md5password)->hash->{user_id};
06:46 ababu Query works when I log it using say
06:47 ababu In the program it throws “Can't use an undefined value as a HASH reference at /var/www/example.com/moblo/script/../lib/Moblo/Model/Login.pm line 31.”
06:47 ababu any better way to return single result ?
06:47 omega so the query doesn't return anything, so the ->hash returns undef
06:47 omega you need to check if you get something back from ->hash maybe?
06:47 ababu But query returns, when I try in the console
06:48 ababu Ok.
06:48 ababu so the idea should be to return the hash and extract user_id from it
06:49 ababu may be after checking the lenght ?
06:49 omega check if the hash is actually a hash at least?
06:49 omega if not, the query probably didn't return what you expected perhaps?
06:50 ababu hmm .. let me check
06:54 Janos joined #mojo
07:01 jamesaxl joined #mojo
07:02 PopeFelix joined #mojo
07:09 Vandal joined #mojo
07:47 trone joined #mojo
08:09 ababu joined #mojo
08:42 ababu joined #mojo
09:00 ababu joined #mojo
09:01 Vitrifur joined #mojo
09:12 Vitrifur joined #mojo
09:38 ababu joined #mojo
09:41 ababu joined #mojo
09:55 PopeF joined #mojo
10:07 cuechan joined #mojo
10:48 sugar joined #mojo
11:19 sugar joined #mojo
11:35 ababu joined #mojo
11:50 sugar_ joined #mojo
11:56 ababu joined #mojo
12:21 kid51 joined #mojo
12:53 jberger I'm assuming closing this was the right choice? https://github.com/kraih/mojo-pg/issues/27
12:57 mra90 joined #mojo
13:00 ababu joined #mojo
13:08 ababu joined #mojo
13:31 ababu joined #mojo
13:43 sri Yes
14:25 mra90 sri: what's your editor of choice?
14:26 sri Atom
14:27 marcus sri: are you using the vim mode plugin?
14:27 sri nope
14:27 mra90 thanks, looks similar to Sublime though
14:27 mra90 sri: not a vim fan?
14:27 sri it's open source
14:28 sri and i do like vim every now and then
14:28 mra90 oh yes that's the difference
14:29 sri to me vim is more of a terminal app i use when i ssh into boxes and need to make quick changes to config files and the like
14:30 mra90 yes it's a bit hard to menage huge projects using vim - for single file edit/read it's just perfect especialy on ssh
14:30 sri i think for working on bigger apps it's just not that good, like, i need very very good search in project functionality
14:31 mra90 call hierarchy and a like ?
14:32 sri not even that, like searching for all uses of a certain method in a project
14:32 kaare_ joined #mojo
14:33 zivester joined #mojo
14:33 sri guess i wouldn't mind more ide functionality, but so far i've not come across a decent one for perl
14:34 mra90 yep, Eclipse ?
14:34 sri eww
14:34 mra90 I do use Eclipse for my C projects and it does its job well
14:34 sri maybe camelcade
14:35 mra90 How is that Atom dealing with Perl code?
15:11 jberger sri: is there any reason we don't default MyApp::Commands:: in the command object?
15:17 Craftsmanship joined #mojo
15:17 Craftsmanship Is there any helpful tooling for collecting a list of places in which a helper is called in ep templates?
15:17 Craftsmanship imagine a hypothetical "translate" helper that someone might be interested in, for example
15:49 ningu joined #mojo
15:52 Janos joined #mojo
15:54 jberger Craftsmanship: first thought is just to use ack on the codebase
15:55 jberger especially since IDE tools might have even more trouble than usual inside of template
15:55 jberger s
16:01 Craftsmanship perl -E ... $( git grep ... ), but i was hoping for something less upsetting
16:02 ababu joined #mojo
16:11 jberger ack translate
16:24 Craftsmanship I was more worried about having to parse the templates right after that
16:27 jberger Parse? What are you trying to do?
16:31 Craftsmanship I'd like to know all of the places and arguments
16:31 Craftsmanship so i can see that <%= translate "All your base are belong to us" %> is in foo.html.ep
16:31 Craftsmanship and grab all those bits
16:32 ababu joined #mojo
16:48 sri jberger: you mean MyApp::Command?
16:57 sri anyway, i guess it's because app specific commands are still rather uncommon
17:13 ababu joined #mojo
17:28 ababu joined #mojo
17:50 sri it's crazy just how much more fun irc is with a nice web client
17:53 jberger agreed
17:54 jberger and actually I almost always have at least one app-specific command
17:54 jberger I like making one for schema migration
17:54 jberger yes I know it can auto migrate but I like it better this way
18:00 sri if i had to complain about something, i guess it would be initial load times of the irccloud app
18:00 sri but that's about it, totally worth the $3.33 per month
18:03 genio I guess I'm weird.  I love web apps, email, etc. but I can't get with IRC via a browser.  ssh and tmux+irssi handle it wonderfully for me
18:03 dod joined #mojo
18:04 sri i've used convos for like a year i think, loved it until it broke, then ssh+tmux+irssi for a bit over a year, and it was miserable
18:04 ningu joined #mojo
18:05 sri not being able to just take a look at irc from my phone sucks so much
18:07 sri and i don't think i've been as active in the last year as i've been in the past two days since i got irccloud
18:07 Grinnz trying to do anything with ssh on the phone is just so difficult without a proper keyboard with control keys
18:07 Grinnz (in general not just ctrl)
18:08 sri Grinnz: i think juicessh actually gets control keys very right, but it's still not good enough for irc
18:08 sri https://pbs.twimg.com/media/CfcNBbhWwAAzyVm.jpg
18:09 Grinnz yeah thats better than what i was using
18:13 Grinnz genio, i dont really like doing any chat system via the browser, i need it logically detached from the browser, luckily discord and slack have very nice desktop apps
18:13 Grinnz that's what annoys me about google chat though
18:13 sri aside from twitter, i think i use only web and mobile apps for communication now
18:17 sri it's funny, i never even considered not using a desktop email client until marcus told me how he uses the gmail web app
18:18 Grinnz yeah i've been using that for a while now, that works well enough, but i don't really use email the same way
18:18 jberger I use google inbox and I really like
18:18 jberger it isn't for everyone, but I think everyone should try it once
18:19 sri all notifications just go to the android phone, and i check my mail or whatever on the desktop when the phone led blinks :)
18:24 sri not sure what i didn't like about inbox
18:29 mishanti1 Kind of sad that the first job-listing I see that advertise a perl-developer position is mostly talking about how cool the company and it's business is.
18:29 sri how is that sad?
18:29 mishanti1 Having a hard time figuring out how that might appeal to anyone, and draw the really good candidates.
18:30 mishanti1 So, if I ever applied for a job somewhere sometime again I would be interested in 1) what are the challenges they face 2) how can I help and 3) is the compensation one that covers my living-expenses.
18:31 sri i mean, how do you draw good programmers in general?
18:32 sri none of that is perl specific, i've looked through tons of job ads recently, and they are all equally terrible ;p
18:33 mishanti1 Hehe. They usually are. :) Love the "minimum 5 years experience using <INSERT THING HERE>", where THING has only existed for 3 years.
18:34 mra90 oh common, perl is just a tool it's obvious that they won't include specific details of tools they use in job offer
18:34 sri yea, or the booking recruiter that told me i don't need to know perl, they could teach me
18:34 mishanti1 And one I will never forget: "closing the browser<->user feedback-loop by leveraging next-generation technologies"
18:34 mishanti1 I was trying to imagine what that would look like.
18:35 sri the stackoverflow people recently mentioned that job ads with salary range get much more candidates
18:36 mra90 how much they care about education you have ? I mean university degree mainly...do they care about it much ?
18:36 mishanti1 mra90: When I employ education is not at all a factor. To me it is totally irrelevant.
18:37 mishanti1 However I do not think that is the norm.
18:37 jberger sri: I know that personally the job has to look REALLY appealing if they don't talk salary at all
18:37 sri wouldn't be surprised if some hr people eliminated me for lack of a degree
18:37 mishanti1 Recruiters I talk to on a regular basis say that they use level of education as a means to simply limit the number of applicants they have to process.
18:37 mra90 mishanti 1: It's good attitude I think but I have heard about countries that you have a degree in a field or else you cannot work...
18:38 jberger preaction has mentioned that same concern (fear that he would get passed over for lack of degree) and honestly I think that's insane that any company would care about that
18:39 mra90 mishanti1: yes I've been told the same..,
18:39 sri it's mostly about work history though, the degree usually helps you get your first job
18:40 jberger I can certainly speak for that
18:40 jberger my first "real" job was a fairly senior developer role at Bank of America
18:40 jberger I don't think I get that interview (even with the recommendation I had from preaction and whitney (chicago.pm) without the Ph.D.)
18:41 jberger err, s/without the Ph.D.\)/) without the Ph.D./
18:42 mishanti1 Yeah, the algorithms they use to limit the pool before manual processing starts usually just filters out all with a level of education under X, so experience would have zero relevance.
18:42 mishanti1 cat cv.txt > /dev/null
18:42 jberger I also impressed one of the technical leads by including a test suite with my code challenge response AND I even coded a test for what I believe was an ambiguity in their spec
18:43 jberger (and a comment to the effect that I believed that the spec was ambiguous and that that test was codifying my reading of that spec)
18:43 jberger he still claims the spec was not ambiguous and that I had read it wrong, but that it was still one of the most memorable things he'd seen in a code challenge response
18:47 mishanti1 jberger: That is quite a way to impress. :)
18:47 mishanti1 I'm hoping more companies here in Norway start advertising that they use Perl. Could do with more skilled Perl-developers up here.
18:48 jberger I liked working with that guy (not everyone did), sadly as that team got bigger and the project too, the whole thing fell apart
18:48 jberger mishanti1: the same could be said of most countries I think
18:49 mishanti1 Probably yes.
18:50 stephan48 when i mention that i know Perl i usually get strange looks
18:52 sri it always amazes me that the german kind of apprenticeships is not more popular around the world
18:52 sri http://www.theatlantic.com/business/archive/2014/10/why-germany-is-so-much-better-at-training-its-workers/381550/
18:53 sri these days we even have apprenticeships for programmers, 3 years of on the job training, school, and you get paid a junior salary the whole time
18:54 stephan48 junior salary?
18:54 ningu I have degrees but they aren't in CS
18:54 sri entry level salary?
18:56 stephan48 where did you get these numbers from?
18:57 ningu he gave numbers?
18:57 mra90 well this apprenticeship programs looks like a company wants cheap workers..
18:59 stephan48 i must honestly say that it still hugely depends from city to city what you get as a salary in apprenticeships
18:59 jberger it seems to me that with the exception of the super-large companies (and even them sometimes) too much developer hiring is done "because we need them now"
18:59 jberger which is why you always see "N years experience"
18:59 mra90 stephan48L but it's always much smaller salary than regular worker
18:59 stephan48 mra90: exactly
18:59 jberger because they don't have the time or inclination to hand-hold younguns
19:00 sri those cheap workers tend to get a rather expensive education, and everything is very strictly regulated
19:01 stephan48 mra90: in my case about the amount you get in social walfare
19:01 mra90 I dunno, but isnt university education in Germany public?
19:01 stephan48 you need a certain degree for that to be allowed to go to universities
19:02 stephan48 you can get them via school later on if you don't get them in your regular school life but it takes its time
19:03 Kripton joined #mojo
19:03 stephan48 sri: yes, if the company is good and taking its job serious it works quite well. i heard of so many companies(including mine) here just throwing tasks at apprentices and doing not much more in regard of preserving a certain quality
19:05 mra90 jberger: well this youngsters tends to be more involved than those older colleagues and progressing really fast..after few months they are regular workers in most cases
19:06 jberger you don't have to convince me
19:06 sri stephan48: true, i imagine there can be huge differences depending on company size
19:06 stephan48 jberger: yes its a common problem, also these "N years experience" requirements often stem from HR being told "we need someone who knows X" without someone actually telling them what to actually request from folks they search
19:06 stephan48 yes
19:07 stephan48 i am currently switching from sysadmin&programming to just a programming job
19:09 sri stephan48: of course i can only speak from my experience at deutsche telekom, which was pretty good, they have dedicated teachers and training facilities
19:09 stephan48 that is great
19:11 sri back then network engineering was still pretty new though, so some of the teaching plan was still a little immature... and i ended up learning stuff like telephone pole climbing :)
19:11 stephan48 haha
19:11 stephan48 my former employer wants to hire an apprentice alongside their team to support them. which is currently quite near 100% of its workload. i advised them against hiring one because an apprentice can be a hudge help but sometimes he will just block a trainer completly preventing both from doing other stuff.
19:12 stephan48 they already train folks in other areas and since the dedicated training person left the company there was a visible loss in quality of the training
19:13 stephan48 "what are you doing up there?(on the telephone pole)" "i like having a good view during my coding sessions"
19:18 sri it's still a much better system than everybody getting college debt they might never be able to repay for a questionable liberal arts degree
19:19 mgrimes_ joined #mojo
19:21 stephan48 yes
19:21 stephan48 that is without question
19:22 PryMar56 joined #mojo
19:25 lluad joined #mojo
19:26 sri of course one thing we don't have enough here in europe is remote work
19:30 sri might be coincidence, but so far my observation has been that companies offering remote work are also pretty good about using modern perl, or at least keen to modernize
19:36 sri and the ones using irc/slack for internal communication being the best in general
19:38 mra90 and let me guess they are small to medium sized companies without corporate way of doing things ?
19:39 mra90 size*
19:40 sri yes
19:41 Grinnz sri, i guess those are signs that the company is open to what will work best for the programmers rather than what management thinks is best
20:05 sri so, no more free windows 10 upgrades
20:05 mra90 :P
20:08 marty joined #mojo
20:12 Grinnz damn, i really wanted microsoft to put more spyware on my computer
21:09 marty joined #mojo
21:11 ningu how about psyware? it would pop up gangnam style unexpectedly
21:15 Grinnz even better
22:10 marty joined #mojo
22:32 kf3t1n0 joined #mojo
22:33 sri mishanti1: re job ads without salary, at least these days there is glassdoor now
22:42 sugar_ joined #mojo
22:47 sugar__ joined #mojo
23:10 marty joined #mojo
23:25 Grinnz looks like this is why SetUserGroup breaks morbo https://github.com/kraih/mojo/blob/master/lib/Mojo/Server/Morbo.pm#L79
23:26 Grinnz after changing user/group, kill 0 returns 0
23:26 Grinnz on the root-owned manager process
23:26 ababu joined #mojo
23:26 Grinnz probably not worth fixing, but i'll at least note in the docs not to use it with morbo
23:28 Grinnz it's unfortunate though, because the app can't tell whether it was started under morbo
23:33 sri Grinnz: you could compare the value of $$ at startup time and setuigid time
23:34 Grinnz not sure how that would help
23:34 sri you deactivate the plugin in that case
23:34 sri since it's single process
23:34 Grinnz if they're the same?
23:34 sri yes
23:34 Grinnz hmm
23:35 sri morbo loads the app in the second process only
23:35 Grinnz right
23:35 sri then you also have daemon covered
23:35 ababu joined #mojo
23:38 sri or is setuidgid with daemon a thing?
23:39 * sri has just used linux capabilities and users with very little permissions
23:45 tchaves joined #mojo
23:52 sugar__ joined #mojo

| Channels | #mojo index | Today | | Search | Google Search | Plain-Text | summary