jhass changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.15.0 | Fund Crystals development: http://is.gd/X7PRtI | Paste > 3 lines of text to https://gist.github.com | GH: https://github.com/crystal-lang/crystal | Docs: http://crystal-lang.org/docs/ | API: http://crystal-lang.org/api/ | Logs: http://irclog.whitequark.org/crystal-lang
trapped has quit [Ping timeout: 246 seconds]
<travis-ci> crystal-lang/crystal#1ee669e (master - Updated Changelog): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/127109281
betheynyx has joined #crystal-lang
tubbo has quit [Changing host]
tubbo has joined #crystal-lang
<crystal-gh> [crystal] kostya opened pull request #2541: allow string split by char with yield (master...split_with_yield) https://git.io/vwDmq
soveran has joined #crystal-lang
soveran has quit [Ping timeout: 244 seconds]
A124 has quit [Read error: Connection reset by peer]
A124 has joined #crystal-lang
pawnbox has joined #crystal-lang
nakilon has quit [Ping timeout: 276 seconds]
pawnbox has quit [Ping timeout: 244 seconds]
nwmcsween_ has joined #crystal-lang
Guest53750 has quit [Ping timeout: 260 seconds]
betheynyx has quit [Max SendQ exceeded]
soveran has joined #crystal-lang
buggs1 has quit [Read error: Connection reset by peer]
buggs1 has joined #crystal-lang
|2701 has quit [Ping timeout: 260 seconds]
guilleiguaran__ has quit [Ping timeout: 260 seconds]
|2701 has joined #crystal-lang
guilleiguaran__ has joined #crystal-lang
soveran has quit [Ping timeout: 252 seconds]
buggs1 has quit [Read error: Network is unreachable]
buggs1 has joined #crystal-lang
nakilon has joined #crystal-lang
ismaelga has quit [Remote host closed the connection]
nakilon has quit [Ping timeout: 260 seconds]
soveran has joined #crystal-lang
pawnbox has joined #crystal-lang
soveran has quit [Ping timeout: 244 seconds]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
ponga has joined #crystal-lang
betheynyx has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
soveran has joined #crystal-lang
pawnbox_ has joined #crystal-lang
pawnbox has quit [Ping timeout: 246 seconds]
nakilon has joined #crystal-lang
nakilon has quit [Ping timeout: 260 seconds]
triangles has quit [Quit: Leaving]
ponga has quit []
pawnbox_ has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
soveran has quit [Read error: Connection reset by peer]
soveran has joined #crystal-lang
soveran has quit [Read error: Connection reset by peer]
soveran has joined #crystal-lang
pawnbox_ has joined #crystal-lang
pawnbox has quit [Ping timeout: 246 seconds]
pawnbox has joined #crystal-lang
pawnbox_ has quit [Ping timeout: 250 seconds]
pawnbox_ has joined #crystal-lang
pawnbox has quit [Ping timeout: 250 seconds]
<crystal-gh> [crystal] will opened pull request #2542: Crypto::MD5 also allow Slice(UInt8) (master...md5) https://git.io/vwDEY
Philpax has quit [Read error: Connection reset by peer]
Philpax has joined #crystal-lang
nakilon has joined #crystal-lang
nakilon has quit [Ping timeout: 276 seconds]
pawnbox_ has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
nakilon has joined #crystal-lang
ome has joined #crystal-lang
trapped has joined #crystal-lang
pawnbox has quit [Ping timeout: 246 seconds]
pawnbox has joined #crystal-lang
maxpowa has quit [Ping timeout: 250 seconds]
pawnbox has quit [Remote host closed the connection]
ponga has joined #crystal-lang
soveran has quit [Remote host closed the connection]
<crystal-gh> [crystal] jhass closed pull request #2534: Make page title dynamic (gh-pages...patch-2) https://git.io/vw1cj
pawnbox has joined #crystal-lang
ponga has quit []
ismaelga has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
pawnbox_ has joined #crystal-lang
Sariyar has joined #crystal-lang
pawnbox has quit [Ping timeout: 276 seconds]
Philpax has quit [Ping timeout: 252 seconds]
soveran has joined #crystal-lang
soveran has quit [Changing host]
soveran has joined #crystal-lang
betheynyx has quit [Excess Flood]
soveran has quit [Ping timeout: 276 seconds]
betheynyx_ has joined #crystal-lang
olbat_ has joined #crystal-lang
buggs1 has quit [Ping timeout: 276 seconds]
olbat has quit [Ping timeout: 276 seconds]
buggs1 has joined #crystal-lang
<crystal-gh> [crystal] MakeNowJust opened pull request #2543: Add IDNA support and integrate with DNS lookup (master...feature/punycode) https://git.io/vwDyP
nakilon has quit [Ping timeout: 260 seconds]
maxpowa has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Ping timeout: 244 seconds]
ponga has joined #crystal-lang
pawnbox_ has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
soveran has joined #crystal-lang
pawnbox has quit [Ping timeout: 244 seconds]
soveran has quit [Ping timeout: 244 seconds]
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 240 seconds]
pawnbox has joined #crystal-lang
Sariyar has quit [Quit: Connection closed for inactivity]
jwaldrip has quit [Read error: Connection reset by peer]
jwaldrip has joined #crystal-lang
<crystal-gh> [crystal] MakeNowJust opened pull request #2544: Fix to redirect corrected URL (master...fix/redirect-corrected-url) https://git.io/vwyUF
buggs1 is now known as buggs
LastWhisper____ has joined #crystal-lang
LastWhisper____ has quit [Read error: Connection reset by peer]
LastWhisper____ has joined #crystal-lang
trapped has quit [Read error: Connection reset by peer]
ome has quit [Ping timeout: 260 seconds]
betheynyx_ has quit [Excess Flood]
emmanueloga has quit [Ping timeout: 260 seconds]
ponga has quit [Ping timeout: 260 seconds]
ldlework has quit [Ping timeout: 260 seconds]
AckZ has quit [Ping timeout: 260 seconds]
toydestroyer has quit [Ping timeout: 260 seconds]
_whitelogger has joined #crystal-lang
AckZ_ is now known as AckZ
emmanueloga_ is now known as emmanueloga
soveran has joined #crystal-lang
jfontan has joined #crystal-lang
AckZ has quit []
soveran has quit [Ping timeout: 244 seconds]
Sariyar has joined #crystal-lang
bjmllr has joined #crystal-lang
sp4rrow has joined #crystal-lang
sp4rrow has quit [Quit: The Internet needs a break and I need a cookie]
maxpowa has quit [Ping timeout: 276 seconds]
sp4rrow has joined #crystal-lang
sp4rrow has quit [Client Quit]
sp4rrow has joined #crystal-lang
<crystal-gh> [crystal] asterite closed pull request #2473: Compiler: guess types from `obj.tap { ... }` (guess from `obj`) (master...feature/guess_tap) https://git.io/vwtdx
ismaelga has quit [Remote host closed the connection]
<crystal-gh> [crystal] asterite pushed 3 new commits to master: https://git.io/vwyVx
<crystal-gh> crystal/master a8f7155 Ary Borenszweig: Compiler: fixed macro didn't work inside array/hash literal
<crystal-gh> crystal/master eabebf7 Ary Borenszweig: Formatter: fixed for macros with operators as names
<crystal-gh> crystal/master 049891f Ary Borenszweig: Added `Number.slice`, `Number.static_array`, `Slice.[]` and `StaticArray.[]`. Fixes #2229
<crystal-gh> [crystal] asterite pushed 1 new commit to master: https://git.io/vwywv
<crystal-gh> crystal/master 3db1d12 Ary Borenszweig: Slice and StaticArray: let `to_s` include the class name. Fixes #2540
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
<travis-ci> crystal-lang/crystal#049891f (master - Added `Number.slice`, `Number.static_array`, `Slice.[]` and `StaticArray.[]`. Fixes #2229): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/127274974
TheLemonMan has joined #crystal-lang
<crystal-gh> [crystal] asterite pushed 1 new commit to master: https://git.io/vwyoc
<crystal-gh> crystal/master af62552 Ary Borenszweig: Specs: use `UInt8.slice` in a few places
<travis-ci> crystal-lang/crystal#3db1d12 (master - Slice and StaticArray: let `to_s` include the class name. Fixes #2540): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/127275032
<|2701> if I wanted to manipulate bytes from an image file that I'm reading, should I be using an array of BitArray or is there a better way
<BlaXpirit> |2701, no, BitArray is not a good option, it's for bitmasks like 01110100100
<travis-ci> crystal-lang/crystal#af62552 (master - Specs: use `UInt8.slice` in a few places): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/127279117
<|2701> what should I be doing
<BlaXpirit> |2701, do you want to manipulate bytes or pixels?
<|2701> ultimately, I'll be writing to several different formats, so I'll need to work with bytes
<BlaXpirit> |2701, contents of a file is an array of bytes. you can use Array(UInt8) or Slice(UInt8)
<|2701> but is there builtin pixel manipulation already?
<BlaXpirit> |2701, uh no?
<|2701> ok, I hadnt seen any but I thought I'd ask
<asterite> |2701: what do yo mean by "builtin pixel manipulation"?
<|2701> no I thought he was saying that image manipulation was already a thing, I had looked through the API and didnt see anything that looked like it, so thats why I wondered
<|2701> communication lapse, i guess
<sp4rrow> is there a way to get access to an objects types as an array or something
<sp4rrow> I want to be ables to access the types individually like `obj.types.each {|x| puts x}`
<asterite> You mean, the instance variables?
<BlaXpirit> asterite, I think like Int32|String -> [Int32, String]
<sp4rrow> yeah I think so
<sp4rrow> do you mean instance variables like in meta programming
<asterite> I'm not sure, I don't know what "obj" and "obj.types" are
<BlaXpirit> sp4rrow, note that an object has only one type (.class property) but you're looking at a compiletime concept that says "this could be an object of any of these classes"
<asterite> maybe what BlaXpirit says
<RX14> in macros you can do it
<sp4rrow> union types right
<RX14> type.union_types in a macro
<sp4rrow> that make alot of sense
<RX14> then you can stringify
<RX14> and make an array
<RX14> which you can use at runtime
<sp4rrow> I true
<RX14> of strings though
<RX14> there isn't a runtime type for type is there
<sp4rrow> I was looking at flatten and trying to wrap my head around the problem
<sp4rrow> this deals with types
<BlaXpirit> sp4rrow, this should be relevant http://crystal-lang.org/2015/08/24/its-a-typeof-magic.html
<sp4rrow> and is more dynamic
<sp4rrow> awesome I will have to check it out
<sp4rrow> I am getting back into crystal and have been using it for a few personal projects and checking out the issues
<sp4rrow> is there a good set of issues to get started on ?
<asterite> sp4rrow: something like this? https://play.crystal-lang.org/#/r/xtd
<asterite> I don't think there's an easier way to do that
<RX14> wait what
<sp4rrow> I was thinking of looking at the iterators type for flatten and pulling out all the nested types for a return type then I realized quickly that would not work
<asterite> with T you get access to the type of x, then you inspect it with macros and return the union types. The type of a union type (or any type) is Class
<RX14> crystal has runtime class types?
<BlaXpirit> RX14, well yeah, like
<RX14> idk i thought it didn't somehow
<BlaXpirit> >> pp [Int32, Array]
<asterite> RX14: kind of, it's Class. But classes can't be added at runtime
<DeBot> BlaXpirit: [Int32, Array] = [Int32, Array(T)] - more at https://carc.in/#/r/xtf
<RX14> >> pp Int32 | Array
<DeBot> RX14: in /usr/lib/crystal/class.cr:50: can't declare variable of generic non-instantiated type Array(T) - https://carc.in/#/r/xtj
<RX14> how does the array work then
<RX14> >> pp Array
<DeBot> RX14: Array = Array(T) - more at https://carc.in/#/r/xtk
<RX14> >> pp Array.name
<DeBot> RX14: Failed to run your code, sorry! - https://carc.in/#/r/xtl
sp4rrow has quit [Read error: Connection reset by peer]
sp4rrow has joined #crystal-lang
<sp4rrow> is there anyway to get nested types of a hash?
<sp4rrow> is there anyway to get nested types of a hash?
<asterite> sp4rrow: if you need that, you can probably write your program in a simpler way so you don't need that
<sp4rrow> ok
<sp4rrow> thanks for all the help
<asterite> Or maybe something like the union_types method above, combined with flatten or something... I'm not sure
<sp4rrow> that is kind of what I am thinking
<BlaXpirit> >> pp Int32 | Array(Int32)
<DeBot> BlaXpirit: Int32 | Array(Int32) = (Array(Int32) | Int32) - more at https://carc.in/#/r/xtv
<BlaXpirit> RX14, a generic can't be in a union
<RX14> oh
LastWhisper____ has quit [Read error: Connection reset by peer]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
sp4rrow has quit [Quit: The Internet needs a break and I need a cookie]
sp4rrow has joined #crystal-lang
Ven has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
LastWhisper____ has joined #crystal-lang
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 260 seconds]
sp4rrow has quit [Quit: The Internet needs a break and I need a cookie]
g3funk is now known as braidn
LastWhisper____ has quit [Ping timeout: 260 seconds]
_kfpratt has joined #crystal-lang
pawnbox has joined #crystal-lang
LastWhisper____ has joined #crystal-lang
qwerty has joined #crystal-lang
qwerty is now known as Guest81747
pawnbox has quit [Ping timeout: 276 seconds]
<Guest81747> how to write code like this (1..n).reduce(&:*) in crystal? and i know about &.some_method but wath about operators?
danzilio_ has joined #crystal-lang
mroth_ has joined #crystal-lang
Kilobyte22 has joined #crystal-lang
maxpowa has joined #crystal-lang
danzilio has quit [Ping timeout: 268 seconds]
mroth has quit [Ping timeout: 268 seconds]
bougyman has quit [Ping timeout: 268 seconds]
kfpratt has quit [Ping timeout: 268 seconds]
Kilo`byte has quit [Ping timeout: 268 seconds]
danzilio_ is now known as danzilio
bougyman has joined #crystal-lang
mroth_ is now known as mroth
mroth has quit [Ping timeout: 276 seconds]
<BlaXpirit> Guest81747, I think binary operations are not possible to accomplish like this
mroth has joined #crystal-lang
<crystal-gh> [crystal] asterite pushed 1 new commit to master: https://git.io/vwS3B
<crystal-gh> crystal/master 4f3b2bf Ary Borenszweig: Allow named args to match arguments that don't have a default value (#2537)
sp4rrow has joined #crystal-lang
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 250 seconds]
soveran has joined #crystal-lang
<travis-ci> crystal-lang/crystal#4f3b2bf (master - Allow named args to match arguments that don't have a default value (#2537)): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/127333558
maxpowa has quit [Quit: Ahh! My head is on fire!]
LastWhisper____ has quit [Ping timeout: 246 seconds]
maxpowa has joined #crystal-lang
sp4rrow_ has joined #crystal-lang
fmcevoy has quit [Quit: leaving]
Guest81747 has quit [Quit: Page closed]
sp4rrow has quit [Ping timeout: 240 seconds]
guest has joined #crystal-lang
<crystal-gh> [crystal] asterite closed pull request #2496: Add `as` special method. Fixes #2482 (master...feature/as_as_method) https://git.io/vw4Hn
guest has quit [Client Quit]
ponga has quit []
soveran has quit [Remote host closed the connection]
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
pawnbox has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]
soveran has joined #crystal-lang
pawnbox has quit [Ping timeout: 244 seconds]
maxpowa has quit [Quit: Ahh! My head is on fire!]
maxpowa has joined #crystal-lang
betheynyx has quit [Max SendQ exceeded]
soveran has quit [Remote host closed the connection]
matp has quit [Ping timeout: 240 seconds]
matp has joined #crystal-lang
ismaelga has joined #crystal-lang
pawnbox has joined #crystal-lang
nakilon has joined #crystal-lang
pawnbox has quit [Ping timeout: 250 seconds]
maxpowa has quit [Quit: Ahh! My head is on fire!]
maxpowa has joined #crystal-lang
betheynyx has joined #crystal-lang
matp has quit [Remote host closed the connection]
matp has joined #crystal-lang
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 260 seconds]
sp4rrow_ has quit [Quit: The Internet needs a break and I need a cookie]
soveran has joined #crystal-lang
soveran has quit [Changing host]
soveran has joined #crystal-lang
soveran has quit [Ping timeout: 252 seconds]
trapped_ has quit [Read error: Connection reset by peer]
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 244 seconds]
willl has joined #crystal-lang
_kfpratt has quit [Remote host closed the connection]
nakilon_ has joined #crystal-lang
nakilon has quit [Ping timeout: 260 seconds]