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.
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?
<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
<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…]
<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>
<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.
<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 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> 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]