freenode/#lisp - IRC Chatlog
Search
11:57:52
selwyn
heisig: do you use maxima as part of your research? either together with petalisp or separately
12:02:53
heisig
selwyn: I have used maxima in two previous projects, but I don't use it for Petalisp.
12:06:02
heisig
Some of my colleagues use SymPy, but it is so slow and full of bugs that I'm tempted to write an alternative based on cl4py and maxima.
12:09:58
heisig
beach: Climaxima looks very promising. But my colleagues want a computer algebra system with Python bindings.
12:12:02
flip214
heisig: perhaps putting effort into https://github.com/pinterface/burgled-batteries would be more interesting?
12:14:32
heisig
flip214: burgled-batteries is about using Python code from Lisp (a horrible thought!). What I want to achieve with cl4py is that one can use Lisp code from Python.
12:15:24
flip214
well, why not provide them an interface "load python file" in climaxima instead? Or have a text REPL for them?
12:20:17
selwyn
given the intention that python programmers should be able to play around with code written in lisp, i suspect that the best approach is to have lisp available from the (c)python REPL, if only to make it more attractive at first sight
12:20:42
selwyn
(as opposed to a FFI approach, or having a python implementation written in Common Lisp)
12:22:15
selwyn
this question does not have a cut and dried answer, since it depends on reasoning about other people's prejudices concerning choosing different software libraries
12:23:29
selwyn
one thing i do notice: most enthusiastic python programmers would not like to program in something other than CPython as that implementation contains the bulk of the libraries that make scientific computation feasible (iiuc)
12:26:21
flip214
still, I would see it as a kind of responsibility to gently nudge them to saner programming languages ... ;)
12:26:27
selwyn
i have not used burgled batteries, but i again suspect that in order to use it practically, one would need to make it aware of which of the various python binaries and environments it should use on a given system.. this seems like a lot of work
12:27:45
selwyn
flip214: well, this is one of my hopes from cl4py. unfortunately, it did not arouse immediate interest from some pythonistas i know
12:30:49
selwyn
they said that there's no point given the range of things they can do with python. it's understandable - most people will not experiment with new things if they are happy with what they have. it's a different matter if some new library, such as a 'python-maxima' were to be presented
12:36:13
heisig
selwyn: That is good to know. One thing that might interest pythonistas already is having access to cl:compile (and cl:disassemble).
12:42:24
selwyn
i have noticed some frustration at the reality of having to switch over to C to write performant code for python
12:43:30
selwyn
heisig: anyway, i ask since i am thinking of using maxima for some symbolic manipulation of n-dimensional tensors and matrices
12:45:16
heisig
selwyn: I haven't used maxima for tensor manipulation yet. But there seem to be some modules for it.
12:49:47
guicho
Hi all, last week I presented my numpy-clone in common lisp in Shibuya.lisp meetup. The talk was in Japanese but here is the youtube link to the recording which starts right at the beginning of the demo on the REPL, which you could understand. https://youtu.be/dWfR25EZNjs?t=6259
12:56:18
flip214
why not enter mostly-python-syntax in a text field in clmaxima, convert that to CL (shown in a second field) and then run that?
13:00:25
guicho
heisig: I basically reimplemented a specialized version of type inference mechanism. Currently every inference happens in the runtime, but they will be shifted to the compile time in the future.
13:02:39
guicho
heisig: specialized because it needs to account for the type upgrading in the common lisp array. Ratios are all converted to single-floats. Bignums are truncated to fixnums, and if overflow happens it signals errors. (COMPLEX FIXNUM) does not exist because common lisp does not allow a complex with imagpart 0.
13:05:26
guicho
flip214: but you cannot make a specialized array for (COMPLEX BIT), SBCL does not have it
13:06:36
guicho
heisig: Still struggling to publish it. I have some backer in my company, and hoping it helps. arademaker and fsmunos
13:14:32
guicho
heisig: since I implemented the inference part, you can focus on the distributed part in PetaLisp with the limited type subset you currently have
13:16:34
guicho
heisig: the distributed computation part and the lazy compilation part are your skill set and are more important for your your research question.
13:22:38
heisig
guicho: One more remark - I had yet another idea for type inference over the last few days.
13:23:30
heisig
guicho: Instead of working with type specifiers, one could work with integers that store a bitvector representation of each type as in Baker's subtypep paper.
15:37:49
jsatk
Thanks for the kind replies and investigation sjl & p_l. (I'm actually using sjl's "A Road to Common Lisp" article to learn)
15:37:51
jsatk
My computer went to sleep and lost connection so I may have lost some chat history. Was their ever a resolution?
15:39:26
p_l
jsatk: yeah, just run it as normal - some warnings are expected, because some implementations are bit more strict about what they see as "code smells" and sometimes you get a warning on "hey, I couldn't figure how to optimize that part, sorry"
15:39:53
p_l
jsatk: I have personally used compiler warnings about unsuccessful optimization as guide when optimizing code :)
15:41:55
jsatk
$ sbcl --load ~/.vim/pack/minpac/start/vlime/lisp/start-vlime.lisp 👈 This is all I'm running and it produces the aforementioned errors.
15:42:46
selwyn
p_l: sometimes i get remarks from SBCL about the 'cost' of various operations. does this usually indicate that the 'code smells?' or is it not possible to conclude anything without investigating more
15:57:09
sjl_
jsatk: yeah this is just a usocket problem that is already fixed, but the fix unfortunately just missed the cutoff for the latest quicklisp dist
16:15:43
fivo
Does anybody know if there is a function in asdf that returns all the systems defined in a directory and its subdirecotries?
16:18:56
jsatk
I'm doing the Vlime tutorial and I'm like grinning ear to ear. It boggles my mind that this old-as-hell language has such a nice and mature way to work with it (that doesn't require an IDE). My day-to-day work is modern web stuff (React, Node, Python, etc). Why don't those have tools this mature? 😢
16:25:16
White_Flame
selwyn: those are just "notes", not warnings or anything. It's just telling you that there are still runtime checks & generic handler calls being made, in situations where it does have extra optimization steps that it can't there due to type uncertainty
20:27:58
dim
can I rely on (probe-file (make-pathname :defaults "/Users/dim/dev/temp/pgloader-issues/926/DNORDOC.DBF" :type "dbt")) #P"/Users/dim/dev/temp/pgloader-issues/926/DNORDOC.DBT" being portable?
20:30:01
pjb
dim: Use :case :common or :case :local with :case :local, it will be upcased depending on the file system (actually the implementations do it randomly).
20:30:13
katco
is there a standard way of interspersing two lists together, e.g. `(intersperse '(1 2 3) '(a b c))` => `(list 1 a 2 b 3 c)`?
20:30:59
dim
I read that “truename may be used to account for any filename translations performed by the file system.”
20:31:39
katco
pjb: perfect! i thought there was something clever with `oddp` or something, but i like this much better :)
20:32:12
pjb
If you use :case :common then the case should not be changed (and since it should be case insensitve, I'd expect it to be upcased, but implementations can do whatever they want with physical pathnames (and some do it with logical pathname, which is not conforming).
20:33:16
pjb
katco: this will still walk the resulting list twice. (cons 'list (loop :for x :in '(1 2 3) :for y :in '(a b c) :collect x :collect y)) #| --> (list 1 a 2 b 3 c) |# walks the result only once.
20:33:30
dim
pjb: if I just use make-pathname, the pathname type is down cased as I enter it in my code, if I then use truename or probe-file on the resulting pathname, then the case is adjusted to the one of the file I have on-disk
20:33:49
katco
in my case i'm looking for clarity over performance. i didn't want to get into a `loop`
20:34:08
dim
I like that behavior as I can hard-code lower case pathname type and then let the implementation figure it out, it seems, but I would like to know if I'm just lucky here...
20:35:13
pjb
dim: well, since you have a physical pathname here, first make-pathname makes in an implementation dependent way. Then it's used to find a file, which may involve symbolic links, then truename rebuilds a path using the file system. So if you have a case insensitive file system, you may get case transformations in both functions.
20:36:56
Bike
(defun intersperse (sep list) (loop for el in list collect sep collect list)) then cons on the front
20:39:05
pjb
uname -s ; mkdir -p /tmp/A ; ccl --no-init --eval '(print (probe-file (make-pathname :defaults "/tmp/A")))' --eval '(ccl:quit)' gives: Darwin #P"/private/tmp/A/" and Linux #P"/tmp/A/"
20:39:22
dim
I think I'm going to implement: (or (probe-file (make-pathname :defaults (filename db3) :type "dbt")) (probe-file (make-pathname :defaults (filename db3) :type "DBT")))
20:39:42
dim
I don't feel like what I see is a general case, rather something specific to using CL on a Macos file syste
20:39:58
pjb
dim: then: ccl --no-init --eval '(print (probe-file (make-pathname :defaults "/tmp/a")))' --eval '(ccl:quit)' give: nil on Linux, and #P"/private/tmp/A/" on darwin.
21:49:25
Bike
just have a script that loads everything and then dies, and load it from your implementation running in the terminal.
22:03:23
Josh_2
Welll saving the image works, but the program doesn't work as a standalone program :(
22:04:46
oni-on-ion
'the program does not work as a standalone program' ... so is it a program at all?
22:09:14
Josh_2
I have a function that I use to load up my system which is how I start it up in sly I don't have to do anything other than change my package and it'll function normally
22:09:52
Josh_2
however I load the system save the image and then it doesn't function the same Q_Q, seems the UDP connections aren't working
22:13:36
oni-on-ion
hmm. i think there are special ways to handle file system handles and sockets and such