jhass changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.7.3 | 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
datanoise has quit [Ping timeout: 246 seconds]
<wmoxam> Before I start digging into this: anyone working on getting Crystal running on OpenBSD?
fowlduck has joined #crystal-lang
fowlduck has quit [Ping timeout: 248 seconds]
strcmp1 has quit [Quit: Leaving]
datanoise has joined #crystal-lang
waj has joined #crystal-lang
bcardiff has quit [Quit: Leaving.]
NeverDie has quit [Quit: Textual IRC Client: www.textualapp.com]
NeverDie has joined #crystal-lang
fowlduck has joined #crystal-lang
fowlduck has quit [Ping timeout: 248 seconds]
havenwood has quit [Ping timeout: 265 seconds]
strcmp1 has joined #crystal-lang
waj has quit [Quit: waj]
datanoise has quit [Ping timeout: 265 seconds]
fowlduck has joined #crystal-lang
fowlduck has quit [Ping timeout: 248 seconds]
datanoise has joined #crystal-lang
datanoise has quit [Ping timeout: 248 seconds]
fowlduck has joined #crystal-lang
datanoise has joined #crystal-lang
fowlduck has quit [Ping timeout: 248 seconds]
daneb has joined #crystal-lang
datanoise has quit [Ping timeout: 248 seconds]
BlaXpirit has joined #crystal-lang
daneb has quit [Remote host closed the connection]
veelenga has joined #crystal-lang
datanoise has joined #crystal-lang
daneb has joined #crystal-lang
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
datanoise has quit [Ping timeout: 276 seconds]
<jhass> wmoxam: not that I'm aware of
Ven has joined #crystal-lang
<jbye> to sortof continue the discussion regarding json_mapping and to_h from yesterday. I still think that being able to take a json mapped object and turning it in to a Hash is useful. I could then create a driver that takes Hash as an input parameter to construct e.g. an INSERT query
<jhass> https://github.com/manastech/crystal/blob/master/src/json/mapping.cr#L59 should be fairly easy to add, you could do it and we discuss it in a PR
<strcmp1> so much macro.
<daneb> is that best practice for a crystal to natively use "macros" inherent to itself?
fowlduck has joined #crystal-lang
<strcmp1> what do you mean?
<daneb> if crystal supports "macros", should it then use "macros" to help build it's native library?
<daneb> feels like an unnecessary dependency, or is that common practice?
<daneb> *just curious*
<BlaXpirit> wat
<daneb> am I asking a dumb question ;)
<jhass> crystal is entirely written in itself, and you're basically asking "should crystal use crystal to build its standard library" ;)
fowlduck has quit [Ping timeout: 248 seconds]
vikaton has quit [Quit: Connection closed for inactivity]
<daneb> I just saw "macros" being external to the language, and thus a less performant means for doing what is available in terse code natively
<daneb> a good example is the "for"
<daneb> but perhaps what I am not understanding is that crystal is made using crystal ;)
<jhass> macros are a way to generate code, nothing more
<jhass> inline templates generating code essentially
<jhass> http://carc.in/#/r/4d4 besides their names, both classes have the same code here
daneb_ has joined #crystal-lang
daneb has quit [Read error: Connection reset by peer]
<daneb_> ah!
<daneb_> jhass: does the inline code not bloat at more complex levels of code, or is that negligible given the optimisations that crystal will do, so if I coded it or you used a macro, the results would be similar?
<jhass> the latter, yeah
<jhass> it's literally generating code and feeding it back into the parser
<daneb_> thanks jhass for taking the time to explain ;)
<jhass> the code that's generated is exactly the same, all the {% %} and {{ }} stuff is evaluated at compile time and gone once macro expansion is done
daneb_ has quit [Remote host closed the connection]
daneb has joined #crystal-lang
unshadow has quit [Quit: leaving]
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
datanoise has joined #crystal-lang
orliesaurus has quit [*.net *.split]
emmanueloga has quit [*.net *.split]
ytti has quit [*.net *.split]
orliesaurus has joined #crystal-lang
fowlduck has joined #crystal-lang
emmanueloga has joined #crystal-lang
fowlduck has quit [Ping timeout: 272 seconds]
datanoise has quit [Ping timeout: 264 seconds]
unshadow has joined #crystal-lang
<unshadow> Anyone got some expireance with the XML module ? I'm trying to get everything under appSettings --> http://carc.in/#/r/4f0
<jhass> well, that it segfaults is clearly a bug
<unshadow> jhass: yeha, I'll open an issue, but aside from that, is there a doc or just go read the specs ? ;)
<jhass> but you can just .xpath("/configuration/appSettings")
<unshadow> jhass: Oh... true Thanks :)
<unshadow> jhass: well, it seems that xpath returns a String, so I cant manipulate the data
<unshadow> maybe I shoud XML.parse the returned value
<jhass> you still puts the result, right?
<jhass> use p, not puts ;)
<jhass> (or pp)
<unshadow> jhass: ohhh stupid me
<unshadow> hahah thanks
datanoise has joined #crystal-lang
datanoise has quit [Ping timeout: 246 seconds]
daneb_ has joined #crystal-lang
daneb has quit [Read error: Connection reset by peer]
<unshadow> ok.. I never really used XML so maybe i'm trying it wrong, how can I change\update on of the key = value pairs ?http://carc.in/#/r/4fs
havenwood has joined #crystal-lang
<jhass> doesn't look like the modifying stuff is mapped out yet :/
fowlduck has joined #crystal-lang
<unshadow> we really need someone to start a Nokogiri like project in crystal
<jhass> I'd love to see something like oga actually
ponga has joined #crystal-lang
fowlduck has quit [Ping timeout: 248 seconds]
<jhass> libxml2's development appears to be pretty dead, no XPath 2, Nokogiri's CSS support is all just transforming them to XPaths etc.
<daneb_> *two thumbs up for oga*
<daneb_> so about that unshadow, a port by Friday? ;)
<unshadow> it loos really nice :) maybe we can tell this @YorickPeterse guy about crystal, he might want to help out ;)
<unshadow> daneb_: hahah yeha right XD I'm currently doing full time job helping Codcore makeing Ametheyst a great Web Framewrok
<daneb_> unshadow: awesome!! Would one consider this to equal a kind of padrino? And will it be supporting websockets?
daneb_ is now known as daneb
<unshadow> daneb: well, padrino is based on Sinatra, while Amethyst is based on Rails (kind of) you can take a look an help out :) https://github.com/Codcore/Amethyst
<unshadow> also the project chat channel is on gitter (https://gitter.im/Codcore/Amethyst)
<jhass> unshadow: yes, that
<daneb> unshadow: thank you
<jhass> and I already tried to convince yorick to do it :P
<daneb> jhass: ha ha that was quick :)
<jhass> huh? no, some time ago already
<daneb> jhass: oh, and so I assume he said no.....
<jhass> well, he's pro parser generator, crystal is contra parser generator, he has his own pet language...
<strcmp1> jhass, what do you think of oga
bcardiff has joined #crystal-lang
<jhass> I think it's cool
<jhass> hence I suggested to do something like that instead of a libxml2 binding
<strcmp1> omfg js has me so confused right now
icezimm has joined #crystal-lang
icezimm has quit [Quit: Leaving.]
isjaylee1 has joined #crystal-lang
NeverDie has joined #crystal-lang
<wmoxam> jhass: ok, thanks
isjaylee1 has left #crystal-lang [#crystal-lang]
<crystal-gh> [crystal] asterite pushed 1 new commit to master: http://git.io/vLQPc
<crystal-gh> crystal/master 13f99f1 Ary Borenszweig: Fixed #840: XML document namespace (and others) should be nil
asterite has joined #crystal-lang
<asterite> Maybe we should try gitter. It's free, you enter the github project's chat page very fast (no need for an irc client, you can do it from your browser) and it seems to have some nice goodies
<jhass> do what you want, but you won't get me over
<jhass> kiwiirc.com and irccloud.com are two popular alternative webclients if it's about that
<asterite> In fact I'm using a web client right now, I'm having issues with desktop clients from my home (don't know why and lazy to find why)
<asterite> I'm using webchat.freenode.net
<jhass> thing is I would never want to use a web client for this type of communication, my IRC client is highly customized to it
<jhass> and no, gitters IRC bridge is not an option, it's by design a crutch
<jhass> and I don't even blame them for that
datanoise has joined #crystal-lang
<strcmp1> asterite, you're on OSX right? if you want a friendly IRC client, try limechat.
<strcmp1> i also prefer IRC over gitter although i havent tried gitter yet tbh, because IRC is just fine, some projects have both.
asterite1 has joined #crystal-lang
asterite1 has quit [Client Quit]
<asterite> Cool, let me try it
<jhass> I also think the target audience is quite different
<jhass> IRC is still 60-70% user support while gitter seems 90% collaborator communication
<jhass> and I'm here for the former
<strcmp1> meh, i wouldn't categorize either like that but fine :P
<jhass> well, I tried to make it a relative statement with those percentages coming from my ass ;)
<strcmp1> lol
<asterite> :-D
<unshadow> asterite: Gitter !!! I tried to tell jhass to move but he is too stuborn
<asterite> Well, but it's true that we need a good reason to have yet another communication channel
<unshadow> asterite: gitter is more for a development chat, it's really nice with the code parsing, github integration etc ..
<unshadow> you should check out https://gitter.im/Codcore/Amethyst
<unshadow> it's really fun working with it
<unshadow> (also it has a client for linux)
<unshadow> and windows, and android, and mac , and iphone etc.. etcc.
<jhass> let me guess, they're all just webviews
<unshadow> jhass: you can see aur/gitter 2.3.2-3
<jhass> the another communication channel argument is a strong one btw, that's the main reason we rejected it at diaspora https://www.loomio.org/d/BqojmUEy/try-out-gitter-im-the-new-chat-for-github-users
fowlduck has joined #crystal-lang
fowlduck has quit [Ping timeout: 248 seconds]
<unshadow> jhass: I went over this post, it seems that most of the argument is "supporting regular users who has no github accounts", well, I can relate to that, but, I did see no one actually tried it, which is quite a shame
<unshadow> knowing the alternatives is what brought me to Crystal from Ruby, it nice to see what else is out there
<jhass> not saying it fully applies here, hence why I didn't bring it up myself
<strcmp1> gitter has an IRC bridge too, so thats a +1
<jhass> I bet it's as good as slacks
<strcmp1> =]
<jhass> which is hated by everybody that mentioned that they use it and only used because running another client is worse
<strcmp1> i use slack through irc and yup its crap, i mean you dont see anything bots say for one.
<strcmp1> there's notification bots or w/e, they're totally absent in the irc bridge.
<jhass> for me it's that I have no reason to swap an open protocol with 30 years of ecosystem with a proprietary one with vendor lock in, just for some fancy "we embed stuff and have emojis!"
<jhass> jeez, I mean we all escaped ICQ, didn't we?
<jhass> or AIM or whatever
<strcmp1> dont miss the emojis but github embeds is useful
<strcmp1> tbh if you find the right irc client you can probably have both :P
<jhass> ;)
<jhass> !enable GithubIssues
<DeBot> jhass: Enabled GithubIssues.
<jhass> #123
<DeBot> https://github.com/manastech/crystal/issues/123 (undefined method in proc)
<jhass> !disable GithubIssues
<DeBot> jhass: Disabled GithubIssues.
<jhass> it's not like we can't write integrations
<strcmp1> sure
bcardiff has quit [Quit: Leaving.]
daneb has quit [Remote host closed the connection]
unshadow has quit [Ping timeout: 250 seconds]
bcardiff has joined #crystal-lang
<crystal-gh> [crystal] asterite pushed 2 new commits to master: http://git.io/vL7ly
<crystal-gh> crystal/master 647ecc7 Ary Borenszweig: Added inline assembly support. Still missing clobbers and options.
<crystal-gh> crystal/master 2b239f5 Ary Borenszweig: Small codegen refactor to avoid repeating a superclass
waj has joined #crystal-lang
<travis-ci> manastech/crystal#2532 (master - 647ecc7 : Ary Borenszweig): The build passed.
asterite has quit [Quit: Page closed]
asterite has joined #crystal-lang
<thor77> jhass: huh, does your bot support plugin-reloading?
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
<jhass> configuration wise and per channel plugin activation
<jhass> no code (re)loading
asterite has quit [Ping timeout: 250 seconds]
NeverDie has joined #crystal-lang
shama has joined #crystal-lang
fowlduck has joined #crystal-lang
fowlduck has quit [Ping timeout: 248 seconds]
asterite has joined #crystal-lang
<asterite> what do you guys like about crystal?
<jhass> duck typing in a compiled language & compile time dynamism/meta programming capabilities
<jhass> & familiar syntax for the rubyist
jua_ has joined #crystal-lang
<BlaXpirit> "duck typing in a compiled language" is pretty much it L|
<BlaXpirit> :|
<BlaXpirit> oh, asteritе is using a client now
<jhass> yeah, I think it was an elaborate "test" message :P
<BlaXpirit> :D
<BlaXpirit> well, there are a lot of things I like but nothing stands out as much
<BlaXpirit> does LLVM have an... uhh... VM?
<BlaXpirit> shouldn't compile-time code execution be possible?
<jhass> LLVM has a JIT
<jhass> but you can't just throw an IR into it afaik
<jhass> *any
<havenwood> asterite: Speed of course and ease of deployment is another big draw. I like the modern, relevant standard library and that I felt productive immediately as a Rubyist.
<asterite> Thanks :-)
vikaton has joined #crystal-lang
daneb has joined #crystal-lang
<ponga> i know if im missing , but i don't see a link to http://crystal-lang.org/api from http://crystal-lang.org/ top url
<ponga> is it intended
<ponga> i only see an icon to /doc
<jhass> asterite's afraid of editing the homepage :P
unshadow has joined #crystal-lang
waj_ has joined #crystal-lang
waj has quit [Ping timeout: 244 seconds]
waj_ is now known as waj
<ponga> lol
tkrajcar_ has joined #crystal-lang
tkrajcar has quit [Quit: leaving]
tkrajcar_ is now known as tkrajcar
bcardiff1 has joined #crystal-lang
bcardiff has quit [Ping timeout: 255 seconds]
yopp has joined #crystal-lang
<yopp> hey
<yopp> as far I understand there still no support from arm?
<yopp> •for
<jhass> yopp: yeah, some are exploring but nothing landed yet
<yopp> :(
dhruv has joined #crystal-lang
<yopp> On the kalman filter it's like 7 times faster than mri
<dhruv> Are there any synchronization primitives like locks in Crystal?
<jhass> dhruv: pthread's mutex is mapped out and available as Mutex
<jhass> I got read write lock mapped out here https://github.com/jhass/DeBot/blob/master/thread/src/thread/read_write_lock.cr, among other things
<jhass> though since 0.7 you want to do most stuff with Channel's I guess
waj_ has joined #crystal-lang
waj has quit [Ping timeout: 256 seconds]
waj_ is now known as waj
Codcore has joined #crystal-lang
<Codcore> where can I read which methods can I call on ArrayLiteral in macroses?
fowlduck has joined #crystal-lang
unshadow has quit [Ping timeout: 248 seconds]
fowlduck has quit [Ping timeout: 248 seconds]
<Codcore> jhass, thanks, for some reason I didn't find it in search, thanks! Do you ever have a rest? ;)
<jhass> I guess at the same time as you do ;)
dhruv has quit [Quit: Leaving]
dhruv has joined #crystal-lang
waj has quit [Quit: waj]
bcardiff has joined #crystal-lang
bcardiff1 has quit [Ping timeout: 256 seconds]
<yopp> hum
<yopp> how I can make array of T's?
<yopp> I'm trying to make an [[Time, Float64]] array
<yopp> for a data buffer
<asterite> yopp: it's also documented here: http://crystal-lang.org/api/index.html#http%3A//crystal-lang.org/api/Macros.html
<yopp> um
<yopp> where? :(
<asterite> I mean, the macro methods
<asterite> [] of Time | Float64
<yopp> ah, snap
<yopp> thanks! :)
<yopp> other questions: function might return (Symbol | {Time, Float64})
<yopp> and I have
<yopp> case data
<yopp> when :empty, :comment, :bad_format
<yopp> stats[type] =+ 1
<yopp> tr/type/data/
<yopp> how I can tell crustal that data in this case definitely will be a Symbol?
<jhass> if it's a symbol, is it possible that it has other values besides the ones you listed?
harisamin has joined #crystal-lang
<yopp> in this branch — nope
<yopp> •condition branch
<jhass> I'd just when Symbol then
<jhass> that should resolve the union
fowlduck has joined #crystal-lang
<yopp> but it still complains: no overload matches 'Hash(Symbol, Int32)#[]=' with types (Symbol | {Time, Float64}), Int32
<jhass> oh, right, you case on data but use type
<jhass> then nvm that and if type.is_a? Symbol
jua_ has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
<yopp> aha
<yopp> thanks!
jua_ has joined #crystal-lang
bcardiff1 has joined #crystal-lang
bcardiff has quit [Ping timeout: 252 seconds]
flaviu has joined #crystal-lang
vikaton has quit [Quit: Connection closed for inactivity]
havenwood has quit [Ping timeout: 256 seconds]
<yopp> um
<yopp> "string".gsub(/\0*\s*/, "") and crystal is done :)
luislavena has joined #crystal-lang
<jhass> >> "string".gsub(/0*\s*/, "")
<DeBot> jhass: Sorry, that took too long. - http://carc.in/#/r/4s1
<jhass> mmh
<jhass> seems fixed in HEAD ;)
<yopp> Execution timed out.? :)
<jhass> yeah
<yopp> but anyway, I've dropped an issue just in case :)
<yopp> is it possible to get HEAD with a just homebrew?
daneb has quit [Remote host closed the connection]
<jhass> yopp: just clone the repo and call make I guess
daneb has joined #crystal-lang
luislavena has quit []
<yopp> hah
<yopp> It's 2015 and \0 still breaking a lot of stuff :B
<yopp> okay, I'll try whitelist approach then
<yopp> but that's really strange, it works without quantifier :)
<yopp> >> "string".gsub(/\0\s*/, "")
<DeBot> yopp: # => "string" - http://carc.in/#/r/4s6
<yopp> yeah
daneb has quit [Remote host closed the connection]
<yopp> >> "str\0ing".gsub(/\0\s*/, "")
<DeBot> yopp: # => "string" - http://carc.in/#/r/4s7
<yopp> >> "str\0ing".gsub(/\0+\s*/, "")
<DeBot> yopp: # => "string" - http://carc.in/#/r/4s8
<yopp> huh
veelenga has quit [Quit: Page closed]
daneb has joined #crystal-lang
<crystal-gh> [crystal] bcardiff pushed 1 new commit to master: http://git.io/vLdPp
<crystal-gh> crystal/master 7978cf3 Brian J. Cardiff: remove fs from std
ponga has quit [Quit: Connection closed for inactivity]
harisamin has quit [Ping timeout: 248 seconds]
bcardiff1 has quit [Quit: Leaving.]
<travis-ci> manastech/crystal#2533 (master - 7978cf3 : Brian J. Cardiff): The build passed.
<asterite> Note that the \0 , at least for regex, is already fixed in master (if I remember well)
dhruv has quit [Remote host closed the connection]
<crystal-gh> [crystal] asterite pushed 1 new commit to master: http://git.io/vLdQx
<crystal-gh> crystal/master 149c92b Ary Borenszweig: Clobbers and options in inline asm
<jhass> asterite: yeah as said doesn't repro with the latest compiler for me
<asterite> Yes, sorry, I didn't read it all before commenting :(
<crystal-gh> [crystal] asterite pushed 1 new commit to master: http://git.io/vLd7r
<crystal-gh> crystal/master 59e1423 Ary Borenszweig: Small fix for asm when using `::::` to just specify options
<jhass> nice work on the inline assembly, if I only could understand a thing about it :D
<asterite> I don't understand all of it, but it seems to work :-D
<asterite> but for now just translating to LLVM is enough ;-)
<jhass> hehe
asterite has quit []
BlaXpirit has quit [Quit: Quit Konversation]
dtscode has joined #crystal-lang
<dtscode> hey guys... I'm building crystal from source. How do I build it if I don't already have a crystal executable?
<jhass> dtscode: you'll have to obtain one
<jhass> what's your OS?
<dtscode> linux mint
<dtscode> thanks
<dtscode> Are the docs open source?
<jhass> sure
flaviu has quit [Ping timeout: 276 seconds]
<dtscode> Thanks again!
<jhass> yw
flaviu has joined #crystal-lang
<travis-ci> manastech/crystal#2534 (master - 149c92b : Ary Borenszweig): The build passed.
fowlduck has quit [Ping timeout: 276 seconds]
fowlduck has joined #crystal-lang
bcardiff has joined #crystal-lang
ddfreyne has quit [Ping timeout: 272 seconds]
ryanf has quit [Ping timeout: 264 seconds]
ryanf has joined #crystal-lang
ddfreyne has joined #crystal-lang
daneb has quit [Remote host closed the connection]
ryanf has quit [Ping timeout: 275 seconds]
<crystal-gh> [crystal] asterite pushed 1 new commit to master: http://git.io/vLFkP
<crystal-gh> crystal/master 0ec80e6 Ary Borenszweig: Use a single buffer for buffered IO
ryanf has joined #crystal-lang
Codcore has quit [Ping timeout: 246 seconds]
jua_ has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
<crystal-gh> [crystal] genericpenguin opened pull request #843: Fixed quoted cell not appending comma if cell is first in row. (master...master) http://git.io/vLFmY
<travis-ci> manastech/crystal#2536 (master - 0ec80e6 : Ary Borenszweig): The build passed.
<crystal-gh> [crystal] genericpenguin closed pull request #843: Fixed quoted cell not appending comma if cell is first in row. (master...master) http://git.io/vLFmY
havenwood has joined #crystal-lang
rocketfair has joined #crystal-lang
tkrajcar has left #crystal-lang [#crystal-lang]
shama has quit [Quit: (╯°□°)╯︵ɐɯɐɥs]