I recently pretended it had keyword arguments by using #;
instead of #:
for the “keywords,” so I think that makes me a fan of this idea. :) https://github.com/lathe/lathe-comforts-for-racket/blob/04bc5e24a54f9e6717970586cefc624fbcc400d7/lathe-comforts-lib/struct.rkt#L475
@krismicinski compilers and languages is what drew me to LISP in the first place, and then to Racket. But yes, I’ve been “learning” this rather statically. Maybe I’ll change that approach.
Hello! I have a racket file that points to an other file in the same directory like: "./help.txt"
but… the relative path doesn’t work i.e. how to build a relative path w.r.t. the current file? thx !
Well, apparently, this will do the trick: (define-runtime-path data-dir ".")
(build-path data-dir "help.txt")
Yes, that’s the correct solution, although you can just put the path you want directly in the define-runtime-path also.
@contact Note that help.txt
or even ../path/to/foo.txt
are perfectly valid identifiers in Racket. So if you want you can do things like: (require racket/runtime-path)
(define-runtime-path help.txt "help.txt")
(define-runtime-path ../path/to/foo.txt (build-path 'up "path" "to" "foo.txt"))
¯_(ツ)_/¯
Is there a shortcut for typing that man in the last line?
Well that is my trademark but I will share how to do it anyway. It’s the shrug
command in slack. Just start the line(s) with /shrug
.
or not ¯_(ツ)_/¯
:smile:
Thanks!
Strange. It’s the only command of that type.
Ah Well.
¯_(ツ)_/¯
/shrug Ok thx !
@sorawee Hi. Hopefully sorbits (Allan) will pull the PR monday, but if not how about this plan: We set up a Github team (say scheme-team) or reuse sicp-team. Then fork the grammar, and then take up pchaigo on his offer. https://github.com/github/linguist/issues/3089#issuecomment-462360585
@free.niu has joined the channel
nice!!
if you’re interested in more details, the docs for this function are online now: http://docs.racket-lang.org/rebellion/Struct_Descriptors.html\|docs.racket-lang.org/rebellion/Struct_Descriptors.html
(it’s part of my utils package)
Back when I was at Uni I had to use Java all the time. I didn’t understand that it was a problem, but I was slowly starting to hate programming. I was considering changing majors actually. However, when I discovered PLT-Scheme and SICP, it reignited my passion for programming. So, for that, I wanted thank all of you for your hard work. It made a big difference for me. Who knows what I would be doing now if I had quit CS?
Often typed/rackunit for me goes into an infinite loop kinda thing (the tests terminate after a while when drracket says it’s gone out of memory)
is that a known bug?
@chris613 has joined the channel
Btw it only happens on test failures
I get this much displayed on screen: --------------------
. ../../../../../../usr/share/racket/pkgs/rackunit-typed/rackunit/main.rkt:22:2: FAILURE
And nothing after that, the interaction window stays like that for a while, and then DrRacket asks to kill the program as it’s gone over memory limit.