badkins
2019-8-12 14:28:01

@jeapostrophe it’s quite possible I simply haven’t been very observant, but it does seem like my surprise is shared by a fair number of other people who also missed the message so to speak.


badkins
2019-8-12 14:37:24

@nma.arvydas.silanskas I can certainly relate, but we have been assured that #lang racket will continue to be well supported. I’ve been using #lang racket for my production coding for the last 9 months, so I’d say Scheme (in the form of #lang racket) can definitely be used for serious production development.


nma.arvydas.silanskas
2019-8-12 15:58:25

perhaps, but I decided I like the assurance by spec (r7rs) more


gknauth
2019-8-12 17:17:24

Very happy for Racket News. Lots of great new stuff I somehow missed.


badkins
2019-8-12 17:38:19

I went through the same thing, and I’m still keeping an eye on the r7rs progress, but there are enough things missing from existing Scheme implementation that are provided by Racket that I would have a lot of work to do to reach the same productivity level - even something as simple as a Postgres library using the native wire protocol, etc. If you find a Scheme implementation with enough batteries included, let me know!


gacuzut
2019-8-12 17:56:34

@gacuzut has joined the channel


nma.arvydas.silanskas
2019-8-12 17:58:46

well yeah limited amount of libs is an issue, hence why I mentioned scripting above, which gives a bridge to ecosystem of host lang, as well as high performance in places where needed. I’m not claiming it’s the best way of doing things for I haven’t done it much myself, but this is what I plan to be exploring for the near foreseeable future; particularly C core + guile logic for a gamedev, and java webdev framework (likely spring boot) with kawa for, well, webdev


soegaard2
2019-8-12 20:41:01

soegaard2
2019-8-12 20:41:24

“lt” must be Left Top


soegaard2
2019-8-12 20:41:31

But ltl ?


sorawee
2019-8-12 20:47:30

Found these in the source code


sorawee
2019-8-12 20:47:37
         find-lt  ; (left & top)  ; pict pict-path -> dx dy
         find-lc  ; (left & vertical center)
         find-lb  ; (left & bottom)
         find-ltl ; (left and top baseline)
         find-lbl ; (left and bottom baseline)
         find-ct  ; (horizontal center & top)
         find-cc
...

soegaard2
2019-8-12 20:47:48

baseline !


soegaard2
2019-8-12 20:47:52

thanks!


sorawee
2019-8-12 21:24:04

Question about style: how do you write a comment on lines with ))]))])?

For instance, consider:

(define (loop xs)
  (match xs
    ['() 0] ; empty case
    [(cons x xs) (+ x (loop xs))])) ; cons case

Putting ; cons case at the position above seems wrong for several reasons. For one, I need to move it if I want to extend cases:

(define (loop xs)
  (match xs
    ['() 0] ; empty case
    [(cons x xs) (+ x (loop xs))] ; cons case
    [(vector a b) (+ (loop a) (loop b))]))

But

(define (loop xs)
  (match xs
    ['() 0] ; empty case
    [(cons x xs) (+ x (loop xs))] ; cons case
    ))

also looks bad (at least with the default indenter that DrRacket uses)

S-exp comment doesn’t help here. I guess block comment could be a solution, but it’s so verbose…


soegaard2
2019-8-12 21:26:18

Either as you first example, or as: (define (loop xs) (match xs ['() 0] ; empty case ; cons case [(cons x xs) (+ x (loop xs))])) or as: (define (loop xs) (match xs ['() 0] ; empty case [(cons x xs) ; cons case (+ x (loop xs))])) Either way is a little annoying.


sorawee
2019-8-12 21:29:36

:disappointed: sad


tgbugs
2019-8-12 21:37:37

I usually just accept the ugliness for in-process comments, and use the line above version if I want to follow the style guidelines as closely as possible


rokitna
2019-8-13 01:45:28

I write comments on the line above.

For reasons other than comments, especially when I’m writing a block of internal definitions, sometimes I do use that example where )) is on its own line. In those situations, I’ve gravitated to using exactly that indentation. It’s consistent with the case where there’s one or more subexpressions on that line, and this consistency pays off a little when matching parens by eye (although my older code is still inconsistent enough that I have to be wary around it anyway).