rokitna
2019-2-24 11:25:54

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


abbyrjones72
2019-2-24 11:54:52

@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.


contact
2019-2-24 18:31:15

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 !


contact
2019-2-24 18:38:39

Well, apparently, this will do the trick: (define-runtime-path data-dir ".") (build-path data-dir "help.txt")


samth
2019-2-24 18:56:48

Yes, that’s the correct solution, although you can just put the path you want directly in the define-runtime-path also.


greg
2019-2-24 19:31:45

@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")) ¯_(ツ)_/¯


soegaard2
2019-2-24 19:42:15

Is there a shortcut for typing that man in the last line?


greg
2019-2-24 19:45:21

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.


greg
2019-2-24 19:45:50

or not ¯_(ツ)_/¯


greg
2019-2-24 19:45:54

:smile:


soegaard2
2019-2-24 19:57:32

Thanks!


soegaard2
2019-2-24 19:59:55

Strange. It’s the only command of that type.


soegaard2
2019-2-24 19:59:58

Ah Well.


soegaard2
2019-2-24 20:00:02

¯_(ツ)_/¯


contact
2019-2-24 20:11:05

/shrug Ok thx !


soegaard2
2019-2-24 20:17:42

@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
2019-2-24 22:20:56

@free.niu has joined the channel


notjack
2019-2-25 02:05:34

nice!!


notjack
2019-2-25 02:07:13

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


notjack
2019-2-25 02:07:23

(it’s part of my utils package)


joelmccracken
2019-2-25 02:58:57

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?


hoshom
2019-2-25 06:28:11

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)


hoshom
2019-2-25 06:28:14

is that a known bug?


chris613
2019-2-25 06:35:37

@chris613 has joined the channel


hoshom
2019-2-25 06:37:01

Btw it only happens on test failures


hoshom
2019-2-25 06:38:38

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.