Perl 6 - the future is here, just unevenly distributed

IRC log for #pdl, 2015-04-22

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

All times shown according to UTC.

Time Nick Message
02:22 travis-ci PDLPorters/pdl#195 (master - bf2d658 : Chris Marshall): The build passed.
02:22 travis-ci Change view : https://github.com/PDLPorters/pdl/c​ompare/17ea9c6f22bd...bf2d658ed23f
02:22 travis-ci Build details : http://travis-ci.org/PDLPo​rters/pdl/builds/59434021
02:24 krismatrix joined #pdl
02:25 krismatrix Here is a random question..sort of offtopic from this channel (hopefully not taboo). When did you guys first learn programming? And how many years have you been programming?
02:26 preaction the Beginning Perl book. 16 years ago
02:26 jberger depends on if you consider LaTeX and/or Mathematica/Maple to be programming
02:27 preaction no, and yes
02:27 preaction wait, does LaTeX have loops and conditionals?
02:27 jberger funny, I would have leaned to saying yes and no
02:27 krismatrix 16 years...wow
02:28 jberger preaction: yes it does
02:28 preaction oh, then yes-ish
02:28 krismatrix I thought Matlab and Mathematica were considered programming languages
02:28 krismatrix although with a specific focus.
02:28 preaction i mean, XSLT has loops and conditionals too
02:28 jberger so then 2003/4 ish
02:29 krismatrix I did do some programming in Pascal in 2003-2004
02:29 jberger I started learning to program using a more real language (perl) in 2009 in order to parse LaTeX log files and generate another additional file from them
02:29 krismatrix And i did some spotty programming in Assmebly, C and java in college in 2004-08 time frame
02:30 jberger btw, that script is now this: https://metacpan.org/pod/App::makebeamerinfo
02:30 krismatrix Would you guys say you are programmers/developers by profession? or other?
02:30 krismatrix jberger: cool
02:30 preaction i am presently employed as a software developer, yes
02:32 krismatrix I hear that a lot of kids now learn programming in middle school?
02:32 krismatrix I haven't met one yet. Most of people I know (adults now) have done minimal programming
02:32 jberger krismatrix: I am as well, though my official schooling (and several degrees) are in physics
02:33 krismatrix And where are you from? Country?
02:33 jberger actually we both are from Chicago, IL, USA
02:34 jberger preaction and I
02:34 krismatrix oh...does that mean you know each other in person?
02:34 preaction it just so happens, yes, but chicago is a fairly big town
02:34 jberger indeed, we worked together for a while and we are both active in chicago.pm
02:34 jberger (which is how I got that job)
02:35 krismatrix Any of you tried creating encryption?
02:36 krismatrix I wanted to see if I could do a simple substitution cipher
02:36 preaction i know enough about encryption to know that i should leave it to the professionals
02:37 jberger krismatrix: implementing rot13 is a fun exercise
02:37 krismatrix rot13?
02:37 jberger google for it
02:38 krismatrix ah...rotate by 13
02:38 krismatrix got it
02:40 krismatrix curious....do you guys try to keep your code file to 80 characters? If so how do you do it?
02:41 preaction i try to keep my lines above 80 characters below 1%
02:43 krismatrix and how do you do that? Specifically...in my case...my code is often shorter than 80 chars...but once I add comments...it exceed them
02:44 preaction i never put comments on the same line
02:44 krismatrix Do you maintain the same indentation as the code...or do you use the full breadth?
02:44 preaction comments use the same indentation
02:45 jberger I have a widescreen, so I'm not rigid about 80 chars
02:46 jberger I do have a vertical line in my vimrc at 90 chars, just to give me a clue
02:47 krismatrix Well...the rigidity is more for other users isn't it?
02:47 jberger usually if I have a line that's much longer than that I'm probably doing something wrong
02:47 preaction i'm the one who reads my code more than anybody else. after 3 months, it might as well have been written by someone else
02:47 jberger krismatrix: eh, 99% of the code I write I maintain
02:48 jberger I'm very rigid in style generally, line length isn't one of my OCD ticks
02:49 krismatrix ok. ok.
02:51 jberger actually, I often see that strict adherence to that rule causes strange mid-statement linebrakes
02:52 jberger good guideline, bad rule
02:53 sivoais hah, its one of the topics of a talk given at Houston.pm earlier this year called "Best Practices Gone Bad" <http://anomaly.org/wade/blo​g/best_practices_gone_bad/>, <https://www.youtube.com/watch?v=T93aexpXShE>
02:56 krismatrix lol
02:59 krismatrix Is it possible to remove an element from an array in a foreach loop?
03:00 krismatrix for example...I have a foreach loop going through an array, then I have a if statement checking for some match. If match found, I want that to be removed.
03:01 jberger modifying the length of a data structure while iterating over it is generally considered scary
03:02 jberger however, a filter might make sense
03:02 krismatrix what is a filter?
03:02 krismatrix Basically what I need to do is take a string says jberger..and remove all e from it and give mean the new string.
03:02 krismatrix mean = me
03:02 jberger @array = grep { ! matches($_) } @array
03:03 jberger where matches is some function you defined
03:03 krismatrix grep...i don't use it a lot ..but i have read it.
03:04 jberger map/grep/sort are some really nice functional tools in perl
03:04 jberger a few more are available in List::Util
03:05 krismatrix ok..let me look into it for a few mins
03:09 krismatrix grep appears to only checking for true or false?
03:09 krismatrix i.e. it returns 1 or 0
03:15 jberger right, the block attached to the grep evaluates for each element and if the block is true the element is returned, if false then it is not
03:16 jberger @a = grep { $_ != 2 } (1..4); # @a = (1, 3, 4)
03:18 jberger grep is generally a filter, ie it will generally return the fewer outputs (or the same number) relative to the number of inputs
03:18 krismatrix yep...however I don't know if that really helps me.
03:18 jberger maps is generally a transform, ie it will generally return the same number of outputs as inputs
03:19 jberger sorry, that was "map"
03:19 krismatrix I think though I figured out a different way to solve my problem.
03:19 jberger "I have a foreach loop going through an array, then I have a if statement checking for some match. If match found, I want that to be removed."
03:19 jberger which can be implemented as @array = grep { ! matches($_) } @array
04:04 krismatrix hmm...Let's say I have a string, $x = funny; If I want to replace u with n using s/u/n/, I could do that. But then I want to change only the nn in funny to tt....is there a perl way to do that?
04:07 krismatrix Actually I should move that question to the main perl page...
14:25 opkick [pdl] wchristian pushed 1 new commit to master: http://git.io/vfnzD
14:25 opkick pdl/master 639dd84 Chris Marshall: Update Release_Notes for rc3 release
14:56 opkick [pdl] zmughal opened issue #101: SF#378 where on dice of pdl bad results  http://git.io/vfnDv
15:39 travis-ci PDLPorters/pdl#196 (master - 639dd84 : Chris Marshall): The build passed.
15:39 travis-ci Change view : https://github.com/PDLPorters/pdl/c​ompare/bf2d658ed23f...639dd84a29d9
15:39 travis-ci Build details : http://travis-ci.org/PDLPo​rters/pdl/builds/59561146
18:35 opkick [pdl] wchristian pushed 1 new commit to master: http://git.io/vfCWR
18:35 opkick pdl/master 1be2fcb Chris Marshall: Update VERSION to 2.007_17 for more development
18:35 opkick [pdl] wchristian tagged v2.007_16 at 18d60f3: http://git.io/vfCW0
19:10 opkick [pdl] wchristian pushed 1 new commit to master: http://git.io/vfCor
19:10 opkick pdl/master e92deb7 Derek Lamb: Remove '-w' from perldl and pdldoc to present a cleaner interface...
19:32 run4flat joined #pdl
19:40 travis-ci PDLPorters/pdl#197 (master - 1be2fcb : Chris Marshall): The build passed.
19:40 travis-ci Change view : https://github.com/PDLPorters/pdl/c​ompare/639dd84a29d9...1be2fcbb1e30
19:40 travis-ci Build details : http://travis-ci.org/PDLPo​rters/pdl/builds/59600778
20:41 travis-ci PDLPorters/pdl#198 (master - e92deb7 : Derek Lamb): The build passed.
20:41 travis-ci Change view : https://github.com/PDLPorters/pdl/c​ompare/1be2fcbb1e30...e92deb7b46e0
20:41 travis-ci Build details : http://travis-ci.org/PDLPo​rters/pdl/builds/59606305
23:20 opkick [pdl] wchristian created range-speedup (+1 new commit): http://git.io/vflLx
23:20 opkick pdl/range-speedup 00ec0a1 Craig DeForest: Speeds up range by 20%-50% depending on use pattern, just by not copying the index variable extra times.

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