Perl 6 - the future is here, just unevenly distributed

IRC log for #pdl, 2013-05-28

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

All times shown according to UTC.

Time Nick Message
01:56 Meiermann joined #pdl
02:10 gtodd joined #pdl
06:16 sivoais joined #pdl
06:44 LimitSupremum joined #pdl
06:45 LimitSupremum is there a nice way to iterate through (index,value) pairs of a PDL?
06:46 LimitSupremum s/PDL/pdl/
14:36 run4flat liddle_piddle_bot, tell LimitSupremum run4flat says you'll just have to write a for loop
14:38 run4flat whereis thread_define
14:38 liddle_piddle_bot run4flat: Found thread_define in PDL::Core (http://pdl.sourceforge.net/PDLdocs/Core.html#thread_define)
14:39 run4flat liddle_piddle_bot, tell LimitSupremum another option is thread_define: http://pdl.sourceforge.net/PDLdocs/Core.html#thread_define
14:42 run4flat Good morning, everyone. :-)
14:45 pdurbin mornin'
15:16 jberger_ o/
15:47 MeierM joined #pdl
16:08 gtodd \0
16:08 gtodd oops head too big
16:08 gtodd \o
16:08 run4flat haha
16:08 run4flat egghead?
16:08 run4flat :-)
16:11 gtodd heh ...   anyone know a portable way to get 1000 random numbers on Unix ... I made a very lazy and linuxish post to stackoverflow and want to fix it  :)
16:11 gtodd eg one that will work on OS/X and BSD ....   bash has $RANDOM  (but does bash come with OS/X or is it tcsh?  )  but I thought of something like
16:11 gtodd od </dev/random
16:12 run4flat Perl comes with OS/X
16:12 run4flat :-)
16:12 gtodd yes .. after I show the non bash methods I will just say ... "or use this perl one liner" :-D
16:12 run4flat perl -E'say rand() for (0..999)'
16:12 run4flat oh
16:12 run4flat ok
16:12 run4flat :-)
16:12 gtodd the perl I even want to work on windows
16:12 gtodd :-)
16:13 run4flat s/I even want/will/
16:13 run4flat er, s/I even want/will also/
16:13 gtodd heh right ... to be fair
16:14 gtodd with perl on windows you still have "find"
16:14 run4flat really? Does Perl come with an implementation of find?
16:14 run4flat I didn't realize that
16:15 run4flat Hmm, I'm not sure, but you could certainly implement it
16:16 gtodd I don't think it is straight up File::Find I think something like File::Find::Win32 it wraps it
16:17 run4flat oh, cool
16:17 gtodd errm I think there is something like File::Find::Win32 that wraps it
16:17 gtodd anyway the perl part will be easier :)
16:17 run4flat yeah, I think I've heard of it
16:19 gtodd I just want a portable way to select a random list of files in $SHELL but with sort gnusort find gnufind $RANDOM (in bash but not sh or tcsh)  ... it may actually be impossible :)
16:19 gtodd without perl :)
16:23 pdurbin run4flat: Thesaurus of Mathematical Languages, or MATLAB synonymous commands in Python/NumPy at http://mathesaurus.sourceforge.net via [TechTalkFollowup] PLEAC (Programming Language Examples Alike Cookbook) for R, matlab, octave, numpy, PDL - https://lists.iq.harvard.edu/pipermail/techtalkfollowup/2013-May/000003.html
16:24 run4flat pdurbin, great!
16:26 gtodd cool  ... I didn't know PLEAC did PDL matlab etc
16:31 gtodd run4flat: anyway I know it's way OT but I thought I'd see how perl/PDL generated randomness on different platforms (rand random urandom) since it is portable
16:31 gtodd run4flat: :)
16:31 gtodd cheers
16:31 gtodd o/
16:31 run4flat oh, ok
16:32 run4flat gtodd, I don't think I ever answered that question. :-)
16:32 run4flat were you curious?
16:32 run4flat or do you have to attend to other things?
16:32 gtodd sure
16:32 run4flat ok
16:32 run4flat use PDL;
16:32 gtodd in an hour
16:32 run4flat print zeroes(100)->random
16:32 run4flat o/
16:32 gtodd ok
16:33 gtodd pretty easy ... probably the same on IRIX HP-UX NetBSD OSX WindowsNT Android
16:34 gtodd :)
16:34 gtodd heh
16:34 run4flat assuming it compiles on those... yes
16:37 gtodd and I can take those random values and make them into whole decimals etc
16:37 run4flat yes
16:37 run4flat something like "long(zeroes(100)->random * 1e8)" or some such
16:38 run4flat That said, if you want to generate a stream of random numbers, I think that plain Perl will probably do just fine
16:38 gtodd right R numpy etc are close to that too
16:39 run4flat PDL modules can take time to load, so for a stream of random numbers, I'd just use a Perl one-liner
16:39 gtodd yeah :-)  but I bet PDL/perl gets their source for randomness in a portable way
16:39 * run4flat checks the source of PDL
16:39 run4flat whereis random
16:40 liddle_piddle_bot run4flat: Found random in PDL::Primitive (http://pdl.sourceforge.net/PDLdocs/Primitive.html#random), PDL::Primitive (http://pdl.sourceforge.net/PDLdocs/Primitive.html#random)
16:40 run4flat PDL's code uses the system rand() function
16:40 gtodd great
16:40 run4flat which is portable, though it is not cryptographically strong
16:41 gtodd I knew it woudl be something like that :)
16:41 run4flat Somebody should really implement the Mersenne Twister for PDL
16:41 run4flat that'd be nice
16:45 gtodd anyway ... bash gnucoreutils are sort of an "installable platform" for shell programming I guess ... but just because elements of linux/gnu are portable that doesn't mean writing scripts that require you to install  bash and gnufind is "portable" programming. Whereas (I think) perl is installed almost everywhere but Windows
16:45 gtodd and PDL only requires > perl 5.8 (correct?)
16:45 run4flat that, and a C compiler
16:46 run4flat (for installation, at least)
16:46 gtodd so therefore ipsofacto using PDL is a "better solution" than bash scripting  :)
16:46 run4flat hahaha
16:46 gtodd ok I have no business ranting in here :-) sorry!!
16:46 gtodd hehe
16:46 run4flat for cross-platform random number generation. :-)
16:47 gtodd heh ... and so much more ;-)
16:47 gtodd cheers
16:47 gtodd o/
17:14 LimitSupremum joined #pdl
18:57 run4flat LimuSupremum, greetings
18:57 run4flat looks like liddle_piddle_bot didn't do its job
18:58 run4flat er, LimitSupremum (misspelled)
18:59 run4flat to get Perl-level auto-looping (also called threading), see thread_define: http://pdl.sourceforge.net/PDLdocs/Core.html#thread_define
21:03 Meiermann joined #pdl
21:58 LimitSupremum joined #pdl
23:55 LimitSupremum joined #pdl

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