jhass changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.8.0 | Fund Crystals development: http://is.gd/X7PRtI | 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
chdorner has joined #crystal-lang
guilleiguaran__ has joined #crystal-lang
Excureo has quit [Ping timeout: 246 seconds]
Excureo has joined #crystal-lang
NeverDie has joined #crystal-lang
blue_deref has joined #crystal-lang
qard has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
blue_deref has quit [Quit: Taking myself out of hear.]
sfcgeorge has quit [Quit: Textual IRC Client: www.textualapp.com]
apt-get has joined #crystal-lang
apt-get has quit [Read error: Connection reset by peer]
havenwood has joined #crystal-lang
NeverDie has quit [Quit: http://radiux.io/]
shama has quit [Quit: (╯°□°)╯︵ɐɯɐɥs]
NeverDie has joined #crystal-lang
Philpax has quit [Ping timeout: 240 seconds]
Philpax has joined #crystal-lang
havenwood has quit [Read error: Connection reset by peer]
Philpax has quit [Read error: Connection reset by peer]
<bmcginty> It doesn't look like crystal is out-of-the-box compilable for windows, correct?
Philpax has joined #crystal-lang
Philpax has quit [Read error: Connection reset by peer]
Philpax has joined #crystal-lang
Philpax has quit [Read error: Connection reset by peer]
Philpax has joined #crystal-lang
Philpax has quit [Read error: Connection reset by peer]
Philpax has joined #crystal-lang
NeverDie has quit [Quit: http://radiux.io/]
rmosolgo has joined #crystal-lang
<bjmllr> ?windows
<DeBot> Windows support is currently developed at https://github.com/xwanderer/crystal/tree/win32/win32
jeromegn has quit [Read error: Connection reset by peer]
rmosolgo has quit [Remote host closed the connection]
NeverDie has joined #crystal-lang
jeromegn has joined #crystal-lang
jeromegn has quit [Ping timeout: 240 seconds]
jeromegn has joined #crystal-lang
rmosolgo has joined #crystal-lang
rmosolgo has quit [Remote host closed the connection]
havenwood has joined #crystal-lang
<crystal-gh> [crystal] luislavena opened pull request #1593: Relocate Char::Reader comments for documentation (master...doc-fix-char-reader) http://git.io/vn5Sx
rmosolgo has joined #crystal-lang
havenwood has quit [Remote host closed the connection]
havenwood has joined #crystal-lang
rmosolgo has quit [Remote host closed the connection]
rmosolgo has joined #crystal-lang
qard has joined #crystal-lang
<bmcginty> bjmllr: thanks!
sdogruyol has joined #crystal-lang
sdogruyol has quit [Remote host closed the connection]
NeverDie has quit [Quit: http://radiux.io/]
rmosolgo has quit [Remote host closed the connection]
vjdhama has joined #crystal-lang
Ven has joined #crystal-lang
vjdhama has quit [Remote host closed the connection]
qard has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
havenwood has quit [Quit: Textual IRC Client: www.textualapp.com]
vjdhama has joined #crystal-lang
<crystal-gh> [crystal] jhass pushed 2 new commits to master: http://git.io/vndCr
<crystal-gh> crystal/master e8e1d50 Jonne Haß: Merge pull request #1593 from luislavena/doc-fix-char-reader...
<crystal-gh> crystal/master fd242d3 Luis Lavena: Relocate Char::Reader comments for documentation...
<travis-ci> manastech/crystal#e8e1d50 (master - Merge pull request #1593 from luislavena/doc-fix-char-reader): The build passed. https://travis-ci.org/manastech/crystal/builds/82101769
<DeBot> https://github.com/manastech/crystal/pull/1593 (Relocate Char::Reader comments for documentation)
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
vjdhama has quit [Ping timeout: 244 seconds]
Ven has joined #crystal-lang
vjdhama_ has joined #crystal-lang
vjdhama_ has quit [Ping timeout: 272 seconds]
leafybasil has quit [Remote host closed the connection]
leafybasil has joined #crystal-lang
leafybasil has quit [Ping timeout: 268 seconds]
<crystal-gh> [crystal] jhass closed pull request #1584: Add documentation to Time class (master...master) http://git.io/vn9jZ
vjdhama_ has joined #crystal-lang
<travis-ci> manastech/crystal#09f9866 (master - Merge pull request #1584 from adlerhsieh/master): The build passed. https://travis-ci.org/manastech/crystal/builds/82105996
<DeBot> https://github.com/manastech/crystal/pull/1584 (Add documentation to Time class)
BlaXpirit has joined #crystal-lang
sdogruyol has joined #crystal-lang
<sdogruyol> @jhass what version of llvm require for building crystal
<sdogruyol> jhass: o/
<jhass> sdogruyol: 3.5.1
<jhass> 3.6 should be fine too
<sdogruyol> jhass: had 3.6.2 but no succeed
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<sdogruyol> meanwhile trying to install arch on virtualbox
<jhass> I'm on 3.6.2
<jhass> hehe, having fun with the beginner guide? :P
<sdogruyol> lol
<sdogruyol> not yet
<sdogruyol> just dled the image
vjdhama_ has quit [Remote host closed the connection]
<sdogruyol> i just booted and i'm in tty lol :D
trapped has joined #crystal-lang
<sdogruyol> jhass: its good that it comes with zsh by default
Ven has joined #crystal-lang
<jhass> could've mentioned antergos which comes with a gui installer... but where's the fun in that? ;P
<sdogruyol> heheh
<BlaXpirit> arch linux is so much fun. for me it was more and more difficult to install every time. the normal guide has turned into a potato, and beginner's guide is really not for beginners
<sdogruyol> jhass: i dont know why but arch doesnt have key mapping for Turkish layout
<sdogruyol> :(
<jhass> sdogruyol: loadkeys tu or so?
<jhass> tk?
<sdogruyol> jhass: tr
<jhass> right
<sdogruyol> jhass: /usr/share/kbd/mac doesnt have that
<BlaXpirit> was tk Tokelau or something
<sdogruyol> lol
<jhass> BlaXpirit: country code though, keymaps go by language code I think
<BlaXpirit> you're right, my language is "uk" :p
<sdogruyol> :D
<sdogruyol> sometimes i really hate os x
<sdogruyol> ..
<jhass> sdogruyol: maybe loadkeys trf is good enough
<jhass> for the tty atleast, the X server one is a different system anyhow
<jhass> or trq?
<jhass> dunno what the mac one is closer to
<sdogruyol> :D
<sdogruyol> it's trq
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Ven has joined #crystal-lang
<jhass> I guess then you can hack the mac_us one if worst comes to worst :P
<sdogruyol> hahah
<sdogruyol> for now i'M back to fixing up os x
<sdogruyol> :S
<jhass> what? you're saying you're not eager for an adventure into the mysterious worlds of keycodes and scancodes?
<sdogruyol> jhass: i'm eager but not for now :P
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Ven has joined #crystal-lang
vjdhama has joined #crystal-lang
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
vjdhama has quit [Ping timeout: 244 seconds]
<jokke> i'd need to add some specs for macro methods
<jokke> but i have no clue how i should do that
<sdogruyol> jokke: i'm pretty sure that i've seen some specs in src/compiler for that
<jokke> yeah but not that kind
<jokke> i need to check if the compiler raises when expanding a macro method
<jokke> i'd basically have to define a macro and see what the compiler does with it
vjdhama has joined #crystal-lang
<vjdhama> I'm facing error compiling latest crystal : https://gist.github.com/vjdhama/a53e22f5a616e0a1330e
<vjdhama> some wrong with llvm?
<sdogruyol> vjdhama: yeah
<sdogruyol> vjdhama: are you on os x
<vjdhama> yes
<sdogruyol> vjdhama: yeah i've been trying to solve the same issue
<sdogruyol> vjdhama: :P
<sdogruyol> vjdhama: os x sucks in this way
<vjdhama> I think this issue is related to llvm version.
<sdogruyol> vjdhama: no
<sdogruyol> vjdhama: it's related to os x actually
<vjdhama> sdogruyol: it was compiling earlier
<sdogruyol> vjdhama: really how?
<sdogruyol> vjdhama: what's your llvm version?
<vjdhama> I think downgraded my llvm to travis ci version
<vjdhama> 3.5.1
<sdogruyol> vjdhama: well jhass says that it also works on 3.6.2
<vjdhama> later I upgraded it back to 3.6.2
<vjdhama> sdogruyol: what version of llvm you have?
<jhass> "earlier"?
<sdogruyol> vjdhama: 3.6.2
<vjdhama> jhass: like 1 day ago maybe.
<jhass> the Travis linux workers are running on the llvm 3.6 version coming with Ubuntu 14.04 btw
<jhass> mh
<vjdhama> on_osx /bin/bash -c "'curl \"http://crystal-lang.s3.amazonaws.com/llvm/llvm-3.5.0-1-darwin-x86_64.tar.gz\" | tar xz -C /tmp'"
<vjdhama> jhass: it says 3.5.0
<jokke> asterite: maybe you can help me: how can i spec for macro expansion errors? as in having a codesnippet with a macro, trying to expand it and testing for a compiler error.
<jhass> vjdhama: yes, for the os x build
<jhass> but mainly because I have no machine where I can explore how to get something else
<jokke> asterite is in a very different time zone, right? :)
<sdogruyol> jokke: yeah
<vjdhama> jhass: i am on osx machine.
<jokke> south america somewhere was it?
<sdogruyol> jokke: they are sleeping right now probably 5 am
<sdogruyol> jokke: argentina
<vjdhama> jokke: argentina
<jokke> ah, yeah that was it
<jhass> jokke: buenos aires specifically iirc
<sdogruyol> jhass: what do you think of kali?
vjdhama has quit [Remote host closed the connection]
<jhass> what's there to think of it?
<sdogruyol> jhass: lol
<sdogruyol> jhass: as a distro
<jhass> no I mean it does what it does just fine
<jhass> and I don't know anything else that does the same
<jhass> not sure I call it a distro though
<jhass> it's not a distro you would use as a daily use OS
<sdogruyol> :D
<jhass> I mean you log into root, that's fine for what it is, but insane otherwise
<sdogruyol> jhass: insane by what means
<jhass> starting a desktop environment as root simply is if you want a system that you don't have to reinstall every week
<jhass> they're not made for that
<sdogruyol> jhass: heheh are you watching mr. robot?
<jhass> watched, it's through
<jhass> er, finished?
leafybasil has joined #crystal-lang
<jhass> sdogruyol: what's $(shell command -v llvm-config-3.6 llvm-config-3.5 llvm-config | head -n 1) ?
<jhass> er, sans the $(shell )
Ven has joined #crystal-lang
<sdogruyol> jhass: first season finished
<jhass> well, I think the story is told, second season will be a new story
<sdogruyol> jhass: $(shell command -v llvm-config-3.6 llvm-config-3.5 llvm-config | head -n 1)
<sdogruyol> empty string
<jhass> yeah, I mean sans the $(shell ), sorry
<sdogruyol> sh command -v llvm-config-3.6 llvm-config-3.5 llvm-config | head -n 1
<sdogruyol> this returns nothing
<jhass> sans sh
leafybasil has quit [Remote host closed the connection]
<sdogruyol> sans?
<jhass> just command -v llvm-config-3.6 llvm-config-3.5 llvm-config really
<jhass> without
leafybasil has joined #crystal-lang
<jhass> you know, as in "sans serif font" ;)
<sdogruyol> ah
<sdogruyol> /usr/local/opt/llvm/bin/llvm-config
<sdogruyol> meanwhile i'm going out for an hour be right back :P
<jhass> /usr/local/opt/llvm/bin/llvm-config --version ?
<sdogruyol> 3.6.2
<jhass> --cxxflags ?
<sdogruyol> -I/usr/local/Cellar/llvm/3.6.2/include -fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wcovered-switch-default -Wnon-virtual-dtor -std=c++11 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
<sdogruyol> jhass: i'm out gonna be back in 1 hour thanks
sdogruyol has quit [Remote host closed the connection]
<jokke> hm i'm pretty lost here..
<jokke> ah wat?
<jokke> haha
<jokke> ok there's a nasty bug
<jokke> this ^ is what it raises
<jokke> the first paste was the output of the exact same command
<jokke> :/
trapped has quit [Read error: Connection reset by peer]
trapped has joined #crystal-lang
<jokke> ah ok
<jokke> with crystal from .build/crystal it works
<jhass> jokke: when working on the compiler always use bin/crystal or make (clean/crystal/spec)
<jokke> yeah
<jokke> makes sense :)
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
trapped has quit [Read error: Connection reset by peer]
trapped has joined #crystal-lang
sfcgeorge has joined #crystal-lang
<jokke> jhass: how would i specify an Enumerable of certain type as a return type?
<jokke> Enumerable(String) doesn't work
<jhass> it should IMO
<jokke> Enumerable(T) is not a generic class, it's a generic module
<jhass> but I guess that's related to the issue I linked last time
<jokke> oh hmm
vjdhama has joined #crystal-lang
<jokke> yay i figured out how to write specs for macros
apt-get has joined #crystal-lang
<vjdhama> shogruyol : do you have `/usr/local/opt/llvm/bin` in you $PATH
<dzv> asterite, jhass, waj: this needs testing/suggestions. it's very rough but appears to work. https://github.com/technorama/crystal/tree/f/thread_safe_fibers
<vjdhama> jokke: can you give me a example
<jokke> this is very simple though
<jokke> just error or no error
<jhass> vjdhama: what's command -v llvm-config-3.6 llvm-config-3.5 llvm-config on your system?
<vjdhama> jhass: /usr/local/opt/llvm/bin/llvm-config
<jhass> /usr/local/opt/llvm/bin/llvm-config --version ?
<vjdhama> 3.6.2
<jhass> /usr/local/opt/llvm/bin/llvm-config --cxxflags ?
<vjdhama> jhass: The compilation issue is fixed
<vjdhama> I think I messed up up my $PATH
<jhass> ah
<vjdhama> jhass: anyways this is the output : -I/usr/local/Cellar/llvm/3.6.2/include -fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wcovered-switch-default -Wnon-virtual-dtor -std=c++11 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
<jhass> mmh sdogruyol had the same though
<vjdhama> jhass: I think only issue might have been $PATH
apt-get has quit [Read error: No route to host]
apt-get has joined #crystal-lang
apt-get has quit [Remote host closed the connection]
sdogruyol has joined #crystal-lang
<sdogruyol> back
<sdogruyol> jhass: o/
<jhass> vjdhama says he fixed it
<sdogruyol> whoops
<sdogruyol> how
<sdogruyol> let me check the logs
<vjdhama> sdogruyol: do you have `/usr/local/opt/llvm/bin` in you $PATH
<sdogruyol> yeah
<sdogruyol> in my .zshrc though
<vjdhama> Try to echo you $PATH and see if you still that address.
<sdogruyol> vjdhama: anyhting else that i need to chekc?
<sdogruyol> yeah it exists
<vjdhama> sdogruyol: that's weird. :/
<sdogruyol> vjdhama: do you use zsh?
<vjdhama> sdogruyol: yes
<sdogruyol> vjdhama: it has that
<sdogruyol> ld: library not found for -lgmp
<sdogruyol> lol missing the devel libraries now :D
<sdogruyol> wth is going on make spec >> Could not raisemake: *** [.build/all_spec] Error 5
<vjdhama> sdogruyol: how did you install crystal-lang?
<vjdhama> brew?
<sdogruyol> vjdhama: brew
<jhass> try again? the OS X sometimes has that too
<sdogruyol> clang: error: linker command failed with exit code 1
<vjdhama> sdogruyol: was this the command `brew install crystal-lang --with-llvm`?
<sdogruyol> vjdhama: yeah then i installed llvm myself
<vjdhama> sdogruyol: Try to reinstall crystal-lang maybe.
<sdogruyol> vjdhama: already reinstalled --with--lvm
<sdogruyol> llvm*
<vjdhama> sdogruyol: i am out of ideas.
<jhass> it's hanging on -lgmp now?
<jhass> just brew install gmp
<jhass> ?libraries
<DeBot> You can find a list of all libraries required to compile the compiler and run the test suite at https://github.com/manastech/crystal/wiki/All-required-libraries
<sdogruyol> ok
<vjdhama> yeah
<sdogruyol> let's rock :P
vjdhama has quit [Remote host closed the connection]
<sdogruyol> OMG
<sdogruyol> it's passing :D
<sdogruyol> jhass: <3
Ven has joined #crystal-lang
<sdogruyol> finished in 2:16 :P
<dzv> the installation process should be a lot easier
<jhass> if you don't want to contribute to the compiler it's brew install crystal-lang and similar for other processes, what would you change?
<jhass> er, for other OSes
<dzv> installing all libraries should be handled with a single command even for the compiler
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Ven has joined #crystal-lang
<jhass> I don't follow, you want to perform OS detection and curate lists with hundreds of mappings from linker flags to package names?
<sdogruyol> dzv: are you talking about an installation script?
<dzv> os detection yes and package installation yes with package version detection and installing dependent libraries from source if necessary. all are easily handled by chef, puppet or a variety of other tools
sdogruyol has quit [Remote host closed the connection]
vjdhama has joined #crystal-lang
<jhass> "easily"
<jhass> I know a lot of people who would disagree
<jhass> those are insanely complex codebases with DSLs that are as complex to learn as a new language
<jhass> RVM grew to 20kloc of shellscript to be able to handle that
<jhass> sorry, but just now
<jhass> *no
<dzv> as opposed to every user doing it by hand? how is that easier?
<jhass> what we can do is parse the linker errors and print a nicer error message
<jhass> but I don't know, dev's should be used to those, you even get them from a bundle install if you're missing a lib
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<dzv> being told "you're llvm install is too old, figure it out" is a shitty solution. curl && ./configure --prefix=./.libs && make && make install as a fallback mechanism is pretty easy to script and doesn't take 20k LOC
<jhass> dzv: I'd suggest you try to maintain such a beast in a separate repo, crystal-installer or something. Maybe we can do something like pluggable subcommand support ala git. If you manage to support the major OSes (OS X, Debian, Ubuntu, Fedora, RHEL, CentOS) and keep up with the growth of the community we talk again
<dzv> there's already an omnibus script that installs from source
<dzv> it's used to build the releases
<jhass> yes and it took me about 12 hours yesterday to automate building with it
<dzv> great. jhass_12_hours + some_more < 30m-4h * every_user_that_ever_compiles_crystal
<dzv> i've easily spent > 6 hours getting crystal working on various os/s, often falling back to source because the os versions of different libs are too old
<jhass> I already spent at least 100 hours merely troubleshooting RVM issues
<dzv> that's weird. it's been pain free for me except for the occasional permission issue
<dzv> a) rvm requires environment switching and is way more complicated. b) compiling from source is a single set of steps for every package we depend on which doesn't change between platforms. it's just configure && make && make install
<dzv> why would you compare this to a shell script? shell scripts are hard to make portable. it doesn't have to be a shell script
<jhass> my offer stands, maintain such a system for a year supporting the major OSes in their widely deployed versions (should give you about 12-18 targets) and then we can evaluate spending core dev time on maintaining it, until then I'd like to see other things
<jhass> well, actually more like 24+ targets taking 32bit builds into account
<jhass> jokke: that would require special casing it for the compiler and then people come along and complain that their own version doesn't work etc
<jhass> meh
<jokke> hmm
ssvb has quit [Ping timeout: 268 seconds]
BlaXpirit has quit [Read error: Connection reset by peer]
vjdhama has quit [Ping timeout: 265 seconds]
rhaps0dy_ has left #crystal-lang ["Leaving"]
dyulax has joined #crystal-lang
ozra has joined #crystal-lang
<ozra> Anyone made bindings for nanomsg?
<jokke> jhass: is it possible to exclude types from a union?
<jhass> how do you mean?
vjdhama has joined #crystal-lang
<jokke> foo as (SuperClass # without SubClassFoo)
<jhass> uh does that union still?
<jhass> >> class A; end; class B < A; end; class C < A; end; b = B.new; a = b as A; typeof(a)
<DeBot> jhass: # => A - http://carc.in/#/r/gyl
<jhass> so?
<jokke> jhass: type restriction String? to which method?
<jhass> the one I linked, on @session
<jhass> @session = nil : String?
<jokke> ah
<jokke> i see
<jokke> aaah
<jokke> yes, now it makes sense
<jokke> thanks!
<jhass> when we have required keyword args we probably could add some safety by changing all calls to .new(_pull: parser) but for now...
trapped has quit [Read error: Connection reset by peer]
Philpax has quit [Ping timeout: 250 seconds]
Ven has joined #crystal-lang
<dyulax> may be "crystal build" should output a message like "For an optimized binary, run crystal build with the --release flag"
<dyulax> it's not the first time I see you asking "did you use --release?"
<jhass> I've been thinking about that, for the benchmark library though
<jhass> basically {{puts }} it on require
Ven has quit [Ping timeout: 264 seconds]
vjdhama has quit [Read error: Connection reset by peer]
BlaXpirit has joined #crystal-lang
BlaXpirit has quit [Client Quit]
BlaXpirit has joined #crystal-lang
greengriminal has joined #crystal-lang
Ven has joined #crystal-lang
BlaXpirit has quit [Quit: Konversation]
NeverDie has joined #crystal-lang
BlaXpirit has joined #crystal-lang
NeverDie has quit [Quit: http://radiux.io/]
<buggs> btw. why is --release not the default?
<jhass> because it's slow
<buggs> it's faster than without here
<jhass> the resulting binary, I'm talking about the compilation process
<buggs> me too
<jhass> well, try it on all_spec ;)
greengriminal has quit [Ping timeout: 260 seconds]
gamemanj has joined #crystal-lang
<buggs> the problem is that after a build without it is slow
<jhass> it's good enough for many (and I'd claim the majority) of usecases
greengriminal has joined #crystal-lang
greengriminal is now known as msg
msg is now known as Guest1825
Guest1825 has quit [Client Quit]
<buggs> ?
<jhass> the binary execution speed
<crystal-gh> [crystal] alanwillms opened pull request #1596: Suggest using the release flag when building (master...suggest-release-flag) http://git.io/vnbIc
Philpax has joined #crystal-lang
ssvb has joined #crystal-lang
sdogruyol has joined #crystal-lang
<sfcgeorge> One thing I like about CoffeeScript is the shortcut for assigning instance variables in the constructor signature. Can Crystal do this? def initialize(@name); end
<sdogruyol> sfcgeorge: yes
<sfcgeorge> Hooray! That's a nice little improvement over Ruby :)
<sdogruyol> sfcgeorge: that's the exact syntax
qard has joined #crystal-lang
<sdogruyol> :D
BlaXpirit has quit [Quit: Konversation]
sdogruyol has quit []
<willl> jhass: i had a similar idea with bm, but not on require, on use. If there is a way to see the release flag from user source
Philpax_ has joined #crystal-lang
Philpax has quit [Ping timeout: 265 seconds]
<jokke> from what i've gathered from the websocket source the opcode send is always text
<jokke> and close is an empty method
<jokke> i don't quite get why
<jokke> shouldn't it be possible to send binary packets or control packets as well?
<jhass> willl: I'd like some more injected constants anyhow, not quite as extensive but the basics of RbConfig
<jokke> especially the empty close method is confusion
<jhass> so we could have things like CRYSTAL_CONFIG[:version] or so and CRYSTAL_CONFIG[:release
<jokke> *confusing
<willl> jhass: yeah, that'd be good. probably most build arguments
<jhass> might even just do {{CRYSTAL_CONFIG}} I guess
<jhass> so only the actually referenced stuff ends up as constants in the binary
<jhass> {{@compiler.config}}? {{{Crysta::CONFIG}}? idk
vjdhama has joined #crystal-lang
rmosolgo has joined #crystal-lang
NeverDie has joined #crystal-lang
feifan has joined #crystal-lang
Raimondi has quit [Quit: The road to wisdom?—Well, it's plain and simple to express: Err and err and err again, but less and less and less. — Piet Hein]
vjdhama has quit [Ping timeout: 244 seconds]
Philpax_ has quit [Ping timeout: 260 seconds]
vjdhama has joined #crystal-lang
fiveteesixone has joined #crystal-lang
<willl> something only available in macros might be also easier to implement too
<asterite> ifdef release
<asterite> (it works already)
<willl> hah :)
chino_ has joined #crystal-lang
vjdhama has quit [Read error: Connection reset by peer]
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
trapped has joined #crystal-lang
greengriminal has joined #crystal-lang
Dreamer3 has joined #crystal-lang
tomchapin has joined #crystal-lang
<dzv> asterite, waj: do you know of a portable way to get the thread stack address? have you explored using GC_push_all_stack or setting altstack?
Raimondi has joined #crystal-lang
shama has joined #crystal-lang
<waj> dzv: I didn't test your branch yet, but GC_register_altstack could indeed work!
<waj> although I wonder if it's better to register just the stack used so far, instead of just sending STACK_SIZE
<jokke> how would i add a UInt16 to a Slice(UInt8) ?
dyulax is now known as alanwillms
alanwillms has quit [Quit: Saindo]
dyulax has joined #crystal-lang
alanwillms has joined #crystal-lang
dyulax has quit [Client Quit]
<jokke> >> foo = 0xabcd_u16; slice = Slice(UInt8).new(2); slice << (foo >> 8).to_u8; slice << (foo & 0x00ff_u16).to_u8; puts slice.map { |i| i.to_s(16) }
<DeBot> jokke: undefined method '<<' for Slice(UInt8) - http://carc.in/#/r/gzi
<jokke> >> foo = 0xabcd_u16; slice = Slice(UInt8).new(2); slice[0] = (foo >> 8).to_u8; slice[1] = (foo & 0x00ff_u16).to_u8; puts slice.map { |i| i.to_s(16) }
<DeBot> jokke: ["ab", "cd"] - more at http://carc.in/#/r/gzj
<jokke> ok
<jokke> any easier way?
<jhass> >> Slice(UInt8) { 6_u8, 4_u8 }
<DeBot> jhass: - Slice(UInt8)#initialize(pointer : Pointer(T), size : Int32) - http://carc.in/#/r/gzk
<jhass> nope
<jokke> ok
<dzv> waj: how does that work exactly. stack used so far is only registered on fiber switch. what about the current fiber? how is that tracked when the stack grows?
fiveteesixone has quit [Remote host closed the connection]
fiveteesixone has joined #crystal-lang
<waj> mm... maybe calling GC_register_altstack while executing the callback to GC_set_push_other_roots ?
<waj> but, maybe it's too late. Another callback? I don't know
<dzv> also, how is the stack cleared? if old objects are left at the end of the stack will they ever be gc'd?
<waj> that's why it's important to get the current stack size
<dzv> but how do you know the current stack size? stack size is only updated when the fiber is switched, not while it's running
<dzv> and what zeroes the end of stack? does anything do that currently?
<Papierkorb> is it currently somehow possible to (re-)load a .cr file at runtime?
<jhass> no
<waj> it's easy to get the current stack pointer and if you know in which fiber you're, you also know the stack base
<dzv> that's not what i'm asking
<dzv> stack_top is set when the fiber is switched. while the fiber runs the stack may grow. how does the gc know about the growth because it's not within the range of top and bottom?
qard has quit [Quit: Textual IRC Client: www.textualapp.com]
<jokke> what does @header :: UInt8[2] mean?
<jokke> is that a pointer of UInt8 allocated with sizeof UInt8 * 2?
<jhass> UInt8[2] in the type grammar is a shortcut for StaticArray(UInt8, 2)
<jokke> ah ok
leafybas_ has joined #crystal-lang
leafybasil has quit [Ping timeout: 264 seconds]
leafybas_ has quit [Ping timeout: 268 seconds]
BlaXpirit has joined #crystal-lang
havenwood has joined #crystal-lang
fiveteesixone has quit [Remote host closed the connection]
fiveteesixone has joined #crystal-lang
<vjdhama> \join #crystal-lang
<jhass> worked already \o/
vjdhama has joined #crystal-lang
<vjdhama> deja vu
<vjdhama> may be?
<jhass> idk
<gamemanj> vjdhama seems to have talked before joining... how on earth?
vjdhama has quit [Read error: Connection reset by peer]
<jhass> gamemanj: so it's not just my client?
<gamemanj> Yeah, vjdhama said something, then joined.
<gamemanj> Weird.
<gamemanj> Oh, and vjdhama left at 17:02:46 according to this...
<gamemanj> (right now is 19:01:13)
NeverDie has quit [Quit: http://radiux.io/]
fiveteesixone has quit [Remote host closed the connection]
<buggs> gives a total new meaning to backslash
<buggs> anyhow i wanted to know if you feel comportable a Memory type
<buggs> String to Memory would be like str to mem
<buggs> it could also host Memory.mmap
fiveteesixone has joined #crystal-lang
fiveteesixone has quit [Read error: Connection reset by peer]
fiveteesixone has joined #crystal-lang
fiveteesixone has quit [Client Quit]
thor77 has joined #crystal-lang
<thor77> is some way to get all functions of a class?
<thor77> *is there
<thor77> i'm still unsure, how a good plugin-system for my irc-libary should look like
<jhass> >> class Class; macro def methods : Array(String); {{@type.methods.map &.name.stringify}}; end; end; String.methods
<DeBot> jhass: # => ["bytesize", "to_i", "to_i", "to_i?", "to_i8", "to_i8", "to_i8?", "to_u8", "to_u8", "to_u8?", "to_i16", "to_i16", "to_i16?", "to_u16", "to_u16", "to_u16?", "to_i32", "to_i32", "to_i32?", "to_u32", "to_u32", "to_u32?", "to_i64", "to_i64", "to_i64?", "to_u64", "to_u64", "to_u64?", "to_u64_info", "to_f", "to_f32", "to_f64", "[]", "[]", "[]", "[]" ... - http://carc.in/#/r/h0j
endou has joined #crystal-lang
endou_ has quit [Write error: Connection reset by peer]
<thor77> jhass: thanks :)
leafybasil has joined #crystal-lang
<crystal-gh> [crystal] vjdhama opened pull request #1600: Modified crystal init to check for pre-existing files and folders. (master...issue-1472-1555) http://git.io/vnNQ1
vjdhama_ has joined #crystal-lang
NeverDie has joined #crystal-lang
nakilon has joined #crystal-lang
vjdhama_ has quit [Ping timeout: 264 seconds]
ozra has quit [Ping timeout: 246 seconds]
chino_ has quit [Quit: Page closed]
vjdhama has joined #crystal-lang
<BlaXpirit> one day i'll understand what macro def means
<vjdhama> jhass: how would i go about spec file / folder creation.
rmosolgo has quit [Remote host closed the connection]
<jhass> just create them in a temporary location and cleanup afterwards https://github.com/manastech/crystal/blob/master/spec/compiler/crystal/tools/init_spec.cr
rmosolgo has joined #crystal-lang
rmosolgo has quit [Remote host closed the connection]
vjdhama has quit [Remote host closed the connection]
vjdhama has joined #crystal-lang
<vjdhama> jhass: another noob question > i am trying to run `init_spec` using `crystal init_spec.cr`. It gives me erroe bunch of errors. Am i doing something wrong.
<vjdhama> *error
<jhass> vjdhama: use bin/crystal when you work on the compiler
<vjdhama> Aha
rmosolgo has joined #crystal-lang
apt-get has joined #crystal-lang
vjdhama has quit [Ping timeout: 256 seconds]
gamemanj has quit [Ping timeout: 265 seconds]
trapped has quit [Read error: Connection reset by peer]
vjdhama has joined #crystal-lang
feifan has quit [Ping timeout: 246 seconds]
feifan has joined #crystal-lang
apt-get has quit [Read error: No route to host]
apt-get has joined #crystal-lang
vjdhama has quit [Read error: Connection reset by peer]
ozra has joined #crystal-lang
alanwillms has quit [Quit: Saindo]
vjdhama has joined #crystal-lang
greengriminal has quit [Quit: Leaving]
vjdhama has quit [Read error: Connection reset by peer]
<crystal-gh> [crystal] asterite pushed 2 new commits to master: http://git.io/vnA5R
<crystal-gh> crystal/master 662eb59 Ary Borenszweig: IO renames and refactors: read -> gets_to_end. Removed `read(count)`. Added `skip(count)`.
<crystal-gh> crystal/master 4889495 Ary Borenszweig: Added `IO#write_bytes` and big/little endian support
<jokke> what's the recommended way to reallocate a slice?
<jokke> or: is there any reason why we shouldn't add a `extend_to(size)` and/or a `extend_by(size)` method?
<jokke> and while were at it a truncate_to(size)
<jokke> i think this would be very useful for dynamically growing buffers
<jokke> what do you guys think?
apt-get has quit [Read error: Connection reset by peer]
apt-get has joined #crystal-lang
<travis-ci> manastech/crystal#4889495 (master - Added `IO#write_bytes` and big/little endian support): The build was broken. https://travis-ci.org/manastech/crystal/builds/82238103
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
apt-get has quit [Ping timeout: 256 seconds]
apt-get has joined #crystal-lang
<BlaXpirit> jokke, uhhh why not use an array
<jokke> i thought slices are more light weight
<BlaXpirit> a bit
<BlaXpirit> but why
<jokke> why what?
<crystal-gh> [crystal] waj pushed 1 new commit to master: http://git.io/vnxLE
<crystal-gh> crystal/master e443c1e Juan Wajnerman: Faster writting for primitive values in IO::ByteFormat
BlaXpirit has quit [Quit: Konversation]
<travis-ci> manastech/crystal#e443c1e (master - Faster writting for primitive values in IO::ByteFormat): The build is still failing. https://travis-ci.org/manastech/crystal/builds/82246255
<crystal-gh> [crystal] waj pushed 1 new commit to master: http://git.io/vnxYU
<crystal-gh> crystal/master 5e9d813 Juan Wajnerman: Fixed samples/2048.cr
apt-get has quit [Remote host closed the connection]
<crystal-gh> [crystal] jreinert opened pull request #1601: Add reallocation and concatenation methods for slice (master...reallocate-slice) http://git.io/vnxsv
<travis-ci> manastech/crystal#5e9d813 (master - Fixed samples/2048.cr): The build was fixed. https://travis-ci.org/manastech/crystal/builds/82247611
sfcgeorg_ has joined #crystal-lang
sfcgeorge has quit [Ping timeout: 240 seconds]
<crystal-gh> [crystal] jreinert opened pull request #1602: add NetworkEndian alias to IO::ByteFormat (master...network-endian) http://git.io/vnxZM
shama has quit [Quit: (╯°□°)╯︵ɐɯɐɥs]
havenwood has quit [Ping timeout: 246 seconds]
rmosolgo has quit [Remote host closed the connection]
rmosolgo has joined #crystal-lang
rmosolgo has quit [Remote host closed the connection]
grindhold has quit [Remote host closed the connection]
rmosolgo has joined #crystal-lang
rmosolgo has quit [Remote host closed the connection]