<hightower2>
ok so, I'm trying to compile shards (the tool) now. I run `make`, but it tells me: "require "./config": can't find file "prelude"". Any hints?
<oprypin>
hightower2, CRYSTAL_PATH not set up
<oprypin>
try `echo $CRYSTAL_PATH` or `(source bin/crystal; echo $CRYSTAL_PATH)` (not sure if the latter makses sense)
<FromGitter>
<Dan-Do> so I cannot use IO.copy(src,dest)
<FromGitter>
<Blacksmoke16> i guess what im proposing is you can just use a regex or something for this
<FromGitter>
<Dan-Do> actually I want to remove the tagged template literal, for example: ⏎ `<span class="form-clear d-none" onclick=${e=>{e.currentTarget.previousSibling.value="";getData();}}><i class="fas fa-times"></i></span>`
<FromGitter>
<Blacksmoke16> and what should the desired output be?
<FromGitter>
<Dan-Do> I am not familiar with regex :(
<FromGitter>
<Blacksmoke16> is what you want to remove always going to be in the format of `onclick=${e=>{e.currentTarget.previousSibling.value="";getData();}}`?
<FromGitter>
<3n-k1> you might just have an easier time writing a basic parser
<kevinsjoberg>
If I want to get involved in the Crystal project more than just backing it through Open Collective, where do I start? I'd love to become a regular contributor, helping out in any way I can. 🙂
<FromGitter>
<3n-k1> that's very bad pseudocode, but i am tired
<jhass>
oprypin: first time I saw source bin/crystal :D
<jhass>
hightower2: to use your locally compiled compiler, just put bin/crystal into your path first, the wrapper script will take care to set all the env vars correctly :)
<f1reflyylmao>
When I'm defining a module, lets name it CelestiteSpec, in two files, /spec/celestite_spec.cr and /spec/celestite_spec/cases/func.cr, crystal complains that it can't find the function myfun() that I defined in the func.cr which is directly required in the celestite_spec.cr even though it's in the same namepsace in both files
<f1reflyylmao>
I'm not sure how to fix this, I thought I can just put my module definition across multiple files, require them and I can use all of the definitions of the module in every file?
<f1reflyylmao>
What am I doing wrong?
<erdnaxeli>
for which file does it complains ?
<erdnaxeli>
ok forget this question :p
<erdnaxeli>
in celestite_spec.cr you have require "./cases/func" ?
<straight-shoota>
f1reflyylmao, that should really work
<straight-shoota>
maybe try a small reproducible example?
<oprypin>
lemme guess: wildcards are involved 😑
<oprypin>
this is probably a circular dependency
<f1reflyylmao>
erdnaxeli: I've required the whole of ./cases/*
<f1reflyylmao>
oprypin: yes ^^'
<oprypin>
well theres your problem
<f1reflyylmao>
not sure if its circular though, I don't think so
<straight-shoota>
hm, but wildecard requires usually only cause issues with namespaces, not methods
<f1reflyylmao>
I didn't require anything in my func.cr
<straight-shoota>
s/wildcard/circular/
<f1reflyylmao>
well, no files at least
<oprypin>
f1reflyylmao, you required all alphabetically preceding files :D
<f1reflyylmao>
theres currently only one file in that directory, so I'm afraid I didnt
<oprypin>
oh
<straight-shoota>
if you could reduce the code to share a reproducible example
<f1reflyylmao>
I' working on this during breaks and after work, so my progress since my last question isn't too much
<f1reflyylmao>
Yeah ill try
<f1reflyylmao>
I'll first try to get it to run like it's now
<f1reflyylmao>
I might just put everything in different namespaces, would probably look cleaner anyways..
<oprypin>
f1reflyylmao, it's not about namespaced, purely about files and circular dependencies
<f1reflyylmao>
I could also try re-adding all my requires
<f1reflyylmao>
to make sure
<f1reflyylmao>
Step by step
<oprypin>
if a requires b and b requires a, then b will not be able to rely on what's in a
<oprypin>
but hm maybe i shouldn't be so sure about it
<oprypin>
anyway if u have all the code and the ability to post it, should be no problem for someone to find whats wrong
<straight-shoota>
> if a requires b and b requires a, then b will not be able to rely on what's in a
<straight-shoota>
that's not true
<straight-shoota>
not in general
<f1reflyylmao>
Well
<straight-shoota>
there can be issues, but AFAIK only with namespaces
<f1reflyylmao>
thing is
<f1reflyylmao>
It's bad and I dont really want to make it public
<f1reflyylmao>
I'll post a broken example should this continue to be a problem after restructuring
<straight-shoota>
then reduce it to the minimal code that reproduces the issue
<f1reflyylmao>
Yeah
<straight-shoota>
chances are, you'll notice what's wrong on the way
<f1reflyylmao>
Hopefully
<FromGitter>
<vladfaust> Could you please tell me where shards cache is stored? (to be used with `--local` flag)
<straight-shoota>
default is $HOME/.cache/shards
<straight-shoota>
you can configure it with SHARDS_CACHE_PATH env var
kreyren has quit [Quit: Leaving]
ua has quit [Ping timeout: 256 seconds]
ua has joined #crystal-lang
<repo>
heyo /
<repo>
is there a way to configure the name, email and github account for crystal init templates?
<oprypin>
repo, copy the file from a previous project. easier & better.
<repo>
it's not better
<repo>
literally every file containing that information is project specific
<oprypin>
everything you enter into crystal init is also project specific
<repo>
exactly
<oprypin>
exactly, so no advantage to crystal init
<repo>
huh?
<repo>
right.. maybe i'll just write something myself then
<erdnaxeli>
or should I submit PR to fix the current markdown implementation ?
<erdnaxeli>
(which I am not sure I want to do or I even am capable of doing ^^)
<straight-shoota>
I don't think there's any point in fixing the markdown parser
<straight-shoota>
it would need a complete rewrite
<straight-shoota>
and there's a complete implementation in markd shard
<erdnaxeli>
yep but this solution already has been refused :p
<erdnaxeli>
so it's a dead end ?
<straight-shoota>
temporarily
<straight-shoota>
until we can agree on how to proceed
<erdnaxeli>
ok
<straight-shoota>
the best short term (and maybe also longterm) solution is to use the compiler to extract docs (via --format json) and use a separte tool for generating the html