pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
jsaak has quit [Ping timeout: 244 seconds]
akwiatkowski has joined #crystal-lang
<txdv>
how do I convert one enum to another?
pawnbox has quit [Remote host closed the connection]
<txdv>
nevermind
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
<txdv>
tw
pawnbox has joined #crystal-lang
sebler_ has joined #crystal-lang
sebler has quit [Ping timeout: 240 seconds]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
soveran has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
jsaak has joined #crystal-lang
efi has joined #crystal-lang
jsaak has quit [Ping timeout: 240 seconds]
soveran has joined #crystal-lang
soveran has quit [Changing host]
soveran has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
Philpax has quit [Ping timeout: 240 seconds]
Philpax has joined #crystal-lang
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
soveran has quit [Remote host closed the connection]
Philpax has quit [Ping timeout: 250 seconds]
Philpax has joined #crystal-lang
<txdv>
is there something like RAII in crystal-lang?
<jhass>
what's RAII again?
pawnbox_ has joined #crystal-lang
pawnbox has quit [Ping timeout: 276 seconds]
<tilpner>
Pretty much the worst common programming acronym, "Resource Acquisition Is Initialization" or "things are destroyed at the end of the scope".
soveran has joined #crystal-lang
soveran has quit [Changing host]
soveran has joined #crystal-lang
<jhass>
so in a GC'd language that'd be a precise GC?
soveran has quit [Remote host closed the connection]
soveran has joined #crystal-lang
<txdv>
jhass: like it the variable lives on the stack, once it gets out of scope, the finalizer is called and shits getting cleaned
<txdv>
also, is there something like rubies ->(x) { |x| } ?
trapped has joined #crystal-lang
<txdv>
o yeah, proc
<tilpner>
jhass - No, precise is something else here. They (RAII and GC) are also not mutually exclusive, though perhaps a little tricky to combine.
<tilpner>
If we consider reference counting garbage collection, that would also work. The reference count would decrease at the end of the scope, and the destructor/drop-code/finalizer runs as soon as the refcount reaches zero.
<jhass>
so basically finalize for struct's? no, we don't have that (yet)
<tilpner>
Almost: For RAII to be useful, we need a "finalize" that runs when the scope (e.g. lexical scope, if on stack) ends. Exactly then, not at some unspecified point in the future. This is relevant when using finalizers for resource management, e.g. closing files or sockets, as well as releasing a mutex lock.
<tilpner>
Which, I suppose, could be *exactly* what you mean.
<jhass>
I think so :)
pawnbox_ has quit [Remote host closed the connection]
jsaak has joined #crystal-lang
pawnbox has joined #crystal-lang
<txdv>
is there like a variable which holds the value of the value psased to a case?
<txdv>
some $1 trickery?
pawnbox has quit [Ping timeout: 246 seconds]
<RX14>
there shouldn't be
<RX14>
just use a variable
<txdv>
yeah, i'm probably overcomplicating shit
<jhass>
case foo = bar; when X; x(foo);
<txdv>
o yeah the inline assignment
<BlaXpirit>
txdv, instead of RAII blocks are used
<BlaXpirit>
open_file("blah.txt") do |f|; f.dsfgshdsrhr; end
<BlaXpirit>
resource is freed at the end of block
<FromGitter>
<sdogruyol> i'm sure that this has been answered before but what's the crystal equivalent of ```[data].pack "H*"```
<crystal-gh>
[crystal] MakeNowJust opened pull request #3001: Fixed #2999: A bug not to allow '~' in HTTP header value (master...fix/header-bug) https://git.io/vKuem
matp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sebler_ has quit []
<crystal-gh>
[crystal] asterite closed pull request #3000: Fixed #2999: allow '~' in HTTP header value (master...feature/fix_http_header_value) https://git.io/vKExQ
<crystal-gh>
[crystal] asterite pushed 2 new commits to master: https://git.io/vKukX
<crystal-gh>
crystal/master c672515 TSUYUSATO Kitsune: Fixed #2999: A bug not to allow '~' in HTTP header value
sdogruyol has quit [Quit: Connection closed for inactivity]
soveran has quit [Remote host closed the connection]
jsaak has joined #crystal-lang
<RX14>
that was fun
<mose>
nice presentation
<mose>
if it gets monthly that can be very interesting
<RX14>
i think monthly would be a bit too much, unless we can get some good new topics
<mose>
can be shorter
<FromGitter>
<sdogruyol> Yeah i think 2 month is good
<RX14>
i meant too short lol
<FromGitter>
<sdogruyol> Or 45 days
<RX14>
hmmn
<RX14>
we could sync it with the release schedule!
<mose>
I meant like 15-20 minutes
<FromGitter>
<sdogruyol> RX14 nice idea
<RX14>
so we have one just after/before a release to talk about the changelog
<RX14>
which would be really interesting
<RX14>
if we don't get a release schedule before 1.0 we can still plan a date so we can do a meetup around then
Oliphaunte has joined #crystal-lang
willl has joined #crystal-lang
kulelu88 has joined #crystal-lang
pawnbox_ has joined #crystal-lang
pawnbox has quit [Ping timeout: 240 seconds]
soveran has joined #crystal-lang
soveran has quit [Ping timeout: 276 seconds]
Oliphaunte has quit [Remote host closed the connection]
soveran has joined #crystal-lang
alanwillms has joined #crystal-lang
<alanwillms>
Anybody here knows how to handle the new crystal-website and crystal-book repositories?
<FromGitter>
<sdogruyol> i really think that we need more premium sponsors to support us towards 1.0 and beyond!
<jhass>
alanwillms: what do you mean with how to handle?
soveran has quit [Remote host closed the connection]
<alanwillms>
Previously crystal-lang had a branch called gh-pages. I ran a command and it would convert HAML to HTML, GitBook to HTML, and then I just had to git push
<alanwillms>
Now crystal-website do not host the Gitbook HTML files, but if you browse to /docs they are there
<alanwillms>
Is there any third repository that joins crystal-website and crystal-book?