RX14 changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.21.0 | Fund Crystal's development: http://is.gd/X7PRtI | Paste > 3 lines of text to https://gist.github.com | GH: https://github.com/crystal-lang/crystal | Docs: http://crystal-lang.org/docs/ | API: http://crystal-lang.org/api/ | Logs: http://irclog.whitequark.org/crystal-lang
<jeromegn> hey there
mounibec has quit [Ping timeout: 268 seconds]
onionhammer has quit [Ping timeout: 245 seconds]
soveran has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]
soveran has quit [Ping timeout: 260 seconds]
Svenskunganka has joined #crystal-lang
Svenskunganka has quit [Ping timeout: 240 seconds]
<jeromegn> I'm confused as to why I'd sometimes get 2 packets from a UDPSocket#receive call. it uses LibC's `recvfrom` which only reads one packet. I do use a spawn right after the `#receive` returns though (so as to listen for the next one.)
<jeromegn> nevermind, I think this is an issue with the thing that's sending datagrams through that socket
Svenskunganka has joined #crystal-lang
Svenskunganka has quit [Ping timeout: 255 seconds]
mgarciaisaia has joined #crystal-lang
mgarciaisaia1 has joined #crystal-lang
mgarciaisaia has quit [Ping timeout: 255 seconds]
soveran has joined #crystal-lang
soveran has quit [Ping timeout: 268 seconds]
mgarciaisaia has joined #crystal-lang
mgarciaisaia1 has quit [Ping timeout: 255 seconds]
mgarciaisaia has quit [Quit: Leaving.]
soveran has joined #crystal-lang
soveran has quit [Ping timeout: 240 seconds]
Guest92924 has quit [Remote host closed the connection]
msg has joined #crystal-lang
msg is now known as Guest23125
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
Guest23125 has quit [Remote host closed the connection]
msg has joined #crystal-lang
msg is now known as Guest56447
Guest56447 has quit [Ping timeout: 268 seconds]
akwiatkowski has joined #crystal-lang
bjz has joined #crystal-lang
soveran has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]
Svenskunganka has joined #crystal-lang
snsei has quit [Remote host closed the connection]
akwiatkowski has quit [Ping timeout: 260 seconds]
msg has joined #crystal-lang
msg is now known as Guest62623
<Yxhuvud> the network in between may also split packages if they are big.
<Yxhuvud> or wait, UDP? never mind :P
bjz_ has joined #crystal-lang
bjz has quit [Ping timeout: 260 seconds]
Qchmqs has joined #crystal-lang
Qchmqs has quit [Client Quit]
Qchmqs has joined #crystal-lang
Qchmqs has quit [Quit: Konversation terminated!]
Qchmqs has joined #crystal-lang
snsei has joined #crystal-lang
<FromGitter> <schoening> Hmm
<FromGitter> <schoening> How come I get a *unterminated parenthesized expression* error in this simple function? ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=58abf502872fc8ce6262d8f5]
snsei has quit [Ping timeout: 260 seconds]
Guest62623 has quit [Remote host closed the connection]
akwiatkowski has joined #crystal-lang
rafadc has joined #crystal-lang
mark_66 has joined #crystal-lang
akwiatkowski has quit [Ping timeout: 240 seconds]
akwiatkowski has joined #crystal-lang
<FromGitter> <schoening> Okay.. so I just learned that I should not add the '@' sign to method calls inside a class :P
bjz_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bjz has joined #crystal-lang
bjz_ has joined #crystal-lang
bjz has quit [Ping timeout: 255 seconds]
gloscombe has joined #crystal-lang
<jokke> ups
<jokke> wrong channel :)
bjz_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bjz has joined #crystal-lang
rafadc has quit [Ping timeout: 240 seconds]
Guest93697 has joined #crystal-lang
bjz_ has joined #crystal-lang
bjz has quit [Ping timeout: 260 seconds]
Guest93697 has quit [Ping timeout: 260 seconds]
Svenskunganka has quit [Quit: leaving]
olek_poz has joined #crystal-lang
akwiatkowski has quit [Ping timeout: 260 seconds]
rafadc has joined #crystal-lang
Raimondii has joined #crystal-lang
Raimondi has quit [Ping timeout: 268 seconds]
Raimondii is now known as Raimondi
snsei has joined #crystal-lang
snsei has quit [Ping timeout: 260 seconds]
bjz has joined #crystal-lang
bjz_ has quit [Ping timeout: 260 seconds]
jojo2210 has joined #crystal-lang
msg has joined #crystal-lang
msg is now known as Guest66382
<FromGitter> <josephljohnston_twitter> I'm no systems programmer, but I love the way Crystal is self-hosted and I'd like to learn about how it functions on the lower levels. The src/lib_c directory contains a lot of architecture specific code. What is this for? I thought the idea of an LLVM backend is the compiler outputs LLVM IR to some file and then invokes LLVM to take it from there. I'm not only curious about src/lib_c, but also src/llvm,
<FromGitter> ... particularly the C++ file llvm_ext.cc. If LLVM is supposed to handle the backend, why does any of this code pertaining to architectures exist?
rafadc_ has joined #crystal-lang
Kug3lis has joined #crystal-lang
rafadc has quit [Ping timeout: 240 seconds]
<FromGitter> <schoening> @jokke regarless of wrong channel, that is awesome!
<FromGitter> <asterite> @josephljohnston_twitter Unfortunately LLVM doesn't abstract you from C ABI details :(
<FromGitter> <josephljohnston_twitter> @asterite Can you give me or point me towards more info? Does this mean all that code is dedicated to communicating with external C functions? Or is some of it dedicated to general compilation?
jojo2210 has quit [Quit: Page closed]
rafadc_ has quit [Quit: Bye!]
soveran has quit [Remote host closed the connection]
soveran has joined #crystal-lang
rafadc has joined #crystal-lang
<FromGitter> <rishavs> can someone tell me how templating works? will it create the htmls at compile time or will it generate html on each server request?
snsei has joined #crystal-lang
snsei has quit [Ping timeout: 255 seconds]
onec has quit [Remote host closed the connection]
Qchmqs has quit [Quit: Konversation terminated!]
<FromGitter> <asterite> @josephljohnston_twitter About your questions: 1. LLVM provides you a way to invoke C functions, but C functions vary between operating systems so that's why we have src/lib_c that is different for each platform. Then llvm_ext.cc is there because the LLVM C API (how LLVM gives you access to its funcionality via C) is missing some stuff, so we added it. Then there's the issue with machine ABI, like x86, arm, x86-64, aarch64, etc.,
<FromGitter> ... which is how arguments are passed in function calls (use the stack? use registers?). So LLVM only abstract you from learning assembly, more or less
<FromGitter> <schoening> Can I clear the terminal with some command? puts clear_terminal :p ?
<FromGitter> <sdogruyol> @RX14 are you here
<RX14> just about
<FromGitter> <sdogruyol> @RX14 HTTP::FormData.parse doesn't yield meta or contain something like that in Crystal 0.21.0
<FromGitter> <sdogruyol> is there are specific reason why you removed that?
<jokke> @schoening :)
<RX14> because all the fields are on part itself
<RX14> i moved all the meta fields into part
<FromGitter> <sdogruyol> i see
<FromGitter> <sdogruyol> i'm trying to keep the API compatability in Kemal
<RX14> well I would advise you to not do that
<FromGitter> <sdogruyol> why?
<RX14> it's best to stick close to the stdlib
<RX14> you can't really provide "no breaking changes" when neither the stdlib or compiler provides "no breaking changes"
<RX14> I eventually want to provide a helper on Part which writes the whole file to a tempfile and returns the path
<RX14> annyway, got to go now sorry
<FromGitter> <sdogruyol> @RX14 see you, thanks :+1:
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Guest66382 has quit [Remote host closed the connection]
Nouv has joined #crystal-lang
rafadc_ has joined #crystal-lang
rafadc has quit [Ping timeout: 260 seconds]
msg has joined #crystal-lang
msg is now known as Guest81777
mark_66 has quit [Read error: Connection reset by peer]
mark_66 has joined #crystal-lang
<Nouv> What is context called? Like when you do "loop do |context|", what is the syntax called containing context?
<FromGitter> <sdogruyol> block?
<Nouv> Or for example the http_server doc page has `HTTP::Server.new(8080) do |context|`
<FromGitter> <sdogruyol> yeah
<Nouv> So the value inside of || is what is yielded by the method?
<FromGitter> <sdogruyol> yeah that's
snsei has joined #crystal-lang
<Nouv> sdogruyol: thanks!
<FromGitter> <sdogruyol> np
<Nouv> Why are there so many ??s in this error message: https://bpaste.net/show/b89b8469a9d6 ?
<FromGitter> <sdogruyol> it's probably not compiled with --debug
<Nouv> I get the same response when doing `crystal run -d myprog.cr`
Kilobyte22 has quit [Quit: ZNC - 1.6.0 - http://znc.in]
Kilo`byte has joined #crystal-lang
<FromGitter> <sdogruyol> well the error is understandable but the stacktrace can be improved for sure
<FromGitter> <mverzilli> nouv are you on Mac?
<Nouv> mverzilli: I am indeed, why?
<FromGitter> <mverzilli> after compiling with debug, try "dsymutil --flat myprog" and then run again
Kilo`byte has quit [Client Quit]
Kilo`byte has joined #crystal-lang
<Nouv> I'm getting "can't use `myprog` as output filename because it's a directory" ... but the directory was created by default when I did `crystal init`?
olek_poz has quit [Ping timeout: 260 seconds]
<FromGitter> <mverzilli> sorry, I was assuming your executable was called myprog
<FromGitter> <mverzilli> `crystal build --debug foo.cr`
<FromGitter> <mverzilli> then `dsymutil --flat foo`
<FromGitter> <mverzilli> then `./foo`
<Nouv> My file is called irc.cr. When I do `crystal build --debug irc.cr` I get "Error: can't use `irc` as output filename because it's a directory"
<Nouv> Not sure where I screwed this up
<FromGitter> <mverzilli> maybe just `cd..` and then `crystal build --debug src/irc.cr`
<Nouv> mverzilli: that works, thanks
<Nouv> Yeah after running dsymutil it fixes the error messages. Why is that?
<FromGitter> <mverzilli> ok, fasten your seatbelt and read this: https://github.com/crystal-lang/crystal/pull/3303
<FromGitter> <crisward> @sdogruyol looks like v0.21.0 is going to create a kemal v0.18.1
<Nouv> mverzilli: Most of this goes over my head
<FromGitter> <mverzilli> don't worry, I know the feeling :)
<Nouv> mverzilli: Can you say any obvious flaws in this code? https://dpaste.de/pHoS
<Nouv> It's resulting in the error I posted earlier
<FromGitter> <mverzilli> I'm not sure, but trying the same sequence with telnet I get "Connection closed by foreign host", which is kind similar to the "connection reset by peer" that we're getting from Crystal
<FromGitter> <mverzilli> are you sure the port is right and it is ok to send a blank PASS?
<Nouv> mverzilli: hm, I assumed so because I was following the RFC
<Nouv> Thanks though, didn't think to try it manually
<FromGitter> <mverzilli> I think the port is 6667
<FromGitter> <mverzilli> and for a blank password you have to send "PASS none"
<FromGitter> <mverzilli> yeah
<FromGitter> <mverzilli> if you change those two things the code works
<Nouv> mverzilli: Ahh, thank you!
Kug3lis has quit [Ping timeout: 240 seconds]
rafadc_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nouv_testing has joined #crystal-lang
nouv_testing has quit [Remote host closed the connection]
dannyAAM has quit [Ping timeout: 240 seconds]
<Nouv> How do I get user input? I can't see it under IO anywhere
dannyAAM has joined #crystal-lang
Kug3lis has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
Kug3lis has quit [Client Quit]
Kug3lis has joined #crystal-lang
rafadc has joined #crystal-lang
Kug3lis has quit [Client Quit]
<jeromegn> @Nouv just `gets` will read from STDIN
<Nouv> jeromegn: Thank you!
soveran has quit [Remote host closed the connection]
mgarciaisaia has joined #crystal-lang
Kug3lis has joined #crystal-lang
mgarciaisaia has quit [Quit: Leaving.]
Kug3lis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mounibec has joined #crystal-lang
mounibec has quit [Client Quit]
mounibec has joined #crystal-lang
tzekid has joined #crystal-lang
mounibec has quit [Max SendQ exceeded]
Nouv has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<FromGitter> <rishavs> guys, can i send a http patch request through normal HTML form? ⏎ like : `<form class="ui form" method="patch" action="/p/<%= data.id %>">`
Kug3lis has joined #crystal-lang
snsei_ has joined #crystal-lang
snsei has quit [Ping timeout: 255 seconds]
<FromGitter> <crisward> Pretty sure HTML only supports get and post
<FromGitter> <luislavena> @rishavs most of the browsers do not support anything other that GET, POST and HEAD in the method for form
<FromGitter> <rishavs> i spent my entire day on this T_T
<FromGitter> <luislavena> Rails and many frameworks allow it to work by hiding behind a POST and having a hidden attribute that indicates that really wants to perform a PATCH or PUT instead.
<FromGitter> <rishavs> <input type="hidden" name="_method" value="patch"/>
<FromGitter> <crisward> `<input type="hidden" name="_method" value="put" />`
<FromGitter> <rishavs> like that?
<FromGitter> <rishavs> ah!
<FromGitter> <crisward> yep - though you'll have to handle it yourself in kemal.
<FromGitter> <luislavena> not sure what framework you're using, but will suggest check the documentation for that support.
<FromGitter> <rishavs> kemal
<FromGitter> <rishavs> unfortunately, there are no examples on kemal
<FromGitter> <rishavs> but i am going through the source of the blog
<FromGitter> <rishavs> thats where i found that snippet
<FromGitter> <crisward> you can use patch, put etc with xhr requests. You'll just need a bit of js.
<FromGitter> <luislavena> @crisward @rishavs AFAIK kemal does handle `patch` via method override, but as always, check the source and the docs of the tools.
Guest81777 has quit [Ping timeout: 240 seconds]
tzekid has quit [Quit: Leaving]
<FromGitter> <crisward> @luislavena well spotted, didn't expect that!
<FromGitter> <crisward> Should check before I answer...!
msg has joined #crystal-lang
msg is now known as Guest53952
snsei_ has quit [Remote host closed the connection]
snsei has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Ping timeout: 260 seconds]
mark_66 has quit [Remote host closed the connection]
mgarciaisaia has joined #crystal-lang
rafadc has quit [Ping timeout: 255 seconds]
Kug3lis has quit [Ping timeout: 240 seconds]
mgarciaisaia has quit [Quit: Leaving.]
soveran has joined #crystal-lang
snsei has quit [Read error: Connection reset by peer]
Kug3lis has joined #crystal-lang
olek_poz has joined #crystal-lang
<FromGitter> <crisward> Just updated crystal to 0.21.0 with homebrew on mac getting the below error ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=58ac7989aa800ee52cc5f464]
<FromGitter> <crisward> MacOS 10.12.3
<FromGitter> <phoffer> I just spent a week fighting with that while using crenv. I uninstalled homebrew formulas for both crystal and libevent, reinstalled, and my homebrew crystal works
<FromGitter> <crisward> I've just switch back to crystal 0.20.5 for now, works fine.
Kug3lis has quit [Ping timeout: 240 seconds]
Kug3lis has joined #crystal-lang
snsei has joined #crystal-lang
Kug3lis has quit [Client Quit]
<FromGitter> <crisward> @phoffer I'll maybe try the re-install when kemal has updated, I have a feel the update may have broken some things
Kug3lis has joined #crystal-lang
mgarciaisaia has joined #crystal-lang
go|dfish has quit [Ping timeout: 260 seconds]
rafadc has joined #crystal-lang
gloscombe has quit [Quit: Lost terminal]
<crystal-gh> [crystal] Bew78LesellB opened pull request #4056: Add abstract unix socket handling (master...add-abstract-UNIX-socket-handling) https://git.io/vDABZ
Kug3lis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Kug3lis has joined #crystal-lang
Kug3lis has quit [Client Quit]
Kug3lis has joined #crystal-lang
Kug3lis has quit [Client Quit]
Kug3lis has joined #crystal-lang
Kug3lis has quit [Client Quit]
Kug3lis has joined #crystal-lang
Kug3lis has quit [Client Quit]
mgarciaisaia has left #crystal-lang [#crystal-lang]
soveran has quit [Remote host closed the connection]
Kug3lis has joined #crystal-lang
danielpclark has joined #crystal-lang
danielpclark has quit [Quit: Leaving]
<FromGitter> <drosehn> That's a problem that comes up with some recent homebrew upgrades. So far I've fixed it via cheating. What happens is some dynamic lib is upgraded to a new version, and some homebrew-related binary is referencing an older version which it has removed. (sometimes I've seen this happen with 'brew' itself). So I just go into /usr/local/opt/libevent/lib and create a symlink of the old version pointing to the new version.
<FromGitter> <drosehn> I'm kinda happy to hear that other people have run into it. I've been wondering why I seemed to be the only one which hit it.
<FromGitter> <rishavs> hi. does anyone have simple example of using controllers with kemal?
<FromGitter> <rishavs> currently, i have all logic and routing in a single large file and would love to know how to best restructure it.
Renich has joined #crystal-lang
<RX14> kemal doesn't support controllers iirc, and that's the main reason why i don't use it
<RX14> it doesn't feel scalable to me
<FromGitter> <sdogruyol> Kemal doesnt enforce you to do that
<FromGitter> <drosehn> (mind you, I do a bunch of other cheating with homebrew, so I assumed *that* cheating was causing the dylib problem)
<FromGitter> <sdogruyol> @RX14 so you assume having controllers is scalable?
<FromGitter> <Rinkana> Easier to maintain
<FromGitter> <sdogruyol> BTW i just released Kemal 0.18.1 https://twitter.com/crystalkemal/status/834125675015598080
<FromGitter> <Rinkana> And almost every webdev knows how to use them
<FromGitter> <sdogruyol> @Rinkana that depends on your background
<RX14> being able to mount a "chunk of routes" on a specific path is really useful
<FromGitter> <sdogruyol> and not necessarily
snsei has quit [Remote host closed the connection]
<FromGitter> <dreyks> as far as i understand kemal positions itself as a lightweight framework akin to sinatra, which also does not have "controllers". so those who want them will have to wait till rails emerge in crystal ;)
<FromGitter> <rishavs> well, i am going with just throwing the route/logic data for each model in a separate file and then requiring them in order. Not elegant but at least i'll have structured code.
soveran has joined #crystal-lang
soveran has quit [Changing host]
soveran has joined #crystal-lang
Kug3lis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
soveran has quit [Ping timeout: 260 seconds]
snsei has joined #crystal-lang
A124 has quit [Quit: '']
A124 has joined #crystal-lang
A124 has quit [Client Quit]
snsei has quit [Remote host closed the connection]
soveran has joined #crystal-lang
soveran has quit [Changing host]
soveran has joined #crystal-lang
snsei_ has joined #crystal-lang
A124 has joined #crystal-lang
snsei_ has quit [Remote host closed the connection]
snsei has joined #crystal-lang
<FromGitter> <Rinkana> Has anyone experienced an issue where you define abstract methods, implement them but the compiler still says that it's not implemented. But when you remove the abstract def and call the method it works fine
snsei has quit [Remote host closed the connection]
<FromGitter> <Rinkana> Argh, found it. It was a yield inside the function
<FromGitter> <Rinkana> However the abstract method did not require a &block
<FromGitter> <dreyks> a nice addition would be if compiler would say "found a similar abstract method". like capybara matchers do. or like the did_you_mean ruby gem
<FromGitter> <bcardiff> The compiler already suggest similar methods, maybe it lacks of check whether a block was given or not. If that the case it could be added: -- hey there is a missing block. -- hey you need to give a block ass well.
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
Renich has quit [Quit: leaving]
bjz has joined #crystal-lang
snsei has joined #crystal-lang
zaiste has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
zaiste has quit [Client Quit]
A124 has quit [Quit: '']
A124 has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
eillos has joined #crystal-lang
<eillos> heya :)
<FromGitter> <schoening> hello
<FromGitter> <schoening> My god.. Error messages are just.. amazing
<FromGitter> <schoening> **The struct Node has, either directly or indirectly, ⏎ an instance variable whose type is, eventually, this same ⏎ struct. This makes it impossible to represent the struct ⏎ in memory, because the size of this instance variable depends ⏎ on the size of this struct, which depends on the size of ... [https://gitter.im/crystal-lang/crystal?at=58acac7921d548df2c3d8ff6]
<FromGitter> <schoening> That is pretty darn helpful
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Guest53952 has quit [Remote host closed the connection]
msg has joined #crystal-lang
msg is now known as Guest86230
Guest86230 has quit [Remote host closed the connection]
snsei has quit [Remote host closed the connection]
rafadc has quit [Ping timeout: 260 seconds]
rafadc has joined #crystal-lang
<FromGitter> <crisward> @sdogruyol Damn you're quick...! Will check it out tomorrow. Looking forward to see what's happening with the file upload api. Managed to keep it the same?
<FromGitter> <sdogruyol> @crisward it's pretty much the same :)
<FromGitter> <crisward> That's cool, but I'm guessing one less dependency. Really liking the way the standard library keeps dependencies small. Coming from using node where it's not uncommon to have thousands of nested dependencies.
<FromGitter> <sdogruyol> yeah i've seen that
<FromGitter> <sdogruyol> npm install -g world
<FromGitter> <sdogruyol> lol
<FromGitter> <dreyks> talking about left_pad :)
<Papierkorb> or the all time favorite is_array
<Papierkorb> function isArray(){ "who knows?!" }
eillos has quit [Read error: Connection reset by peer]
soveran has quit [Remote host closed the connection]
msg has joined #crystal-lang
msg is now known as Guest33828
rafadc has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
snsei has joined #crystal-lang
rafadc has joined #crystal-lang
rafadc has quit [Read error: Connection reset by peer]
rafadc has joined #crystal-lang
snsei has quit [Ping timeout: 260 seconds]
Guest33828 has quit [Remote host closed the connection]
greengriminal has joined #crystal-lang
olek_poz has quit [Ping timeout: 260 seconds]
greengriminal has quit [Quit: This computer has gone to sleep]
soveran has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]
soveran has quit [Ping timeout: 260 seconds]