mark.warren
2018-5-17 07:33:18

Hi all, as a beginner with racket, but coming from a looong background in Java I was wondering about the efficiency of immutable hash tables. If I use hash-set to add items to an immutable hash table, is it dealt with in some clever way or is the original hash table just thrown to the garbage collector? e.g. If I do (hash-set(hasheq ’name “Jane”) ’age 20), are 2 hash tables created then the original garbage collected or does anything get re-used.


mark.warren
2018-5-17 07:33:32

Sorry that was a fairly garbled question.


samth
2018-5-17 13:08:56

@mark.warren immutable hash tables are efficient and share as much as possible


mark.warren
2018-5-17 13:09:41

Thanks @samth I was hoping that was the case.


samth
2018-5-17 13:10:50

@xizhao unfortunately setting that inside your file won’t change how the current file is compiled


samth
2018-5-17 13:11:34

I recommend using the PLTCOLLECTS environment variable


oleg.patraschku
2018-5-17 17:32:34

@oleg.patraschku has joined the channel


xizhao
2018-5-17 17:55:29

Thanks Sam!


oleg.patraschku
2018-5-17 18:05:06

hello,

I’ve been programming for a while in haskell and ocaml (working on static analysis of multithreaded C programs right now), but have never touched any lisp dialect . But that will change when I get started with racket in August (when I finish my semester and have more free time). My simple indented actions : 1.Read SICP.(numerous people recommended this book) 2.Do all the exercises in racket.

(I’m more in for the concepts than for the language specifically, but from what I’ve read, racket has a lot of tasty concepts in it :slightly_smiling_face:) Would you like to add something more? if you were a racket new comer how would you start your first stepts, now having all that experience.

Goal: given that racket will be at GSOC 2019, I would like to contribute to a project. Even if it won’t be, I will still implement colaborative editing with in a simple text editor (if that goes well , then for sure I’ll try to do it for DrRacket)

@mark.warren you’ll enjoy reading phill bagwell’s paper on ideal hash trees :slightly_smiling_face: (although I don’t know how any of rackets data structures are implemented, I’m new to the language as well)


pblasucci
2018-5-17 18:15:38

@pblasucci has joined the channel


zenspider
2018-5-17 19:54:38

@oleg.patraschku I wouldn’t recommend doing all the exercises in SICP. That’s a lot. It took our study group 9 months. Go look up what got assigned at MIT or UCBerkeley for suggested problem sets. I only discovered that AFTER we slogged through it.


zenspider
2018-5-17 19:54:51

that said. it was a tough yet good slog.


zenspider
2018-5-17 19:56:15

also since SICP really emphasizes vanilla scheme, you don’t really get problems that emphasize using the “tasty” bits. You probably can here and there, but higher level problems might help there more.


oleg.patraschku
2018-5-17 20:16:42

@zenspider thanks for the tip , are you refering specifically to : https://edge.edx.org/courses/uc-berkeley/cs61as-1x/SICP/eec65c5d8c924ca1a48c0a4d8295ec74/ ?


zenspider
2018-5-17 20:26:27

cs61a is definitely one of the ones to check


zenspider
2018-5-17 20:27:09

I don’t know if that’s what I found at the time. No, probably not. IIRC, I found something that just had chapters and problem #s to do


oleg.patraschku
2018-5-17 20:57:29

@zenspider if you find them by any chance please post the link :slightly_smiling_face: , I also found a newer version https://cs61a.org/

anyway it shouldn’t take me too much to finish it , with some topics I am very familiar , with some not quite


awz.ang
2018-5-18 01:46:27

@awz.ang has joined the channel


mark.warren
2018-5-18 06:22:43

Thanks @oleg.patraschku I’ll see if I can read that.