
@jcoo092 Well, math/matrix
being a functional library, there weren’t a way to do so. However other matrix libraries can do so. FWIW I think it would make more sense to benchmark the individual matrix operations. It makes it easier to compare apples-to-apples.

I didn’t attempt to fix the Makefile, I just ran the benchmarks with (time ...)
.

@jcoo092 About BLAS/LAPACK let’s ask @laurent.orseau how he installed it on Debian.

Both BLAS and LAPACK are very old, so they exist in several variations.

The original was written in Fortran and now there are a Fortran-based version and one based on the output of a Fortran-to-C compiler.

I think the naming conventions differ: Some export names with a prefixed _ and some omit it.

The Apple supplied libraries offer both (I think) - so maybe one needs to supply a flag when installing the library?

I see in the comments, that macOS uses CBLAS (the C-version), so maybe there is a both a BLAS and a CBLAS package?

@jcoo092 BTW - the benchmark you wrote using math/matrix
might turn out to be significantly faster if you run it in #lang typed/racket
instead. I can’t remember why, but at some point there were a problem with contracts that slowed things down when working with math/array
which math/matrix
uses. Maybe @samth knows whether things have improved.

Also how would I deal with e.g., logging the chat to disk if I used Universe. Would it be an expensive operation and need to write the whole chat window again every tick rather than append to e.g., a DB.

?

James Cooper. Thanks for the idea. I will ask her. Not sure exactly what her group does in the RP, but they don’t meet in person.

Yip, I very much intend to get to trying out Typed Racket also :slightly_smiling_face: I wanted to get proper versions in regular Racket first (and I have to make sure that I actually have working programs in the other languages too)

@jcoo092 I probably got these after installing scipy I guess, but otherwise you can probably install them with something like sudo apt install libblas liblapack
. There seems to be a libopenblas
too, not sure which is better

@laurent.orseau @jcoo092 Rereading the error message “ffi-obj: couldn’t get "cblas_scopy” from “libblas.so.3” (/lib64/libblas.so.3: undefined symbol: cblas_scopy)" I think it means that “libblas.so.3” was found, but “cblas_copy” wasn’t in the library. From that name it is clear, that we are using the C-version. Using the scipy
version might be a good idea - since they probably also make macOS and Windows versions.

Yeah, that’s what it looks like. I’ve tried installing just about everything I can think of/find - I strongly suspect now that the issue might be that whatever goes searching for the dependency finds a version of libblas which doesn’t have cblas_scopy
in it (the others all apparently are fine :confused: ).
I’ll need to work out how I can change the ordering of the search path.

You can temporarily change the path on line 85 to an absolute path. The macOS path is absolute (the string-append was just to break the line). https://github.com/soegaard/flmatrix/blob/master/flmatrix.rkt#L85

Also we need a way to list the symbols in a .so to check the names.

Yeah… :thinking_face:

I think nm -D <path-of-shared-library>
ought to work.

The Racket uses this process to find the shared library: https://docs.racket-lang.org/foreign/Loading_Foreign_Libraries.html It’s a bit complicated - shared libraries always are :disappointed:

But (get-lib-search-dirs)
in the repl should give you an idea where Racket looks first.

I’m still not 100% sure on the details, but it turned out that I had both libblas
and libcblas
.so files installed. Changing the reference in flmatrix to libcblas seems to have worked ¯_(ツ)_/¯

I do have libcblas too btw :slightly_smiling_face:

strange

Thanks @soegaard2 & @laurent.orseau :slightly_smiling_face:

3.10

Although: Debian science team maintainers have merged the CBLAS ABI into
the libblas.so shared object. Everything you need from libcblas.so
can be found in libblas.so . Please link your program against it
instead. See also

Seems specific to debian though

So flmatrix
ought to look for libcblas
first and then libblas
? Or is there a way to tell Debian apart?

Looks like mine are 3.8. I’m still on the Fedora distro before the current one, so probably mine aren’t 100% up to date. Regardless, I now know how to get this working so I can play around with it!

As far as I know, the version of BLAS used on mac is very old, so 3.8 is fine.

I think I have 3.8 on my other laptop also

It is confusing. I can’t even find the exact version used by Apple :disappointed:

Probably 3.apple

I wish there was a linux distribution called Orange, just so I could say “In terms of distribution, you really can’t compare Apple’s to Orange’s”

Whalesong is no longer maintained. I recommend using JavaScript in the browser and Racket on the server.

sorry for the late response, I’ve been playing dad for a newborn :slightly_smiling_face: … I finally managed to watch this talk and it was very interesting.

unfortunately it’s not really a diff of scheme and racket, so I think I’ll just read the rackett guide from cover to cover and try to figure out the differences myself

Would a custom browser protocol for Racket be something that racketeers would find useful? e.g. being able to have a link like racket:<args>
launch DrRacket Racket Mode and do something?

Sounds like a fun attack vector ;)

How?

Or are you just being funny?

@greg Just checked out the master of Racket Mode. Navigation in racket-xp-mode
is considerably more fluid than in the previous version! Very nice :thumbsup:

Congratulations (on the newborn)

Hi, I am trying to understand my examples in scribble are not showing the expected output. Take for example a package providing struct foo
: (struct foo (x)
#:methods gen:custom-write
[(define (write-proc self port mode)
(match self
[(foo x) (fprintf port "#~a#" x)]))])
then having in its documentation an example as follows: @(define fooeval
(parameterize ([sandbox-output 'string]
[sandbox-error-output 'string]
[sandbox-memory-limit 50])
(make-evaluator 'racket/base #:requires (list 'foo-pkg))))
@examples[#:eval fooeval
(foo 2)
]
Unfortunately the documentation will show as output of the example: (foo 2)
instead of #2#
. Is this my fault or some sort of Scribble breaking the generic gen:custom-write
method?