freenode/#lisp - IRC Chatlog
Search
10:42:41
phoe
Shinmera: I remember that this problem was solved before, maybe two or three years ago, and I was discussing it on #lisp. Does anyone remember it and/or have the code that was posted then?
10:45:27
Shinmera
Ah. I do not remember nor have the code. I have my own version of this primitive line breaking in Trial, and will be working on a Proper™ solution sometime soon.
10:48:40
pjb
What about: (com.informatimago.common-lisp.cesarum.string:string-justify-left "abc de ghi jk lmno pq" 7) #| --> "abc de
10:50:29
p_l
trying to figure if there are any roadblocks in front of me, since well, it's starting to get problematic to just find info about installing Qt4
10:51:53
p_l
I don't have much time, and my volunteering time is pretty much negative now, but maybe some time in future
10:52:31
Shinmera
the qt+libs thing is a tie-in with that in commonqt (which qtools uses by default)
10:57:31
Shinmera
phoe: though you can improve the results drastically by just using something like: https://shinmera.github.io/uax-14/#How%20To instead
11:06:34
Shinmera
still need to do UAX 50 and 29 before I can get to the text layouting engine though
11:09:26
p_l
Shinmera: is there anything I can call out to get a quick test of qtools? Haven't touched GUI coding in years...
11:12:59
Shinmera
yeesh. I think it's just doing a drakma download and zip extract. Nothing too weird there except perphaps cl+ss-- ahh.
11:20:59
p_l
flip214: whatever is in current quicklisp - I literally just grabbed quicklisp.lisp on this machine
12:04:05
thijso
What are the options for Qt on Lisp? I'm currently working with EQL5 (well, the android port EQL5-Android), and just now saw CommonQt mentioned (which I remember trying a long time ago, but didn't manage to really get working). Is that it, or there more avenues?
12:06:01
thijso
As I'm working on an android thing now (and maybe in the future iOS), that would be a requirement. Does CommonQt run on android?
12:06:28
bitmapper
how would i convert a nested list like (1 ((2 3) 4 (5 (6 7 8)))) into (1 ((2 3) (4 (5 (6 (7 8))))))
12:07:09
bitmapper
basically take any sublist that is length > 2 and make it into a list with the next item
12:08:39
thijso
Heh... it's actually not that bad. Or, it wasn't until I thought to update some versions, and ended up in a broken state and unable to build any working apps anymore...
12:10:12
thijso
Actually, I ended up with EQL5-android because that gave me CL on android. The only Qt part I use now is a blank text field where I dump output... ;)
12:15:52
pjb
bitmapper: perhaps you would consider reading Common Lisp: A Gentle Introduction to Symbolic Computation http://www.cs.cmu.edu/~dst/LispBook/ http://www-cgi.cs.cmu.edu/afs/cs.cmu.edu/user/dst/www/LispBook/index.html
12:19:27
pjb
bitmapper: it teaches you how to write a function to convert a nested list like (1 ((2 3) 4 (5 (6 7 8)))) into (1 ((2 3) (4 (5 (6 (7 8)))))).
12:41:41
thijso
Shinmera: yeah, it is, but eventually I'll be using more of Qt to build a (minimal) UI for my app of course. I'm currently still working on underlying libraries that I need for my app to even function...
12:42:44
thijso
I've looked into some examples in ecl that show how to run CL on android, but it looked like it only did it by some byte-compiler stuff, not by actually creating cross-compiled libs and using those
12:43:24
thijso
I'd like to figure out how to do that, though. Just have an NDK shell that loads up a Lisp loop or whatever and runs CL code from cross-compiled libs
12:43:54
thijso
But, as I already have a system that works (or, at least, I *had* one), I'm focussing on that
14:01:27
phoe
Oh gods. Half a year in this new dayjob project has caused my programming skills to recede *MASSIVELY*.
14:06:48
p_l
/Users/linus/qt4/install/lib/libQtGui.4.dylib (compatibility version 4.8.0, current version 4.8.7)
14:06:57
Shinmera
Can you try (qt-libs::fix-dylib-collection (uiop:directory-files qt-libs:*standalone-libs-dir* (make-pathname :type "dylib" :defaults uiop:*wild-path*)))
14:09:52
p_l
Error opening shared library /Users/pl/quicklisp/dists/quicklisp/software/qt-libs-20190710-git/standalone/qtlibs!commonqt.dylib : dlopen(/Users/pl/quicklisp/dists/quicklisp/software/qt-libs-20190710-git/standalone/qtlibs!commonqt.dylib, 10): Library not loaded: /Users/linus/qt4/install/lib/libQtGui.4.dylib
14:09:52
p_l
Referenced from: /Users/pl/quicklisp/dists/quicklisp/software/qt-libs-20190710-git/standalone/qtlibs!commonqt.dylib
14:10:05
phoe
Shinmera: have you considered setting up Travis CI for auto-building qt-libs and friends?
14:10:50
p_l
oh, and I had to link the libs to dynamic linker's fallback path ($HOME/lib) because some stuff couldn't find each other even earlier
14:11:15
Shinmera
phoe: I have waste so many hours with debugging these shitty ass CI environments that I have completely given up on CI that isn't on my own machines.
15:24:27
phoe
Geez. It took me much more efford than I thought it would take to write this piece of code.
15:25:10
phoe
And I am still not really happy with it because of the SPLIT-SEQUENCE call in the beginning that literally splits the paragraph into words.
15:28:29
dlowe
also this one-line insanity: https://github.com/dlowe-net/irken/blob/master/irken.tcl#L130
15:29:06
phoe
dlowe: your algorithm breaks on non-alpha-chars, which means that "...foo, bar..." might have the comma separated from "foo".
15:30:35
phoe
But, if I replace `position-if-not #'alpha-char-p` with `position-if #'whitespacep`, it might work the way I'd like it to...
15:34:44
Xach
i wanted to use it for both ascii text and variable-width fonts and didn't want to write it twice.
15:35:47
phoe
Xach: I kind of didn't expect that I'd need to file an issue on it right after I see it
15:39:08
Oladon_wfh
Heh, indeed. I've been heavily involved in that sphere over the years, including as an Immortal.
15:41:28
Oladon_wfh
The MUD I was on did a complete rewrite of Diku many years ago (still in C), and it was quite intense
15:43:56
dlowe
I have a less-Diku-like MUD engine that I was working on, too, but didn't have the energy to start one from scratch
15:45:39
phoe
Xach: I'm not sure yet - I'll need to check it out later today, as I have to scoot in a few.
15:48:41
phoe
Xach: I'll take a look at it and perhaps write some tests for it later. (Any particular framework that I should use?)
15:52:23
pfdietz
"Let's look in QL to see which test frameworks are popular." (looks) "Let's look in QL for projects that have any tests."
15:56:14
Lycurgus
it would be great if cl had a semantics that allowed something like quickcheck in hs
20:27:19
pfdietz
Lycurgus: ansi-test has a simple 'make-random-element-of-type' function. It's quite useful for testing various CL built-ins, and has found lots of bugs in various implementations.
21:15:48
sebboh
LdBeth: funny you should mention that, I am specifically curious about whether or not the next such tool will use symlinks in that way... theres-got-to-be-a-better-way.gif?
21:19:22
LdBeth
the reason why people develop package mngrs like nix is because haskell is the language that has most of the libraries are not compatible with each others
21:20:41
LdBeth
well you could get similar probs in C++, but most of the time this problem doesn't exists in CL
21:22:21
LdBeth
well, I just build a minimal version of graphviz not producing raster imgs but postscript/svg
21:23:23
sebboh
hm that would solve all the renderer problems! Nice. But, I've had build problems with layout stuff too
21:28:39
sebboh
the latter, yes. bind that to some sequence.. But that would reveal that there's more than one thing I don't understand about haskell. :P
21:29:39
sebboh
(or maybe it would reveal that I know you can type 7-bit clean ascii in haskell always and not be limited in anyway because the glyph feature is like.. basically macro expansion or something?)
22:35:51
_death
np.. btw, ironclad should also export modular-inverse, since it's a useful operation
22:36:39
pjb
_death: you want ironclad:generate-safe-prime, or com.informatimago.common-lisp.arithmetic.primes:compute-primes-to
22:40:33
pjb
asarch: you will prefer com.informatimago.common-lisp.arithmetic.primes:compute-primes-to then.
22:40:42
pjb
(com.informatimago.common-lisp.arithmetic.primes:compute-primes-to 64) #| --> #(2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61) |#