ChanServ changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.23.1 | Fund Crystal's development: http://is.gd/X7PRtI | GH: https://github.com/crystal-lang/crystal | Docs: http://crystal-lang.org/docs/ | API: http://crystal-lang.org/api/ | Gitter: https://gitter.im/crystal-lang/crystal
eliasjpr_ has quit [Ping timeout: 240 seconds]
eliasjpr_ has joined #crystal-lang
<RX14> we don't do aliases
<RX14> and we do breaking changes a lot
<RX14> so if we did change it it'd be breaking
eliasjpr_ has quit [Ping timeout: 260 seconds]
<FromGitter> <picatz> I believe that alias_method was removed to keep the language simpler, if I remember my Crystal commits correctly.
<vivus> does anybody know what this error means: ERROR: cast from String to Int64 failed, at /home/user/reddit/src/models/post.cr:3:1:192 (TypeCastError) ? can't find anything regarding crystal-lang about it
snsei has quit [Remote host closed the connection]
eliasjpr_ has joined #crystal-lang
eliasjpr_ has quit [Ping timeout: 248 seconds]
eliasjpr_ has joined #crystal-lang
snsei has joined #crystal-lang
eliasjpr_ has quit [Ping timeout: 248 seconds]
eliasjpr_ has joined #crystal-lang
eliasjpr_ has quit [Ping timeout: 248 seconds]
eliasjpr_ has joined #crystal-lang
snsei has quit [Remote host closed the connection]
eliasjpr_ has quit [Ping timeout: 240 seconds]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
faustinoaq has joined #crystal-lang
<FromGitter> <Sevensidedmarble> anyone have any idea why this line: ⏎ line.match(/([^"'|]+)|"' ([^"']+)["']/) ⏎ returns the following error: ⏎ Capture group 2 was not matched (IndexError) ⏎ ... [https://gitter.im/crystal-lang/crystal?at=59ffc884d6c36fca31de9926]
vivus has quit [Quit: Leaving]
<FromGitter> <Sevensidedmarble> also has anyone seen this error?
eliasjpr_ has joined #crystal-lang
<FromGitter> <Sevensidedmarble> `Failed to raise an exception: END_OF_STACK`
DTZUZU has joined #crystal-lang
eliasjpr_ has quit [Ping timeout: 240 seconds]
eliasjpr_ has joined #crystal-lang
eliasjpr_ has quit [Ping timeout: 248 seconds]
snsei has quit [Remote host closed the connection]
<FromGitter> <pnloyd> @RX14, do you know how useful the multi-thread crystal branch is?
<FromGitter> <pnloyd> as in if code that doesn't rely on the std being thread safe works in general
eliasjpr_ has joined #crystal-lang
eliasjpr_ has quit [Ping timeout: 260 seconds]
faustinoaq has quit [Ping timeout: 240 seconds]
shankar has joined #crystal-lang
eliasjpr_ has joined #crystal-lang
shankar has quit [Remote host closed the connection]
eliasjpr_ has quit [Ping timeout: 240 seconds]
<FromGitter> <iambudi> 👆waiting this answer
eliasjpr_ has joined #crystal-lang
eliasjpr_ has quit [Ping timeout: 268 seconds]
Creatornator has joined #crystal-lang
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 240 seconds]
<shelvacu> Now I'm curious as well.
rohitpaulk has joined #crystal-lang
eliasjpr_ has joined #crystal-lang
snsei has joined #crystal-lang
eliasjpr_ has quit [Ping timeout: 268 seconds]
Creatornator has quit [Quit: Textual IRC Client: www.textualapp.com]
eliasjpr_ has joined #crystal-lang
eliasjpr_ has quit [Ping timeout: 268 seconds]
olbat has quit [Ping timeout: 248 seconds]
olbat has joined #crystal-lang
olbat has quit [Changing host]
olbat has joined #crystal-lang
eliasjpr_ has joined #crystal-lang
Guest76467 has quit [*.net *.split]
shelvacu has quit [*.net *.split]
saadq has quit [*.net *.split]
minus has quit [*.net *.split]
waveprop has quit [*.net *.split]
oprypin has quit [*.net *.split]
hallomann has quit [*.net *.split]
dom96 has quit [*.net *.split]
eliasjpr_ has quit [Ping timeout: 240 seconds]
cyberarm has quit [Ping timeout: 240 seconds]
A124 has quit [Ping timeout: 260 seconds]
cyberarm has joined #crystal-lang
A124 has joined #crystal-lang
eliasjpr_ has joined #crystal-lang
eliasjpr_ has quit [Ping timeout: 240 seconds]
alex`` has joined #crystal-lang
FromGitter has quit [Remote host closed the connection]
FromGitter has joined #crystal-lang
hallomann has joined #crystal-lang
saadq has joined #crystal-lang
Guest76467 has joined #crystal-lang
shelvacu has joined #crystal-lang
oprypin has joined #crystal-lang
dom96 has joined #crystal-lang
waveprop has joined #crystal-lang
minus has joined #crystal-lang
oprypin has quit [Max SendQ exceeded]
oprypin has joined #crystal-lang
TheGillies has quit [*.net *.split]
sz0 has joined #crystal-lang
olbat[m] has quit [Ping timeout: 240 seconds]
thelonelyghost has quit [Ping timeout: 240 seconds]
dtcristo has quit [Ping timeout: 240 seconds]
Renich has quit [Ping timeout: 252 seconds]
cptaffe has quit [Ping timeout: 248 seconds]
braidn[m] has quit [Ping timeout: 255 seconds]
weston_[m] has quit [Ping timeout: 255 seconds]
sija[m] has quit [Ping timeout: 255 seconds]
watzon has quit [Ping timeout: 240 seconds]
tybee[m] has quit [Ping timeout: 276 seconds]
kp666[m] has quit [Ping timeout: 264 seconds]
byteflame has quit [Ping timeout: 276 seconds]
eliasjpr_ has joined #crystal-lang
eliasjpr_ has quit [Ping timeout: 260 seconds]
snsei has quit [Remote host closed the connection]
eliasjpr_ has joined #crystal-lang
eliasjpr_ has quit [Ping timeout: 255 seconds]
<FromGitter> <Rinkana> Morning
<FromGitter> <Rinkana> The multi-thread branch is very WIP.
<FromGitter> <Rinkana> You're better off just writing concurrent code in the latest release
snsei has joined #crystal-lang
DTZUZU has quit [Ping timeout: 240 seconds]
snsei has quit [Ping timeout: 264 seconds]
<FromGitter> <sdogruyol> this is interesting, someone from Red Hat taking a look at adding Crystal to their official rpms https://groups.google.com/d/msg/crystal-lang/wYQ5aqdpF3k/YZOKVjckCwAJ
eliasjpr_ has joined #crystal-lang
<vegai> sdrogruyol: nice!
qard_ has joined #crystal-lang
<FromGitter> <sdogruyol> they also built something with Crystal and want to take it into production
qard has quit [Ping timeout: 240 seconds]
Papierkorb_ has joined #crystal-lang
eliasjpr_ has quit [Ping timeout: 268 seconds]
claudiuinberlin has joined #crystal-lang
<oprypin> is this real life
<FromGitter> <sdogruyol> what?
<oprypin> sdogruyol, i mean this is unbelievably good news
<FromGitter> <sdogruyol> ah, yeah
<FromGitter> <sdogruyol> it's interesting though, didn't know that they have 10 years "build from the source" guarantee
<oprypin> i've always been interested in this from-scratch source build, might try it
<FromGitter> <sdogruyol> not sure how to keep llvm e.g in specific version for this to work
mark_66 has joined #crystal-lang
qard_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<vegai> hmm, this makes me feel a bit of fear too
<vegai> I'm suddenly reminded of Redhat 5s that are running in production right now all over the world
<vegai> so if they get crystal into rhel7 or perhaps 8... some of us will be supporting crystal-0.24 in 10 years
<Papierkorb_> If the pay is good
<vegai> yeah, that's what I thought too :P
<Papierkorb_> COBOL is still kicking too
<FromGitter> <sdogruyol> lol
<FromGitter> <sdogruyol> someone has to pay the bills :D
<FromGitter> <sdogruyol> I'm curious if there's any language actually giving 10+ years support to RHEL in that purpose
snsei has joined #crystal-lang
<vegai> back when I was working with PHP and RHELs, we never used the official php packages
<vegai> because they were several years old
eliasjpr_ has joined #crystal-lang
<FromGitter> <sdogruyol> hmm, that's weird
<FromGitter> <sdogruyol> are they keeping track of any dependent projects or just doing that in random manner?
snsei has quit [Ping timeout: 246 seconds]
eliasjpr_ has quit [Ping timeout: 255 seconds]
rohitpaulk has quit [Ping timeout: 240 seconds]
<oprypin> vegai, dont worry, it will not be part of the official official packages. must be some kind of additional repo
<oprypin> sdogruyol, not sure what you mean, yeah, on RHEL all packages are ancient
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<FromGitter> <sdogruyol> I meant "do RHEL pay any language developers to actually maintain that ancient version"
<oprypin> yeah thats pretty much their business
<FromGitter> <sdogruyol> didn't know that, thanks
<oprypin> security-patched ancient software
<FromGitter> <sdogruyol> doesn't sound that bad
<FromGitter> <yxhuvud> I doubt very much crystal would enter any time of LTS support before 1.0 as been released. :)
<FromGitter> <sdogruyol> :D
<Papierkorb_> sdogruyol, they maintain the ancient versions for you
<vegai> how is the backtick operator work? I was wondering at https://github.com/crystal-lang/crystal/issues/5240
<vegai> and couldn't easily find how this is implemented in the compiler
<Papierkorb_> Which creates funny constructs like in #ruby, where someone asked questions on version 1.8.2 - Oh and without proper security patches. Don't worry, they were only in the telephony sector, and their server is totally secured!
<vegai> oprypin: oh, ok.
<oprypin> vegai, https://crystal-lang.org/api/0.23.1/toplevel.html#%60%28command%29%3AString-class-method
<vegai> oprypin: thanks!
<FromGitter> <sdogruyol> 1) 8.2 :D
<oprypin> that's only part of the answer though, the rest is somewhere in parser
<oprypin> but u can probably go to lexer.cr or parser.cr and search for `
Papierkorb has quit [Quit: Schnitzel]
rohitpaulk has joined #crystal-lang
<oprypin> welp, the deps of ruby-crystal have changed and were not pinned. so that's fun
olbat[m] has joined #crystal-lang
eliasjpr_ has joined #crystal-lang
eliasjpr_ has quit [Ping timeout: 240 seconds]
<FromGitter> <codenoid> morning !
<oprypin> and ruby 2.1 does not compile on arch
<Papierkorb_> I guess RHEL has old enough versions for that lol
olbat[m] has quit [Ping timeout: 264 seconds]
olbat[m] has joined #crystal-lang
eliasjpr_ has joined #crystal-lang
snsei has joined #crystal-lang
eliasjpr_ has quit [Ping timeout: 268 seconds]
snsei has quit [Ping timeout: 252 seconds]
faustinoaq has joined #crystal-lang
gcds has joined #crystal-lang
byteflame has joined #crystal-lang
kp666[m] has joined #crystal-lang
tybee[m] has joined #crystal-lang
braidn[m] has joined #crystal-lang
TheGillies has joined #crystal-lang
Renich has joined #crystal-lang
thelonelyghost has joined #crystal-lang
watzon has joined #crystal-lang
dtcristo has joined #crystal-lang
cptaffe has joined #crystal-lang
weston_[m] has joined #crystal-lang
sija[m] has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 268 seconds]
eliasjpr_ has joined #crystal-lang
rohitpaulk has joined #crystal-lang
eliasjpr_ has quit [Ping timeout: 268 seconds]
Ven has joined #crystal-lang
Ven is now known as Guest53102
alex`` has quit [Quit: WeeChat 1.9.1]
alex`` has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 260 seconds]
rohitpaulk has joined #crystal-lang
claudiuinberlin has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 268 seconds]
eliasjpr_ has joined #crystal-lang
eliasjpr_ has quit [Ping timeout: 248 seconds]
Guest53102 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<FromGitter> <asterite> So basically they need some source code to compile that doesn't need a previous compiler?
olbat[m] has quit [Ping timeout: 264 seconds]
<FromGitter> <asterite> Here's an idea: compile the compiler to llvm ir. From that, convert that to C
<FromGitter> <asterite> https://stackoverflow.com/a/5188406
<FromGitter> <asterite> Then you can compile a that with any V compiler. We'll, and you need GC and other dependencies.
snsei has joined #crystal-lang
<FromGitter> <asterite> Not sure it will work, though, I never tried it
olbat[m] has joined #crystal-lang
aemadrid has quit [Read error: Network is unreachable]
<FromGitter> <asterite> Oh... It seems that doesn't work anymore
aemadrid has joined #crystal-lang
<FromGitter> <bew> that would have been nice! what doesn't work?
snsei has quit [Ping timeout: 258 seconds]
sz0 has quit [Quit: Connection closed for inactivity]
<FromGitter> <asterite> Nothing. They eventually removed it
<FromGitter> <asterite> It was buggy and limited
eliasjpr_ has joined #crystal-lang
eliasjpr_ has quit [Ping timeout: 248 seconds]
gcds has quit [Ping timeout: 240 seconds]
gcds_ has joined #crystal-lang
<FromGitter> <sdogruyol> @asterite we need to go totally self-hosted İncluding all dependencies for that to work, right?
gcds_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gcds has joined #crystal-lang
<FromGitter> <asterite> Sorry, I don't understand what you mean
<FromGitter> <sdogruyol> do having all the dependencies in Crystal (including GC, libevent e.g) is enough to compile Crystal from source without anything else?
<FromGitter> <sdogruyol> written in Crystal*
<FromGitter> <bew> you'd still need a crystal compiler if it's written in crystal
faustinoaq has quit [Quit: Konversation terminated!]
<FromGitter> <sdogruyol> that's right
<FromGitter> <straight-shoota> Or port the current compiler back to Ruby :D
<FromGitter> <bew> please no x)
eliasjpr_ has joined #crystal-lang
eliasjpr_ has quit [Ping timeout: 240 seconds]
faustinoaq has joined #crystal-lang
eliasjpr_ has joined #crystal-lang
snsei has joined #crystal-lang
<Papierkorb_> Going Crystal to ruby should be easier. Remove type restrictions, and monkey-patch differing stdlib features. Run a big regex to replace property with attr_accessor :
snsei has quit [Ping timeout: 246 seconds]
<Papierkorb_> The LLVM stuff may make issues, ruby llvm bindings are super outdated
eliasjpr_ has quit [Ping timeout: 258 seconds]
<oprypin> crystal2ruby huh
<FromGitter> <crisward> Never imagined there would be negative to self hosted code.
<Papierkorb_> oprypin: if that'd actually work, it'd basically fix RHELs issue lel
<Papierkorb_> Except for the LLVM stuff that I wouldn't want to maintain
<FromGitter> <crisward> Perhaps one of these languages has a solutions - https://en.wikipedia.org/wiki/Self-hosting#Examples
rohitpaulk has joined #crystal-lang
<Papierkorb_> I'd look at Go and Rust if anything
<Papierkorb_> Go has (had?) a C compiler, and their Go-based compiler can be compiled with that (thus they're restricting the compiler to use the subset supported by the old compiler)
eliasjpr_ has joined #crystal-lang
alex`` has quit [Quit: WeeChat 1.9.1]
eliasjpr_ has quit [Ping timeout: 240 seconds]
hmans has quit [Read error: Connection reset by peer]
avdi has quit [Read error: Connection reset by peer]
t-richards has quit [Read error: Connection reset by peer]
hmans has joined #crystal-lang
t-richards has joined #crystal-lang
avdi has joined #crystal-lang
jackivan88 has left #crystal-lang [#crystal-lang]
eliasjpr_ has joined #crystal-lang
sz0 has joined #crystal-lang
eliasjpr_ has quit [Ping timeout: 268 seconds]
DTZUZU has joined #crystal-lang
eliasjpr_ has joined #crystal-lang
<FromGitter> <Shalmezad> There is a negative. Wonder if I can find that talk... made a really good point that security vulnerabilities can easily be snuck in.
eliasjpr_ has quit [Quit: WeeChat 1.9.1]
<FromGitter> <Shalmezad> ^ Not the one I recall, but it's along the same lines.
alex`` has joined #crystal-lang
snsei has joined #crystal-lang
snsei has quit [Ping timeout: 250 seconds]
ducklobster has quit [Quit: Page closed]
<gcds> Hmm do you guys think its hard to write Crystal as LLVM backend :D
lacour has joined #crystal-lang
Papierkorb_ has quit [Quit: Konversation terminated!]
snsei has joined #crystal-lang
snsei has quit [Ping timeout: 258 seconds]
Papierkorb has joined #crystal-lang
Ven has joined #crystal-lang
Ven is now known as Guest53864
qard has joined #crystal-lang
sz0 has quit [Quit: Connection closed for inactivity]
<FromGitter> <Sevensidedmarble> should shard.lock be under vcs?
shankar has joined #crystal-lang
<Papierkorb> for an application yes, for libs, no
<gcds> Papierkorb trying to get ur bindgen/clang stuff to work under osx :D
<Papierkorb> yay
<Papierkorb> If the relative paths are the same on Mac, then you should only need to have clang++ in your PATH, or set the CLANG variable to its path
<Papierkorb> for bingen
<gcds> does not work for some reason
shankar_ has joined #crystal-lang
<gcds> fails at if llvm_libs.empty? || clang_libs.empty?
shankar has quit [Ping timeout: 268 seconds]
<Papierkorb> then you're missing the the llvm and/or clang development files, as written on screen
<gcds> nope I am not missing
<Papierkorb> where are the headers and libraries for clang?
<Papierkorb> Not for clang, but of clang
<Papierkorb> Also, which Clang version are you using?
<gcds> /usr/local/opt/llvm/lib /usr/local/opt/llvm/include
<Papierkorb> Their contents?
<gcds> libClang***
<Papierkorb> there will be a ton of libclangSomethinguppercased *static* libs, same for LLVM
<gcds> none of those flags u have under case works on mac I guess
<Papierkorb> they should be clang specific
<Papierkorb> can you paste the output of the clang++ -### command?
shankar has joined #crystal-lang
<gcds> ok there is "-resource-dir" flag but for somereason its not picked up
shankar_ has quit [Ping timeout: 240 seconds]
rohitpaulk has quit [Ping timeout: 240 seconds]
<gcds> -L does not exist
<Papierkorb> please gist the whole output of that command
shankar has quit [Ping timeout: 240 seconds]
shankar has joined #crystal-lang
claudiuinberlin has quit [Quit: Textual IRC Client: www.textualapp.com]
<Papierkorb> What's the full path to the `lib` directory containing the libLLVM and libclang libs gcds?
<FromGitter> <marksiemers> Is there a place to see the inheritance chain for Crystal?
<FromGitter> <bew> in the API docs?
<FromGitter> <bew> what do you mean "for crystal" ?
shankar_ has joined #crystal-lang
<FromGitter> <marksiemers> Something like this: http://ruby-hacking-guide.github.io/images/ch_minimum_classtree.jpg
shankar has quit [Ping timeout: 240 seconds]
<FromGitter> <marksiemers> But with Crystal's types
<FromGitter> <marksiemers> Inheritance tree may be a better term
<gcds> Papierkorb for some reason it ignores the correct llvm
<Papierkorb> ‎[18:04] ‎<‎Papierkorb‎>‎ What's the full path to the `lib` directory containing the libLLVM and libclang libs gcds?
<gcds> because therse is one in /usr/local/opt/llvm/bin and one in /usr/local/Cellar/llvm/5.0.0
<gcds> u see InstalledDir is correct but later on it uses old
<FromGitter> <asterite> @marksiemers try `crystal tool hierarchy file.cr`
shankar_ has quit [Ping timeout: 240 seconds]
<Papierkorb> gcds: Have you moved your installation of clang manually?
<gcds> no I used brew
shankar has joined #crystal-lang
<FromGitter> <marksiemers> Thanks @asterite
<gcds> omg I AM IDIOT
<gcds> ...
<gcds> this "find_libraries" doesnt work u know why....
<gcds> it searches for .a files
<gcds> then on osx its dylib...
<Papierkorb> .a files are static libs
<gcds> in linux
<Papierkorb> .dylib are dynamic (hence their name)
<gcds> ahh sorry
<gcds> there are no static libs on osx
<gcds> only dynamics
<Papierkorb> You still didn't share the contents of the lib directories
<Papierkorb> There must be a gazillion of them
<gcds> ls -l /usr/local/opt/llvm/lib/*.a | wc #> 3 27 267
<gcds> libc++ libunwind
<gcds> what lib is tinfo?
<gcds> it failed because it could not find it
<Papierkorb> terminfo iirc
<Papierkorb> and/or ncurses
<Papierkorb> Which clang needs for some reason
<gcds> ahm I cant find terminfo or tinfo for mac :(
<Papierkorb> install ncurses
<Papierkorb> or just curses if that's not available
mark_66 has quit [Remote host closed the connection]
<gcds> yay... Undefined symbols for architecture x86_64: "_pcre_free_study", referenced from:
<gcds> alright managed to get compiled
<gcds> :D
hightower4 has joined #crystal-lang
hightower3 has quit [Ping timeout: 240 seconds]
<gcds> Papierkorb is there some kind specific flags I need provide to get some output?
<Papierkorb> from what?
rohitpaulk has joined #crystal-lang
<gcds> bindgen
<Papierkorb> ... the clang part or the crystal part?
<gcds> clang
<Papierkorb> Have you got it to link?
<gcds> yeah
<Papierkorb> Just run the full Crystal test suite
<Papierkorb> if those run through, your bindgen installation should work correctly in its entirety
<Papierkorb> shouldn't take too long to run
<gcds> it works, I am just trying to use it standalone
qard has quit [Quit: Textual IRC Client: www.textualapp.com]
greengriminal has joined #crystal-lang
<gcds> ahh there are flags
<Papierkorb> `VERBOSE=1 crystal spec`
<Papierkorb> will dump the clang/bindgen commands it runs
<gcds> yeah it parsed header file nicely :)
<Papierkorb> Great. Waiting for the PR then. clang/find_clang.cr should report the brew install line to pull in the dependencies.
<Papierkorb> If you want to fight with travis, you could also make it run on OSX
claudiuinberlin has joined #crystal-lang
gcds has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Ven has joined #crystal-lang
Guest53864 has quit [Ping timeout: 268 seconds]
Ven is now known as Guest72122
greengriminal has quit [Quit: Leaving]
shankar has quit [Remote host closed the connection]
<FromGitter> <marksiemers> Figuring out how to capture a block with no arguments and a return value, then call it was a bit of a struggle for me using the docs. ⏎ I got to the answer. I'm wondering if you think some version of this would be helpful in the docs: ⏎ https://play.crystal-lang.org/#/r/31hn
<FromGitter> <marksiemers> In this part of the docs: https://crystal-lang.org/docs/syntax_and_semantics/capturing_blocks.html
rohitpaulk has quit [Remote host closed the connection]
<robacarp> at first glance I'm not seeing how your example is different from the example in the doc
<FromGitter> <Rinkana> One has type annotations so its more
<robacarp> ah, it's combining the type annotations from the first example into the second. I don't see any reason not to open a pull request and get some comments. It wouldn't be a big change
<FromGitter> <asterite> @marksiemers you can also just `-> String` (with nothing before the `->`)
<FromGitter> <marksiemers> Nice, I was trying an underscore. Then you don't need the `.call(nil)` - which did feel hacky.
<FromGitter> <asterite> But I agree, it's missing from the docs
<FromGitter> <marksiemers> I can attempt a PR this week (assuming the docs are OS)
<FromGitter> <Sevensidedmarble> whats the best way to require from /lib directory when in a file in /src?
ephemera_ has quit [Quit: No Ping reply in 180 seconds.]
<FromGitter> <Sevensidedmarble> I have a library in lib too that just has `require "cute"` which fails too
<robacarp> usually `require "folder"` where `folder` is the name of the folder in the lib dir
lacour has quit [Read error: Connection reset by peer]
<FromGitter> <Sevensidedmarble> do I need to build the dependencies after shards install or something?
<FromGitter> <Sevensidedmarble> because when I do shards install the code is only in src
<FromGitter> <Sevensidedmarble> so require doesnt find anything in the main folder
ephemera_ has joined #crystal-lang
<robacarp> you don't need to build shards manually, they build at each compile of your project
<robacarp> is all the code in your lib folder placed there by `shards install`?
<FromGitter> <Sevensidedmarble> correct
<FromGitter> <Sevensidedmarble> I have Papierkorb's fancyline lib installed via shards
<FromGitter> <Sevensidedmarble> and it brought another library caleld cute with it
<FromGitter> <Sevensidedmarble> and the first require in fancyline fails to find cute
<robacarp> which library?
<FromGitter> <Sevensidedmarble> https://github.com/Papierkorb/fancyline
<FromGitter> <Sevensidedmarble> if I make a new crystal app with `crystal init app test` and require code from fancyline, it fails to find cute
vivus has joined #crystal-lang
Ryan__ has joined #crystal-lang
<Ryan__> Hi all, is it possible to delete XML elements? I can't seem to find any docs for it https://crystal-lang.org/api/0.23.0/XML.html
<Ryan__> I see it's possible to delete the node attributes, but not the nodes themself? (https://crystal-lang.org/api/0.23.0/XML/Node.html)
<robacarp> @sevensidedmarble I don't see the same behavior.
<robacarp> when you say "and require code from fancyline" what specifically are you doing
<oprypin> Ryan__, i think you're supposed to use this https://crystal-lang.org/api/0.23.0/XML/Node.html#children-instance-method
<oprypin> ..which doesnt let you delete nodes lol
<FromGitter> <unreadable> Ok, I managed to get this small assembly code working. Any way I could wrap it in crystal?
<FromGitter> <unreadable> section .data ⏎ text db "Hello, World!", 10 ⏎ ⏎ section .text ⏎ global _start ... [https://gitter.im/crystal-lang/crystal?at=5a00be81b20c64242995ff13]
<FromGitter> <unreadable> asm doesn't seem to work
<oprypin> unreadable, try to find examples in https://github.com/crystal-lang/crystal/search?q=asm
<FromGitter> <unreadable> that should help me do the trick
olbat[m] has quit [Ping timeout: 240 seconds]
watzon has quit [Ping timeout: 240 seconds]
<Ryan__> oprypin, I can't find how to delete the children nodes though, i.e all <script></script>
<oprypin> Ryan__, neither can i
<Ryan__> None of the crystal third party shards seem to be able to delete nodes either :-/
byteflame has quit [Ping timeout: 252 seconds]
kp666[m] has quit [Ping timeout: 276 seconds]
weston_[m] has quit [Ping timeout: 240 seconds]
tybee[m] has quit [Ping timeout: 240 seconds]
dtcristo has quit [Ping timeout: 240 seconds]
TheGillies has quit [Ping timeout: 250 seconds]
sija[m] has quit [Ping timeout: 252 seconds]
braidn[m] has quit [Ping timeout: 248 seconds]
cptaffe has quit [Ping timeout: 248 seconds]
thelonelyghost has quit [Ping timeout: 276 seconds]
Renich has quit [Ping timeout: 276 seconds]
<FromGitter> <unreadable> Rust got me covered
<FromGitter> <unreadable> It should work the same in crystal
Guest72122 has quit [Ping timeout: 240 seconds]
Ven has joined #crystal-lang
Ven is now known as Guest66292
lacour has joined #crystal-lang
claudiuinberlin has quit [Quit: Textual IRC Client: www.textualapp.com]
<FromGitter> <asterite> Ryan__ I don't think that's possible, XML has just some stuff but a lot is missing
<Papierkorb> Sevensidedmarble, you don't just "require the code from some shard", you have to properly add it as dependency to your shard.yml, then run `crystal deps` to install it and its dependencies, and then you can require that shard
<FromGitter> <asterite> Ryan__ actually, there's unlink, I think you need to call that
<FromGitter> <unreadable> Is the stdlib going to split till the end?
<Ryan__> asterite, You're right, unlink is there! That's quite a bad name (I think), I was searching for 'delete', 'remove', 'destroy'. Perhaps the docs could be updated to make it easier to search for that
alex`` has quit [Ping timeout: 250 seconds]
<Yxhvd> unlink is one of the methods I think deserve an alias. isn't it an unixism anyhow? Are files unlinked on say Windows?
<FromGitter> <Sevensidedmarble> Sorry for late reply papierkorb but I did do that
<Papierkorb> Yxhvd: there's no File.unlink
<Papierkorb> Dunno if it makes sense in the context of XML. unlinking a node can make sense. who knows.
<Yxhvd> oh, xml. then I dunno :)
<FromGitter> <Sevensidedmarble> I have fancy line and cute in my lib folder
<FromGitter> <Sevensidedmarble> From running shards install
<Papierkorb> do you have a CRYSTAL_PATH environment variable set?
<FromGitter> <Sevensidedmarble> But when I `require "..lib/fancyline/src/fancyline"`it loads fancyline but when fancyline tries to `require "cute"` that last require fails
<oprypin> Yxhvd, the name unlink is quite literal, as you're not deleting the node and still can use it further
<FromGitter> <Sevensidedmarble> And no I don't think I do
<Papierkorb> Sevensidedmarble, that's not how you do that at all. Just `require "fancyline"` in your application.
<FromGitter> <bew> @Sevensidedmarble just `require "fancyline"`
<FromGitter> <Sevensidedmarble> When I tried that it didn't find it
<FromGitter> <Sevensidedmarble> I'll update my repo on gh and show you guy's when I get home, I'm sure I'm doing sure one thing wrong
chrisarcand has joined #crystal-lang
<oprypin> i dont get it
<literal> as I understand it, every call to get() with an equivalent string should always return the first string object
<literal> but it seems that every time the pool is dynamically grown/reallocated, it loses the string(s) it was keeping, and starts returning a new object
<oprypin> https://carc.in/#/r/31jy for convenience sake
faustinoaq has quit [Ping timeout: 240 seconds]
Guest66292 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
faustinoaq has joined #crystal-lang
faustinoaq has quit [Ping timeout: 252 seconds]
faustinoaq has joined #crystal-lang
<Ryan__> Does Crystal have any debugging tools, like `pry ` for Ruby?
_whitelogger has joined #crystal-lang
<FromGitter> <marksiemers> Ryan - I don't think anything like pry exists. There is `icr` which is kind of like `irb` but is not a "full featured REPL" - you'll see a full warning about its functionality and limitations if you run it.
<hightower4> Ryan__, yes, basically when you run lines in icr (from what I know) it compiles all of your lines as a program (each time from the beginning) and executes them
<hightower4> there is no "running" code like in irb or pry
<Ryan__> Thanks, I'll take a look at `icr`
olbat[m] has joined #crystal-lang
<FromGitter> <Sevensidedmarble> so this is this is the error I get: ⏎ Error in crysh.cr:3: while requiring "fancyline": can't find file 'fancyline' relative to '/home/marble/Projects/crysh/crysh/src' ⏎ ⏎ require "fancyline" ⏎ ^ [https://gitter.im/crystal-lang/crystal?at=5a00dbca86d308b755b6e697]
<FromGitter> <Sevensidedmarble> is my path set up wrong you think?
<FromGitter> <bew> from where are you running the file?
<FromGitter> <Sevensidedmarble> myapp/src/myapp.cr
<FromGitter> <Sevensidedmarble> where myapp is my project and fancylib is in myapp/lib
<FromGitter> <bew> is your command `crystal run src/myapp.cr` (from project root) ? or `crystal run myapp.cr` (from src)
<FromGitter> <Sevensidedmarble> I'm running crystal myapp.cr
<FromGitter> <Sevensidedmarble> from inside the src dir
<FromGitter> <Sevensidedmarble> is that why it fails?
<FromGitter> <bew> yeah
<FromGitter> <Sevensidedmarble> well shit
<FromGitter> <Sevensidedmarble> ok you solved my riddle thank you lol
<FromGitter> <bew> it can't find a lib directory where you are, so it won't find anything
<FromGitter> <Sevensidedmarble> I think the docs for shards should mention something like that
Ryan__ has quit [Ping timeout: 260 seconds]
gcds has joined #crystal-lang
<RX14> it
<RX14> oops
<RX14> it's interesting how we've gotten more IRC users in the last few months, it seems to be more evenly split where it definitely seemed to be more gitter before
<RX14> i really want to add colour username hashing for the gitter bot as it's invaluable to me for differentiating users in a gitter conversation
<oprypin> i would have added it but i think it's detrimental to the experience. irc colors are atrocious
<FromGitter> <Sevensidedmarble> @Papierkorb do you have any idea why the cursor gets displayed too far to the right when you pass in a colorized string as a prompt to fancyline?
<oprypin> Sevensidedmarble, well the coloring stuff is special characters so fancyline probably just counts those towards the total size
<FromGitter> <Sevensidedmarble> if I don't colorize the prompt, it looks fine. but if I do, the text goes in the right place when I type but the cursor is blinking several characters to the right in what looks like empty space
vivus has quit [Quit: Leaving]
<FromGitter> <Sevensidedmarble> that sounds pretty likely
<RX14> oprypin, i can never follow conversations without them
<oprypin> shouldnt have added gitter then, lol
<RX14> it's really difficult for my eyes to quickly tell apart different people from FromGitter's output format
<RX14> oprypin, you could always just turn off colours locally
<oprypin> then i dont get bold
<RX14> *sigh*
<FromGitter> <oprypin> test
<oprypin> ok still getting bold after disabling colors
gcds has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<oprypin> but that's just me, i'm not sure others would like to see those scary colors
<oprypin> i think it's time for a new IRC extension :p
<FromGitter> <Sevensidedmarble> I kinda want to write a whole irc client
<FromGitter> <Sevensidedmarble> I hate both irrsi and weechat
<oprypin> i mean, you can probably hack your irc client to detect this
<FromGitter> <oprypin> hate to do the testing here, but i have no idea how to un-disable colors in a channel that I'm op in. ⏎ ⏎ > ChanServ sets the channel mode to 'no colors allowed'
DTZUZU has quit [Ping timeout: 240 seconds]
<oprypin> also nice that i have a package auto-patcher after each system update :p cuz it's not reaelly viable otherwise
olbat[m] has quit [Remote host closed the connection]
<Papierkorb> Sevensidedmarble, follow the tutorial. You can't just "pass in" a colorized string. You have to add colorization through a middleware
<FromGitter> <Sevensidedmarble> I saw the colorizing for text that's being typed, I assume it works the same for the prompt right?
<Papierkorb> I don't think I ever tried prompt colorization
<Papierkorb> that could mess with the cursor positioning, yes
<FromGitter> <Sevensidedmarble> I'd definitely like to be able to colorize the prompt too
<FromGitter> <Sevensidedmarble> also your library is awesome
<FromGitter> <Sevensidedmarble> it reminds me of that python prompt library that gets used for a few python repls
olbat[m] has joined #crystal-lang
<Papierkorb> I have code somewhere which can ignore the ansi sequences to tell how large a string will be on screen.
<Papierkorb> That'd also implement RPROMPT (Totally not stolen from zsh)
<FromGitter> <Sevensidedmarble> commit it!
<Papierkorb> in the following days
<FromGitter> <Sevensidedmarble> would fancy line be able to draw above the current line?
<Papierkorb> ?
<Papierkorb> I mean you could add an `above_info` middleware, but ..
<FromGitter> <Sevensidedmarble> well it's something I want to do with my shell at some point
<FromGitter> <Sevensidedmarble> I know it sounds weird but the usage I'm envisioning is more like autocomplete works in a text editor then bash's tab completion
<FromGitter> <Sevensidedmarble> anyways your library rocks so far
<FromGitter> <Sevensidedmarble> you've saved me a load of time
<Papierkorb> You mean context-menu style things? Not sure if putting that into the lib is a good fit, but you can do that using a custom Widget I guess
<Papierkorb> The expected behaviour of a widget is documented, so you could do it today
<Papierkorb> gn8
olbat[m] has quit [Remote host closed the connection]
olbat[m] has joined #crystal-lang