Fork me on GitHub
#off-topic
<
2020-01-27
>
bherrmann01:01:28

Is REPL based development is the same as TDD for strongly typed languages? (Tests have the slight advantage of being automatically reasserted over time... but a REPL session can be fairly easily spun into a test.) It seems the primary benefit of both REPL Driven and Test driven is immediate feedback. The REPL clearly wins in terms of feedback speed - for most cases.

seancorfield01:01:54

@bherrmann I definitely wouldn't consider them anything like the same.

seancorfield01:01:44

I still do TDD in Clojure and using a REPL just makes that even more convenient and faster.

seancorfield01:01:13

I would consider them orthogonal, to be honest.

👍 4
Matti Uusitalo04:01:07

With TDD you are also building a series of tests which catches regressions and documents intended usage of your apis. If you're only testing your code in the repl it might be you don't get this benefit. Fast feedback loop is definitely a thing in common with TDD and repl based development. Oh.. you basically said the same thing actually now that I parse it more carefully.

mloughlin09:01:25

what resources do I use to learn C in 2020?

andy.fingerhut09:01:13

I learned C so long ago I don't have any recommendations, but thankfully it is a smaller and more focused language than C++ !

mloughlin09:01:11

a lot of people swear by the K&R book, but it was written in '88!

mloughlin09:01:22

thankfully I have no interest in C++, it seems like the learning curve is more like a learning cliff, and you only have a text editor with which to scale it

orestis09:01:16

I knew a little bit of C back from Uni days - but I got over my fear of it when doing objective-c. Not sure if that helps though :)

Eamonn Sullivan09:01:20

The K&R book is still a good resource. It's as small and simple as the language. C doesn't change that much. That said, though, real-life C looks a lot different.

Eamonn Sullivan09:01:55

But you'll have a very good start on it with the K&R book.

dominicm09:01:02

Another vote for K&R from me

p-himik09:01:20

Yeah, K&R + reading at least a digest of all the changes in the standard that you end up using. (Or wow, there are now C11 and C18, TIL).

borkdude11:01:39

@UHK8B8STX There is a book "Modern C" which is free but also available on paper with Manning

✔️ 4
borkdude11:01:00

It was recommended by @U82DUDVMH

mloughlin13:01:48

that looks really good, (also it's free 😉 ). Thanks everyone!

hindol14:01:45

K&R is still the best book I believe.

dvingo15:01:24

I found "learn c the hard way" to be a great resource. https://github.com/zedshaw/learn-c-the-hard-way-lectures it looks like he took the site down, but the videos are still available here: https://www.oreilly.com/library/view/learn-c-the/9780134434452/

bfay16:01:04

I recommend 21st Century C, it's a pretty practical resource - it got me to start using gdb and valgrind, taught some useful things about coding style, got me more comfortable thinking in terms of stack and heap, etc. K&R is fine but when I've tried reading it I felt like I had a lot of unanswered questions about how C looks when people write it today.

👍 8
borkdude16:01:26

Does it make sense to just skip C and start with Rust? 😉

bfay16:01:02

I wonder that, too. There's something to be said about dealing with the pains of C programming, like forgetting to initialize variables or free memory, having your programs segfault mid-process with no explanation and spending an hour tracing that back to one stupid line you missed. It's sort of a rite of passage, and going through it would probably lead to a better appreciation of Rust. But maybe it's just a masochistic waste of time.

mloughlin16:01:18

I'm learning C so I can learn how memory exploits work, which Rust would ruin 😛

borkdude16:01:49

What's the most fun book for learning Rust btw?

3Jane17:01:29

@UHK8B8STX I pulled together a couple references here:

3Jane17:01:49

osx is a bit of a miserable experience because of missing tools / libraries, which is annoying if you're trying to use one of the books (like Modern C) out of the box.

3Jane17:01:13

but it's doable. If you don't already have a preselected IDE I'd recommend VS Code; CLion is commercial-only and user-provided C/C++ plugin for IDEA is out of date and spits errors.

3Jane17:01:50

(and clang / lldb for compilation and debugging)

seancorfield18:01:15

@UHK8B8STX The other book to check out is the latest edition of the Harbison and Steele C Reference

👍 8
hindol18:01:42

@U04V15CAJ The official documentation and book are pretty solid for learning Rust. The books are available offline once you install Rust.

mloughlin19:01:54

I have a half-thumbed copy of Programming Rust by Jason Orendorff and Jim Blandy. The quality seems high, but IDK how much it's kept up with changes to the std lib in recent years (async/await?)

mloughlin20:01:56

thanks @U82DUDVMH for the IDE recommendation, at the moment I'm using the trial version of CLion & was hoping I'd figure something out before the trial ended.

3Jane20:01:35

I was really sad to see there's no community version of CLion. vs code has IDEA-compatible keybindings, but it's not ideal.

Vincent Cantin11:01:15

I just realized that there are more people in #off-topic (16 036) than in #announcements (10 802). Next time I want to make an announcement, I know where to make it to reach people the most 😆

😂 12
borkdude12:01:45

only off-topic messages are allowed here. announcements are too useful for this channel

😂 12
👍 4
borkdude12:01:35

note: that wasn't serious

dominicm12:01:19

The trick is to make it look irrelevant

dominicm12:01:48

"Babaska: a not-clojure language now has support for new cool things"

👍 8
😂 8
emccue16:01:04

@sveri always unixtime

emccue16:01:35

Wherever possible

mloughlin16:01:42

that depends on how you store the unix time! https://en.wikipedia.org/wiki/Year_2038_problem