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
<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
<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
<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]
<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>
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