This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-05-19
Channels
- # ai (3)
- # aws (1)
- # beginners (94)
- # boot (26)
- # cider (3)
- # cljs-dev (99)
- # cljsrn (86)
- # clojure (263)
- # clojure-dusseldorf (4)
- # clojure-greece (22)
- # clojure-italy (2)
- # clojure-quebec (1)
- # clojure-russia (12)
- # clojure-spec (71)
- # clojure-uk (123)
- # clojurescript (92)
- # core-async (4)
- # cursive (13)
- # data-science (2)
- # datomic (123)
- # docker (2)
- # emacs (15)
- # events (1)
- # graphql (2)
- # hoplon (71)
- # jobs-discuss (7)
- # lumo (5)
- # off-topic (12)
- # om (6)
- # onyx (97)
- # other-languages (4)
- # overtone (2)
- # pedestal (1)
- # re-frame (20)
- # reagent (33)
- # remote-jobs (1)
- # ring-swagger (1)
- # rum (5)
- # slack-help (6)
- # uncomplicate (1)
- # unrepl (33)
- # untangled (48)
- # vim (23)
- # yada (21)
Not going to paste an example, but I had noticed that sometimes an exception stack will not show the actual function where it was thrown, but rather just an upstream call line, that triggered materialization of a cascade of lazy sequences / function calls. And then it is a nightmare to figure out where the problem actually lies in the code.
Yes, that happens sometimes
you take parameteres say marked 5 pieces of data per page page number request to server get from database first 5 pieces of data
lepistane: I would typically accept optional query string params like offset
and count
, order the records by time or another key to get deterministic results, and select the proper page starting at offset
and going up to the offset + count - 1
. I'd also recommend to limit the results at datastore level to avoid transmission of unnecessary data but it depends on the use case / technology stack.
I'm trying to install lein on ubuntu. After downloading the bin via wget, I can't seem to make it into an executable with chmod
the command runs with any errors but calling lein
brings an error lein: command not found
@vitruvia it needs to be on your path
are you sure ~/bin is on your path?
usually you have to add it yourself, sometimes .profile is set up to check if ~/bin exists on login, and only adds it to path if it exists
but if lein is executable, and you can run it, then the problem is likely that it’s not on the path
@vitruvia well you said it ran without errors, how did you run it?
I can't remember which, but either .profile
or .bashrc
only runs in a login sh
. So I update my path in both.
profile is login only, bashrc is read every time a shell is started
@vitruvia try running bash -l, then running lein
bash -l gives you a new bash instance that has read your login config
@noisesmith this one doesn't work
@dpsutton but there’s multiple files (bashrc, profile, bash_profile…)
bash -l ensures all of them have been used as would happen on a fresh login, so it’s the thing to check if you are setting up for the future
which is why I recommend it
oh and also /etc/bashrc… there’s a list 😄
so many rumors about how to use a unix proficiently i never really know the "proper" way
yeah - the web is full of instructions for using unix that were put together by people that know just enough to be dangerous
@noisesmith but where should I include bin
so it remains in my path?
do you have something in your .profile or .bashrc that already sets your path? if so I’d add it there
Yes there is something in .profile. I'm at my notebook which doesn't have linux right now, but I remember seeing something there
@john @noisesmith Just got home and copied my path statement from profile
to .bashrc
and it worked. I haven't logged off yet to make sure it stays that way but thanks!
cool - if it was in profile it would have been applied after a future login (or even in a new terminal usually…)
It's been a while since I read about it, since I just always migrate the path conf over to .bashrc
after a fresh install anyway.
john bash reads .profile
I use bash, I have a .profile
.bashrc is read every time a shell is created
.profile is read on every login, unless there’s a .bash_profile, in which case that’s used instead
but .profile is the right place for things that would be valid even if your shell wasn’t bash, and should be set on login
For some reason, launching a graphical terminal would never read my .profile. This was a long time ago...
you can usually tell your terminal whether new windows should read your login config- sometimes people do things on login that should not run with every shell they start up
but bash will definitely use the .profile file unless it finds something more specific that overrides it (which most people don’t use)
hmm, I just updated my .profile, restarted my bash, ran $PATH, and I can't see my update there.
did you give the -l arg to bash which specifies that it should be a login shell?
otherwise profile will never be loaded
So open a graphical terminal, and then open another shell inside every time I want to use my path?
my terminal emulator starts my shell as a login shell
if yours doesn’t do that, then putting things in login config is not very useful, sure
i think fedora 25 changed this when it adopted wayland if you're running either of those john
profile file selection and defining a shell as “login” or “non-login” makes a difference too; see https://www.digitalocean.com/community/tutorials/how-to-read-and-set-environmental-and-shell-variables-on-a-linux-vps#setting-environmental-variables-at-login
although minor pet peeve - I don’t like the use of “environmental variables” vs. “environment variables” in that doc - but, it has the usual profile load order specified, which is what I wanted to call out.
How can I set profiles.clj for leiningen on ubuntu? In my case I downloaded lein, installed, and can even run a REPL, but I don't see a profiles.clj
file under .lein
. I tried making one but it caused errors when running a new REPL
Possibly. But in this case I don't know what is wrong with it. I didn't find a default one on my installation or on the internet