jerome.martin.dev
2018-6-8 07:01:32

+1 for that feature. Right now I usually make a install.rkt file that calls raco pkg install (list of dependencies) but it would be great to have something like the pip install -r requirements.txt of Python or the Ruby gemfiles.


pocmatos
2018-6-8 11:25:59

I am starting to play with syntax-parse and define-syntax-class. Is there a way to have keywords in the middle of a pattern as a literal-datum?


pocmatos
2018-6-8 11:26:12

I have: (begin-for-syntax (define-syntax-class field-spec #:attributes (idx name-list cst) #:datum-literals (#:names #:static) (pattern (idx:nat #:names name-list:expr #:static cst:nat)) (pattern (idx:nat #:names name-list:expr) #:with cst #'#false))


pocmatos
2018-6-8 11:26:15

but it results in:


pocmatos
2018-6-8 11:26:26
; registerbank-impl.rkt:17:22: define-syntax-class: expected datum-literal entry
;   at: #:names

pocmatos
2018-6-8 11:32:59

i am using keywords for no obvious reason, I simply like how they look.


ryanc
2018-6-8 11:41:08

@pocmatos keywords (and numbers, booleans, strings, etc) already act as literals in a pattern; the #:literals and #:datum-literals lists are only necessary for identifiers


pocmatos
2018-6-8 11:41:43

ah ok, so I don’t need to specify them as literals in the pattern form?


ryanc
2018-6-8 11:43:05

right


pocmatos
2018-6-8 11:50:19

it works!!! :slightly_smiling_face: thx


soegaard2
2018-6-8 16:04:58

FWIW A guide to use Racket with Sublime Text 3: https://gist.github.com/sarahlim/3f1527f8e910c36b3303346422b03409


Bot messages not yet supported
jboyens
2018-6-8 17:56:38

Is there a good resource for learning about FFI in Racket OTHER than the Racket-Docs? Maybe some blogs or something with more examples.


samth
2018-6-8 18:04:58

samth
2018-6-8 18:07:38

jboyens
2018-6-8 18:16:42

@samth Awesome. Thank you so much.


soegaard2
2018-6-8 19:48:00

@jboyens The paper on the FFI is nice too.


abmclin
2018-6-8 19:51:37

@jboyens I second the FFI paper, it was helpful for me too


jboyens
2018-6-8 20:59:05

Is there a link to the FFI paper? I’m not even sure what I might try searching for.



lexi.lambda
2018-6-8 21:24:59

@robby do you know what the “preserve stacktrace” option means in the drracket language menu?



lexi.lambda
2018-6-8 21:25:59

aha, thank you!


lexi.lambda
2018-6-8 21:27:12

now, for a followup question: is there a way to have DrRacket use .zo files produced by raco setup rather than always making new .zos? I thought turning errortrace off would do it, but I was wondering if I needed to also turn off preserve stacktrace… but I haven’t actually tried that yet.


samth
2018-6-8 21:27:34

@lexi.lambda I thought it already did that …


lexi.lambda
2018-6-8 21:28:18

all I know is that, even with debugging turned off, drracket takes a really long time to run a file written in #lang hackett after I’ve changed the implementation of Hackett and rebuilt with raco setup, but subsequent runs are fast


robby
2018-6-8 21:31:52

@lexi.lambda “populate compiled directories” ?


lexi.lambda
2018-6-8 21:32:15

if I turn that off, will DrRacket use existing zos? I think I was afraid that meant “load everything from source”, but maybe that doesn’t make sense…


robby
2018-6-8 21:32:26

If you turn that off, it will do what racket does.


robby
2018-6-8 21:32:29

sometimes use them and sometimes now


robby
2018-6-8 21:32:31

not


lexi.lambda
2018-6-8 21:32:37

that makes more sense in retrospect


robby
2018-6-8 21:32:58

if you turn it on, it will try to make its own compiled/drracket/* and do “good things” with them that you might not want your deployment environment to do


lexi.lambda
2018-6-8 21:34:35

yes, that’s reasonable. I do wonder one other thing: how does DrRacket decide which files to compile? does it whitelist <collects> so that it doesn’t try and create drracket/ subdirectories anywhere in there, or is there something more complicated?


gcc.programmer
2018-6-9 04:03:43

@gcc.programmer has joined the channel