jhass changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.9.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
datanoise has joined #crystal-lang
glenab has joined #crystal-lang
glenab has quit [Remote host closed the connection]
A124 has quit [Read error: Connection reset by peer]
A124 has joined #crystal-lang
glenab has joined #crystal-lang
glenab has quit [Ping timeout: 265 seconds]
kulelu88 has quit [Quit: Leaving]
circ-user-bcqQx has joined #crystal-lang
benoist has quit [Ping timeout: 260 seconds]
blue_deref has quit [Ping timeout: 256 seconds]
pawnbox has joined #crystal-lang
pawnbox has quit [Ping timeout: 244 seconds]
pawnbox has joined #crystal-lang
blue_deref has joined #crystal-lang
benoist has joined #crystal-lang
Cidan has quit [Ping timeout: 260 seconds]
datanoise has quit [Ping timeout: 252 seconds]
Cidan has joined #crystal-lang
glenab has joined #crystal-lang
circ-user-bcqQx has quit [Remote host closed the connection]
glenab has quit [Ping timeout: 265 seconds]
datanoise has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
datanois1 has joined #crystal-lang
datanoise has quit [Read error: Connection reset by peer]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
blue_deref has quit [Quit: Taking myself out of hear.]
datanois1 is now known as datanoise
bcardiff has joined #crystal-lang
BlaXpirit has joined #crystal-lang
BlaXpirit has quit [Client Quit]
reed_ has joined #crystal-lang
yxhuvud has quit [Ping timeout: 240 seconds]
glenab has joined #crystal-lang
glenab has quit [Ping timeout: 244 seconds]
datanoise has quit [Quit: WeeChat 1.3]
Philpax_ is now known as Philpax
benoist has quit [Remote host closed the connection]
benoist has joined #crystal-lang
bcardiff has quit [Quit: bcardiff]
benoist has quit [Ping timeout: 240 seconds]
datanoise has joined #crystal-lang
Ven has joined #crystal-lang
datanoise has quit [Quit: WeeChat 1.3]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
reed_ has quit [Ping timeout: 240 seconds]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
cyjimmy264 has joined #crystal-lang
Ven has quit [Read error: Connection reset by peer]
Ven has joined #crystal-lang
Ven has quit [Read error: Connection reset by peer]
Ven has joined #crystal-lang
Ven has quit [Read error: Connection reset by peer]
Ven_ has joined #crystal-lang
ssvb has quit [Ping timeout: 250 seconds]
Ven_ has quit [Read error: Connection reset by peer]
Ven has joined #crystal-lang
Ven has quit [Read error: Connection reset by peer]
Ven_ has joined #crystal-lang
Ven_ has quit [Read error: Connection reset by peer]
Ven has joined #crystal-lang
unshadow has joined #crystal-lang
ssvb has joined #crystal-lang
<unshadow> Hi, I got a more general question, Is there a way to "protect" a string in memory ? for example, if I will do a memory-dump on the current machine I wont be able to see the information (or atlest see it obfuscated)
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<unshadow> Or maybe even to segregate memory access to specific program\user
Ven has joined #crystal-lang
Ven has quit [Read error: Connection reset by peer]
Ven has joined #crystal-lang
Ven has quit [Read error: Connection reset by peer]
leafybasil has quit [Remote host closed the connection]
Ven has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
Ven has quit [Read error: Connection reset by peer]
Ven has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
Ven has quit [Read error: Connection reset by peer]
Ven has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
leafybas_ has joined #crystal-lang
Ven has quit [Read error: Connection reset by peer]
Ven_ has joined #crystal-lang
Ven_ has quit [Read error: Connection reset by peer]
Ven has joined #crystal-lang
Ven_ has joined #crystal-lang
Ven has quit [Read error: Connection reset by peer]
trapped has joined #crystal-lang
leafybas_ has quit [Remote host closed the connection]
leafybasil has joined #crystal-lang
<jhass> unshadow: as usual ask the question for C, there's usually some way to achieve the same in Crystal
<jhass> though I don't know how that could work, you would at least some point at which you have the decryption key in the same memory
<jhass> *least have
<bougyman> still no repl ?
<bougyman> is that even on the roadmap or wishlist?
<jhass> bougyman: it's still very hard for a language like crystal
<jhass> so probably not a 1.0 goal
<bougyman> jhass: hard doesn't mean not worth it, though :)
<bougyman> couldn't the way C-L does it be ported without too much 'hardness' ?
<jhass> but it does mean that there are other more low hanging fruits time can be spent on ;)
<bougyman> heh, C-L is the same letters as crystal-lang, just noticed. I meant common-lisp.
<jhass> I don't know C-L and it's apparently impossible to google for
<bougyman> common lisp
<bougyman> their method of repl is possible because of the dual compiled/interpreted system they've had for longer than i've been alive.
<bougyman> and i'm old and grey.
<unshadow> jhass: Thanks, TBH bougyman has answered my question, apperently there is a Linux module that allows memory segragation between apps and users, pretty cool
<unshadow> It's names Yama
<jhass> bougyman: well, would you really want to compare lisp and crystal?
<jhass> for example in crystal a class is never fully defined
<jhass> so you have to detect changes, recompile it to a new type, recompile all previous code referencing it
<bougyman> the standard common lisp object model is nothing like crystal's, to be sure.
<jhass> and that's just a simple example
<bougyman> methods don't belong to a class in lisp, they specialize on classes.
<bougyman> so that's quite different, but I don't think it has bearing on the runtime repl interpreting code.
<bougyman> the biggest difference I suppose is common lisp is running a big runtime lisp machine that ferrets away this problem
<bougyman> so the cost is in memory usage.
<bougyman> it's nowhere near the size of something like the jvm or even ruby's (mri) vm, though.
<jhass> the point is that it amounts to reimplementing the language basically
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
<jhass> let's not spend that effort while it's changing all the time still
<jhass> having to basically maintain two implementations would be a bit insane at this point
<bougyman> wouldn't it be harder to do later than earlier?
<jhass> I don't think so
<bougyman> I'm just one guy who uses a repl-based programming method, of course. But I think crystal is going to be most attractive to rubyists and the ruby community has more than a few who use this method. Of course it also opens the door to lispers tired of the stale feeling and all those parenthesis to consider crystal.
<vegai> repl *is* amazingly useful. I think the gist is that it's too difficult to implement
reed_ has joined #crystal-lang
sstarr has left #crystal-lang [#crystal-lang]
<unshadow> jhass: If i do this: a = 12; puts a; a = nil , will 12 be saved in memory somewhere until the GC will handle it , or, would it be overwriteen when a = nil been called ?
<jhass> for that particular case it's a constant referenced in the code section of your binary I think, like it directly generates the assembler that says write 12 into this register here. Of course the puts will create temporary string that's later garbage collected
<jhass> mmh, or actually, does it even? probably not
<unshadow> jhass: Maybe I should ask waj
<jhass> or we just look at Int#to_s
glenab has joined #crystal-lang
<unshadow> jhass: Yeha XD I'll take a look
<jhass> no heap allocation, that's all stack
<jhass> so no GC
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
glenab has quit [Ping timeout: 240 seconds]
Ven_ has quit [Read error: Connection reset by peer]
Ven has joined #crystal-lang
<unshadow> jhass: Cool ! so this is a good idea too for memory cleanup, I can also Call GC.new or GC.run right ? I know in Ruby you can
<unshadow> >> GC.methods
<DeBot> unshadow: undefined method 'methods' for GC:Module - http://carc.in/#/r/jdv
<unshadow> >> GC.run
<DeBot> unshadow: undefined method 'run' for GC:Module - http://carc.in/#/r/jdw
<unshadow> >> GC.new
<DeBot> unshadow: undefined method 'new' for GC:Module - http://carc.in/#/r/jdx
<unshadow> Oh ...
<jhass> .start
<unshadow> Ha
<unshadow> GC.start
<jhass> in Ruby too
<unshadow> >> GC.start
<DeBot> unshadow: undefined method 'start' for GC:Module - http://carc.in/#/r/jdy
<jhass> mh
<unshadow> >> GC.init
<DeBot> unshadow: undefined method 'inspect' for Void - http://carc.in/#/r/jdz
<unshadow> >> GC.collect
<jhass> unshadow: afaik the whole code pages of the binary are mapped into memory, always. So you "just" need to know where to look
<DeBot> unshadow: undefined method 'inspect' for Void - http://carc.in/#/r/je0
<jhass> unshadow: well, what do you expect from a null GC?
<jhass> note it's not loaded by default
<unshadow> Ha ...
<unshadow> I need to do GC.enable first ?
<jhass> no
<jhass> it overwrites the variant I linked
<jhass> if loaded
xd1le has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
reed_ has quit [Ping timeout: 240 seconds]
BlaXpirit has joined #crystal-lang
trapped has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
trapped has joined #crystal-lang
BlaXpirit has quit [Quit: Konversation]
Ven 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
ssvb has quit [Ping timeout: 272 seconds]
<Philpax> it_lexes_idents ["ident", "something", "with_underscores", "with_1", "foo?", "bar!", "fooBar",
<Philpax> "❨╯°□°❩╯︵┻━┻"]
<Philpax> someone has a sense of humour, I see :-)
<Philpax> (I feel like something got munged in the process of transmission ther)
<Philpax> +e
<jhass> Philpax: you don't want unicode method names? :P
<Philpax> can I use tableflip as a method name? I feel like I should try this
<jhass> you should be, it's a valid identifier after all
<Philpax> let's find out
<jhass> \o/
<crystal-gh> [crystal] ysbaddaden opened pull request #1782: Fix: UNIXServer#accept nonbloking socket (master...std-unixserver-accept) http://git.io/vChNq
<trapped> jhass, Philpax: http://play.crystal-lang.org/#/r/jg6
<Philpax> we could design a purely-emoji subset of crystal
<Philpax> imagine the possibilities
<jhass> trapped: Philpax how about http://carc.in/#/r/jgh
<trapped> it would be evil if someone made PRs filled with invisible characters
<Philpax> that is fantastic
<Philpax> unicode provides such ripe opportunities for trolling
<crystal-gh> [crystal] jhass pushed 2 new commits to master: http://git.io/vChpa
<crystal-gh> crystal/master 27c5681 Jonne Haß: Merge pull request #1782 from ysbaddaden/std-unixserver-accept...
<crystal-gh> crystal/master d024678 Julien Portalier: Fix: UNIXServer#accept nonbloking socket
<travis-ci> manastech/crystal#27c5681 (master - Merge pull request #1782 from ysbaddaden/std-unixserver-accept): The build passed. https://travis-ci.org/manastech/crystal/builds/86170149
<DeBot> https://github.com/manastech/crystal/pull/1782 (Fix: UNIXServer#accept nonbloking socket)
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<crystal-gh> [crystal] ysbaddaden opened pull request #1783: Logger: write messages atomically and drop coroutine (master...std-logger) http://git.io/vCjvq
unshadow has quit [Quit: leaving]
<jokke> shouldn't IO#read_fully block?
<jokke> maybe with an optional timeout?
<jokke> in any case WebSocket#receive isn't blocking
<jokke> is this intentional?
xdougx has joined #crystal-lang
<xdougx> hello
<jokke> hi xdougx
<xdougx> crystal can define property for class variables? :)
<jhass> there's no helper macro as far as I'm aware
<xdougx> i see, but is possible to build it as macro right?
<trapped> jokke: you can set a timeout using Socket.read_timeout
<jokke> trapped: cool, is it 0 by default?
<trapped> it raises an IO::Timeout
<trapped> no, it's disabled by default
<trapped> read_fully blocks afaik
<trapped> at least for me
<jokke> trapped: nope
<jokke> not for me
<jokke> i get an EOFError
<trapped> oh well that's a different issue then
<jokke> it is?
<jokke> it happens during read_fully
<jokke> yeah
<trapped> it means that it can't read at all
<trapped> probably the socket is closed
<jokke> you think so?
<trapped> otherwise it would just block until it can read something
<jokke> hmm
<trapped> i think so but take my word with a grain of salt
<jokke> trapped: i'm trying to implement https://github.com/meteor/meteor/blob/devel/packages/ddp/DDP.md for meteor
<jokke> and get it straight at connect
<jokke> (the error, that is)
<trapped> can you show me your code
<jokke> sure
<jhass> xdougx: yes, very possible
<jokke> trapped: i know i get a connection because meteor sends {"server_id": 0} as its first message
<jhass> xdougx: https://github.com/manastech/crystal/blob/master/src/object.cr#L208-L216 property just calls getter and setter
<xdougx> okay
<jhass> in theory we could even have those parse something like self.foo
<trapped> xdougx: what line are you getting the error
bcardiff has joined #crystal-lang
<trapped> my bad, meant jokke
<jokke> ah
<xdougx> self a method call from the current object right? and @ is the current class variable, right?
<xdougx> object variable*
<jhass> xdougx: yes and no
<xdougx> self.foo is a method call from the current object
<jhass> local_or_method, @instance_variable, @@class_variable, $global_variable, Constant
<xdougx> indeed
<trapped> jokke: no clue, perhaps the server is closing the connection unexpectedly
<jokke> hm
<xdougx> im building some kind of application controller to start, run and stop server or job
<xdougx> like crystal app -- start production
<xdougx> like crystal app -- server start production
<jhass> you mean a supervisor?
<xdougx> or crystal app -- server stop production
<xdougx> yep
<jhass> mmh, I prefer systemd where I can get it these days
<xdougx> there are any implementation of systemd in crystal?
<jhass> lol, no. Are you sure you know what systemd is?
<xdougx> just like upstart
<jhass> pretty much
<xdougx> i just want a interface to use the upstart to start/stop mu app with my server
<trapped> so a sysctl wrapper
reed_ has joined #crystal-lang
<jhass> more like a upstart service generator
<jhass> and you probably meant systemctl or service
<xdougx> yes, i want to use the upstart service
<jhass> isn't newest ubuntu on systemd too by now?
<xdougx> my current server is running on precise pangoling 12.04lts
<bougyman> yes
<xdougx> still with upstart
<bougyman> there aren't many systemd holdouts.
<bougyman> xdougx: consider installing runit on that.
<bougyman> and then when everything changes to systemd you don't have to go back and retool your apps.
<bougyman> old article but still valid.
<bougyman> runit is decades old, solid as a rock.
<xdougx> let me see it
<crystal-gh> [crystal] adlerhsieh opened pull request #1785: Add documentation to Random module (master...add-doc) http://git.io/vCjlt
<bougyman> most of it's not relevant to you, but there's an example runit ruby service script there.
<bougyman> the linux distribution I dev on moved to systemd early on, then as the feature creep started coming the founder/lead dev punted it for runit (and his own sanity).
<bougyman> I started using it shortly after they punted systemd.
<bougyman> not viable to use such an edge distro for server stuff, though. apt-get install runit on ubuntu takes care of all the setup you need, though. Without replacing init. runit's not opinionated, it doesn't give a shit if it's pid1 or not.
<bougyman> the only weird thing the debuntu runit packages do is use /etc/service as the service directory.
Ven has joined #crystal-lang
<xdougx> seems very nice, i've found the ruby exemple on that article
<xdougx> pretty simple to use
<bougyman> it's quite simple to use but can do very complex things.
<bougyman> like not come up until a service on some _other_ machine is up.
<xdougx> this is very useful, setup to run just is something is already running o even another machine is up, it can reduce many errors
<bougyman> I don't know if I put it in that particular article, but you have the option to have a ./finish script in addition to the ./run script, it gets the exit code of your app.
<bougyman> so if it crashes or there's an error or someone/something restarts it you can shoot an alert, take whatever action you like.
<bougyman> chef uses runit for all of its supervision.
<xdougx> this is really nice, i need to take a time to read about
glenab has joined #crystal-lang
ssvb has joined #crystal-lang
<jokke> can i somehow verify if a socket is open or closed?
<jokke> (tcp socket)
<jhass> there's .closed? though that's just tracking if .close was called iirc
glenab has quit [Ping timeout: 272 seconds]
<jokke> mmh
<jhass> not sure there's a syscall for it besides trying to read or write to it
walkingtoast has joined #crystal-lang
NeverDie has quit [Quit: http://radiux.io/ -> Manhattan Project]
greengriminal has joined #crystal-lang
unshadow has joined #crystal-lang
NeverDie has joined #crystal-lang
leafybas_ has joined #crystal-lang
NeverDie has quit [Max SendQ exceeded]
leafybasil has quit [Ping timeout: 250 seconds]
NeverDie has joined #crystal-lang
<xdougx> jhass is this possible in be included on crystal release? https://gist.github.com/xdougx/1c6c9954f028e53b8346
PragTob has joined #crystal-lang
<jhass> xdougx: I wouldn't say it's out of question. If you do a proper implementation (class_getter, class_getter?, class_getter!, class_setter, class_property, class_property?, class_property!) and pull request it, that would give some good place to discuss ;)
<xdougx> nice, gonna make it, it could solve many problemans
<trapped> xdougx: that'd be nice to have
datanoise has joined #crystal-lang
ismaelga has joined #crystal-lang
ismaelga has quit [Remote host closed the connection]
ismaelga has joined #crystal-lang
Ven_ has joined #crystal-lang
Ven has quit [Read error: Connection reset by peer]
Ven_ has quit [Read error: Connection reset by peer]
Ven has joined #crystal-lang
walkingtoast has quit [Quit: Leaving...]
greengriminal has quit [Quit: This computer has gone to sleep]
greengriminal has joined #crystal-lang
greengriminal has quit [Client Quit]
greengriminal has joined #crystal-lang
<xdougx> there are doc for DeclareVar
datanoise has left #crystal-lang ["WeeChat 1.3"]
pawnbox has quit [Remote host closed the connection]
BlaXpirit has joined #crystal-lang
<xdougx> whats the diference between getterm getter? and getter! ?
<xdougx> getter*
<jhass> did you look at their implementation?
<xdougx> um looking
<xdougx> just return the getter var?
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<jhass> getter? adds a ? to the method name, getter! calls .not_nil! on the value before returning it
<jhass> I think getter! also calls getter? ?
<jhass> well, to the effect
<xdougx> not_nil! return self
<jhass> >> nil.not_nil!
<DeBot> jhass: Nil assertion failed (Exception) - http://carc.in/#/r/jhl
<jhass> except in this case
<jhass> >> typeof([nil, 1].sample)
<DeBot> jhass: # => (Nil | Int32) - http://carc.in/#/r/jhm
<jhass> >> typeof([nil, 1].sample.not_nil!)
<DeBot> jhass: # => Int32 - http://carc.in/#/r/jhn
<xdougx> yeah im testing it, force the attribute to be not nil
<xdougx> this is fully used on implementations? first seen an object has a method to force to not be nil, only in model i see this implementation with the validation of presence
<xdougx> also implmentation of blank? is very useful too like self.name.blank?
<jhass> it's useful in Crystal since you easily run into a case where you know a value is present but the compiler doesn't
<jhass> the typeof above is returning the compile time type
<jhass> >> [nil, 1].sample + 1
<DeBot> jhass: undefined method '+' for Nil (compile-time type is (Nil | Int32)) - http://carc.in/#/r/jho
<jhass> compile time error
<jhass> >> [nil, 1].sample.not_nil! + 1
<DeBot> jhass: Nil assertion failed (Exception) - http://carc.in/#/r/jhp
<jhass> runtime error
<jhass> >> [nil, 1].sample.not_nil! + 1
<DeBot> jhass: # => 2 - http://carc.in/#/r/jhq
<jhass> successful run (we were lucky)
<xdougx> pp [nil, 1].sample.not_nil! + 1 prints on terminal 2
<xdougx> but
<xdougx> this is could have a issue
<jhass> in roughly 50% of the invocations ;)
<jhass> it's just an example, not a real world usecase
<xdougx> nil must be 0 instead of 1
<xdougx> nil like null like 0
<jhass> that's weak typing, please just no ;)
PragTob has quit [Remote host closed the connection]
<xdougx> very nice
<xdougx> i tryied http://carc.in/#/r/jhs
<jhass> that's expected so far
<xdougx> nil has no implementation to_i
<jhass> yes, we dropped it
<xdougx> why? :(
<xdougx> finished the draft of class_property
<xdougx> i see x.try(&.to_i) || 0
<jhass> should probably handle DeclareVar too like getter
<jhass> I mean it's kinda misleading atm and we probably should drop it, but for now it should be consistent
fowlduck has joined #crystal-lang
<xdougx> just a draft, looking for this Daclare
<xdougx> this DeclareVar i need to test it
<jhass> "x :: Foo" is a DeclareVar
<jhass> so it allows you to getter foo :: Foo
<jhass> but it's misleading because it just takes the name and doesn't actually type restrict anything
pawnbox has joined #crystal-lang
<jhass> also x :: Foo is actually unsafe code, don't use it unless you know why you need it
<xdougx> undertood
<jhass> but getter handles it for the time being and so should class_getter for the time being
ismaelga has quit [Remote host closed the connection]
<xdougx> also if i have str = "str" as String and Foo.str = str it be a problaman?
<jhass> I don't see how
<jhass> it could be
barosl has quit [Quit: Leaving]
NeverDie has quit [Quit: http://radiux.io/ -> Manhattan Project]
<xdougx> gonna check
<jhass> sorry that was misleading in retrospect, I meant that as one, "I don't see how it could be"
canhtak has joined #crystal-lang
endou has joined #crystal-lang
NeverDie has joined #crystal-lang
Excureo has joined #crystal-lang
Excureo has quit [Remote host closed the connection]
<xdougx> i found something very bad
barosl has joined #crystal-lang
asbradbury has quit [Ping timeout: 264 seconds]
yie has quit [Ping timeout: 264 seconds]
<xdougx> if i include the macro as a module and i have module foo; end and class Baz; include Food; the class_property is not being added to the class
endou_ has quit [Ping timeout: 264 seconds]
shadeslayer has quit [Ping timeout: 264 seconds]
<jhass> lookup is still wonky there yeah, try extend
shadeslayer has joined #crystal-lang
yie has joined #crystal-lang
asbradbury has joined #crystal-lang
<xdougx> keep getting undefined method 'environment' for Application::Base:Class
<jhass> I expect that to start working or make more sense as such things are redesigned and ironed out
<jhass> for now you can also use Module.foo to invoke a macro
gamemanj has joined #crystal-lang
<xdougx> okay, i can change the location and include the module into the class instead of module
<xdougx> works fine
ismaelga has joined #crystal-lang
reed_ has quit [Ping timeout: 240 seconds]
ismaelga has quit [Remote host closed the connection]
leafybas_ has quit [Remote host closed the connection]
leafybasil has joined #crystal-lang
benoist has joined #crystal-lang
<xdougx> thwwwwwwss2w
<xdougx> ops
<xdougx> there any way to check is respond_to a method? Class or Object
fowlduck has quit [Remote host closed the connection]
<jhass> it pretends to be a method but is actually syntax
<jhass> since the compiler is aware of it
Excureo has joined #crystal-lang
Excureo has quit [Remote host closed the connection]
Excureo has joined #crystal-lang
Excureo has quit [Remote host closed the connection]
<xdougx> in the class property need to check if the method exists, but didnt find a clue of it
<ddfreyne_> BlaXpirit: I use GLFW with my own wrappers, not your SFML stuff--sorry :)
<BlaXpirit> :|
benoist has quit [Read error: Connection reset by peer]
benoist has joined #crystal-lang
<jhass> xdougx: I don't follow
shama has joined #crystal-lang
<xdougx> this is not possible? http://carc.in/#/r/ji8 pass a block to a method and in this method pass the block to another method
<xdougx> ok need & as argument
<crystal-gh> [crystal] asterite pushed 2 new commits to master: http://git.io/vWvzA
<crystal-gh> crystal/master e1f04e8 Ary Borenszweig: Parser: fixed parsing of `return method do ... end`, and say syntax error no `return do ... end`
<crystal-gh> crystal/master 55aa0b7 Ary Borenszweig: Formatter: only align "if" and "case" expressions to the right of an assignment. Fixes #1773. Also: preserve spaces around operators *, / and **.
leafybas_ has joined #crystal-lang
unshadow has quit [Ping timeout: 250 seconds]
fowlduck has joined #crystal-lang
<crystal-gh> [crystal] asterite closed pull request #1761: Align consecutive assignments if they are logically grouped (master...formatter_align_assignments) http://git.io/vCFsX
ssvb has quit [Ping timeout: 250 seconds]
leafybasil has quit [Ping timeout: 250 seconds]
Renich has joined #crystal-lang
<travis-ci> manastech/crystal#55aa0b7 (master - Formatter: only align "if" and "case" expressions to the right of an assignment. Fixes #1773. Also: preserve spaces around operators *, / and **.): The build passed. https://travis-ci.org/manastech/crystal/builds/86236101
<DeBot> https://github.com/manastech/crystal/issues/1773 (Formatter assignment alignment decisions)
ssvb has joined #crystal-lang
Renich has quit [Quit: leaving]
Renich has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
Philpax has quit [Ping timeout: 240 seconds]
<benoist> asterite: do you want the openssl PR's in small PR's or just one full one?
reed_ has joined #crystal-lang
fowlduck has quit [Remote host closed the connection]
trapped has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
fowlduck has joined #crystal-lang
benoist has quit [Remote host closed the connection]
benoist has joined #crystal-lang
glenab has joined #crystal-lang
<xdougx> cant forward blocks with param?
<jhass> xdougx: you'll have to explicitly specify the signature in the method definition
<jhass> def foo(&block : String ->)
<xdougx> like this def start(&block : Application::Base)
<jhass> no, using the Proc syntax, Argument, Types -> Return Type
<jhass> either can be omitted but the -> cannot
<xdougx> works :D
canhtak has quit [Quit: canhtak]
canhtak has joined #crystal-lang
<crystal-gh> [crystal] benoist opened pull request #1787: OpenSSL::Cipher (master...feature/openssl-cipher) http://git.io/vWf48
xdougx has quit [Remote host closed the connection]
xdougx has joined #crystal-lang
glenab has quit [Remote host closed the connection]
graycoder has joined #crystal-lang
xdougx has quit [Ping timeout: 260 seconds]
globalkeith has joined #crystal-lang
glenab has joined #crystal-lang
glenab has quit [Ping timeout: 240 seconds]
benoist has quit [Remote host closed the connection]
benoist has joined #crystal-lang
gamemanj has quit [Ping timeout: 246 seconds]
knoopx has joined #crystal-lang
fowlduck has quit [Remote host closed the connection]
fowlduck has joined #crystal-lang
elia has joined #crystal-lang
leafybas_ has quit [Remote host closed the connection]
knoopx1 has joined #crystal-lang
knoopx has quit [Read error: Connection reset by peer]
knoopx1 has quit [Read error: Connection reset by peer]
knoopx has joined #crystal-lang
cyjimmy264 has quit [Ping timeout: 240 seconds]
elia has quit [Quit: Computer has gone to sleep.]
leafybasil has joined #crystal-lang
fowlduck has quit [Remote host closed the connection]
fowlduck has joined #crystal-lang
knoopx has quit [Remote host closed the connection]
tomchapin has joined #crystal-lang
greengriminal has quit [Quit: This computer has gone to sleep]
Renich has quit [Remote host closed the connection]
doddok has joined #crystal-lang
<doddok> but get error
Excureo has joined #crystal-lang
<doddok> is it easy to fix error? i am new
BlaXpirit has quit [Quit: Konversation]
<jhass> doddok: mmh, is your pastie truncated perhaps?
<doddok> y
<jhass> well there's no real error message
<jhass> what's the code that produces the error?
<doddok> first code sample on https://github.com/dhruvrajvanshi/Moonshine
graycoder has quit [Ping timeout: 240 seconds]
<jhass> doddok: looks like it's not compatible with Crystal 0.9.0, yet
graycoder has joined #crystal-lang
<doddok> i think u should delete this shit from https://crystalshards.herokuapp.com/
<doddok> untill fixed
<doddok> i tried 2 web libs and nothing works
<jhass> which two?
<doddok> amethyst
<doddok> and moonshine
<jhass> artanis seems to work fine for me (though there seems to be a bug on OS X atm)
<jhass> you probably just had bad luck trying shortly after a release that has some changes in the http/server code
<jhass> which the webframeworks depend on
<jhass> and weren't updated yet
<doddok> as remeber i tried with 0.8 version and amethyst didnt work
<doddok> i think i know personally Pomozov, maintainer of crystal
NeverDie has quit [Quit: http://radiux.io/ -> Manhattan Project]
fowlduck has quit [Remote host closed the connection]
<jhass> doddok: anatolik is just the archlinux package maintainer ;)
<jhass> the language creators are asterite and waj here
<jhass> doddok: well, here's a small artanis application for the time being https://github.com/jhass/crpaste
bcardiff has quit [Quit: bcardiff]
canhtak has quit [Quit: canhtak]
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tomchapin has joined #crystal-lang
doddok has quit [Ping timeout: 244 seconds]
reed_ has quit [Ping timeout: 264 seconds]
trapped has joined #crystal-lang
trapped has quit [Client Quit]
doddok has joined #crystal-lang
ssvb has quit [Ping timeout: 250 seconds]
Philpax has joined #crystal-lang
globalkeith has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ssvb has joined #crystal-lang
<CompanionCube> hm
* CompanionCube wonders if there is a crystal program that produces a knowable results that's smaller than 7184 bytes
<jhass> "knowable"?
globalkeith has joined #crystal-lang
<CompanionCube> jhass, i.e one that can be observed. I have a program that returns 2
<jhass> let me check what I got my true implementation down to again
<jhass> 1016
bcardiff has joined #crystal-lang
<CompanionCube> source?
<jhass> ah no, that's the one where the .start function didn't work
<jhass> 6136 for the dynamically linked one
<CompanionCube> o.o how?
<CompanionCube> That's interesting
<CompanionCube> mine:
<jhass> that in theory doesn't depend on libc
<CompanionCube> fun main(argc : Int32, argv : UInt8**) : Int32
<CompanionCube> 2
<CompanionCube> end
<jhass> but I get a segfault if I link it with a .start that I found on the net
* CompanionCube wonders if he can literally use no prelude
<CompanionCube> rather than empty.cr
<jhass> the unlinked object file is 696
<CompanionCube> What's the size of the code in LLVM IR?
<jhass> 63 lines if the one I have laying around is up to date
glenab has joined #crystal-lang
<jhass> 2474 characters
<CompanionCube> mine's 307 characters of LLVM IR
globalkeith has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jhass> well, mine is doing more :P
<CompanionCube> jhass, ik
glenab has quit [Ping timeout: 240 seconds]
greengriminal has joined #crystal-lang