Any http://exercism.io\|exercism.io Racket mentors on here? I’ve had a submission to the Scrabble Score problem for a few weeks and it seems there are still 3 other users ahead of me in the :racket-flat: queue. Could someone move the needle for the four of us trying to learn Racket?
Can you just put your code in a github gist or something and share the link here?
@joshua.e.cottrell Me too. I’m the third one in the queue. :stuck_out_tongue_winking_eye:
Yes, I could do that but it won’t unlock the next problem for me. It passes the tests published with the problem but that alone doesn’t move me forward in the :racket-flat: track. If you’d like to see the code for some other reason I’d be glad to post it, just let me know.
@joshua.e.cottrell @wanpeebaw @acorso522 As an alternative the guidance at https://docs.racket-lang.org/getting-started/index.html provides different learning paths depending on your experience programming, and racketeers here and on https://groups.google.com/forum/#!forum/racket-users/\|racket-users always do their best to help.
Appreciate it Stephen. I’m actually working through SICP with Racket right now. Had a similar issue with exercism on the julia track though!
There is a language in racket specifically supporting SICP! https://docs.racket-lang.org/sicp-manual/SICP_Language.html Also look at the https://racket-lang.org/books.html\|books on http://racket-lang.org\|racket-lang.org for other good resources.
I’m actually using the sicp lang! :slightly_smiling_face:
I’ve also gone through a fair amount of the realm of racket book.
probably doesn’t need mentioning but I will just-in-case; use an editor with Racket or at least scheme support; Racket Mode (emacs) and DrRacket are the obvious choices, but there is also VIM and VSC support, though they don’t offer as many features and affordances. https://docs.racket-lang.org/guide/other-editors.html https://github.com/racket/racket/wiki/IDE%27s-and-text-editors
Interesting, it seems that http://excercism.io\|excercism.io has changed since I <https://github.com/lojic/LearningRacket/tree/master/exercism.io|coded some of the exercises> years ago. IIRC the list of problems was publicly viewable (w/o login), so I just coded them up. I never submitted them, and never had to “unlock” any exercises.
it’s still like that, I think? I didn’t log in and could view solutions and problems
Revisiting Unit system, I think I may misunderstand the purpose of the Unit system before.
Racket’s Unit system is something like first-class linking system. It allows programmers to write linking programs in the core language (i.e. Racket) itself. This makes it very easy to write a plugin system.
If we create a complete program by the Unit system, the resulting unit has close resemblances to a dynamic link library or executable. When we want to execute this unit, we need invoke-unit
it (it is something like so-loader
). So we still need main
or initial
function in that unit to set initial values.
PS: The parameterize a “module” can work, but it essentially parameterizes the source code of the program, rather than initialize the value. Therefore it may not be the best solution for eliminating the initial
function. The best solution for eliminating the initial
function may still be OOP.
Do you have a link to exercises? All I see are language tracks. And everything I click on says to “sign up”.
And switch to “Instructions” tab
I see. That is different than 2016 for sure. I didn’t have to view a solution to see the instructions - the exercises had details up front.
And the exercises weren’t specific to any language.
Recently I learned Racket’s unit system. This may be an optional solution for circular dependencies.
A-sig.rkt #lang racket/signature
a-function
A-unit.rkt #lang racket/unit
(require "A-sig.rkt")
(require "B-sig.rkt")
(import B^)
(export A^)
(printf "A started.\n")
(define (a-function)
(printf "a-function\n")
(sleep 1)
(b-function))
B.sig.rkt #lang racket/signature
b-function
B-unit.rkt #lang racket/unit
(require "A-sig.rkt")
(require "B-sig.rkt")
(import A^)
(export B^)
(printf "B started.\n")
(define (b-function)
(printf "b-function\n")
(sleep 1)
(a-function))
main.rkt #lang racket
(require "./A-sig.rkt")
(require "./B-sig.rkt")
(require "./A-unit.rkt")
(require "./B-unit.rkt")
(define my-program@
(compound-unit
(import)
(export A B)
(link [((A : A^)) A@ B]
[((B : B^)) B@ A])))
(define-values/invoke-unit my-program@
(import)
(export A^))
(a-function)
@maburns has joined the channel
I think their exercises are on github, fwiw.
Yeah, Exercism has changed a lot since 2016. Overall those changes are probably positive, but they have a serious problem with many languages in that they can’t get enough active volunteers to do the mentoring side of things that they introduced. (See also https://exercism.io/blog/sorry-for-the-wait)
You can still do the completely self-directed approach if you like, but you have to opt into explicitly at some point.