programming-beginners

2018-03-06T15:46:47.000635Z

Wow installing Leiningen is a giant hassle

2018-03-06T15:46:52.000123Z

Why isn't this easier?

2018-03-06T15:47:06.000850Z

(That's mostly a rhetorical question, though I'm sure there are Reasons)

val_waeselynck 2018-03-06T15:58:22.000465Z

If your need is not too advanced, you should maybe consider replacing Leiningen with the more recent CLI tools

2018-03-06T15:59:59.000014Z

Thank you! Such as?

bronsa 2018-03-06T16:14:21.000726Z

@amelia https://clojure.org/guides/getting_started

bronsa 2018-03-06T16:15:04.000673Z

you can install the new clj scripts through your package manager

2018-03-06T16:15:16.000625Z

"Installation on Windows Not yet available - see Leiningen or Boot instead."

2018-03-06T16:15:22.000624Z

Am I looking at the right place?

bronsa 2018-03-06T16:15:49.000041Z

ah — if you’re on windows then things will be a bit awkward to do

bronsa 2018-03-06T16:16:07.000014Z

there’s not great support for windows I’m afraid

2018-03-06T16:16:21.000064Z

Yeah... I have an environment set up on my Mac, but that's a work machine and I'll be giving it back soon. My own laptop is Windows.

bronsa 2018-03-06T16:16:44.000134Z

I know support for windows is coming for clj, lein already does support it tho

bronsa 2018-03-06T16:16:51.000771Z

how are you finding installing lein a pain?

bronsa 2018-03-06T16:17:04.000270Z

should be just a matter of fetching a script and running it

2018-03-06T16:18:04.000566Z

You think I know how to do either of those things?

2018-03-06T16:18:31.000213Z

This is why the beginners channel felt advanced to me

bronsa 2018-03-06T16:19:04.000512Z

surely you know how to download a file from your browser?

2018-03-06T16:19:18.000347Z

I've downloaded a file.

2018-03-06T16:20:05.000002Z

I downloaded a JDK file, installed it, and downloaded a Leiningen file, which says it can't detect the JDK file

2018-03-06T16:21:27.000495Z

Then if I try to manually select the location where the JDK file is, I get a runtime error saying "Out of Range"

bronsa 2018-03-06T16:21:42.000073Z

select from what?

2018-03-06T16:22:15.000407Z

I can't get that far, unfortunately... in the tutorial it shows a list of radio button options with 'Custom' at the bottom. Mine shows only 'Custom' and when I click on it I get the runtime error

bronsa 2018-03-06T16:22:35.000134Z

I don’t know what tutorial you’re talking about so I have no idea what you’re refering to

bronsa 2018-03-06T16:23:22.000783Z

yeah ignore that

bronsa 2018-03-06T16:23:26.000145Z

it’s old and unmaintained

2018-03-06T16:23:28.000035Z

Right...

2018-03-06T16:24:02.000615Z

But going to the Leiningen page direct gives me nothing to download, just a text file

2018-03-06T16:24:07.000055Z

Or a page of text, I should say

bronsa 2018-03-06T16:24:27.000535Z

so as a first step you need to make sure you have a jdk installed — https://www.ntu.edu.sg/home/ehchua/programming/howto/JDK_HowTo.html follow steps 1 to 4 of “How to install jdk on windows”

2018-03-06T16:24:38.000894Z

I definitely have that, so all good

bronsa 2018-03-06T16:25:01.000023Z

can you open a terminal and type java -version and paste the output here?

2018-03-06T16:25:25.000628Z

java version "9.0.4" Java(TM) SE Runtime Environment (build 9.0.4+11) Java HotSpot(TM) 64-Bit Server VM (build 9.0.4+11, mixed mode)

bronsa 2018-03-06T16:25:25.000706Z

should output something like

java version "1.8.0_144"
Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)

2018-03-06T16:25:49.000704Z

Yep, as above

bronsa 2018-03-06T16:25:53.000401Z

ok

bronsa 2018-03-06T16:26:03.000144Z

download https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein.bat this file then

joelsanchez 2018-03-06T16:26:04.000228Z

support for 1.9 is flakey ATM...isn't it

bronsa 2018-03-06T16:26:16.000239Z

nah

👍 1
2018-03-06T16:26:27.000742Z

It's a page of text - how do I download it?

bronsa 2018-03-06T16:26:39.000624Z

File -> Save as

2018-03-06T16:27:13.000776Z

Save As a text document?

bronsa 2018-03-06T16:27:30.000161Z

yes

2018-03-06T16:27:41.000135Z

okay

2018-03-06T16:28:01.000073Z

I've done that

bronsa 2018-03-06T16:28:47.000272Z

cool, now you have leiningen available — just open a terminal and type path/to/lein.bat (where path/to matches the directory where you downloaded lein)

2018-03-06T16:29:20.000032Z

It's just in downloads right now, I guess I need to put it somewhere else

bronsa 2018-03-06T16:30:25.000557Z

I have no idea how to set the global PATH in windows — somebody else that uses windows might be more helpful — but as a first step you could try just putting it in C:\ and invoking C:\lein.bat from the terminal

bronsa 2018-03-06T16:30:52.000585Z

that said

bronsa 2018-03-06T16:31:33.000313Z

I would recommend you started with something like https://sekao.net/nightcode/ instead

2018-03-06T16:32:16.000267Z

Oh, that looks ideal!

bronsa 2018-03-06T16:32:31.000257Z

no need to set up your env at all

2018-03-06T16:32:40.000462Z

Okay, putting those path commands into my terminal didn't work anyway, I'll download this with fingers crossed

2018-03-06T16:32:46.000101Z

Thank you for all your help 🙂

bronsa 2018-03-06T16:33:19.000563Z

all this stuff is way easier to do on a linux or osx machine FYI

bronsa 2018-03-06T16:33:42.000205Z

there’s not many people using clojure on windows

2018-03-06T16:33:46.000787Z

Why is that?

bronsa 2018-03-06T16:34:46.000398Z

well, for various reasons unless you’re programming for Windows in e.g. .NET languages, people prefer unix environments to program

bronsa 2018-03-06T16:35:44.000040Z

the new clj stuff should make all this much less painful but it’s relatively recent and windows support is still a work in progress

joelsanchez 2018-03-06T16:37:03.000470Z

better terminal, better integration with most programming tools (git!), more reasonable over all 😛

sundarj 2018-03-06T16:37:29.000652Z

You can use something like https://c9.io to get a linux environment in the browser (it's free)

2018-03-06T16:37:47.000258Z

This is getting more and more complicated...

bronsa 2018-03-06T16:37:59.000185Z

just stick to nightcode for now

3
2018-03-06T16:38:04.000106Z

Thank you

2018-03-06T16:38:41.000006Z

Although I've only started it up and already got an error message...

2018-03-06T16:38:44.000697Z

"Cannot run program "java" (in directory "."): CreateProcess error=2, The system cannot find the file specified"

bronsa 2018-03-06T16:39:47.000607Z

eh, that looks like the same issue you had with installing leiningen from that setup file, which suggests your JDK is either not set up properly or you haven’t selected the proper path

2018-03-06T16:40:37.000171Z

Okay, I'll take a look... I just installed the JDK and left it at default settings and didn't select anything manually in installing Nightcode, I'll have to dig and see what I can do.

2018-03-06T16:40:43.000823Z

The barrier to entry to just getting access to Clojure is so much higher than I thought.

bronsa 2018-03-06T16:42:06.000286Z

again, this is unfortunately because of your using Windows.. compare with installing lein and jdk on e.g. ubuntu (linux) sudo apt-get install openjdk-8-jre-headless leiningen

bronsa 2018-03-06T16:43:02.000369Z

https://lispcast.com/clojure-windows-8/

bronsa 2018-03-06T16:43:06.000863Z

you could try following this guide

2018-03-06T16:43:17.000639Z

Thank you, I'll give it a go

2018-03-06T16:43:54.000183Z

I'm not in a tiny minority here or anything though - Macs are expensive and I associate Linux with needing knowledge to make it work. Maybe that's wrong, but I'm pretty sure I'm not some outlier. I hope it gets easier to use soon, I like Clojure and want to recommend it to other friends trying to learn this stuff.

1
joelsanchez 2018-03-06T16:44:13.000892Z

Ubuntu is easy

bronsa 2018-03-06T16:44:15.000835Z

if you just want to start playing with clojure then https://repl.it/repls/UglyTrustyLivecd

bronsa 2018-03-06T16:47:01.000656Z

@amelia windows developer for the JVM are definitely a minority, some Linux distros are as simple as osx or windows to use nowadays. This is not to say that it should be hard to start working with clojure on windows, but unfortunately a good first experience with windows has never been a priority

sundarj 2018-03-06T16:47:19.000053Z

does Lein provide a jar? i'm running Boot on my Windows laptop like so: java -jar "%HOME%\Downloads\bin\boot.jar"

bronsa 2018-03-06T16:48:21.000633Z

it does but the bash script is quite useful

2018-03-06T17:18:39.000735Z

Took a break, restarted Nightcode and it works now! Thanks for the help, everyone.

val_waeselynck 2018-03-06T17:23:45.000422Z

@amelia this https://clojure.org/guides/getting_started

2018-03-06T17:24:22.000418Z

Nothing for Windows, unfortunately

val_waeselynck 2018-03-06T17:28:26.000609Z

@amelia ah yeah too bad 😕 back to Leiningen then. I've heard rumor that the CLI tools will be available for windows soon though: https://www.reddit.com/r/Clojure/comments/81yk2a/clojurescript_110x_new_quick_start_feedback/dv6k18r/

2018-03-06T17:30:02.000333Z

Fingers crossed it's a better experience soon...

val_waeselynck 2018-03-06T17:34:16.000388Z

@amelia what's your use case for Leiningen? If you just want to set up an environment for learning the language, maybe you can use Nightcode (https://sekao.net/nightcode/), it's designed to provide an out-of-the-box experience

felipebarros 2018-03-06T17:34:24.000183Z

@amelia after you go through this first moments with Clojure (so you are not overloaded), consider installing a distribution of Linux in a part of your computer. The process is straightforward (grab an empty pendrive, download a Linux image and download a program to install that Linux image on your pendrive, reboot with pendrive connected) and you will still have you comfy Windows, but will also be able to boot up a Linux machine and, I sincerely believe, you will not only love the experience (it's cleaner and easier to use, in my not so humble opinion) but it will make your developer life a lot easier. If you ever decide to do this, and you need help, feel free to ask me, or, well, any other Linuxer. We love bringing people to the dark side.

2018-03-06T17:34:36.000598Z

That's where the advice in the main thread ended up too 🙂 Thanks!

2018-03-06T17:37:28.000869Z

Thank you 🙂 Honestly, I'm a little frustrated by the fact that you need to change something so fundamental to make such a positive difference - it's less inclusive than I was expecting. But I'm taking this seriously, and if it'll help then I'll give it a try.

sundarj 2018-03-07T10:37:58.000300Z

if you want to know why this is, this section of an essay by a programming luminary details some of the reasons (it's the essay that first led me to programming): http://www.catb.org/esr/faqs/hacker-howto.html#skills2. it's opinionated, but informative.

sundarj 2018-03-07T10:40:45.000475Z

depending on which Windows version you're on, you may be able to use this instead of having to install Linux from scratch: https://docs.microsoft.com/en-us/windows/wsl/about

sundarj 2018-03-07T10:42:05.000194Z

i have a programmer friend who uses Windows, and he uses that subsystem to get access to the same tools that Linux users have

2018-03-07T11:23:00.000086Z

Thanks @sundarj, that essay is really interesting! I want to hold off on doing anything more complicated just yet - I don’t even know if I’ll still be using Clojure in a month, let alone long enough to justify the kinds of changes being suggested here. I just want to play with Clojure for a while and see if I like it.

sundarj 2018-03-07T11:34:16.000229Z

@amelia oh, of course! stick with what you have now and just keep playing. above all it's important to have fun! by all means take things slowly; didn't mean to suggest you needed to rush into such a big change 🙂 just wanted to (try to) ameliorate any confusion you might have had, and suggest an easier path to Linux for if/when in the future, you felt like giving it a go

1
2018-03-06T17:37:46.000590Z

Definitely a job for another day though - now I'm set up I just want to play with some code for a bit and remember why I like it...

felipebarros 2018-03-06T17:41:11.000014Z

Absolutely. Have fun with what your current setup, even to understand its limitations, which is important. People use Linux and Mac to develop in Clojure because Unix systems are better suited to the task and provides the programmer with more control over the OS. So don't feel frustrated, it's a long and boring war. Clojure just happened to exist in this side of the fence, so Windows is left with not that great support. But the same is true if you try to program in Node on Windows, or run Docker. Windows started embedding a Linux kernel in recent PRO versions, can you imagine? Even Microsoft realized that in order to become a suitable OS for developers, they had to embrace the way people do it on Linux. Well, again, have fun and don't hesitate to ask.

1