<FromGitter>
<codenoid> i dont have a windows computer, ^^ 👍
<FromGitter>
<codenoid> but is just for windows 10 @faustinoaq ?
<FromGitter>
<mgarciaisaia> @codenoid I think so, because it depends on the Linux Subsystem (the Bash On Ubuntu On Windows), that's only available on Windows 10
<FromGitter>
<mgarciaisaia> Lovely, Faustino :)
<FromGitter>
<simaoneves> hi, i have a question
<FromGitter>
<simaoneves> how can i convert the characters that i read from STDIN in raw mode to something usable?
<FromGitter>
<simaoneves> if i click "j", thats good, but if i do arrow up i get "A"
<FromGitter>
<simaoneves> or if i do Ctrl-e i get "\u0005"
<FromGitter>
<simaoneves> which is not very helpful
<FromGitter>
<picatz> Well, up arrow is `^[[A` a control character or something, right?
<FromGitter>
<picatz> Down arrow should be `^[[B` or something like that.
<FromGitter>
<simaoneves> yep, it is
<FromGitter>
<picatz> So to be clear as I mess around, the `^[[` would make the `A` you get more helpful?
<FromGitter>
<picatz> Or, what would you want to see if you hit the up arrow?
<FromGitter>
<simaoneves> well, it can be that, or some other representation
<FromGitter>
<simaoneves> like a lib that would convert to better format maybe
<FromGitter>
<simaoneves> instead of ^[[A, "up" would be cool for example
<FromGitter>
<simaoneves> nothing like that in stdlib right? i looked around but didnt found anything
<FromGitter>
<faustinoaq> > but is just for windows 10 @faustinoaq ? ⏎ ⏎ @codenoid Yes, just Windows. commonly it uses installers like accept, next, next, finish. ⏎ ⏎ > I think so, because it depends on the Linux Subsystem ... [https://gitter.im/crystal-lang/crystal?at=59a0d33ebc46472974c26d00]
<FromGitter>
<picatz> I wouldn't want it in the stdlib if it was there.
<FromGitter>
<simaoneves> control? and ascii_control?
<FromGitter>
<picatz> @simaoneves nice 👍
sz0 has quit [Quit: Connection closed for inactivity]
<brycek>
fancy, got a crystal binary for arm-none-eabi built, but i don't have a great way to get output :P
greengriminal has quit [Quit: This computer has gone to sleep]
<brycek>
bah
<brycek>
tied up in figuring out what parts of the elf are actually needed to load, how to get teensy_cli_loader to parse the .hex file, and using dtrace on arduino.app to figure out what it's doing
Philpax__ has joined #crystal-lang
<FromGitter>
<elorest> How do I write a slice to a file without it looking like `Bytes[20, 219, 197, 20, 202, 33, 42, 215, 255, 92, 33, 15, 9, 244, 177, 166]`
alex`` has joined #crystal-lang
<txdv>
brycek: good job!
_whitelogger has joined #crystal-lang
maxpowa has quit [Ping timeout: 240 seconds]
maxpowa has joined #crystal-lang
alex`` has quit [Ping timeout: 246 seconds]
<FromGitter>
<codenoid> hi, how to make a loop, if the loop is complete, then he automatically starts from above again
<FromGitter>
<krypton97> Any process manager for production usage like pm2 or supervisord that doesn't require an runtime like node/py ??
<FromGitter>
<codenoid> ^^ in crystal
<FromGitter>
<krypton97> What are you guys using?
<FromGitter>
<krypton97> Looking to be a binary
<FromGitter>
<krypton97> crystal/c/rust etc
<FromGitter>
<codenoid> got it, `.cycle`
maxpowa has quit [Ping timeout: 246 seconds]
maxpowa has joined #crystal-lang
bmcginty has quit [Ping timeout: 248 seconds]
bmcginty has joined #crystal-lang
<FromGitter>
<sdogruyol> Morning everyone
<FromGitter>
<crisward> Morning @sdogruyol , Just had a github pull request accepted after 10 months... must be a record (not crystal btw)
<vegai>
I started looking at hanging pull requests, sorted by time
<FromGitter>
<sdogruyol> @vegai Crystal?
<vegai>
and continued working on one that was opened on Feb 18, 2016...
<vegai>
dunno if I'll ever get it done though. It augments the openssl bindings and those things are black magic to me still
<vegai>
sdogruyol: yeah
<vegai>
I sometimes wonder about open source projects
<vegai>
the more successful you are, the more open issues and pull requests there are
<vegai>
it seems to me that if a typical software team working in a company would have over 20 issues in their backlog, they'd ring all sorts of alarms
<vegai>
but hundreds is just fine for a github project :P
* vegai
shrugs
<vegai>
perhaps the crystal team in Manas keeps some sort of a backlog internally?
<FromGitter>
<sdogruyol> probably
<vegai>
or perhaps this chaos just works :)
<FromGitter>
<sdogruyol> Crystal is a big project :)
<vegai>
yeah
<FromGitter>
<sdogruyol> it's not chaos, it's just unordered :D
<FromGitter>
<maxpert> @Papierkorb when interfacing with C I want to do some memory management myself
<FromGitter>
<maxpert> wait where is this IRC?
<Papierkorb>
maxpert Not if can avoid it. Use the boehmGC C API instead.
<Papierkorb>
Freenode #crystal-lang
<FromGitter>
<maxpert> let me join IRC
maxpert has joined #crystal-lang
<maxpert>
Hi everyone
<maxpert>
:)
<maxpert>
Happy to join community
<maxpert>
I have a personal hobby project
<maxpert>
http://raspchat.com/ that has been written in golang right now I am looking forward for a more efficent implementation and thus exploring crystal-lang
<maxpert>
Happy to see you guys already have a websocket support
<maxpert>
I will be compiling my project for Raspberry pi so need ARMv6 support with some really efficent memory management
<maxpert>
I am not sure how good crystal-langs memory management is but willing to give it a shot
<Papierkorb>
Raspi's are quite powerful machines. It would surprise me if the GC would actually be a bottleneck.
<Yxhuvud>
I seem to remember someone having it working on the pi, but I can't remeber who it was. :(
<maxpert>
@Papierkorb yes it can handle 1000s of connections right now
<maxpert>
so I can cross-compile for ARM machines
<maxpert>
?
<maxpert>
I am looking forward to take 1000s to 10K connections that's where I hit bottle neck
<maxpert>
I have done some benchmarks and turns out I was using channels to pass messages
<maxpert>
and channels in golang inherently has some overhead
<Papierkorb>
A shitty test broker I did which simply broadcasted everything to every connection handled 10K connections just fine on a few megs of RAM. Has been a year since then though
<maxpert>
so I will be using something complicated like Disruptor pattern and interfacing a C/C++ library for realtime message distribution
<Papierkorb>
That test broker used channels too. You'll want to too, as Crystal has a deep integration with libevent2
<maxpert>
@Papierkorb what's recomended way to broadcast in Crystal
<maxpert>
and the send does all the heavy lifting?
<Papierkorb>
That's up to you
<maxpert>
queueing and sending over ws etc?
<Papierkorb>
What's the heavy lifting?
<Yxhuvud>
It would be nice to see a nice implementation of the Disruptor. Dunno if you need manual memory management for that though - as long as you don't allocate on the heap the gc shouldn't run IIRC.
<Papierkorb>
That's a call to write() away.
<maxpert>
@Papierkrob so current implementation is running on golang gorilla ws implementation which is 1 blocking and 2 needs syncronization since it's not threadsafe
<Papierkorb>
Never used Go-lang
<Papierkorb>
Will have to in a few weeks :/
<maxpert>
@Papierkorb so when you say deep integration with libevent2 is send async?
<maxpert>
@Papierkorb why :P
<maxpert>
?
<Papierkorb>
No idea how #write is implemented. it was always fast enough for me in my tests.
<maxpert>
@Yxhuvud would need to interface anyway because I use leveldb as well :P
<maxpert>
I might have to change that though
<maxpert>
what's the package manager name and where can I search for different packages?
<watzon>
But that shite isn't cryptographically secure anymore
<Papierkorb>
`OpenSSL::SHA256.hash`
<Papierkorb>
watzon: Are you learning for a custom toy "blockchain"?
<Papierkorb>
If yes, I don't think that SHA-1 not being that secure anymore would inhibit that :)
<watzon>
Basically, so being secure isn't really necessary
<watzon>
But still. I wanted to be sure it was possible
<Papierkorb>
In fact, exploiting SHA-1 in the blockchain would be a commendable task, the blocks shouldn't be big enough (while still passing all tests)
<Papierkorb>
commendable as in, totally worth the coins in the block ;)
<watzon>
Hahaha. Yeah I'm just getting into this
<watzon>
Thought it sounded like a fun side project
<watzon>
For me to start and then drop in a few days
<Papierkorb>
If you get hung up by Base58Check, lemme know
<watzon>
Will do
<FromGitter>
<johnjansen> @watzon id be interested in doing the same … wanna share your work, and for that matter reference you are following?
<Papierkorb>
johnjansen, Which part exactly? The theory, if you don't care about the math proof behind it, isn't that hard at all actually