jhass changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.7.5 | Fund Crystals development: http://to.ly/TtGw | Paste > 3 lines of text to https://gist.github.com | GH: https://github.com/manastech/crystal - Docs: http://crystal-lang.org/docs/ | API: http://crystal-lang.org/api/ | Logs: http://irclog.whitequark.org/crystal-lang
mgarciaisaia has quit [Ping timeout: 265 seconds]
shama has quit [Quit: (╯°□°)╯︵ɐɯɐɥs]
mgarciaisaia has joined #crystal-lang
<crystal-gh> [crystal] asterite pushed 2 new commits to master: http://git.io/vOEsn
<crystal-gh> crystal/master 84dfa6d Julien Portalier: Added: File.link, .symlink and .symlink?
<crystal-gh> crystal/master 98b5caa Ary Borenszweig: Merge pull request #1102 from ysbaddaden/std-file-links...
kulelu88 has left #crystal-lang ["Leaving"]
havenwood has quit [Quit: Textual IRC Client: www.textualapp.com]
<asterite> Tuples have all their members side by side, there's nothing extra, so you can use them to pack values (for which you know the length), then take a pointer to that, cast the pointer, and get back the value
<travis-ci> manastech/crystal#98b5caa (master - Merge pull request #1102 from ysbaddaden/std-file-links): The build passed. https://travis-ci.org/manastech/crystal/builds/73986379
blue_deref has joined #crystal-lang
sdogruyol has joined #crystal-lang
sdogruyol has quit [Ping timeout: 240 seconds]
sardaukar has quit [Ping timeout: 256 seconds]
sardaukar has joined #crystal-lang
havenwood has joined #crystal-lang
nahtnam has joined #crystal-lang
sailorswift has joined #crystal-lang
sailorswift has quit [Client Quit]
sailorswift has joined #crystal-lang
sailorswift has quit [Max SendQ exceeded]
sailorswift has joined #crystal-lang
sdogruyol has joined #crystal-lang
sdogruyol has quit [Ping timeout: 240 seconds]
havenwood has quit [Ping timeout: 250 seconds]
havenwood has joined #crystal-lang
ylluminate has quit [Remote host closed the connection]
ylluminate has joined #crystal-lang
ylluminate has quit [Ping timeout: 272 seconds]
ylluminate has joined #crystal-lang
mgarciaisaia has quit [Quit: Leaving.]
blue_deref has quit [Quit: bbn]
sdogruyol has joined #crystal-lang
sdogruyol has quit [Ping timeout: 240 seconds]
mgarciaisaia has joined #crystal-lang
sailorswift has quit [Read error: Connection reset by peer]
sailorswift has joined #crystal-lang
mgarciaisaia has quit [Quit: Leaving.]
mgarciaisaia has joined #crystal-lang
mgarciaisaia has quit [Quit: Leaving.]
mgarciaisaia has joined #crystal-lang
nahtnam has quit [Quit: Connection closed for inactivity]
sailorswift has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sdogruyol has joined #crystal-lang
willl has joined #crystal-lang
sdogruyol has quit [Ping timeout: 240 seconds]
mgarciaisaia has quit [Quit: Leaving.]
BlaXpirit has joined #crystal-lang
havenwood has quit [Ping timeout: 250 seconds]
elia has joined #crystal-lang
elia has quit [Client Quit]
strcmp1 has quit [Ping timeout: 240 seconds]
sdogruyol has joined #crystal-lang
rvchangue has joined #crystal-lang
sdogruyol has quit [Ping timeout: 240 seconds]
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
elia has joined #crystal-lang
willl has quit [Quit: Connection closed for inactivity]
waj has joined #crystal-lang
<crystal-gh> [crystal] sferik opened pull request #1103: Update code of conduct to Contributor Covenant version 1.2.0 (master...update-code-of-conduct) http://git.io/vOuDz
sailorswift has joined #crystal-lang
waj has quit [Quit: waj]
Raimondi has quit [*.net *.split]
wonderbreadz has quit [*.net *.split]
adam| has quit [*.net *.split]
shadeslayer has quit [*.net *.split]
tliff has quit [*.net *.split]
yie has quit [*.net *.split]
wmoxam has quit [*.net *.split]
asbradbury has quit [*.net *.split]
pleiosaur has quit [*.net *.split]
Raimondi has joined #crystal-lang
wonderbreadz has joined #crystal-lang
adam| has joined #crystal-lang
shadeslayer has joined #crystal-lang
yie has joined #crystal-lang
wmoxam has joined #crystal-lang
pleiosaur has joined #crystal-lang
tliff has joined #crystal-lang
asbradbury has joined #crystal-lang
wonderbreadz has quit [Read error: Connection reset by peer]
wonderbreadz has joined #crystal-lang
zamith has joined #crystal-lang
unshadow has joined #crystal-lang
<unshadow> jhass: I found the source of the issues I get with building the AUR packages of Crystal
<unshadow> jhass: in the package() part, where you hace two cp -rv, when I remove the -v so only -r remains, the build is much more stable for me
<jhass> oO
<jhass> your terminal has trouble printing text or something? :P
<jhass> btw there's an OBS project now: https://wiki.archlinux.org/index.php/Crystal
<jhass> just building releases though
<unshadow> jhass: XD not sure why this happens but the ammount of printing just crashes the PAKGBUILD
<unshadow> jhass: cool !
<unshadow> What the procedure of pushing Crystal package into Community repo ?
<jhass> find a TU that does it
<jhass> we'll probably need a passing 32bit first
<jhass> though anatolv was interested already
<jhass> *32bit build
sdogruyol has joined #crystal-lang
elia has quit [Quit: (IRC Client: textualapp.com)]
sdogruyol has quit [Ping timeout: 240 seconds]
sdogruyol has joined #crystal-lang
willl has joined #crystal-lang
sdogruyol has quit [Ping timeout: 240 seconds]
<unshadow> jhass: is 32bit a requirment ? can't we allow crystal, and crystal-32 ?
<jhass> I wouldn't be too surprised if it still is
unshadow_ has joined #crystal-lang
unshadow_ has quit [Read error: Connection reset by peer]
unshadow has quit [Ping timeout: 250 seconds]
unshadow has joined #crystal-lang
unshadow has quit [Quit: leaving]
trapped_ has joined #crystal-lang
trapped has quit [Read error: Connection reset by peer]
trapped_ has quit [Ping timeout: 246 seconds]
trapped has joined #crystal-lang
leafybasil has quit [Remote host closed the connection]
leafybasil has joined #crystal-lang
sdogruyol has joined #crystal-lang
leafybasil has quit [Ping timeout: 244 seconds]
sdogruyol has quit [Ping timeout: 240 seconds]
sailorswift has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dbackeus has joined #crystal-lang
<dbackeus> when using HTTP::Server#listen_fork instead of listen for concurrency I get "[warn] kevent: Bad file descriptor" for each fork in STDERR and the server doesn't work in the end, is this a known issue?
<dbackeus> never mind found this: https://github.com/manastech/crystal/issues/600
<vegai> I wonder how ARM support is doing
havenwood has joined #crystal-lang
zamith has quit [Quit: Be back later ...]
<jhass> vegai: I think nobody's actively working on it atm
<jhass> asterite: roadmap is nice! Though looking at the issue tracker recently, it might also be good to write some basic vision statement, composable language constructs over syntax, whitespace significance for the user not the compiler, Go like concurrency, thinks like that. Basically a mixture of already achieved roadmap items & language design goals
<jhass> asterite: mostly to signify that we're maybe a little beyond the point of changing basic fundamentals like that, else we'll probably end up arguing over the same things over and over again for the next year as more people discover Crystal
<jhass> er, *signal is the better word
<crystal-gh> [crystal] will opened pull request #1105: add zsh completion (master...zsh) http://git.io/vO2n4
<asterite> jhass: yes, we keep discussing the same things over and over. I thought about creating a FAQ where questions like "Why not rely on indentation?" are answered and there's a big "and we'll never change this"
dbackeus has quit [Remote host closed the connection]
waj has joined #crystal-lang
<BlaXpirit> ;/
waj_ has joined #crystal-lang
waj_ has quit [Client Quit]
waj has quit [Ping timeout: 252 seconds]
shama has joined #crystal-lang
leafybasil has joined #crystal-lang
leafybasil has quit [Remote host closed the connection]
<willl> oh missed http://play.crystal-lang.org/#/r/9o3 from asterite
<willl> interesting
<BlaXpirit> willl's is better
<asterite> BlaXpirit: yes, much simpler
<BlaXpirit> and reliable
<BlaXpirit> and safe
waj has joined #crystal-lang
<crystal-gh> [crystal] waj pushed 2 new commits to master: http://git.io/vOaGS
<crystal-gh> crystal/master b98efc3 Erik Michaels-Ober: Update code of conduct to Contributor Covenant version 1.2.0
<crystal-gh> crystal/master 09147a3 Juan Wajnerman: Merge pull request #1103 from sferik/update-code-of-conduct...
NeverDie has joined #crystal-lang
sdogruyol has joined #crystal-lang
<asterite> jhass: I started https://github.com/manastech/crystal/wiki/FAQ :-)
<asterite> I'll try to find more FAQs and put the answers there, so we can easily link answers to repetitive questions
<jhass> <3
<sdogruyol> asterite: hey ary great job :+1
<jhass> another thing is that in the mid- to long-term we'll need to get feature requests either out of the issue tracker or at least clearly marked as wanted, considered (further discussion needed) or closed as unwanted. Else they'll just accumulate, we'll loose track of duplicates and people get confused at what's okay to contribute
mgarciaisaia has joined #crystal-lang
<asterite> Yes, discussions are already starting to accumulate
<jhass> for example bundler extracted them to its own bundler-features repo
<jhass> if you want to know why that's bad, have a look at https://github.com/diaspora/diaspora/labels/feature, that's 204 out of 362 open issues
<asterite> I think rust also has an rfc-only repo
<jhass> (with only 91 marked as bug)
<jhass> I can also imagine a uservoice like system to filter out most wanted features, in such duplicates and strange stuff usually ends up at some low end of a list to be safely ignored
<BlaXpirit> oh yeah
<BlaXpirit> woul be great to have features separate AND with voting
benner_ is now known as benner
blue_deref has joined #crystal-lang
<sdogruyol> how to i define getter and setter at the same time?
<jhass> sdogruyol: property
<sdogruyol> is there something like attr_accesor
<sdogruyol> oh
<sdogruyol> jhass: thanks <3
<jhass> yw
<sdogruyol> jhass: how are you doing btw?
<jhass> well enough I guess
<sdogruyol> jhass: good to hear
<sdogruyol> btw do we have something like pluck here :P
<jhass> what's that do?
<sdogruyol> a sugar from ActiveSupport
<jhass> I know AR::Base#pluck
<sdogruyol> yeah that's it
<sdogruyol> i wanna do something like
<sdogruyol> requests.pluck(:time_token).sum
<jhass> that's for AR models only, not even AM models let alone anything from AS
<sdogruyol> yeah
<jhass> what's requests?
<sdogruyol> but they did implement it for array of hashes
<sdogruyol> in the latest as
<sdogruyol> it's an array containt of Request objects
<jhass> oh I see
<sdogruyol> request = [] of Request
<sdogruyol> requests = [] of Request
<jhass> .map &.time_token
<sdogruyol> yeah that's also good enough :)
<jhass> just one char more, I think we can bear ;)
<sdogruyol> :D
<sdogruyol> but how do you that with hashes?
<jhass> &.fetch(:time_token) or even &.[:time_token] should work
<sdogruyol> woww
<jhass> #[] is a method call after all and &. is just syntax transformation
<sdogruyol> <3
<sdogruyol> asterite: is there a way to get the http response status code like response = client.get uri.full_path; response.code;
<sdogruyol> asterite: oh i saw status_code
dbackeus has joined #crystal-lang
dbackeus has quit [Ping timeout: 250 seconds]
dbackeus has joined #crystal-lang
<trapped> jhass: is carc.in open source
<jhass> trapped: yes, on my github
<sdogruyol> lol
<sdogruyol> jhass: do you run the processes in a container or?
<trapped> i guess i should've thought about that
<jhass> sdogruyol: sure, feel free to break it
<trapped> i was interested in the part that generates those random urls anyway
<sdogruyol> jhass: lxc or docker?
<jhass> sdogruyol: playpen
<jhass> >> 1234.to_s(36)
<DeBot_> jhass: # => "ya" - http://carc.in/#/r/9pn
<jhass> it's just base36
<sdogruyol> jhass: why base36
<trapped> ah thanks
<BlaXpirit> sdogruyol, numbers and letters, u know? :p
<BlaXpirit> what else
<sdogruyol> BlaXpirit: lol
<jhass> yeah, makes them shorter without all these messy things in base64
<sdogruyol> why not hex
<BlaXpirit> because there are much less combinations??
<jhass> because it's more than twice as short?
<BlaXpirit> with no advantage
<sdogruyol> yeah makes sense now :P
<jhass> >> "9pn".to_i(36).to_s(16)
<DeBot_> jhass: # => "312b" - http://carc.in/#/r/9pp
<jhass> see we would already be at four characters
<jhass> while not even having reached 1/3 of the 3 character ones of base36
mgarciaisaia1 has joined #crystal-lang
mgarciaisaia has quit [Ping timeout: 250 seconds]
waj_ has joined #crystal-lang
waj has quit [Ping timeout: 246 seconds]
waj_ is now known as waj
sdogruyol has quit []
kulelu88 has joined #crystal-lang
strcmp1 has joined #crystal-lang
<trapped> can i write to the yielded File from File.open ?
<trapped> File.open/3
daphee has joined #crystal-lang
<daphee> The compiler says "You just found a bug" should I open an issue? http://play.crystal-lang.org/#/r/9pv
<BlaXpirit> daphee, :o sure
<daphee> This code should be working then?
<BlaXpirit> daphee, maybe not but compiler shouldn't crash either
<BlaXpirit> i dont know what these classes do, so i cant tell if you're doin something wrong
<jhass> yeah, no matter whether the code ought to work or not, the compiler shouldn't crash
<jhass> daphee: http://play.crystal-lang.org/#/r/9pw regression in 0.7.5 interestingly
<jhass> worth noting in the issue
<BlaXpirit> :o
<jhass> (and that's why I keep every minor release on carc.in for now :P)
mgarciaisaia has joined #crystal-lang
mgarciaisaia1 has quit [Ping timeout: 252 seconds]
mgarciaisaia has left #crystal-lang [#crystal-lang]
<dbackeus> jhass: did you consider having a HEAD or nightly build available on it as well to see if an issue has been fixed already?
<jhass> it would kinda be quite some work to do so
<thor77> can anyone explain the Array.sort-function?
<thor77> * sort(&block)
<thor77> i have a [] of Tuple(String, Int32) and want to sort it by the Int32
<thor77> is that possible?
<BlaXpirit> thor77, i think u want sort_by { |t| t[1] }
<BlaXpirit> >> [{"a", 4}, {"b", 2}].sort_by { |t| t[1] }
<DeBot_> BlaXpirit: # => [{"b", 2}, {"a", 4}] - http://carc.in/#/r/9q9
<BlaXpirit> yay i'm getting the hang of this
<BlaXpirit> docs are getting on my nerves though
<thor77> http://carc.in/#/r/9qa not rly
<BlaXpirit> thor77, sort_by returns a sorted copy
<BlaXpirit> add ! to sort in place
<thor77> works, thanks :)
<thor77> please add this to the docs D
<crystal-gh> [crystal] asterite pushed 5 new commits to master: http://git.io/vOwG6
<crystal-gh> crystal/master 5098e1c Ary Borenszweig: Try to reclaim some memory in String::Builder once the string is finished
<crystal-gh> crystal/master cb6b66c Ary Borenszweig: Simpler `IO#read(length : Int)`
<crystal-gh> crystal/master b7c2b33 Ary Borenszweig: Added `IO#gets(limit : Int)` and `IO#read_line(limit : Int)`
<daphee> That was fast :o
<jhass> get used to it :P
dbackeus has quit [Remote host closed the connection]
<waj> 32bit is back! :)
<jhass> <3
<waj> The current version (0.7.5) has some bugs with BigInt but already fixed for the next release
<jhass> you probably want to close https://github.com/manastech/crystal/issues/603 then ;)
<asterite> jhass: can you confirm 32 bits specs all pass?
<asterite> jhass: oh, nevermind, waj tried it already, so...
<jhass> I'll verify over here
<asterite> jhass: one thing that we lack, maybe you'll have ideas, is a way to test 32 bits after each commit... travis doesn't support 32 bits
<jhass> yeah, I researched a bit, but the free stuff all sucks beyond bearable
<asterite> :-D
<asterite> Or maybe ;-(
<BlaXpirit> i mean, it's not so difficult to set up a server and use github api to listen for commits
<BlaXpirit> but it needs time and a running server
<jhass> some of the more interesting spam in my inbox yesterday was https://vexor.io/
<jhass> buddy of mine is setting up a CI server currently for various stuff and would give some low prio jobs for it, though as I know him that's probably not going to happen this month
<BlaXpirit> vexor.io $329 a year FYI
<jhass> asterite: mmh, you just uploaded these right? o_O Or did I really overlook them in the last release?
<BlaXpirit> wait
<BlaXpirit> no, forget about what i said
<BlaXpirit> is it $329 per year of CPU time or what
<jhass> yeah
<BlaXpirit> well that's good
blue_deref has quit [Quit: bbn]
<asterite> jhass: we just uploaded them :-)
<jhass> phew, sanity saved :P
<asterite> I told waj: so we need to release 0.7.6 with the 32 bits versions? Reply: we can upload the binary for 0.7.5 ;-)
<jhass> so that's binaries built from the tag or later?
<BlaXpirit> wouldn't make any sense to build if from later changes. so hopefully from tag
<asterite> from the tag. That's why it has the BigInt bugs
<jhass> k, good
fowlduck has joined #crystal-lang
<fowlduck> can you produce statically linked binaries with crystal?
<jhass> crystal build has the --link-flag option which allows you to pass any option to the cc call used to link the binary, rest depends on your system
<fowlduck> ah, cool
<jhass> asterite: waj great, 32bit specs are passing here too on HEAD
<waj> nice!!
<BlaXpirit> anyone knows about the advances for windows support? can crystal compile itself on windows? how do they compile it for windows anyway?
<jhass> ?windows
<DeBot_> jhass: Nothing known about windows.
<jhass> mmh
<jhass> ?windows=Windows support is currently developed at https://github.com/xwanderer/crystal/tree/win32/win32
<DeBot_> jhass: Set windows.
<BlaXpirit> so was the initial bootstrapping successful?
<BlaXpirit> appears so :)
<BlaXpirit> does that mean the compiler works without exceptions?
leafybasil has joined #crystal-lang
<jhass> I guess he just commented out stuff until it did :P
<BlaXpirit> considering how much there is to it, this starts to seem like a good approach
<BlaXpirit> i remembered just how many external (probably many unix-specific) libs crystal uses
<jhass> yeah, and I'm still not convinced of doing the ifdef approach in a OOP language that offers so many alternatives :/
<BlaXpirit> jhass, what do you mean?
<jhass> er, rather but I guess
<jhass> and that'll be only the very tip of the icebaerg in following that approach
<BlaXpirit> jhass, i don't see anything wrong with it
<BlaXpirit> also: i thought / worked on Windows anyway
<BlaXpirit> maybe so many programming languages make it magically work that i don't notice
<jhass> the conditions for when it worked were quite weird iirc
<jhass> that is there were some constraints to it that doesn't make it work in all situations afaik
zamith has joined #crystal-lang
<jhass> anyway, what I see wrong with it is that it riddles all of stdlib with platform specific knowledge, instead of making use of some OO programming and abstracting that away
<BlaXpirit> jhass, there are too many tiny things. you'd need thousands of abstractions made up on the spot
<jhass> at worst case all syscalls and all of glibc
<jhass> so in the absolute worst case about what, 1500?
<jhass> more realistically about 100-200
<jhass> of which many are used multiple times
<jhass> so you don't only riddle stdlib with doing them inline, you also will repeat them
<BlaXpirit> that can be true
<BlaXpirit> ifdefs are not so bad. we need to get something working
<BlaXpirit> refactoring can follow if needed
<BlaXpirit> it's not like much time is wasted by doing ifdef first then refactoring.
<jhass> well IMO some still is
<jhass> it's not like it's overly complicated to do now, I'm not even asking to extract all the calls that happen to work on both right away, just where you'd put an ifdef take the minute more and extract
<jhass> but anyway, I won't contribute towards windows support so I shall not argue
<BlaXpirit> :<
<BlaXpirit> i wish xwanderer still worked on this
<jhass> he does, just slowly
<BlaXpirit> i dont see commits
<jhass> well, merging two weeks of work on Crystal, breaking something already working and git not being able to properly rebase to it (due to actually logical reasons, but oh well), might have discouraged a bit
<jhass> er, *biset
<jhass> no idea why i wrote rebase
<jhass> it probably would need half an hour daily of merging upstream and verifying nothing broken by that, yeah
<jhass> waj: got the following warnings building crystal with the 32bit binaries:
<jhass> /home/jhass/aur/crystal/src/crystal-0.7.5-1/bin/../embedded/lib/libunwind.a(Los-linux.o): In function `_ULx86_local_resume':
<jhass> Los-linux.c:(.text+0x73b): warning: sigreturn is not implemented and will always fail
<waj> yup, I also got that message but I’m still not sure what it means
<jhass> known since 2013 and still unfixed, probably harmless then http://lists.nongnu.org/archive/html/libunwind-devel/2013-03/msg00010.html
waj has quit [Quit: waj]
adam| is now known as adam12
BlaXpirit has quit [Quit: Konversation]
shama has quit [Quit: (╯°□°)╯︵ɐɯɐɥs]