Fork me on GitHub
#off-topic
<
2017-04-25
>
qqq00:04:41

I think, as long as I am granted the Either and State Monads, I'm willing to forsake all other Haskell monads.

tbaldridge01:04:13

Something to consider though...I've learned the hard way that trying to get monads into a language (unless that language was built on monads like Haskell) is a fantastic way to waste time on something that doesn't really matter.

tbaldridge01:04:23

Especially considering that most monad patterns (functions that create functions that create functions) tend to perform badly on platforms not designed for them, for example the JVM. A straight-line imperative function is going to perform way better than a function that has been split into 10 partially applied functions. @qqq

tbaldridge01:04:00

So it's a fun metal exercise...but how can it be justified trying to shoe-horn monads into Clojure when a bit of mutability here, and a few macros there would solve the problem in 5% of the time.

cjs02:04:19

@qqq: You seem to think that JavaScript is something difficult to learn, that takes weeks or even months of study. It doesn't; it's a relatively trivial language that you can learn very quickly once you know a few more sophisticated languages. Someone familiar with Haskell looking at things like promises in JS knows almost immediately exactly why they're there, what problem they're solving and how they work. He'll also think, "they should just have used a monad for that."

souenzzo02:04:12

After a program in clojurescript, I got a better feeling as javascript works and a quality of my JS code has improved by 10000% (Judged by me 😛 )

qqq08:04:31

@cjs: I never claimed it was difficult to learn.

qqq08:04:08

@cjs: If you're first language is C++, Java, or Haskell, you don't get to see how to immedaitely create cool apps in it.

qqq08:04:29

@cjs: If your first language is JS, you can be building mini-pinterest, http://mini-slither.io in your first quarter of college.

cjs09:04:22

@qqq Sure, but if you're so uninterested in learning about comp. sci. that you need the distraction of playing around with web apps to keep you going at all, you should just drop out of the program (saving yourself a large pile of time and money) and just play with that stuff yourself or do a programming boot camp. What you're suggesting is akin to spending time teaching physics students how to build model rockets instead of physics theory.

akiroz09:04:58

@cjs I think JS is a difficult language in the sense that you need to understand its internal workings very well to avoid bugs or explain why unexpected things behave the way they do...

akiroz09:04:28

JS is the only language where I actually had to look through the formal ECMA spec to get something done.

qqq09:04:05

@cjs: I bet you have more CS theory knowledge than the founders of SnapChat, but look at who has created more jobs / higher net worth.

qqq09:04:43

and I believe teaching JS first will get more students to think about creating stuff like snapchat/ pinterest / http://slither.io / ...

cjs09:04:12

@qqq: I am utterly mystified why you think university courses are a place to convince people they want to create startups or why they should be a place to teach that.

qqq09:04:31

Elite universities are focused on creating the next generation of leaders.

qqq09:04:38

Founders are part of that group of leaders.

cjs09:04:16

Founders of tech. startups are usually leaders because they were successful at building a startup, and they're usually successful at that because they just went and did it rather than relying on some university to make them a leader. Bill Gates' little time at Harvard before he dropped out contributed negligably, if at all, to his success.

cjs09:04:14

And having universities, elite or not, try to turn their students into code monkies is not going to help any of them become leaders.

qqq09:04:27

@cjs: Teaching people JS does NOT turn them into code monkeys. It gives them the opportunity to build something new (and a chance to be a Founder/Leader if it takes off).

qqq09:04:48

@cjs: (see above)

fellshard14:04:05

No, it does not, primarily because to build anything non-trivial will require them to build systems that JS simply would not equip them to think about properly.

fellshard14:04:32

Not by default, not without some painful stretching of the language.

roberto15:04:56

He is also assuming everyone wants to build a startup. Not everyone who goes into CS wants to build a startup.

roberto15:04:03

And learning a little bit of Business Admin/Marketing would be more helpful to those who want to build a business. Learning JS does not make them a business guru.

sveri15:04:40

I studied cs because I am interested in how things work, in the basics and concepts behind all the superficial stuff. Programming languages are just a small part of it. If I wanted to start a business I would rather have studied economics or marketing probably and not some STEM stuff.

dominicm15:04:11

> [Computer science] is not really about computers -- and it's not about computers in the same sense that physics is not really about particle accelerators, and biology is not about microscopes and Petri dishes...and geometry isn't really about using surveying instruments. Now the reason that we think computer science is about computers is pretty much the same reason that the Egyptians thought geometry was about surveying instruments: when some field is just getting started and you don't really understand it very well, it's very easy to confuse the essence of what you're doing with the tools that you use."

tbaldridge15:04:35

@dominicm one of my absolute favorite quotes from SICP

qqq16:04:22

@roberto : I'm not assuming everyone who goes into CS wants to build a startup. I am stating that, from a University's perspective, cranking out successful Founders makes the University more prestigious.

qqq16:04:30

@fellshard : I completely agree that JS-first is not a good way to design systems that scales to millions of requests / second. However, by the time the JS-first student reaches that point, he/she has enough users to raise VC and hire professionals.

fellshard16:04:05

And yet we have a startup industry full of those who I daresay I'd label JS jocks. 😛

fellshard16:04:41

The presumption that JS devs will simply 'grow out of development' seems patently incorrect.

roberto16:04:52

that is not the really CS. If they want to rush things to build a business, a trade school is the right place for them (and also get a degree in Business and/or Marketing)

qqq16:04:20

@fellshard : I'm not talking about "JS Devs", I'm talking about Founders who merely use JS to write their first prototype to find a new niche, who then raises VC, becomes CEO, and hires professionals.

fellshard16:04:42

Professionals who also write in JS.

fellshard16:04:53

The popularity of JS in recent years alone speaks to that, despite it being practically unused beyond basic web dev in any organization larger than a startup.

qqq16:04:03

I'm not sure if we are even debating the same issue anymore, or just flinging facts. 🙂 To clarify, here is my argument: 1) Producing students who go on to to Found successful companies increases the prestiege of an University. 2) A lot of modern web startup is NOT about some fundamental tech breakthrough; but just flinging mud at a wall until something sticks. 3) Teaching JS first allows first year students to try random social experiemnts that may or may not become the next Pinterest / Facebook / Snapchat. 4) Thus, teaching JS first makes sense for Universities.

tbaldridge16:04:54

But none of that requires a university

roberto16:04:17

yeah, I disagree with all those points.

qqq16:04:24

@tbaldridge : but that is the question of "should founders go to University"; not "should Universities teach JS in first year"

tbaldridge16:04:40

And for that matter the vast majority of developers I know don't have any formal training on software engineering at all.

tbaldridge16:04:05

But yes I agree, it's OT from your statement.

qqq16:04:02

Personally, I love Scheme/SICP; but if a University is trying to maximize it's prestiege by producing maximal # of successful startups, JS seems like an excelltent choice.

tbaldridge16:04:07

But on-topic, I have yet to see anyone go from knowing nothing about programming to writing some awesome startup 4 years of training later.

tbaldridge16:04:27

Maximal successful startups is completely orthogonal to the language chosen.

tbaldridge16:04:45

Facebook was starte with PHP. Snapchat was written in Python and Java. Pintrest is Python....none of that says we should be teaching JS.

tbaldridge16:04:06

Let alone that if you have serious server work to do you're going to need something besides Node.JS.

tbaldridge16:04:52

(e.g. you're not going to do facial recognition in pure JS)

qqq16:04:17

Youd' probably get started not by writing your own tensorflow / gpu routines, but by usting GOogle/Amazon computer vision services.

tbaldridge16:04:28

maybe, but a JS course at a university isn't going to teach you that. Let alone that any JS stuff you learn will all be different by the time you leave the uni. It's better to teach students proper software design, and comp-sci that will help them understand the reasons "why" we program a certain way, not the "how".

tbaldridge16:04:59

It's like any profession...teaching someone the "how" just turns them into cargo-cult-ers. Better to teach them the "why" so they can go and teach themselves the rest.

jsa-aerial16:04:31

@qqq you are also mistaken in thinking that the prestige of a university has anything to do with tech founders having been associated with it. That's just plain wrong. Prestige of a university is pretty much solely based (for good or bad) on whether it produces top notch research and thereby also attracts top notch researchers.

leonoel16:04:46

The one thing universities are good at is their ability to make brilliant people meet each other. When brilliant people meet, they make great things together. I'm not sure universities will attract as much brilliant people if they follow the path of hype

noisesmith16:04:56

@qqq the other day you compared clojure to a totalitarian socialist economy, and called erlang capitalist. It led me to wonder what an actual capitalist runtime environment would look like. For example, you would need a scheduler that allocated runtime resources in proportion to the resources you have already claimed (even erlang is socialist in that resources go back to a communal pool and can’t be reserved for the children of their owners).

qqq16:04:42

@jsa-aerial: I agree that there are different forms of prestiege, and that research prestiege is based on research output, not founder output.

qqq16:04:35

@noisesmith: this was in the context of actor model / objects / messaging (stuff talking to each other on its own) vs top-down control of managing all the objects right?

jsa-aerial16:04:39

as I say, for a university there really is only one form of prestige and it isn't anything about founders of companies

qqq16:04:39

@jsa-aerial: If we look at the two extremes, I would argue that in the eyes of many students, YC (pure startups, no research) is more prestigious than pure research centers (that produce research appers but not startups).

jsa-aerial16:04:03

students don't care about that

qqq16:04:21

@noisesmith : perhaps 'capitalist' was a bad choice of words; I wasn't referring to actors "producing more output than the resources they use" -- but rather, objects decide when to talk to each other ; rather than a top down control to get stuff to talk to each other

roberto16:04:22

people who want to study CS don’t care about founders and YC and all of that

qqq16:04:56

let's call truce on this; I think we're spamming #off-topic, and neither of us will convince the other of anything 🙂

jsa-aerial16:04:00

seriously, I work at a uni in research and none of the students there care one bit about what you are saying they do/should

roberto16:04:03

you are better off doing a major in information systems and a minor in business admin if you care more about the business side

tbaldridge16:04:19

So here's my beef...I don't care....because at the end of the day 99% of startups die, or are acquired by some company then killed. It's a tech bubble that will pop (horribly) in the next 10 years. You can't keep lighting money on fire and expect everything to go well long-term. At some point investors will catch on, that most "disruption" tech is just a 20-something kid who doesn't understand the problem space.

tbaldridge16:04:37

We even see that today with Uber...turns out, once you start paying people decent wages, and stop paying your customers for using your service, and start doing better vetting...you have to charge the same amount as a normal Taxi company. And the whole thing falls apart.

dominicm16:04:49

Do Universities not leave the education targeted at "practical" to trade schools? Admittedly, I've read that universities are being pushed towards being trade schools in computer science department.

sveri16:04:50

Disrupting also usually just is a term for "getting as much capital as one can, bid much lower than the competitors, try to wait until competitors fall apart, monopolize the business". So its not about being better in terms of economics, treating workers or anything, but just about moving as much money to yourself as possible when you have a monopolized business space.

jsa-aerial16:04:10

They used to - and for the most part, the 'prestigious' ones still do that. But, as you mention, there is definitely a push at being a trade school competitor for some of this.

qqq16:04:23

There seems to be alot of animosity towards SV style startups here. 🙂

sveri16:04:18

For me personally its more of animosity towards capitalism in general

tbaldridge16:04:31

Well for me it comes down to a certain amount of insolence is the idea of "disruptive tech". The idea being: "I'm a person who understands computers...you don't, let me show you how computers can change how you work". That's all well and good, but the problem is there's little recognition that the programmer may not understand the problem space at all. Disruptive tech boils down to: "let me tell you how to do your job". Sometimes a industry needs that, or sometimes it doesn't matter. If you screw up and delete 50TB of cat photos, big deal. However, what about if you screw up your "disruptive" medical tech and people die?

tbaldridge16:04:55

Or like Soylent...end up giving a ton of people food poisoning.

roberto16:04:22

SV “disruptive tech” is a joke. It is just insolent kids with silly ideas getting loads of money to screw up the world.

roberto16:04:59

“disruptive tech” would be SV solving the water crisis in flint. It would have way more impact than self driving cars.

sveri16:04:02

The problem with solving the water crisis in flint is that there is only money to be spent and none to be earned. Thats why no one with money is interested in that^^

tbaldridge16:04:50

right, the incentives are wrong.

roberto16:04:32

so …. be “disruptive” then….. isn’t SV so smart?

sveri16:04:52

Exactly, if you spin this further, it would not be disruptive tech, but tech that benefits human beings which is not the goal of capitalism as capitalism values money and not healthy humans.

qqq16:04:36

Milton Friedman https://www.youtube.com/watch?v=D3N2sNnGwa4 would argue that it's precisely selfish Capitalism that ends up producing the best living conditions for all involved.

tbaldridge16:04:57

What we have today in the US is not capitalism, but crony capitalism. Things like patents, lobbying, etc. stifle innovation and competition.

tbaldridge16:04:34

And now we descend into politics...and that's hard, so I'm going to go back to the easy stuff and do some programming.

john16:04:02

Seems like there's a lot of good points on both sides of the "js as a first language" debate. Maybe the answer is "you should learn 'theoretical' languages like Scheme and 'practical' languages like Javascript as early as possible." Maybe all novice programmers should be trained polyglots from the jump.

mobileink17:04:03

john: my advice to noobs is always "spend a few months studying assembler and Scheme, at the same time. once you've got the basics of those 2 you can easily pick up any other language. nobody ever takes that advice, i dunno why.

fellshard18:04:15

So much of this. Much like someone raised in a bilingual environment tends to learn new languages much more quickly, learning and holding seemingly conflicting models of computing through different languages will help shape these devs for future application of those principles, whether they realize it at the time or not.

john18:04:24

Seems like language skill has to do with knowledge of the syntax and some idiosyncratic semantics of said language. Whereas comp-sci knowledge or wisdom has more to do with the semantics that are general to all computing languages, such as the big O notation characteristics of certain idioms, regardless of the underlying language.

john18:04:52

and what separates a novice from an expert comp sci professional is knowing those trans-language constraints on general algorithms, regardless of the language.

john18:04:15

But Lisp has an objective, qualitative impact here. Because of the simplicity of the syntax, the semantics of the idioms become much more obvious, at least to my eyes.

john18:04:44

As such, there are lots of aspects of comp sci that I simply didn't understand until learning Clojure

mobileink18:04:15

yup. imagine having to write Turing Machine code.

fellshard18:04:18

It's part of why people swear by SICP.

mobileink18:04:52

the other thing is that lisps are not just "better" versions of ealier languages, the way e.g. Python is better than COBOL, but of the same family. The primitives of a lispy language are genuine computational primitives.

john18:04:14

Exactly. And lisp syntax is simple enough that my little brain can actually see those computational primitives. Whereas people with larger brains are able to see them through all the ceremony of OOP in Java, which I cannot.

john18:04:57

Which is why I don't understand the "steep learning curve" argument about Clojure. It was the smallest learning curve of any language I've tried, for me.

mobileink18:04:26

and they compose! woot!

mobileink18:04:58

ah, but clojure has some twists, most obviously laziness, but also some non-obvious typing wierdness.

mobileink18:04:43

e.g. contains? is a little counter-intuitive.

fellshard18:04:10

It's got default conventions sometimes that aren't what learners expect, but make sense as soon as you plug it into common contexts.

fellshard18:04:29

Things like next vs rest.

fellshard18:04:58

More than any other language, Clojure seemed to follow the rule of 'that just works', due to that extreme composability. "This function describes that it works like this. Does it do X I expect it to? Yup. Does it do Y that I expect? That seems like common sense... yep, it does. Nice."

john21:04:36

Yeah, it'd have caused less dissonance too if seq operations returned coll types of the kind they were handed. Not sure how much more complex that implementation would be though, if even possible for arbitrary collection types.

mobileink21:04:23

which means: getting started with clojure is pretty smooth, but real mastery is pretty much the same as any other language: lots of time and pain. but the rewards are better.

roberto16:04:29

hmmm, I thought all CS students were trained polyglots.

john16:04:35

Or just use Clojure, and operate over Java and JS at the same time 😉

roberto16:04:44

I remember learning C, assembly language, C++, Java, perl at Univeristy

sveri17:04:16

Assembler, C, bash, Java and Haskell here 🙂

sveri17:04:52

Although I have to add, I was at a very database oriented university and we had a lot of courses about them

tbaldridge17:04:15

I wonder what would happen if schools spent time teaching categories of languages. Assember/C, Java, Haskell, Prolog, Scheme

jdeisenberg17:04:38

PL/I, FORTRAN, Assembler. This was a while ago 😉

souenzzo17:04:09

IMHO C to undersand computer-specific problems (pointers, buffers, memory) javascritp/java to understand the "real world" lisp to anything else

dominicm17:04:01

Everyone deterred me from C when I was trying to learn to program. When I just read the K&R book, I got programming, and felt pretty comfortable writing code.

dominicm17:04:50

C is great because it is small. Sure it's dangerous. But if you know it, you know the foundation for languages such as PHP, Javascript and Java. You won't have too much problem upskilling onto them.

akiroz18:04:53

personally I really don't like working in C.... sure the language itself is great but the culture is just not right for me, I can never understand what those damn abbriviations mean when all the library authors decide to name their things with the least characters possible and documentations are just autogenerated with zero explaination (if they even exist)....

fellshard18:04:51

That's more an ecosystem than language problem, but yeah.

akiroz18:04:39

My first language was assembler since I came from an electronics background and thought programming languages were scary..... and boy am I glad I learned everything from the bottom up 🙂

akiroz18:04:15

and to this day I still find compilers magical, assembler is the only "language" I'd claim to fully understand.

tbaldridge18:04:26

@akiroz what's awesome is when you realize that even assembly is a high-level language over microcode, that's executed by a JIT in the CPU.

akiroz18:04:12

oh yeah, modern CPUs are whole different beasts compared to what I used back then 😛

akiroz18:04:01

I can't even begin to comprehend how the neural-network branch predictor works in the new AMD Ryzen CPUs.....

mobileink18:04:07

even more awesome is the realization that you've learned a model of conputation, and that lambda calc and Turing Machines are completely different models.

mobileink18:04:01

and then you discover that interactive computing requires a while 'nother model and your head explodes.

sveri18:04:37

Which boils down to learning for all your life which is why it just doesnt matter which language you learn first or second or third in CS. I think its way more important to get a side job as soon as possible, to see some real world problems and code.

sveri18:04:45

I always see myself as someone that solves problems. And the tool to solve a problem is mostly dicated by the business you join after you are done with your degree. Hardly anyone will come to some fresh guy from university and ask him about the architecture of its system.

souenzzo18:04:12

@tbaldridge if I want to write a new language and generate a "IR" on python "VM", there is a good pointo to start to study? (i'm diggin on pixie code but I'm lost)

mobileink19:04:00

a point in favor of js: i'll bet most students in the Intro class are not CS majors; they just want to learn a little programming, because they know some programmning skill is fast becoming a requirement in almost any field. that makes js or python a reasonable choice.

roberto19:04:20

can’t they have a remedial course instead of inflicting damage on the CS majors?

roberto19:04:51

and I think an intro to programming class should cover at least three paradigms, which might require using 3 different languages. For example: functional typed: SML, dynamic functional: clojure or racket, and oop : python or ruby. If people who just want a general knowledge about how to write a web site, and learn JS/html/css, then I think that is a different course. Not sure that belongs in a CS course.

mobileink19:04:19

my guess is lots of schools have an Intro for CS Majors, or an Honors Intro or similar that covers this.

tbaldridge19:04:48

@souenzzo two things are your friend there, look into a python library called byteplay or a similar bytecode assembler module. From there I recommend digging into the dis module. If you call dis.dis(myfunc) from a Python repl it will dump the bytecode from the function

tbaldridge19:04:03

it's fairly easy to reverse engineer from there.

tbaldridge19:04:01

Also, you can introspect all the aspects of a funct/code object in python via dir. I learned a lot by comparing the properties of those objects with the output of dis.

tbaldridge19:04:40

the Python bytecode interpreter is quite elegant, even if it does make several odd design decisions.

tbaldridge19:04:54

Like mutable closures..... (facepalm)

souenzzo20:04:22

There days I findout how clojure #'vars works the differences between call (#'var x) or (@#'var x).... just awesome implementation...

dominicm19:04:11

I just remembered why: it had it's own vm