<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]
<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!
<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_>
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)
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.
<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
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>
<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
<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
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> 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>
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'
<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]