00:02
sorbo_ has joined #crystal-lang
00:16
trapped has quit [Read error: Connection reset by peer]
00:20
azgil has joined #crystal-lang
00:20
<
azgil >
hi, i have error
00:20
<
azgil >
Syntax error in ./src/controllers/forum_controller.cr:4: expecting token ')', not ','
00:20
<
azgil >
mforums_threads = Hash(Int32, [] of {Int32, Int32, String}).new
00:21
<
azgil >
is possible decalre hash with int32 as key and value as array of{int32...}
00:21
<
azgil >
if i remove '[]' code is working
00:22
<
BlaXpirit >
azgil, you must specify a type
00:22
<
BlaXpirit >
azgil, [] of Something is code to make a new array
00:22
<
BlaXpirit >
Array(Something) is the type
00:23
<
BlaXpirit >
you want Hash(Int32, Array({Int32, Int32, String})).new
00:29
<
azgil >
can't dinf in doc how add subarray to array
00:29
<
azgil >
can't find in doc how add subarray to array
00:29
<
azgil >
i gett error in mforums_threads[mf[0]] += site_forum_threads
00:37
<
vikaton >
>> "hello".length
00:37
<
vikaton >
>> "hello".len
00:37
<
vikaton >
>> "hello".count
00:37
<
BlaXpirit >
>> "hello".size
00:37
<
vikaton >
why take out length?
00:37
<
BlaXpirit >
vikaton, they took away all aliases
00:38
<
vikaton >
whats the reason?
00:39
<
BlaXpirit >
search for it
00:40
<
BlaXpirit >
ugh even i cant find it
00:40
<
BlaXpirit >
github search is totally useless
00:43
<
vikaton >
all my code is broken since 0.7.1 :)))))))))))
00:44
<
jhass >
yes and the next bigger version will break it all over again
00:46
* CompanionCube
is tempted to paraphrase the borg regarding that
00:53
<
CompanionCube >
vikaton, I agree with you :)
00:56
<
vikaton >
azgil, what lib r u using?
00:58
<
vikaton >
I'm using Moonshine atm but it's breaking :(
00:58
<
vikaton >
jhass, what big chnage is coming?
00:58
<
CompanionCube >
vikaton, more mandatory type annotations
00:58
<
jhass >
for instance variables
01:17
<
sorbo_ >
when is that landing?
01:21
<
jhass >
hard to say
01:25
<
azgil >
if request from browser , all id ok
01:45
lokulin has joined #crystal-lang
01:45
lokulin has quit [Changing host]
02:58
joedrl has joined #crystal-lang
03:02
joedrl has quit [Client Quit]
03:05
fowlduck has joined #crystal-lang
03:09
fowlduck has quit [Ping timeout: 245 seconds]
03:18
A124 has quit [Quit: '']
04:36
azgil has quit [Quit: Leaving]
04:48
<
crystal-gh >
[crystal] rmosolgo opened pull request #1928: Add Int#popcount from LLVM intrinsic (master...int-popcount)
http://git.io/vRgqQ
05:18
sorbo_ has quit [Remote host closed the connection]
05:24
sorbo_ has joined #crystal-lang
05:28
sorbo_ has quit [Remote host closed the connection]
06:28
sorbo_ has joined #crystal-lang
06:33
sorbo_ has quit [Ping timeout: 260 seconds]
06:36
emancu_ has quit []
07:33
CompanionCube has quit [Ping timeout: 264 seconds]
07:48
fowlduck has joined #crystal-lang
07:58
fowlduck has quit [Remote host closed the connection]
08:30
sorbo_ has joined #crystal-lang
08:35
sorbo_ has quit [Ping timeout: 260 seconds]
08:59
fowlduck has joined #crystal-lang
09:03
fowlduck has quit [Ping timeout: 260 seconds]
09:59
BlaXpirit has quit [Quit: Bye]
10:00
BlaXpirit has joined #crystal-lang
10:31
sorbo_ has joined #crystal-lang
10:36
sorbo_ has quit [Ping timeout: 260 seconds]
10:49
fowlduck has joined #crystal-lang
10:54
fowlduck has quit [Ping timeout: 260 seconds]
10:56
CompanionCube has joined #crystal-lang
10:56
CompanionCube has quit [Changing host]
10:56
CompanionCube has joined #crystal-lang
11:10
trapped has joined #crystal-lang
11:10
trapped has quit [Client Quit]
11:21
trapped has joined #crystal-lang
11:32
sorbo_ has joined #crystal-lang
11:37
sorbo_ has quit [Ping timeout: 246 seconds]
11:55
<
jhass >
jwaldrip: the real definition is somewhere else I guess
11:55
<
jhass >
jwaldrip: but you should be able to just alias GraphQLAstNode = Void; or even Void*, if it's opaque you should have allocation functions for it hopefully
11:56
azgil has joined #crystal-lang
12:39
trapped has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
13:08
unshadow has joined #crystal-lang
13:13
trapped has joined #crystal-lang
13:19
ponga has joined #crystal-lang
13:23
trapped has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
13:31
trapped has joined #crystal-lang
13:39
justinmcp_ has joined #crystal-lang
13:40
bjmllr_ has joined #crystal-lang
13:40
trapped has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
13:41
salvor has joined #crystal-lang
13:41
wmoxam_ has joined #crystal-lang
13:43
justinmcp has quit [Quit: No Ping reply in 180 seconds.]
13:43
Keziolio- has joined #crystal-lang
13:43
Keziolio- is now known as Keziolio
13:45
unshadow has quit [Quit: leaving]
13:47
bjmllr_ has quit [Ping timeout: 260 seconds]
13:50
bjmllr_ has joined #crystal-lang
13:59
sdogruyol has joined #crystal-lang
13:59
wminor_ has joined #crystal-lang
13:59
wminor has quit [Ping timeout: 264 seconds]
14:06
trapped has joined #crystal-lang
14:06
sdogruyol has quit [Remote host closed the connection]
14:24
A124 has joined #crystal-lang
14:25
wminor__ has joined #crystal-lang
14:25
wminor_ has quit [Ping timeout: 264 seconds]
15:01
kulelu88 has joined #crystal-lang
15:01
kulelu88 has quit [Changing host]
15:01
kulelu88 has joined #crystal-lang
15:10
<
miketheman >
I've been trying poke at how to send UDP messages in a sane manner, and one of the problems I've been having that I cannot get this to run without having a UDP server on the other side.
15:10
<
miketheman >
since UDP is connectionless, it should "behave" in a manner of tossing the message to void, and if something is there to catch it, that's great, but if not, that shouldn't result in a connection error
15:11
<
jhass >
miketheman: seems to work locally, the sandbox just rejects (that kind of) network access
15:12
<
miketheman >
jhass: that makes sense, I guess.
15:13
<
miketheman >
jhass: so while I can't show the example on the sandbox, even if I run the same sample with a listener, `nc -l -u 127.0.0.1 8125` only a single payload is emitted
15:14
<
miketheman >
I was also trying to see if I could minimize the opening/closing of file descriptors for socket call, but I'll settle for getting the payloads through. :)
15:15
<
jhass >
mh, no idea
15:15
<
jhass >
I didn't toy much with UDP yet in C yet
15:15
<
jhass >
, not even in C yet
15:16
<
jhass >
if you have a C variant that works, it might be worth to compare the strace's
15:16
<
jhass >
though libevent will make them a bit harder to follow I guess
15:17
<
miketheman >
I think that my listener might not be a good representation, as I'm closing the socket. I'll try to work with a better "realish" listener before bugging again
15:18
<
jhass >
miketheman: mh, sure this isn't some interaction issue with netcat? if I run it twice with the same nc instance running I still only see a single payload
15:19
<
miketheman >
yeah, it might be netcat - yesterday I was able to see all payloads flow through, but that was using a different variant of my client that did connection tracking and bailed when there was no server
15:21
<
miketheman >
jhass: that seems to mirror the behavior I see on the client side
15:21
<
miketheman >
I wonder if I rescued the ICMP message (i.e DONT CARE!) and continued to send if it would work
15:22
<
jhass >
well, it already does continue to send
15:22
<
jhass >
idk enough about UDP :/
15:23
<
miketheman >
I'll continue to poke
15:23
<
miketheman >
thanks for the help!
15:23
<
miketheman >
oh, I had another q: is there anything out there on how to best read call traces?
15:24
<
jhass >
if your LLVM version is old enough you can generate debug symbols, which might give you filenames in it, I don't remember
15:27
<
jhass >
miketheman: mh, if I use netcat as client too, I can send multiple messages inside the same session to the netcat server but if I restart the netcat client it too gets rejected
15:27
<
jhass >
UDP is weird
15:27
<
jhass >
or nc is, idk
15:27
<
miketheman >
yes to both
15:47
sdogruyol has joined #crystal-lang
15:49
<
BlaXpirit >
sdogruyol, :o
15:50
<
BlaXpirit >
yeah that's no good for sure
15:50
<
BlaXpirit >
apt-get: command not found really?
15:50
<
jhass >
no idea what they broke this time
15:50
<
jhass >
but it must have broken at least half of the community supported languages
15:50
<
jhass >
yeah, I mean what?
15:50
<
BlaXpirit >
uh it says osx
15:51
<
BlaXpirit >
sdogruyol, why do u have osx
15:51
<
sdogruyol >
hold on
15:51
<
jhass >
sdogruyol: let's switch through the images, try sudo: false, sudo: required, sudo: true
15:51
<
jhass >
dist: trusty is also available
15:51
<
jhass >
but I think only with sudo: required, iirc
15:52
<
BlaXpirit >
but it's not easy to switch through images, doesnt that require commits?
15:52
<
sdogruyol >
os x shouldnt be there
15:52
<
sdogruyol >
let me check
15:53
<
BlaXpirit >
if in doubt check my travis.yml
15:54
<
sdogruyol >
trying to find it could oyu shared it
15:54
<
sdogruyol >
share it*
15:55
<
BlaXpirit >
srsly just remove osx
15:56
<
sdogruyol >
i wonder why os x fails
15:58
ponga has quit [Quit: Connection closed for inactivity]
15:58
trapped has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
15:58
<
BlaXpirit >
sdogruyol, did you have it before and did it just work?
15:59
<
sdogruyol >
not sure
15:59
<
jhass >
ugh, looks like I messed up the nightly
16:00
<
jhass >
Undetermined Error
16:00
<
jhass >
APT, helpful as fuck as always
16:00
<
jhass >
guess it doesn't follow redirects?
16:00
<
jhass >
so much for upgrading to HTTPS without having to interact with travis-build :/
16:00
<
BlaXpirit >
ah that's what it is
16:01
<
BlaXpirit >
ok so nightly is broken
16:01
<
BlaXpirit >
so it seems like osx is just ignored then?
16:01
<
sdogruyol >
lol seems so
16:01
<
jhass >
no, the earlier link was to the latest build
16:01
trapped has joined #crystal-lang
16:02
<
jhass >
sdogruyol: could you relaunch it please?
16:04
<
sdogruyol >
good job
16:10
<
BlaXpirit >
so now it succeeds in failing the tests :)
16:13
<
sdogruyol >
BlaXpirit: yeah they fail on nightly :)
16:17
sdogruyol has quit [Remote host closed the connection]
16:19
sdogruyol has joined #crystal-lang
16:34
trapped has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
16:36
trapped has joined #crystal-lang
17:05
fowlduck has joined #crystal-lang
17:09
fowlduck has quit [Ping timeout: 246 seconds]
17:18
danzilio has quit [Ping timeout: 264 seconds]
17:21
FLOOR_9_ has joined #crystal-lang
17:22
<
FLOOR_9_ >
good day
17:22
<
FLOOR_9_ >
strange, i couldn't find this channel in /list
17:22
FLOOR_9_ has quit [Read error: Connection reset by peer]
17:22
danzilio has joined #crystal-lang
17:23
FLOOR_9_ has joined #crystal-lang
17:24
<
FLOOR_9_ >
also some connection problems... argh
17:24
<
FLOOR_9_ >
how is it here?
17:25
greengriminal has joined #crystal-lang
17:28
<
FLOOR_9_ >
but i would like to say
17:28
<
FLOOR_9_ >
what a awesome language
17:29
<
FLOOR_9_ >
i love ruby and stopped using it because it wasn't fast enough for my needs
17:29
<
FLOOR_9_ >
then i went over to nodejs
17:30
<
FLOOR_9_ >
and then i saw crystal i was like WOOHA, this is awesome
17:30
<
FLOOR_9_ >
because when i was using ruby, i found myself constantly wondering, if ruby will ever achieve C like speed
17:31
<
FLOOR_9_ >
and most of the people i talked to (including irc) said, forget it, so i was disappointed for some time
17:32
<
FLOOR_9_ >
so all in all i really hope this is going to be great
17:36
A124 has quit [Remote host closed the connection]
17:40
sdogruyol has quit [Remote host closed the connection]
17:40
sdogruyol has joined #crystal-lang
17:41
<
crystal-gh >
[crystal] porras opened pull request #1929: Basic YAML generation (master...to-yaml)
http://git.io/vRaMv
17:42
lokulin has quit [Ping timeout: 264 seconds]
17:42
<
sdogruyol >
FLOOR_9_: you are in the right place
17:42
<
FLOOR_9_ >
feels good :D
17:42
<
sdogruyol >
FLOOR_9_: what do you do that requires so much speed?
17:43
<
sdogruyol >
not web
17:43
kulelu88 has left #crystal-lang ["Leaving"]
17:43
<
FLOOR_9_ >
yeah also web, because of node
17:43
greengriminal has quit [Quit: This computer has gone to sleep]
17:43
<
FLOOR_9_ >
i was working on a web api
17:44
<
FLOOR_9_ >
and was using ruby for some serverside scripting
17:44
<
sdogruyol >
FLOOR_9_: have you done web programming with crystal then
17:45
<
FLOOR_9_ >
no , i was testing a http server in crystal tho
17:45
<
FLOOR_9_ >
and benchmarking it with wrk
17:45
<
sdogruyol >
FLOOR_9_: it's pretty darn fast
17:46
<
FLOOR_9_ >
yeahi think i read somewhere 60k req/s
17:46
<
sdogruyol >
FLOOR_9_: if you use express or sinatra pretty familiar
17:46
<
FLOOR_9_ >
i was using sinatra actually
17:46
<
FLOOR_9_ >
yes that was the benchmark i saw
17:47
<
sdogruyol >
FLOOR_9_: good to hear
17:47
<
FLOOR_9_ >
funny enough that number 64986, is close to the maximum number of file descriptors
17:47
<
sdogruyol >
FLOOR_9_: actually the limit is the io not cpu
17:47
<
FLOOR_9_ >
well in unix systems, the OS has a limit
17:48
<
sdogruyol >
FLOOR_9_: yeah
17:48
<
sdogruyol >
FLOOR_9_: and also was tested on os x
17:48
<
FLOOR_9_ >
that's why the max allowed file disc on 1 ip adress is 65K
17:48
lokulin has joined #crystal-lang
17:48
<
sdogruyol >
FLOOR_9_: you can perform your own benchmarks and check the difference
17:49
<
FLOOR_9_ >
is it using the native http server in crystal?
17:50
<
sdogruyol >
FLOOR_9_: yes
17:50
<
FLOOR_9_ >
could it be , that the native http server is bound by the max file descriptors?
17:50
<
vikaton >
sdogruyol: putting kemal in my shard.yml is giving me a git error :/
17:51
<
sdogruyol >
vikaton: can you share your shard.yml
17:52
<
vikaton >
nvm fixed it :)
17:52
<
sdogruyol >
vikaton: great
17:54
<
FLOOR_9_ >
because in nodejs http server benchmarks, they talk about , modifying the max file desc to get more req/s
17:55
<
FLOOR_9_ >
1 million concurrent connections ! :)
17:56
<
sdogruyol >
yeah but that's another story 1m concurrent is really OS specific
17:57
<
FLOOR_9_ >
because what i am aiming for , is a realtime web api
17:57
<
FLOOR_9_ >
with as much of req/s i can get, and on the backend, as low as latency i can get
17:57
<
FLOOR_9_ >
that's why i encountered crystal :)
17:58
<
sdogruyol >
FLOOR_9_: then Crystal is a great fit for that imho
17:58
<
FLOOR_9_ >
yeah i would imagine is 64K on 1 core, the multithreaded version would be somewhat 4x
17:59
<
FLOOR_9_ >
like when i benchmark my node app, and then use cluster, to utilise more cores
17:59
<
FLOOR_9_ >
in theory of course
18:00
<
FLOOR_9_ >
have you got any experience with zeromq?
18:00
<
FLOOR_9_ >
you know what it is?
18:00
<
FLOOR_9_ >
cool, because the limit i am running into , is because of nodejs
18:01
<
FLOOR_9_ >
nodejs does about 10K reqs per core, and using zeroMQ for IPC communication
18:01
<
sdogruyol >
why not try out Crystal and make a blog post about it
18:01
<
sdogruyol >
that'd be really good
18:01
<
FLOOR_9_ >
well i don't know how to use IPC within crystal
18:01
<
sdogruyol >
i also dont know about it but we all have to start from somewhere :)
18:02
<
FLOOR_9_ >
mind you that i am pretty new to crystal
18:02
<
FLOOR_9_ >
but i think that if you can use IPC in crystal, you can already do somewhat multithreading
18:05
<
sdogruyol >
FLOOR_9_: the thing is that you can use spawn for async
18:05
<
sdogruyol >
much more easier than node and performant
18:06
<
FLOOR_9_ >
do you have a tutorial?
18:06
<
sdogruyol >
FLOOR_9_: for starter i think you can port the ruby 0mq driver to Crystal
18:07
<
sdogruyol >
FLOOR_9_: spawn and channels are what i am talkning about
18:07
<
FLOOR_9_ >
the zeromq gem is written in C , and i am not that good in C :)
18:07
<
sdogruyol >
FLOOR_9_: it's super simple to write C bindings in Crystal
18:08
<
CompanionCube >
yes
18:08
<
CompanionCube >
there's even a tool that takes the .h files
18:08
<
FLOOR_9_ >
i am a real noob in C
18:08
<
CompanionCube >
and generates the low-level binding for you
18:08
<
FLOOR_9_ >
a REAL noob
18:10
<
FLOOR_9_ >
i think it would be less of a challenge for someone who is used to C
18:10
* CompanionCube
also wrote a minimal CLI for the above tool
18:11
<
FLOOR_9_ >
sdogruyol: what does spawn do? is it like fork in javascript?
18:23
<
FLOOR_9_ >
ah yes i see now what it does, like in ruby
18:24
<
FLOOR_9_ >
i didn't use spawn in my ruby apps tho, i used thread.new sometimes
18:25
<
FLOOR_9_ >
sdogruyol: do you use Thread.new in kemal?
18:28
<
azgil >
what is kemal?
18:28
<
FLOOR_9_ >
awsome http server written in crystal by sdogruyol
18:29
<
FLOOR_9_ >
simular to sinatra and rails
18:29
<
azgil >
special for kidds
18:29
<
FLOOR_9_ >
well for setting up a simple http server for speed
18:30
<
FLOOR_9_ >
it's quite cool
18:32
<
sdogruyol >
azgil: ?
18:33
<
sdogruyol >
FLOOR_9_: no thread at all
18:34
<
azgil >
lim(usage of kemal) -> 0
18:35
FLOOR_9_ has quit [Ping timeout: 260 seconds]
18:35
FLOOR_9_ has joined #crystal-lang
18:36
<
FLOOR_9_ >
having some connections problems :)
18:37
<
FLOOR_9_ >
the speed of that http server azgil is 60k reqs
18:37
<
azgil >
what for create another one if already exsit good web frameworks
18:37
<
FLOOR_9_ >
try that with your rails app :)
18:37
<
sdogruyol >
because it's fun?
18:37
<
FLOOR_9_ >
azgil which OS do you use?
18:38
<
FLOOR_9_ >
do you think it's better than windows?
18:40
<
FLOOR_9_ >
what i am reffering to, that like Linux , someone tried to make something different
18:40
<
FLOOR_9_ >
and hey, look what we have today
18:40
<
FLOOR_9_ >
if everyone stopped because there is already something, we all be using the same OS right now
18:41
<
azgil >
you drink a lot
18:48
<
RX14 >
FLOOR_9_, AFAIK all of the http frameworks for crystal use the http server/parser in the stdlib
18:48
<
RX14 >
the only perf difference between crystal http frameworks is in routing
18:48
<
FLOOR_9_ >
yeah, but because the req/s are so close to the max file descriptor limit, i thought about articles raising that limit
18:51
<
azgil >
try to use db , u will see real limit
18:51
<
FLOOR_9_ >
like in node
18:52
<
FLOOR_9_ >
the zeromq module 'zmq' also was benchmarked, it also had a 65K messages/s limit
18:52
<
FLOOR_9_ >
no matter the protocol, IPC, TCP, so whenever i see that 65K limit, i can't help notice
18:53
CompanionCube has quit [Ping timeout: 260 seconds]
18:56
sdogruyol has quit []
18:59
<
FLOOR_9_ >
but i am not knowledgable enough, to know the relation between sockets and open file descriptors in a unix system
18:59
<
FLOOR_9_ >
alto anything is a stream in unix, even a file, it could be something to do with it
19:02
<
azgil >
u a smart guy
19:02
<
FLOOR_9_ >
and that's why these articles with 500K, 1 Million Reqs all mention raising that kernel limit
19:02
<
FLOOR_9_ >
on a unix system
19:03
<
azgil >
what os d u use
19:03
<
FLOOR_9_ >
mac, linux, windows
19:03
<
FLOOR_9_ >
mac right now
19:03
<
FLOOR_9_ >
for developing
19:05
greengriminal has joined #crystal-lang
19:07
<
FLOOR_9_ >
btw, when i say unix i also mean unix-like, so also Linux
19:12
CompanionCube has joined #crystal-lang
19:12
CompanionCube has quit [Changing host]
19:12
CompanionCube has joined #crystal-lang
19:16
<
FLOOR_9_ >
don't know if it adds something useful RX14
19:16
<
FLOOR_9_ >
what i just said
19:17
elbow-jason has joined #crystal-lang
19:18
CompanionCube has quit [Ping timeout: 264 seconds]
19:20
greengriminal has quit [Quit: This computer has gone to sleep]
19:31
CompanionCube has joined #crystal-lang
19:31
CompanionCube has quit [Changing host]
19:31
CompanionCube has joined #crystal-lang
19:40
trapped has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
19:47
trapped has joined #crystal-lang
19:57
trapped has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
20:04
trapped has joined #crystal-lang
20:05
FLOOR_9_ has quit []
20:15
sorbo_ has joined #crystal-lang
20:25
greengriminal has joined #crystal-lang
21:08
lokulin has quit [Ping timeout: 245 seconds]
21:10
greengriminal has quit [Quit: This computer has gone to sleep]
21:10
lokulin has joined #crystal-lang
21:11
fowlduck has joined #crystal-lang
21:16
fowlduck has quit [Ping timeout: 246 seconds]
21:41
Keziolio has left #crystal-lang ["Leaving"]
21:59
greengriminal has joined #crystal-lang
21:59
greengriminal has quit [Client Quit]
22:12
fowlduck has joined #crystal-lang
22:13
bmcginty has joined #crystal-lang
22:17
fowlduck has quit [Ping timeout: 260 seconds]
22:17
sorbo_ has quit [Remote host closed the connection]
22:38
<
CompanionCube >
you know what'd be an interesting idea?
22:38
<
CompanionCube >
if one could easily compile Crystal code to JavaScript using Emscripten
22:39
<
jhass >
there's an issue for that somewhere
22:39
sorbo_ has joined #crystal-lang
23:13
fowlduck has joined #crystal-lang
23:17
fowlduck has quit [Ping timeout: 246 seconds]
23:31
elbow-jason has quit [Ping timeout: 246 seconds]