rokitna
2019-8-15 08:11:40

oh, nice technique!


soegaard2
2019-8-15 08:12:29

@bmitchell33 Also except-in


pocmatos
2019-8-15 09:37:53

@khepin thanks for the article, really interesting!


khepin
2019-8-15 15:01:17

it was fun to build too


soegaard2
2019-8-15 17:17:51

Is this supposed to generate no output? #lang racket (require slideshow) (para " I disappear! Where are you?")


samth
2019-8-15 17:44:17

Do you mean for that to be in a slide form?


soegaard2
2019-8-15 17:51:59

No, just in the repl. Compare with:


soegaard2
2019-8-15 17:52:05
(para "I disappear!
Where are you?")

soegaard2
2019-8-15 17:52:24

Here the second line disappears.


soegaard2
2019-8-15 17:54:53

Bigger picture: I was looking for a function that converts a multi line string into a pict.


leif
2019-8-15 18:06:45

Hey @robby, the changes you made to text-first-line.rkt seem to cause drracket to crash on any file long enough to make drracket scroll.


leif
2019-8-15 18:08:43

The error in particular being: send: no such method method name: do-draw-single-line class name: add-on-paint-logging context...: /home/leif/racket/racket/collects/racket/private/class-internal.rkt:4679:0: obj-error34 /home/leif/rsrc/gui/gui-lib/framework/private/text-first-line.rkt:147:6: on-paint method in first-line-mixin /home/leif/rsrc/drracket/drracket/drracket/private/unit.rkt:815:10: on-paint method in ...ket/private/unit.rkt:557:8 /home/leif/rsrc/drracket/drracket/drracket/private/module-language.rkt:2630:6: on-paint method in mk-module-language-text-mixin236 /home/leif/rsrc/drracket/drracket/drracket/private/syncheck/blueboxes-gui.rkt:323:4: on-paint method in docs-text-gui-mixin /home/leif/rsrc/drracket-vim-tool/private/text.rkt:243:6: on-paint method in vim-emulation-mixin /home/leif/rsrc/drracket/drracket/gui-debugger/debug-tool.rkt:500:8: on-paint method in debug-definitions-text-mixin186 /home/leif/rsrc/gui/gui-lib/framework/private/logging-timer.rkt:41:0: log-timeline/proc ...higher-order.rkt:375:33 /home/leif/rsrc/gui/gui-lib/mred/private/wxme/text.rkt:5381:18: paint-done /home/leif/rsrc/gui/gui-lib/mred/private/wxme/text.rkt:5202:2: refresh method in text% /home/leif/rsrc/gui/gui-lib/mred/private/wxme/editor-canvas.rkt:628:2: redraw method in editor-canvas% /home/leif/rsrc/gui/gui-lib/framework/private/text-first-line.rkt:119:6: after-scroll-to method in first-line-mixin /home/leif/rsrc/drracket/drracket/drracket/private/module-language.rkt:2667:6: after-scroll-to method in mk-module-language-text-mixin236 /home/leif/rsrc/drracket/drracket/drracket/private/syncheck/blueboxes-gui.rkt:296:4: after-scroll-to method in docs-text-gui-mixin /home/leif/rsrc/drracket-vim-tool/private/text.rkt:191:6: after-scroll-to method in vim-emulation-mixin ...


soegaard2
2019-8-15 18:20:20

Also in (para "I \n disappear!" "Where are you?") I see the “I ” and the “Where are you?” but the rest is gone.


robby
2019-8-15 18:23:36

@leif I’m not seeing that, but I may not be up to date. Let me rebuild


robby
2019-8-15 18:25:59

oic.


robby
2019-8-15 18:26:01

yes indeed.


robby
2019-8-15 18:36:45

@leif I’ve pushed a fix. Thanks.


dimitri.lozeve
2019-8-15 18:51:20

@dimitri.lozeve has joined the channel


nma.arvydas.silanskas
2019-8-15 19:01:02

(not sure if you get notified about replies or not on slack, still new to it, so I’ll ping you just in case @philip.mcgrath)


soegaard2
2019-8-16 00:23:56

sorawee
2019-8-16 01:03:27

sorawee
2019-8-16 01:06:16

Racket dependencies don’t usually include version number, unlike package.json / package-lock.json for JS


sorawee
2019-8-16 01:06:24

which is unfortunate


willbanders
2019-8-16 02:13:37

Might be misunderstanding something, but the documentation seems to state that delete-directory/files is part of base (presuming racket/base?). Using #lang racket includes it but #lang racket/base does not. <https://docs.racket-lang.org/reference/Filesystem.html#%28def._%28%28lib._racket%2Ffile..rkt%29._delete-directory%2Ffiles%29%29>



jaz
2019-8-16 02:14:48

@willbanders No, it’s in racket/file


jaz
2019-8-16 02:15:21

If you scroll up, you’ll see that it’s listed under the section: 15.2.6 More File and Directory Utilities


jaz
2019-8-16 02:15:57

On long doc pages that contain stuff from different modules, this can be pretty hard to notice.


willbanders
2019-8-16 02:16:08

What does it mean by Changed in version 7.0 of package base: Added Windows-specific file deletion.?


jaz
2019-8-16 02:16:49

It’s referring to that last paragraph about what it does differently on Windows.


jaz
2019-8-16 02:17:04

Before that version presumably it didn’t do that.


willbanders
2019-8-16 02:18:07

package base?


jaz
2019-8-16 02:18:13

Oh, sorry — yeah, just got that


willbanders
2019-8-16 02:18:17

np xD


jaz
2019-8-16 02:18:28

I think that’s a mistake


willbanders
2019-8-16 02:49:43

Alrighty, one final question and I think I’m done. How do I compare a path x with the parent of path y? Essentially, I want to know if x directly contains y. In this particular case y is a file, so I want to test if it’s in a given directory.

I found path-only on the docs, but the format seems a bit off - it return a path that prints as root/dir/, while the path I have for the directory prints as root/dir (no trailing slash).


willbanders
2019-8-16 02:57:13

This was fixed by adding a trailing \\ to paths for directories. (build-path root "dir") is a directory, but not equivalent to (build-path root "dir\\") in terms of equality and the behavior of path-only. This is a bit annoying and unexpected behavior.


jaz
2019-8-16 03:01:16

@willbanders does this (or some variant of it) work: (equal? (simplify-path x) (simplify-path (build-path y 'up)))


willbanders
2019-8-16 03:07:23

It does, but still requires the trailing \\.


willbanders
2019-8-16 03:23:58

Haven’t found anything to get the name of a directory yet, file-name-from-path only works on files. I thought I could get the last path element and use path-element-&gt;string, but there doesn’t seem to be a way to do that either. I don’t understand why this is so convoluted.


willbanders
2019-8-16 03:26:30

path-element-&gt;string says it’s generally the best method for getting a directory name, but fails on split because the path is not relative.


lexi.lambda
2019-8-16 04:18:06

@willbanders The base package is not the same as the racket/base module—a “package” is a unit of distribution (something you can install with raco pkg) while a “module” is a thing you can require. The base package is the package containing all the stuff that’s a part of Minimal Racket, including everything in #lang racket, various modules in the syntax/ collection, a handful of modules in the net/ collection, and a grab bag of other things needed to implement the core of Racket.


lexi.lambda
2019-8-16 04:18:37

notjack
2019-8-16 04:20:32

also “collection” is another thing


lexi.lambda
2019-8-16 04:21:20

For most purposes, a “collection” can be approximated as the analog of a “directory” in a module path, e.g. racket/, syntax/, net/, etc.


lexi.lambda
2019-8-16 04:22:00

A single collection can actually correspond to several different directories on-disk, though.