Fork me on GitHub
#off-topic
<
2019-01-07
>
Daniel Hines02:01:58

Request for comment! I'm soon going to be giving a talk on declarative UI. I want to express how React has moved us forward in this realm, so I've written a tiny implementation of what I understand to be the essence of React. I'd appreciate comments on the following: - Is it clear and easy to follow? - Does it actually capture the core of what React is about? - Is it correct? - Is the demo enough? https://stackblitz.com/edit/pico-react

lilactown02:01:38

the React reconciliation docs are really good, if you haven’t read them already: https://reactjs.org/docs/reconciliation.html

👌 5
marplesoft21:01:26

Cool to see and sounds like a good book. I wonder how much overlap the book’s content would have with Clojure concepts?

cvic09:01:36

No idea... yet! But I'd love to see a Clojure equivalent for the Little / Reasoned / Seasoned Schemer

dangercoder15:01:27

Anyone with some good tutorial for learning Clojure/Getting interested in Clojure as a beginner? I want to introduce a friend to Clojure (actually using it, not Rich's videos), but to throw setting up Emacs in his face together with https://www.braveclojure.com/introduction/ feels a bit too much. Even if I went that path.

dangercoder15:01:28

I recommended Cursive, but not sure if Light table is easier.. would be nice with a all-in-one Tutorial.

enforser15:01:19

is he new to programming? If not, then try to use what they are already used to

dangercoder15:01:38

he is not. I guess Cursive would work since he uses IntelliJ on a daily basis

orestis15:01:09

I’ve recently revieweed a few books for intro material — Getting Clojure seemed to be the most gentle, no-fluff approach.

💯 5
orestis15:01:20

If he uses IntelliJ, cursive seems a no brainer.

kodnin15:01:33

I second @U7PBP4UVA with Getting Clojure.

orestis16:01:04

The downside of that book is that it doesn’t have exercises. My plan so far is to use the 2015 AoC puzzles, as the first 5-6 are very easy to solve.

henrik19:01:24

I'm a perpetual newbie in many respects. I use Atom with parinfer, previously with proto-repl, but I'm trying out Chlorine. I'm impressed by all popular options, at a distance. I gravitate towards Atom because: fewer bells and whistles than Cursive, more modern UI sensibilities than vim and emacs. Parinfer, because paredit makes me feel that a past as a professional piano player would have been useful (vim and emacs induce this sensation as well). Having at least tried my hand at all other options known to me, Atom is what I would recommend someone completely new to Clojure.

henrik19:01:47

Note that Chlorine only supports socket repl. If nrepl is desired, proto-repl is the alternative.

seancorfield19:01:13

That is a benefit of Chlorine in my opinion: it requires less of your Clojure app/REPL.

👍 5
fellshard19:01:08

Thoughts on Udemy as a resource? Our company migrated from a limited number of Pluralsight licenses to a per-employee Udemy license, but I know there's been major issues with course piracy in the past on that platform.

manutter5119:01:53

You mean people pirating other folk’s course and putting them on Udemy?

mattly19:01:31

as someone who takes courses, I like Udemy over Kadenze and Pluralsight a lot

mattly19:01:52

though I can't really reify that opinion beyond taste

todo22:01:29

What do these two python lines do?

def tokenizeWords(s) :
        global words                                          # clip comments, split to list of words
        words += re.sub("#.*\n","\n",s+"\n").lower().split()  # Use "#" for comment to end of line
        */

Conor22:01:00

Tokenizes words, of course

seancorfield22:01:19

The re.sub() part removes the portion of each line s that contains #, from the # to the end of the line.

Conor22:01:19

global is accessing a global variable from a different scope

Conor22:01:33

Looks like it's stripping off trailing comments

seancorfield22:01:03

Then converts what's left of the string to lower case and splits that (into words -- so presumably split splits on whitespace? maybe whitespace and punctuation?)

seancorfield22:01:05

So "Hello World # say hello\n" => "Hello World " => "hello world " => ["hello", "world"]

seancorfield22:01:21

(I feel tempted to spin up a Python REPL and just try it out...)

todo22:01:45

thanks for explaining 🙂

Lennart Buit22:01:23

(also, global is realy really really frowned upon in Python)

Lennart Buit22:01:39

Split indeed splits on consecutive whitespace, so "abc def".split() => ["abc", "def"]

Lennart Buit22:01:43

so its not equal to "abc def".split(" ")