jhass changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.7.2 | 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
bcardiff has quit [Quit: Leaving.]
vikaton has quit []
bcardiff has joined #crystal-lang
zipR4ND has quit [Ping timeout: 246 seconds]
bcardiff has quit [Quit: Leaving.]
bcardiff has joined #crystal-lang
bcardiff has quit [Client Quit]
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
zipR4ND has joined #crystal-lang
NeverDie has joined #crystal-lang
zipR4ND has quit [Ping timeout: 240 seconds]
c355E3B has quit [Quit: Connection closed for inactivity]
shama has joined #crystal-lang
Cidan is now known as zz_Cidan
zz_Cidan is now known as Cidan
Cidan is now known as zz_Cidan
mdz_ has quit [Remote host closed the connection]
Sadin has joined #crystal-lang
havenwood has joined #crystal-lang
shama has quit [Quit: (╯°□°)╯︵ɐɯɐɥs]
willl has quit [Quit: Connection closed for inactivity]
zz_Cidan is now known as Cidan
Cidan is now known as zz_Cidan
havenwood has quit [Remote host closed the connection]
bcardiff has joined #crystal-lang
mdz_ has joined #crystal-lang
mdz_ has quit [Ping timeout: 244 seconds]
bcardiff has quit [Quit: Leaving.]
datanoise has quit [Ping timeout: 264 seconds]
zz_Cidan is now known as Cidan
Cidan is now known as zz_Cidan
willl has joined #crystal-lang
datanoise has joined #crystal-lang
havenwood has joined #crystal-lang
BlaXpirit has joined #crystal-lang
Netfeed has quit [Quit: WeeChat 0.3.0]
datanoise has quit [Quit: WeeChat 1.2]
datanoise has joined #crystal-lang
datanoise has quit [Client Quit]
datanoise has joined #crystal-lang
datanoise has quit [Client Quit]
datanoise has joined #crystal-lang
unshadow has joined #crystal-lang
<unshadow> What would it take to add exec to the top level namespace ?
<datanoise> there is system and ` already
Ven has joined #crystal-lang
mdz_ has joined #crystal-lang
<unshadow> well, maybe I should just explain my situation, I want to execute a file without needing to "drop down" to the shell enviroment, both system() and `` do use the shell to execute my commands, maybe exec does that too, if there a way to execute an external file without the need to drop down to shell
<unshadow> ?
<datanoise> Process.run is the way to go then
mdz_ has quit [Ping timeout: 256 seconds]
<unshadow> datanoise: thanks :)
<unshadow> lets say I want to run "ls /tmp" how can I do this ? it seems that Process.run("ls", "/tmp/", STDOUT) want's something which is not string as command
<unshadow> NM, i saw it wanted an Array so I changed it to Process.run("ls", ["/tmp/"], STDOUT) :)
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
datanoise has quit [Ping timeout: 264 seconds]
Sadin has quit [Ping timeout: 276 seconds]
Ven has joined #crystal-lang
Locke23rus has joined #crystal-lang
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
leafybasil has quit [Remote host closed the connection]
datanoise has joined #crystal-lang
havenwood has quit [Ping timeout: 252 seconds]
JBat has joined #crystal-lang
datanoise has quit [Ping timeout: 250 seconds]
leafybasil has joined #crystal-lang
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
Ven has joined #crystal-lang
sandelius has joined #crystal-lang
JBat has quit [Quit: Computer has gone to sleep.]
JBat has joined #crystal-lang
datanoise has joined #crystal-lang
datanoise has quit [Ping timeout: 245 seconds]
JBat has quit [Ping timeout: 255 seconds]
c355E3B has joined #crystal-lang
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
datanoise has joined #crystal-lang
datanoise has quit [Ping timeout: 256 seconds]
bcardiff has joined #crystal-lang
bcardiff has quit [Quit: Leaving.]
sandelius has quit [Quit: Textual IRC Client: www.textualapp.com]
bcardiff has joined #crystal-lang
havenwood has joined #crystal-lang
bcardiff has quit [Client Quit]
bcardiff has joined #crystal-lang
bcardiff has quit [Client Quit]
<unshadow> Lets say i have this array, [1,1,1,0] and I want to do something like : if everything in the array is == 1 do something, else do something else
<unshadow> how can I do that ?
<jhass> if .all? &.==1
<jhass> if (arr - [1]).empty?
<jhass> if .count(1) == .size
<jhass> stick to the first :P
<unshadow> >> 0.size
<DeBot> unshadow: Error in line 4: undefined method 'size' for Int32 - http://carc.in/#/r/1k6
<jhass> >> a = [1, 1, 1, 0].count(1)
<DeBot> jhass: # => 3 - http://carc.in/#/r/1k7
BlaXpirit_ has joined #crystal-lang
BlaXpirit has quit [Killed (orwell.freenode.net (Nickname regained by services))]
<jhass> oh, needs the parens
<jhass> >> [1, 1, 0].all? &.==(1)
<DeBot> jhass: # => false - http://carc.in/#/r/1ka
<unshadow> cool thanks :)
datanoise has joined #crystal-lang
sandelius has joined #crystal-lang
vikaton has joined #crystal-lang
<unshadow> You know what would be cool to add to Crystal ? a --obfuscate flag, which will generate extra code and change the methods names and classes to numbers and will make the code less human readable to make it harder for disassamble
<jhass> unshadow: man strip
<jhass> though in general, if your security depends on obfuscation you're on a lost boat and IMO deserve to be owned
<unshadow> Security should never depend on one thing, it should depend on multiple layers. obfuscation is a single layer in the whole security idea
bcardiff has joined #crystal-lang
<jhass> if you manage to completely forget that you do obfuscation when designing your real security, I can agree
<jhass> I see few people manage to do that
<unshadow> jhass: take a look at this gold mine :) https://www.cise.ufl.edu/~manuel/obfuscate/obfuscate.html
<jhass> well, that's just a variant of code golf
<unshadow> code golf ?
<jhass> do something with the least amount of characters possible
<unshadow> Oo this is crzy
<unshadow> sinatra in 5 lines XD
NeverDie has joined #crystal-lang
unshadow has quit [Quit: leaving]
bcardiff1 has joined #crystal-lang
bcardiff has quit [Ping timeout: 265 seconds]
sandelius has quit [Quit: Textual IRC Client: www.textualapp.com]
<crystal-gh> [crystal] asterite pushed 6 new commits to master: http://git.io/vkAYy
<crystal-gh> crystal/master d934978 Ary Borenszweig: Time: correctly compare time instances with different kinds (local, utc)
<crystal-gh> crystal/master b57ce40 Ary Borenszweig: Allow invoking methods on abstract types (from the compiler's point of view), as these can never be instantiated.
<crystal-gh> crystal/master ef31c8c Ary Borenszweig: Fixed Tuple#last
Codcore has joined #crystal-lang
shama has joined #crystal-lang
ponga has joined #crystal-lang
ponga has quit [Client Quit]
<epitron> Lol @ that trap rescue require trick
vikaton has quit []
zipR4ND has joined #crystal-lang
<travis-ci> manastech/crystal#2400 (master - a593dc3 : Ary Borenszweig): The build passed.
sandelius has joined #crystal-lang
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
zz_Cidan is now known as Cidan
NeverDie has joined #crystal-lang
zipR4ND has quit [Ping timeout: 240 seconds]
vikaton has joined #crystal-lang
leafybasil has quit [Remote host closed the connection]
datanoise has quit [Read error: Connection reset by peer]
Cidan is now known as zz_Cidan
leafybasil has joined #crystal-lang
datanoise has joined #crystal-lang
zz_Cidan is now known as Cidan
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
vikaton has quit []
sandelius has joined #crystal-lang
bcardiff has joined #crystal-lang
bcardiff1 has quit [Ping timeout: 244 seconds]
sferik has joined #crystal-lang
sferik has quit [Read error: Connection reset by peer]
sferik has joined #crystal-lang
kulelu88 has joined #crystal-lang
sferik has quit [Client Quit]
vikaton has joined #crystal-lang
vikaton is now known as dom98
dom98 is now known as vikaton
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bcardiff1 has joined #crystal-lang
bcardiff has quit [Ping timeout: 264 seconds]
gnx has joined #crystal-lang
bcardiff1 has quit [Quit: Leaving.]
bcardiff has joined #crystal-lang
c355E3B has quit [Quit: Connection closed for inactivity]
bcardiff has quit [Quit: Leaving.]
BlaXpirit has quit [Quit: Quit Konversation]
bcardiff has joined #crystal-lang
<flaviu> btw, it's possible to turn off auto-op and /msg Chanserv OP #crystal-lang whenever you need OP
<flaviu> not that it's a problem for me or anything, I can have my IRC client filter those messages.
shama has quit [Quit: (╯°□°)╯︵ɐɯɐɥs]
<jhass> they're very new to IRC, check the channel ACL ;)
NeverDie has quit [Remote host closed the connection]
NeverDie has joined #crystal-lang
<flaviu> Founded 1y 38w 1d ago? That's not that new, but not that old either, I guess.
<flaviu> This channel is older than my nick :)
<jhass> more referring to the permissions given to the other founders
<flaviu> Nice! I created a new crystal project, and it even gave me a license file with my name and year!
* jhass counts the days until somebody opens an issue about "How can you dare to suggest this license by default, it's the worst!"
<flaviu> Ha! That was my first thought too.
Codcore has quit [Ping timeout: 246 seconds]
mdz_ has joined #crystal-lang
mdz_ has quit [Ping timeout: 255 seconds]