Jeffrey Sarnoff | 1 Aug 2012 02:13
Picon
Gravatar

Re: Question regarding naming of types and constructors


  
    the constructor for type T is    T( <thisorthese> )                 [ constructor(s)  T()  T(x::A)  T(y::B) T(x::A, y::B) T(x::A, y::A) , T(xs..) if the typology allow ]
                             ---
  
    the constructor  of type T is one of us

    tobj = T(x)

    the constructor  of tobj, an object of type T, is  the constructor for type T
                              --
    tobjs = T(xs)

              --- dinner arrived ---


On Tuesday, July 31, 2012 5:01:38 PM UTC-4, Stefan Karpinski wrote:
On Tue, Jul 31, 2012 at 4:57 PM, John Myles White <johnmyleswhite-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
I'm completely sure I don't appreciate the subtleties of this the way you and John Cowan do, but I'm not so troubled by this. T(x) can be seen as giving you "the best approximation" of the input to an object of type T. For an array, that's an array of Int's rather than a single Int, which would be a terrible approximation to the original inputs. When the best approximation is exact, you get exact answers.

 -- John

That's kind of a nice way to look at it. Although it doesn't quite jive with the "T(x...) constructs objects of type T" view which is where this conversation got started.

--
 
 
 
Mark Vogelsberger | 1 Aug 2012 04:28
Picon

clone/make failed

Hi,

I just tried to make the most recent repository version, but it fails:

[mvogelsberger <at> heroint1 julia]$ make
Initialized empty Git repository in /n/home12/mvogelsberger/julia/deps/libuv/.git/
error: The requested URL returned error: 403 while accessing http://github.com/JuliaLang/libuv.git/info/refs

fatal: HTTP request failed
Clone of 'http://github.com/JuliaLang/libuv.git' into submodule path 'deps/libuv' failed

Thanks,
Mark

--
 
 
 
Stefan Karpinski | 1 Aug 2012 04:51
Gravatar

Re: clone/make failed

You may need to mess around with the protocol for the libuv module in .git/config. I just change the default in .gitmodules to be git:// which should work for everyone who isn't behind a draconian firewall. If you are behind a draconian firewall, mess around with .git/config and/or complain to your sysadmin.


On Tue, Jul 31, 2012 at 10:28 PM, Mark Vogelsberger <mark.vogelsberger-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
Hi,

I just tried to make the most recent repository version, but it fails:

[mvogelsberger <at> heroint1 julia]$ make
Initialized empty Git repository in /n/home12/mvogelsberger/julia/deps/libuv/.git/
error: The requested URL returned error: 403 while accessing http://github.com/JuliaLang/libuv.git/info/refs

fatal: HTTP request failed
Clone of 'http://github.com/JuliaLang/libuv.git' into submodule path 'deps/libuv' failed

Thanks,
Mark

--
 
 
 

--
 
 
 
Mark Vogelsberger | 1 Aug 2012 04:57
Picon

Re: clone/make failed

Thanks for the quick reply! Got it working.

Mark


Am Dienstag, 31. Juli 2012 22:51:13 UTC-4 schrieb Stefan Karpinski:

You may need to mess around with the protocol for the libuv module in .git/config. I just change the default in .gitmodules to be git:// which should work for everyone who isn't behind a draconian firewall. If you are behind a draconian firewall, mess around with .git/config and/or complain to your sysadmin.

On Tue, Jul 31, 2012 at 10:28 PM, Mark Vogelsberger <mark.vogelsberger-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
Hi,

I just tried to make the most recent repository version, but it fails:

[mvogelsberger <at> heroint1 julia]$ make
Initialized empty Git repository in /n/home12/mvogelsberger/julia/deps/libuv/.git/
error: The requested URL returned error: 403 while accessing http://github.com/JuliaLang/libuv.git/info/refs

fatal: HTTP request failed
Clone of 'http://github.com/JuliaLang/libuv.git' into submodule path 'deps/libuv' failed

Thanks,
Mark

--
 
 
 

--
 
 
 
tor | 1 Aug 2012 05:26
Picon

Re: binary search cache behavior

The short discussion at the bottom was also very interesting. I'm not sure I understood it exactly, but one idea is perhaps to organize a sorted array into binary-heap like segments, each of which fits in a cache line, page or whatever unit makes sense?
Yet, intuitively it seems odd to use binary search instead of hash tables if the purpose is only to look up single keys. I'm not only thinking about the assymtotic running time, but the overhead of the compare as well. Maybe his application needed ranges of continually sorted keys? But if so, why consider hash tables?

--
 
 
 
Jeffrey Sarnoff | 1 Aug 2012 06:53
Picon
Gravatar

multi-line comments, a visual sampler

(for your viewing pleasure)

If you choose to use tab character pairs for multi-line comments, use tab pairs for nested multi-line comments.
That decision parsimony offers user harmony.  You should not care how relatively indented is the nested pair.


using treble octothorpe pairs


###
   one, two, three
   three twenty one
###


###
      # one, two, three
      three twenty one
   ###
     one, two, three
     three twenty one
   ###
###


using octothorpe vertical_bar pairings


#|
   one, two, three
   three twenty one
|#


#|
      # one, two, three
      three twenty one
   #|
     one, two, three
     three twenty one
   |#
|#


using octothorpe exclamation pairings


#!
   one, two, three
   three twenty one
!#


#!
      # one, two, three
      three twenty one
   #!:
     one, two, three
     three twenty one
   !#
!#


using octothorpe colon pairings


#:
   one, two, three
   three twenty one
:#


#:
      # one, two, three
      three twenty one
   #:
     one, two, three
     three twenty one
   :#
:#



--
 
 
 
Viral Shah | 1 Aug 2012 10:49
Gravatar

Re: Re: DGEMM Benchmark

Emily,


Please look at these slides to understand what it takes to get DGEMM to work fast. OpenBLAS goes much beyond these optimizations, but this is a good starting point.


-viral


On Tuesday, July 31, 2012 11:34:08 PM UTC+5:30, Emily M wrote:
okay, but then how does that fit in with DGEMM? 

I'm running on a 64 bit, 800+ node Linux machine...so I really feel like it shouldn't be taking as long as it is. However, because I am also sharing said machine with x amount of other users, I have no idea how that is affecting my timings. 

I was given this:

do j=1,1000
  do k=1,1000
     TEMP=b(k,j)
       do i=1,1000
          c(i,j)=c(i,j)+TEMP*a(i,k)
      enddo
   enddo
enddo

 I was then told to rewrite it in Julia, which seems to be what I did...but again, it seems very slow. I mean, does what I wrote compare to that? That could be my problem...? Mainly I just really don't know what I'm doing, so any and all advice is welcome!

On Tuesday, July 31, 2012 10:07:36 AM UTC-7, Stefan Karpinski wrote:
Julia uses a BLAS (either OpenBLAS or your system BLAS depending on how it was configured when you installed it) automatically when doing a floating-point matrix multiply. All you have to do is write A*B where A and B are dense floating-point matrix objects (i.e. Array{Float64,2} or Array{Float32,2}). So writing

<at> time rand(1000,1000)*rand(1000,1000)

Is already generating 2 million uniformly distributed random numbers and then multiplying the two 1000x1000 random matrices using a BLAS. Looks like that takes about 1s on your system (it takes about 0.25s on mine).

On Tue, Jul 31, 2012 at 12:58 PM, Emily M <esmurch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
alright, so to clarify, I'm working on this with a year of extremely basic coding ability(in Java), so a lot of the technical terminology is lost on me. How would I use the BLAS implementation? 

when I do <at> time rand(1000,100)*rand(1000,1000) i get anywhere between ~1.04 seconds and ~7.78 based on what else is going on on my system at the same time. 


On Tuesday, July 31, 2012 8:11:28 AM UTC-7, Emily M wrote:
Hi all, 

I'm wondering if anyone has done the DGEMM benchmark with Julia yet, as I would be curious to see what sort of times people were getting. I'm getting times at ~90sec for a 1000x1000 matrix, which seems slow to me? But I really have more or less no idea what I'm doing, so that could be perfectly normal, I just don't know. Here's the code I have, maybe there are things I can do to make it faster?

function matmult(n::Int)
       a = rand(n,n)
       b = rand(n,n)
       c = fill(0.0,n,n)
       y,z = size(c)
       tic()
       for j = 1:n
         for k = 1:n
           for i = 1:n 
             c[i,j] = c[i,j] + b[k,j] * a[i,k]
  end
         end
       end
       toc()
 end

matmult(1000)

--
 
 
 

--
 
 
 
Jeffrey Sarnoff | 1 Aug 2012 12:45
Picon
Gravatar

Re: Question regarding naming of types and constructors

 ... let's try that again ...

A properly specified and appropriately designed big-t Type is as constructor of the well realized little-t type.  There are one or more constructors for every realized type.  The type may internalize the manner of its own instantiation; or object generation may be an external matter -- or both. 

Julia gives to types privileged standing an offers them a most capable nascent nature.  What does AkoType( ---- )  objectify? Must it be an object of dashing type or an expression of AkoType?

    akoness = AkoType( --- ) ;    Instantiate AkoType to obtain akoness objectified.

This is as it should be; there is nothing awry.








On Tuesday, July 31, 2012 5:01:38 PM UTC-4, Stefan Karpinski wrote:

On Tue, Jul 31, 2012 at 4:57 PM, John Myles White <johnmyleswhite-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
I'm completely sure I don't appreciate the subtleties of this the way you and John Cowan do, but I'm not so troubled by this. T(x) can be seen as giving you "the best approximation" of the input to an object of type T. For an array, that's an array of Int's rather than a single Int, which would be a terrible approximation to the original inputs. When the best approximation is exact, you get exact answers.

 -- John

That's kind of a nice way to look at it. Although it doesn't quite jive with the "T(x...) constructs objects of type T" view which is where this conversation got started.

--
 
 
 
tor | 1 Aug 2012 19:49
Picon

Re: bug and how to file issues

I like the fact that one can tell the compiler exactly what one wants done. The compiler writer can then choose to generate code as he sees fit. If you supply a sequenence of general bit manipulations (say, to count bits), the compiler will not be able to recognize the complex code's intention and use a pop count instruction whenever that is more efficient. I also think primitive functions are more readable than complex bit twidling sequences.

For the same reason I would like to have a plethora of such intrinsic instructions, even when no hardware equivalents exists, and even if they are currently not more efficient. I would like to have many of these in a separate module though. The idea is not to map to current hardware, but to make a statement about commonly seen primitive operations: "the compiler should know what this means and take advantage of it".

--
 
 
 
Elliot Saba | 1 Aug 2012 19:49
Picon
Gravatar

Re: multi-line comments, a visual sampler

I love this pairing idea.  The only downside is that transitioning back to pretty much any other language is going to be difficult, as I'll expect multiline comments to respect these rules!


I personally prefer ### over any of the others, if only because I'm used to python's """, and ### makes more sense as # is more traditionally a comment symbol.
-E

On Tue, Jul 31, 2012 at 9:53 PM, Jeffrey Sarnoff <jeffrey.sarnoff-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
(for your viewing pleasure)

If you choose to use tab character pairs for multi-line comments, use tab pairs for nested multi-line comments.
That decision parsimony offers user harmony.  You should not care how relatively indented is the nested pair.


using treble octothorpe pairs


###
   one, two, three
   three twenty one
###


###
      # one, two, three
      three twenty one
   ###
     one, two, three
     three twenty one
   ###
###


using octothorpe vertical_bar pairings


#|
   one, two, three
   three twenty one
|#


#|
      # one, two, three
      three twenty one
   #|
     one, two, three
     three twenty one
   |#
|#


using octothorpe exclamation pairings


#!
   one, two, three
   three twenty one
!#


#!
      # one, two, three
      three twenty one
   #!:
     one, two, three
     three twenty one
   !#
!#


using octothorpe colon pairings


#:
   one, two, three
   three twenty one
:#


#:
      # one, two, three
      three twenty one
   #:
     one, two, three
     three twenty one
   :#
:#



--
 
 
 

--
 
 
 

Gmane