freenode/#lisp - IRC Chatlog
Search
0:35:17
patrixl
yason for json parsing/emitting, spinneret for handling html, plump for xml/html parsing...
0:36:13
vms14
and It's not the first time I found a lisper who does not like cl-who for some reasons
0:36:23
patrixl
oh yeah I tried a few.. started out with cl-who at first, used r-clip as well, for now I settled on Spinneret
0:36:56
patrixl
cl-who is alright, I think it's when you want to do more complex things that you start writing macros, so might as well use something like spinneret that can help out
0:37:10
vms14
I've looked at cl-css, it's fine. Also looking at Shinmera's LASS library which seems much nicer
0:37:18
patrixl
basically I wanted to define my own "tags" so simplify my code and remove a lot of repetitions
0:38:09
patrixl
so it was either write a bunch of macros with cl-who, and learn a bunch of lessons over time leading me to rewrite my macros.. or use spinneret that already has gone through that process lol
0:39:50
mfiano
He goes as far as to recommend alternatives in his book, Common Lisp Recipes. He told me I should use them in email correspondence
0:52:55
mfiano
That's because it's ruricolist's project, and he wrote and uses serapeum everywhere, which has almost 40 dependencies itself
0:57:59
patrixl
and thinking "40 deps isn't as bad as any npm package" and then berating myself for thinking like that
0:58:52
aeth
What's going to become my utility library has essentially no dependencies except for alexandria and maybe a few more.
1:00:53
aeth
For CSS, well, CSS is much harder than HTML because it has this weird regexp-like language for selectors
1:01:19
mfiano
javascript has more dependencies because they have libraries for the most basic of tasks. there are such things as 1-line libraries. In a way this is better, but it does result in downloading the whole internet for a trivial project. I am of the opinion that utility libraries are rather useless when they bring in so much functionality that you don't need. Just copy what you need into your project and move on.
1:01:38
aeth
I thought I had a feature list, then I realized each feature has features, and I shelfed my CSS selector DSL for another day... again.
1:02:39
aeth
Well, I allow strings as selectors and always will because there's a good chance I'll accidentally leave features out
1:08:14
vms14
I want to practice with microdata and I saw it's very easy to put microdata for a qa page
1:08:54
vms14
google should show the answered question in a more visible way using microdata, stackoverflow uses microdata, quora does not
1:10:57
vms14
a forum has more needs than what I thought, I'm using phpbb as example to see what a forum should have. I see it uses templates for html with some little dsl inserted in it
1:11:28
vms14
It seems to be an interesting exercise to create a forum, but I'm really aiming to create a forum creator
1:12:09
vms14
should be a good step for then creating a website creator, a forum has more specific stuff, so it should be easier
1:12:32
aeth
phpBB offers a lot more than you probably need to offer for an initial first attempt at a web app
1:12:58
vms14
aeth: yes, but it serves as a good example and I can look at their features and steal them slowly
1:20:11
aeth
Running a forum (or wiki or whatever) on the Internet isn't really about the visible feature set, it's about the invisible issues that are practically mandatory, like moderation tools and anti-spam measures.
1:22:06
aeth
If you just have a submit box on the Internet, bots will flood it. Especially if it's known software like MediaWiki or phpBB, but I assume it will apply to custom forums as well.
1:23:09
aeth
If you want others to use it, you could have an IRC bot here give people a secret registration link. Security by obscurity, nobody's going to think to use an IRC bot.
1:23:34
aeth
Otherwise you're going to have to think about how to combat spam accounts far too much and that'll be all you think about.
1:49:32
no-defun-allowed
Because then if you have a name like John Where, you now store John. That sucks.
1:50:31
no-defun-allowed
I think any SQL libraries in CL with a s-expression syntax (or most SQL libraries in any language with some special function) will escape for you though.
1:54:42
aeth
xkcd 327 is old enough (2007-10-10) that if anyone did name a kid that name, then that kid could turning 12 in a few days. https://www.explainxkcd.com/wiki/index.php/Little_Bobby_Tables
1:55:40
aeth
take a few years to develop your software and Bobby Tables could literally be using your forum software
2:01:13
aeth
The article for the comic at [1] recommends to use prepared statements [2]. [1] https://www.explainxkcd.com/wiki/index.php/327:_Exploits_of_a_Mom [2] https://en.wikipedia.org/wiki/Prepared_statement
9:57:51
phoe
I remember that some time ago I was working on some code that split paragraphs of text into chunks that are no more than N characters in length. I don't have that function anymore though.
10:03:13
flip214
phoe: so, basically, (POSITION #\Space string :from-end T :end line-len) and cut off there, rinse and repeat?
10:10:35
flip214
what should happen with multiple spaces at the line-end? continue the next line with spaces?
10:12:11
phoe
flip214: coalesce multiple whitespaces into one, and too-long words should be broken up as-is; if the line width is 80 and a word is 90, then we break that into 80 and let the 10 overflow to the next line.
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)))))).