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
illyohs has quit [Quit: Leaving]
<FromGitter> <marksiemers> > guys what you think will crystal dominate go or not ?)) ⏎ ⏎ Still TBD. I think Crystal will have to get a lot of adopters from Ruby, Python, and even Elixir. ⏎ Syntax and enjoyment of coding, I think Crystal is a hands down winner, but that is pretty subjective. ⏎ The major things holding it from wide adoption (IMO) are these: ... [https://gitter.im/crysta
<FromGitter> ... l-lang/crystal?at=5a0e29fd982ea2653f8bd7e5]
<FromGitter> <marksiemers> In addition to those, in the data science world, it could displace python - but that's really outside my realm of knowledge.
<FromGitter> <sdzyba> not sure we would see 1.0 any time soon. ⏎ according to the graph on this page 2017 has the lowest development pace comparing to previous years: https://github.com/crystal-lang/crystal/graphs/contributors
<oprypin> the situation is even worse than that when you look at code added. commits from external contributors are usually tiny
<oprypin> also @asterite's graph is basically the same as the main one
<FromGitter> <marksiemers> @sdzyba - I agree that doesn't look like a promising trend, I would hope that means as the language matures, fewer changes are needed, and each of them take more time (to co-exist with the larger existing code-base), but I'm afraid it may be volunteer weariness - and it looks like for a while Ary was putting in a lot of commits.
<oprypin> but FWIW we did get more external contributors
<FromGitter> <marksiemers> High level what is considered mandatory for 1.0? Parallelism, Windows support, something else?
<FromGitter> <marksiemers> With the concurrency built in, I think parallelism could wait for a 2.0, but there may be a lot of important reasons for that feature that I'm not aware of.
<oprypin> marksiemers, it's needed for 1.0 not because it's "nice" but because libraries (standard library too) are not ready for it and would have to change their APIs likely
<oprypin> for the longest time I was of the opinion that having a breaking 2.0 release soon after 1.0 could be devastatingly disappointing to a lot of people
<oprypin> but hey, maybe it's time to cut the losses
<oprypin> it just ain't happening soon
<FromGitter> <marksiemers> When you say libraries - crystal libraries, or other languages? Same question for standard library
<oprypin> Crystal
<FromGitter> <marksiemers> So if parallelism is not built in to 1.0, as soon as it is added, then none of the libs will be compatible - is that the issue?
<FromGitter> <marksiemers> Would it be a huge PIA to maintain a 1.0 (w/o parallelism) and a 2.0 (with it) concurrently for a long time frame (~3 years) (sorry about the pun)
balduin has left #crystal-lang [#crystal-lang]
<oprypin> 1. yes 2. obviously yes
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 255 seconds]
rohitpaulk has joined #crystal-lang
snsei has quit [Remote host closed the connection]
lacour has quit [Quit: Leaving]
rohitpaulk has quit [Read error: Connection reset by peer]
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 255 seconds]
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Read error: Connection reset by peer]
rohitpaulk has joined #crystal-lang
Papierkorb_ has joined #crystal-lang
qard has joined #crystal-lang
qard has quit [Client Quit]
claudiuinberlin has joined #crystal-lang
<FromGitter> <extremety1989> guys i do have a question what is difference using TCP server and WEBSOCKET
<FromGitter> <extremety1989> require "socket" ⏎ ⏎ channel = Channel(String).new ⏎ ⏎ spawn do ... [https://gitter.im/crystal-lang/crystal?at=5a0eaca4e606d60e34d573c4]
<FromGitter> <extremety1989> SOCKETS = [] of HTTP::WebSocket
<livcd> Go has a backing of multibillion dollar corporation and is also extremely popular in China because chinse people in general admire Google. Also Go is lets say a finished project which is just being polished. Crystal on the other hand...But we all know this :)
DTZUZO has quit [Ping timeout: 260 seconds]
<Papierkorb_> extremety1989, what's your question?
<FromGitter> <extremety1989> @FromIRC what is better HTTP::WebSocket or TCPServer
<Papierkorb_> ..wut?
<Groogy> Morning!
<Groogy> o7
<FromGitter> <extremety1989> =)
<Papierkorb_> Groogy: o/
<FromGitter> <extremety1989> hahaha
<Groogy> donno why I accidentally saluted
<FromGitter> <extremety1989> what is better HTTP::WebSocket or TCPServer ?
<Papierkorb_> extremety1989, you're comparing pears to apples
<Groogy> also so nice everything is released and the forums/reddit are just people talking about crazy shit they managed to do
<FromGitter> <extremety1989> really ?
<Papierkorb_> ..yes?
<Papierkorb_> Please read up on what TCP and WebSocket is. Even the wikipedia page will suffice.
<FromGitter> <extremety1989> i will
<FromGitter> <extremety1989> just wanted to know
<FromGitter> <extremety1989> what is better approche
<Papierkorb_> You didn't even state a full question. Posting a blob of code (that's not even formatted) is not a question.
<Papierkorb_> Help the helper.
<Groogy> TCP is a protocol, websocket is an implementation of it isn't it?
<FromGitter> <extremety1989> well for me it is kinda same thing ))
<Papierkorb_> TCP is the Transmission Control Protocol, a stateful and stream-based protocol on OSI Layer 4. WebSocket builds upon TCP, also stateful but message/datagram based.
<Papierkorb_> What's better? The V4 Engine or a Porsche?
<FromGitter> <extremety1989> ahha okey))
<FromGitter> <extremety1989> thank you
<Papierkorb_> Please read up on that, it'll help you tremendously in the general case
<Groogy> for some reason every time you guys in this chat say WebSocket I read it as WinSocket and I shiver
<FromGitter> <extremety1989> i know that, i just wanted to know what is much better in perfomance in Crystal lang
<Papierkorb_> Groogy: What does the WSA_Init shit do? Nobody knows!
<Groogy> extremety you are learning right now right? What's your project you are doing to learn stuff?
<FromGitter> <extremety1989> i just started to learn crystal, iused to work with nodejs socket io
<livcd> bararchy: Do you have a plan B if using Crystal backfires on you ?
<Groogy> Yeah no but I mean what are you implementing to learn crystal?
<Groogy> i.e since you are so concerned about performance from the get go as learning the language
<FromGitter> <extremety1989> any real-time application
<Groogy> (I've seen you put a lot of emphasis on it so)
<FromGitter> <extremety1989> go lang ?
<Papierkorb_> Please define 'real-time application'
<FromGitter> <extremety1989> chat application
<Papierkorb_> Then performance is your least worry. You want a WebUI?
<FromGitter> <extremety1989> i have his repo https://github.com/Angarsk8/chat-app-demo
<Papierkorb_> You have to use WebSockets then.
<FromGitter> <extremety1989> not even working ))
<Groogy> Focus on just learning and getting something done for now, I believe it is better to learn by fucking up if you aren't bound by actual deadlines/getting shit done
<FromGitter> <extremety1989> his implementation with postgres does not work..
<Papierkorb_> I agree with Groogy
<Papierkorb_> Getting shit done > ain't shits getting done
<FromGitter> <extremety1989> ahha ))
<Groogy> i.e if you kill performance by creating way too many tmp arrays unnessecairly you'll both learn to not do that ever again but also how to find them and fix it
<FromGitter> <extremety1989> here is exemple
<FromGitter> <extremety1989> i try to learn
<FromGitter> <extremety1989> class Topic ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ end [https://gitter.im/crystal-lang/crystal?at=5a0eb185540c78242d14d599]
<FromGitter> <extremety1989> get "/topics" do ⏎ ⏎ ```topics = Topic.all ⏎ puts topics.map(&.inspect).to_s``` ⏎ ⏎ end [https://gitter.im/crystal-lang/crystal?at=5a0eb18de606d60e34d59089]
<FromGitter> <extremety1989> does not works
<FromGitter> <extremety1989> in documentation there is mapping
<FromGitter> <extremety1989> topics.mapping
<Papierkorb_> missing `require "json"`
<FromGitter> <extremety1989> i do have it))
<FromGitter> <extremety1989> require "kemal" ⏎ require "json" ⏎ require "./db/connection" ⏎ require "./models/note.cr" ⏎ public_folder "src/public" ... [https://gitter.im/crystal-lang/crystal?at=5a0eb1e4cc1d527f6b8005e3]
<FromGitter> <extremety1989> inserting works
<FromGitter> <extremety1989> Error in src/index.cr:35: undefined method 'map' for PG::ResultSet (did you mean 'tap'?) ⏎ ⏎ ```puts topics.map(&.inspect).to_s ⏎ ^~~``` [https://gitter.im/crystal-lang/crystal?at=5a0eb22fdf09362e671cce2f]
<FromGitter> <extremety1989> ahha
<Papierkorb_> Surround your code pastes with ``` (Three backticks) to enable highlighting and all the good stuff
<FromGitter> <extremety1989> okey,sorry i didnt know that
<Papierkorb_> don't worry, you probably never used gitter so how are you supposed to know
<FromGitter> <extremety1989> ``````
<FromGitter> <extremety1989> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5a0eb32a2837ee510694a41d]
<Papierkorb_> there should be `DB.mapping` to map your topic class to the database
<FromGitter> <extremety1989> okey
<FromGitter> <extremety1989> i will try
<FromGitter> <extremety1989> ``````
<FromGitter> <extremety1989> Error in src/index.cr:11: undefined method 'mapping' for Connection::DB:Module ⏎ ⏎ Connection::DB.mapping({ ⏎ ⏎ ``` ^~~~~~~``` [https://gitter.im/crystal-lang/crystal?at=5a0eb3fbcc1d527f6b801089]
<FromGitter> <extremety1989> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5a0eb476982ea2653f8e4579]
<FromGitter> <extremety1989> [development] Kemal is ready to lead at http://0.0.0.0:3000 ⏎ ⏎ #<PG::ResultSet:0x292c540> ⏎ ⏎ 2017-11-17 11:05:09 +0100 200 GET /topics 87.62ms [https://gitter.im/crystal-lang/crystal?at=5a0eb480982ea2653f8e45c7]
<FromGitter> <extremety1989> def self.transform_messages(messages_table) ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ end [https://gitter.im/crystal-lang/crystal?at=5a0eb5eecc1d527f6b801b6a]
<FromGitter> <extremety1989> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5a0eb61071ad3f8736f6875d]
<FromGitter> <extremety1989> it says to_hash method is undefined
<FromGitter> <extremety1989> undefined method 'to_hash' for DB::ExecResult
<Groogy> and back from lunch
<Papierkorb_> Just why is the query planner of Neo4j so trash >_>
<FromGitter> <extremety1989> lol
<Groogy> anyone know a good graphical svn client? need to work on an old repo and I don't want to relearn svn ( ´_ゝ`)
<Groogy> for arch
faustinoaq has joined #crystal-lang
faustinoaq has quit [Quit: Konversation terminated!]
<crystal-gh> [crystal] MakeNowJust opened pull request #5307: Don't use `{{yield}}` outside a macro (master...fix/crystal/cant-use-yield-outside-a-macro) https://git.io/vFyAa
rohitpaulk has quit [Ping timeout: 240 seconds]
DTZUZO has joined #crystal-lang
rohitpaulk has joined #crystal-lang
Ven has joined #crystal-lang
Ven is now known as Guest25798
<faustinoaq> >> [0x679bff14d].map(&.to_s(36)).join
<DeBot_> faustinoaq: # => "crystal" - https://carc.in/#/r/33re
<FromGitter> <monouser7dig> @Groogy isn't there some git integration https://git-scm.com/book/en/v1/Git-and-Other-Systems-Git-and-Subversion
<faustinoaq> Hi How Can I convert String to Hex?
flaviodesousa has joined #crystal-lang
benner has left #crystal-lang [#crystal-lang]
<FromGitter> <jdbann> Is there an equivalent of Timecop for Crystal? Or a way to stub `Time.now`?
<Groogy> @monouser7dig yeah but it is super slow
<Groogy> the first time around when it parses the entire repo
<Groogy> with old repo I mean really old and a lot of history
<FromGitter> <Rinkana> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5a0edb8af257ad9109a83dd5]
<FromGitter> <Rinkana> This benchmark yields: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5a0edb9ccc1d527f6b80ecda]
<FromGitter> <bararchy> livcd I put my hopes with Crystal, the thing about it, and other languges, it's open-source, we can always fork our own if things go sower and slowly move to another lang, though, I don't see this as a real posibility
<FromGitter> <monouser7dig> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5a0edc67e606d60e34d67ce0]
<FromGitter> <monouser7dig> int 218.27M ( 4.58ns) (±10.91%) 1.09× slower ⏎ float 238.84M ( 4.19ns) (± 9.80%) fastest
<FromGitter> <monouser7dig> +1 is to Javaid zero division, should be in the int version as well
Guest25798 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<FromGitter> <monouser7dig> although that won't even work cause it's in the range Int::MIN Int::MAX
<FromGitter> <monouser7dig> you say float should be much faster?
faustinoaq has quit [Quit: Konversation terminated!]
<FromGitter> <Rinkana> I'm not saying that. But in the article it states that it should be faster because CPU's are optimized for float operations. And in both our benchmarks floats are indeed faster
faustinoaq has joined #crystal-lang
<FromGitter> <monouser7dig> yes
<FromGitter> <jdbann> Great! Thanks @faustinoaq
<Papierkorb_> would be kinda news if CPUs were any good at floats. They just suck at divisions.
<faustinoaq> ‎Papierkorb_‎, How can I list online users on IRC?
<Papierkorb_> huh? your client should have a nick list to the right
<Papierkorb_> or on the left. somewhere.
<faustinoaq> Oh, ok, but can I use some IRC command too?
<Papierkorb_> https://gist.github.com/Papierkorb/759766128bb9beb7cf1ef707e8ea3bef float is much better than expected, but still worse thant int.
<Papierkorb_> depends on your client if it actually sends commands you give it
<Papierkorb_> If it does, `WHO #channel` should give it
<faustinoaq> Ok, Thank you! :) BTW, Do you know how convert String to Hex? something like:
<faustinoaq> >> [0x679bff14d].map(&.to_s(36)).join
<DeBot_> faustinoaq: # => "crystal" - https://carc.in/#/r/33rh
<Papierkorb_> Slice#hexstring
<faustinoaq> but reverse String to Hex
<faustinoaq> ‎Papierkorb_: Thank you again! :)
faustinoaq has quit [Quit: Konversation terminated!]
faustinoaq has joined #crystal-lang
qard has joined #crystal-lang
faustinoaq has quit [Quit: Konversation terminated!]
faustinoaq has joined #crystal-lang
qard has quit [Ping timeout: 250 seconds]
faustinoaq has quit [Client Quit]
faustinoaq has joined #crystal-lang
<FromGitter> <faustinoaq> *ignore this message, testing IRC bot*
faustinoaq has quit [Quit: Konversation terminated!]
faustinoaq has joined #crystal-lang
<faustinoaq> [[Crystal (programming language)]]
<FromGitter> <faustinoaq> *ignore this message, testing IRC bot*
<faustinoaq> <@faustinoaq> >> p "Hi".to_slice.hexstring
<faustinoaq> >> p "Hi".to_slice.hexstring
<DeBot_> faustinoaq: "4869" - more at https://carc.in/#/r/33rn
<faustinoaq> >> p "0x4869".to_s(36)
<DeBot_> faustinoaq: in /usr/lib/crystal/string.cr:4043: undefined method 'write_utf8' for Int32 - https://carc.in/#/r/33ro
<faustinoaq> >> p 0x4869.to_s(36)
<DeBot_> faustinoaq: "eax" - more at https://carc.in/#/r/33rp
<Papierkorb_> well, hexstring is of course a different base
<faustinoaq> <@Papierkorb_> Oh, What I need to do to get "Hi" from hexstring then?
<Papierkorb_> Well, the 'table' crystal uses is basically `[ 0, 1, 2, ... , a, b, c, ... , z ]`.
<Papierkorb_> Try to figure out how to make .to_s(36) emit a single `a`, then look for `h`. Then try to make it emit a second character.
<faustinoaq> :+1:
<Papierkorb_> There's a simple rule on what math operation you need to do, including which operands you need to give it
<Papierkorb_> to make it 1337, just turn the decimal number into a hex number, and post that.
<faustinoaq> <@Papierkorb_> Ok, Thank you!, let me try :)
flaviodesousa has quit [Ping timeout: 258 seconds]
Ven has joined #crystal-lang
Ven is now known as Guest40983
rohitpaulk has quit [Ping timeout: 240 seconds]
hellomyfellow has joined #crystal-lang
rohitpaulk has joined #crystal-lang
<hellomyfellow> hello can I view a list of all the versions of crystal with data etc?
<Papierkorb_> "data"?
<hellomyfellow> date!
<Papierkorb_> .. their release date?
<hellomyfellow> yes..
<hellomyfellow> is there any list of all this?
<Papierkorb_> just check the git.
<hellomyfellow> the git? ok..
<Papierkorb_> and/or the CHANGELOG
<hellomyfellow> but changelog? wheres a changelog
<Papierkorb_> there's a actual file.
<hellomyfellow> okay found it thx
<hellomyfellow> i think it should also be viewable on the website
rohitpaulk has quit [Ping timeout: 240 seconds]
<hellomyfellow> how can I run C code with crystal?
<hellomyfellow> call C code*
rohitpaulk has joined #crystal-lang
Guest40983 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<z64> check out the section on C bindings from the crystal book: https://crystal-lang.org/docs/syntax_and_semantics/c_bindings/
<hellomyfellow> hm. I definitely entered "C" in this and this doesnt appeared
<hellomyfellow> buut can I also write C code in crystal? and run this
Ven has joined #crystal-lang
Ven is now known as Guest48681
<crystal-gh> [crystal] RX14 closed pull request #5296: Remove mistake example in query property comment (master...correct-query-property-doc) https://git.io/vFPSW
Papierkorb_ has quit [Ping timeout: 268 seconds]
<FromGitter> <codenoid> hi, is `Time.monotonic` removed in crystal 0.23.1 ?
<hellomyfellow> uhhh.. im very sure Time.monotic is added first in 0.24
<FromGitter> <codenoid> okay then
<FromGitter> <joegyoung> I am looking for a way in crystal to start the bash shell within crystal... Any help?
<FromGitter> <codenoid> `some shell script (?)`
<FromGitter> <codenoid> `
<FromGitter> <joegyoung> Let me check...
<FromGitter> <joegyoung> Thanks it!!!! Thank you !!!
<FromGitter> <codenoid> https://carc.in/#/r/33t1
<FromGitter> <codenoid> okay
<FromGitter> <claisne> Hello does anyone know what the dup method does on a simple object ?
<FromGitter> <claisne> i feel like I had to redefine the #dup method on this object
<Papierkorb> #dup does by definition a shallow copy.
<FromGitter> <claisne> which is a direct translation of what I wrote no ?
<FromGitter> <claisne> because it did not seem to work without a redefinition
<Papierkorb> You're not specifying what "did not work"
<Papierkorb> did your house catch on fire?
<Papierkorb> Or what was unexpected?
<FromGitter> <claisne> calling dup on a Move object
<FromGitter> <claisne> without redefining it
<FromGitter> <claisne> buts its ok I'll find the cause by myself
<FromGitter> <claisne> sorry for the trouble
<FromGitter> <Fryguy> shallow copy means it doesn't follow references
<FromGitter> <Fryguy> so the Array and Set will be copied as references (hence pointing to the same thing)
<FromGitter> <Fryguy> you probably want `clone` instead for a deep copy
<Papierkorb> >> class Foo; end; a = Foo.new; pp a.object_id, a.dup.object_id
<DeBot_> Papierkorb: a.object_id # => 93867079143392 - more at https://carc.in/#/r/33t2
<Papierkorb> >> class Foo; end; a = Foo.new; pp [ a.object_id, a.dup.object_id ]
<DeBot_> Papierkorb: [a.object_id, a.dup.object_id] # => [94424165826528, 94424165826512] - more at https://carc.in/#/r/33t3
<Papierkorb> Works as intended.
hellomyfellow has quit [Quit: Page closed]
Guest48681 is now known as Ven``
<FromGitter> <simaoneves> hey guys
<FromGitter> <simaoneves> i can't find the Windows support and parallelism branches
<FromGitter> <simaoneves> any ideas?
claudiuinberlin has quit [Quit: Textual IRC Client: www.textualapp.com]
hightower4 has joined #crystal-lang
<FromGitter> <simaoneves> yes, i saw that, and "windows" branch aswell
<FromGitter> <simaoneves> but both are not updated in a lonnggggg time
hightower3 has quit [Ping timeout: 248 seconds]
<crystal-gh> [crystal] straight-shoota opened pull request #5308: Docs: Fix matching nested type references in markdown renderer (master...jm-issue-5293) https://git.io/vFSXe
Ven`` has quit [Ping timeout: 258 seconds]
<FromGitter> <claisne> if anyone like to criticize code, could you review my checkers move generation code ? ⏎ https://github.com/claisne/online_boards/blob/master/backend/src/online_boards/checkers/board.cr ⏎ thanks
<FromGitter> <Fryguy> I just glanced at it, but it looks pretty nice to me. ⏎ ⏎ On cool thing that Crystal has is a simpler comparison operator for `a < x < b`: ⏎ ⏎ `square.rank >= 0 && square.rank < @size` can be written as `0 <= square.rank < @size` [https://gitter.im/crystal-lang/crystal?at=5a0f24e8982ea2653f90f40e]
<FromGitter> <Fryguy> Its minor, but it reads nice
<FromGitter> <claisne> great thanks
<FromGitter> <Fryguy> One other minor thing is that `self.` isn't necessary on methods calls...it's implied...but you do need it when calling a setter method
<FromGitter> <claisne> ok I'll refactor!
<Papierkorb> #set_starting_board, #moves and #piece_captures are way too complex
<Papierkorb> Empty `()` can (= should) be omitted: `foo()` -> `foo`
<FromGitter> <claisne> how would you simplify #set_starting_board ? decompose for white and black ?
<Papierkorb> That'd be a good refactor, yes
<Papierkorb> The if also doesn't have a branch for `rank == (@size / 2)`. But that thing's gone in a minute anyway now, so
<Papierkorb> ..
<FromGitter> <claisne> what do you mean ?
<FromGitter> <claisne> if ```rank === (@size / 2)``` its only empty pieces
<Papierkorb> For rank in { @size / 2 - 1, @size / 2 }, no branch matches.
<FromGitter> <claisne> yes indeed there are no pieces
<Papierkorb> The current, unrefactored, code doesn't make this intention clear
<Papierkorb> Lines 73/74 could benefit from trailing-if: `piece.promote if promotion_square?(..)`
<FromGitter> <claisne> great didn't know about this one thanks
<Papierkorb> the algorithm in #piece_captures could actually be its own class
<FromGitter> <Fryguy> oh interestnig...i didn't know single-line do/end blocks worked in Crystal: https://github.com/claisne/online_boards/blob/master/backend/src/online_boards/checkers/board.cr#L155
<FromGitter> <Fryguy> For some reason I thought you *had* to use curly braces
<Papierkorb> Yeah and those should be refactored to use `{ }` instead of do/end
<FromGitter> <Fryguy> yeah that ^^ :)
<FromGitter> <claisne> do/end is not the recommended way ?
<Papierkorb> do/end for multi-line blocks, { } for single line
<FromGitter> <Fryguy> Not for in-line block...prefer curly braces
<FromGitter> <claisne> ok great is there any linter available for crystal ?
<Papierkorb> dunno if the formatter catches that
<FromGitter> <claisne> humm I only find a atom plugin
<FromGitter> <Fryguy> `crystal tool format` gets you most of the way there
<Papierkorb> `crystal tool format --help`
<FromGitter> <claisne> great thanks to both of you I'll stop spamming now
<FromGitter> <Fryguy> some editors, like SublimeText, auto-format on save, which is nice
<Papierkorb> ..if you like that.
<Papierkorb> #king_steps is mis-indented by 2 spaces
<FromGitter> <claisne> I'll run the format tool on all the files
<faustinoaq> >> hex = [] of Char; p "hello".to_slice.hexstring.scan(/../).map(&.to_a.first).map(&.to_s.split("").reverse.map_with_index { |v, i| v.to_i(36)*(16**i) }.sum).map { |n| hex << n.chr; n.chr.to_i(36).to_s(36) }.join; p "0x" + hex.join.to_i(36).to_s(16)
<DeBot_> faustinoaq: "hello" - more at https://carc.in/#/r/33uq
<faustinoaq> >> p 0x1be15dc.to_s(36)
<DeBot_> faustinoaq: "hello" - more at https://carc.in/#/r/33ur
<faustinoaq> <@Papierkorb> I did it! :)
<Papierkorb> gratz
<faustinoaq> >> hex = [] of Char; "hello".to_slice.hexstring.scan(/../).map(&.to_a.first).map(&.to_s.split("").reverse.map_with_index { |v, i| v.to_i(36)*(16**i) }.sum).map { |n| hex << n.chr; n.chr.to_i(36).to_s(36) }.join; p "0x" + hex.join.to_i(36).to_s(16)
<DeBot_> faustinoaq: "0x1be15dc" - more at https://carc.in/#/r/33us
<Papierkorb> >> "hello".chars.reverse.map_with_index{|c, i| (c - 'a' + 10) * (36 ** i)}.sum.to_s(16)
<DeBot_> Papierkorb: # => "1be15dc" - https://carc.in/#/r/33uw
<FromGitter> <codem4ster> can I do smt like this; ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5a0f2d77614889d475937b15]
<FromGitter> <codem4ster> or I need to use macros only for this type of thing?
<faustinoaq> <@Papierkorb> Thanks you! :)
vivus has joined #crystal-lang
claudiuinberlin has joined #crystal-lang
<faustinoaq> >> "hello".to_i(36).to_s(16)
<DeBot_> faustinoaq: # => "1be15dc" - https://carc.in/#/r/33vd
<faustinoaq> lol
<faustinoaq> <@Papierkorb> XD
danielpclark has quit [Ping timeout: 268 seconds]
<faustinoaq> <@Papierkorb> I think I fell into xyproblem http://xyproblem.info/ XD
<Papierkorb> ?
<faustinoaq> I didn't know what I was asking for
danielpclark has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 248 seconds]
qard has joined #crystal-lang
<robacarp> I've been wondering for a while, why are the majority of line numbers in stack traces '??'
<Papierkorb> shouldn't be the majority. only the first 1-3
<Papierkorb> (or last, depending on how you look at it)
<FromGitter> <Fryguy> They are mostly ?? in my stacktraces too
<robacarp> I only have the one stacktrace I'm looking at now, but I think almost all of the stack frames I see and work through are just "at ??"
<Papierkorb> platform? version of LLVM and crystal?
<robacarp> macos and crystal in homebrew, not sure how to check llvm
<robacarp> oh: Crystal 0.23.1 (2017-10-12) LLVM 4.0.1
<FromGitter> <Fryguy> same for me
<Papierkorb> may be a mac issue then
<robacarp> macos high sierra 10.13.1
<FromGitter> <Fryguy> I assumed that mine was bad because in my project I mes with crystal_main, so I'm interested to see someone else has the issue too
<Papierkorb> always worked for me
<FromGitter> <Fryguy> macos sierra 10.12.6 for me
<robacarp> I'll...submit an issue I guess
<faustinoaq> <@robacarp> I think 0.24.0 has been improved, see https://github.com/crystal-lang/crystal/pull/4968
<robacarp> oh awesome.
ShalokShalom has joined #crystal-lang
<faustinoaq> <@‎Papierkorb> What Did you do to use a domain name in your IRC Whois instead of an IP?
<robacarp> faustinoaq: the easiest way is to connect from an ip address where the reverse lookup is the domain
Bish has quit [Ping timeout: 248 seconds]
<Papierkorb> ^
<faustinoaq> <@robacarp> Thank you! So, I can't do that on my home ip, right?
<Papierkorb> Probably not
Bish has joined #crystal-lang
<faustinoaq> Ok :P
qard has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<robacarp> there is a way to get a hostmask from freenode, but I've never gone so far
<robacarp> seems like it isn't that hard: https://www.wikihow.com/Get-a-Cloak-on-IRC
<faustinoaq> <@robacarp> Thank you! I'll take a look +1
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 248 seconds]
faustinoaq has quit [Ping timeout: 258 seconds]
vivus has quit [Quit: Leaving]
<FromGitter> <exts> is there a shard out there to format cli data? built for cli, like I want to build a table and have the library format the padding and all that jazz.
<FromGitter> <exts> if not i may have a weekend project I can work on
<FromGitter> <eliasjpr> There is shell-table shard @exts
<FromGitter> <exts> thanks @eliasjpr will check it out
<FromGitter> <exts> looks like the shard site's down, gonna check github
<FromGitter> <exts> you're a life saver @eliasjpr that's exactly what I wanted
ShalokShalom has quit [Remote host closed the connection]
<FromGitter> <eliasjpr> 👌🏻👍🏻
claudiuinberlin has quit [Quit: Textual IRC Client: www.textualapp.com]