RX14 changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.19.3 | Fund Crystals 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
<FromGitter> <jwoertink> I think worst case, it gives you a head start
<FromGitter> <jwoertink> Fork it, and if you find bugs with latest crystal, submit a PRA
<FromGitter> <jwoertink> PR*
<FromGitter> <piedoom> good idea :)
<Papierkorb> Weird, Crystal only lets me use one output register for inline assembly https://play.crystal-lang.org/#/r/1b3g
ruby_ has quit [Remote host closed the connection]
ruby_ has joined #crystal-lang
ruby__ has joined #crystal-lang
ruby_ has quit [Ping timeout: 244 seconds]
ruby__ has quit [Ping timeout: 264 seconds]
ruby_ has joined #crystal-lang
ruby_ has quit [Remote host closed the connection]
ruby_ has joined #crystal-lang
ruby_ has quit [Client Quit]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
Davy_CC_ has quit [Ping timeout: 276 seconds]
snsei has quit [Remote host closed the connection]
Philpax_ has joined #crystal-lang
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei_ has joined #crystal-lang
snsei has quit [Ping timeout: 272 seconds]
havenwood has quit [Quit: mIRC 5.91 (16 bit) for Microsoft © Windows For WorkGroups 3.11®]
fnovd has joined #crystal-lang
snsei_ has quit [Remote host closed the connection]
fnovd has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
A124 has quit [Quit: '']
A124 has joined #crystal-lang
snsei has joined #crystal-lang
snsei has quit [Ping timeout: 244 seconds]
soveran has joined #crystal-lang
soveran has quit [Remote host closed the connection]
soveran has joined #crystal-lang
soveran has quit [Changing host]
soveran has joined #crystal-lang
soveran has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
soveran has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]
snsei has joined #crystal-lang
soveran has quit [Ping timeout: 272 seconds]
snsei has quit [Ping timeout: 272 seconds]
pawnbox has joined #crystal-lang
<BlaXpirit> how can I take a pointer to a value inside a struct?
<BlaXpirit> >> record S, x : Int32, y : Int32; s = S.new(1, 2); pointerof(s.y)
<DeBot> BlaXpirit: can't take address of s.y - https://carc.in/#/r/1b3l
<BlaXpirit> honestly pointerof should just support this
<FromGitter> <jellymann> The only way I've found to do this is manually "pluck" the correct address from a pointer to a struct: ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=57ef8267d38f186520b6d563]
<BlaXpirit> oh yes, but my struct is huge and prone to change
soveran has joined #crystal-lang
soveran has quit [Ping timeout: 244 seconds]
soveran has joined #crystal-lang
soveran has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
<BlaXpirit> well this is frustrating, i'm still fighting with this and still no way to find out the offset, even if i have to hardcode it
<BlaXpirit> i successfully was able to add all sizes of variables that precede it but realized that this tells nothing
pawnbox has quit [Read error: Connection reset by peer]
pawnbox has joined #crystal-lang
snsei has joined #crystal-lang
snsei has quit [Ping timeout: 264 seconds]
Ven_ has joined #crystal-lang
Ven_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pawnbox has quit [Ping timeout: 264 seconds]
pawnbox has joined #crystal-lang
matp has quit [Quit: ZZzzzZz...]
<FromGitter> <sdogruyol> @RX14 can you release 0.1.0 of multipart.cr?
<RX14> yeah, sure
<RX14> i wanted you to check that it was working well in kemal first though
<FromGitter> <sdogruyol> @RX14 it's working pretty good enough
<FromGitter> <sdogruyol> thanks a lot
<RX14> are you making it a dependency of kemal?
<RX14> any special integration?
<FromGitter> <sdogruyol> yeah i'll do so
<FromGitter> <sdogruyol> at least till it becomes a part of std
<FromGitter> <sdogruyol> no, special integration just a helper method :P
<RX14> done!
<FromGitter> <sdogruyol> @RX14 thanks
<FromGitter> <sdogruyol> i'm gonna release 0.16.0 with this
<RX14> nice!
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
snsei has joined #crystal-lang
snsei has quit [Ping timeout: 264 seconds]
<FromGitter> <sdogruyol> @RX14 https://github.com/sdogruyol/kemal/pull/216
Ven_ has joined #crystal-lang
<FromGitter> <sdogruyol> @RX14 it takes like 1200 ms to upload and write 176MB zip file
<RX14> on localhost?
<FromGitter> <sdogruyol> yeah
<RX14> slightlly longer than I would have though
<FromGitter> <sdogruyol> note that i'm also writing it into a file
<FromGitter> <sdogruyol> takes like 874.92ms to parse
<RX14> yeah, ok
<RX14> so you parse it into memory
<RX14> then write it?
<FromGitter> <sdogruyol> File.write(File.join(Dir.current, "#{field}.zip"), data.gets_to_end)
<RX14> thats pretty much the least performant way to write a file
<FromGitter> <sdogruyol> what do you suggest?
<RX14> IO.copy
<FromGitter> <sdogruyol> ugh
<FromGitter> <sdogruyol> and how would i use that?
<RX14> File.open(filename) do |file|
<RX14> IO.copy(data, file
<RX14> end
<FromGitter> <sdogruyol> oh i see
<RX14> well
<FromGitter> <sdogruyol> makes sense
<RX14> File.open(file, "w")
<FromGitter> <sdogruyol> yeah definitely faster
<FromGitter> <sdogruyol> takes half of the time 400ms to 200 ms
<FromGitter> <johnjansen> @RX14 thats an awesome tip, it just doubled my download speed for another project … these tips need to be organized somewhere
<RX14> yeah, they are, it's called the docs :P
<FromGitter> <sdogruyol> @johnjansen agreed
<FromGitter> <sdogruyol> well File.write is like pretty common so you dont bother anything else unless it's really slow
<RX14> it seems pretty obviousl that converting a file to a string and writing it out again will be slow
<RX14> think of all that memory allocation
<FromGitter> <sdogruyol> yeah makes sense
Ven_ has quit [Read error: Connection reset by peer]
<RX14> IO.copy read 8kb into the stack, and writes it out again in a loop
<RX14> oh, no
<RX14> 1kb
Ven_ has joined #crystal-lang
<FromGitter> <johnjansen> totally … however, programming is like assembling a jigsaw with 9000 pieces and no reference picture, sometimes it helps to get a nudge in the right direction
<FromGitter> <sonic182> Hi
<RX14> hi
<FromGitter> <johnjansen> hi
Ven_ has quit [Client Quit]
<FromGitter> <sonic182> Oh I tried to add a break line and it sends the message
<FromGitter> <johnjansen> @RX14 would you comment any perf improvements which can be made to the following code (mainly the fragment relating to download and save ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=57efdb3bb0ff456d3ad7cbde]
<FromGitter> <johnjansen> so i can GIST it
<FromGitter> <sonic182> There is no way to insert break lines on this chat? Anyway... I rewrote a genetic algorithm from ruby (jruby) to crystal and I have to say it's very fast right known
<RX14> nice
<FromGitter> <sdogruyol> @sonic182 genetic algorithm? That sounds badass
<FromGitter> <sonic182> https://github.com/sonic182/ia_proy2_ruby (on branch crystal run) but it's academic stuff, when I was on college, the code is in Spanish, comments, :/
<FromGitter> <johnjansen> That is an excellent use of crystal and in fact one area where the language can really make an impact
<FromGitter> <sonic182> And it doesn't follow best practices hehehe
<FromGitter> <sdogruyol> cool
<FromGitter> <sdogruyol> how about publishing some benchmarks?
<FromGitter> <sdogruyol> that'd be great
<FromGitter> <johnjansen> i was just about to say ...
<FromGitter> <sonic182> But yes, I'm thinking to use crystal with micro services for AI stuffs ⏎ Stuffs
<FromGitter> <johnjansen> talk to @sdogruyol about Kemal
<FromGitter> <sdogruyol> yeah i can help with that i guess lol
<FromGitter> <sonic182> Maybe for an Argentina guy can understand what was the project for with the documents that I have (my repo). I'm going to organize that code and translate it to English. Whenever I got time for that xD
<FromGitter> <sonic182> How long will it takes to crystal be stable? Just asking 🙈
<RX14> a think a while yet
<FromGitter> <jwoertink> It's good enough for government work
<FromGitter> <sdogruyol> roflmao
<FromGitter> <sdogruyol> @sonic182 it depends. For me it's been pretty stable since the beginning of this year
<FromGitter> <sdogruyol> no big breaking changes e.g
Liosha has joined #crystal-lang
<FromGitter> <johnjansen> speaking of benchmarks (from the code i just posted) ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=57efde0d0ff4ef7a50f77e37]
<Liosha> Hi! @asterite Why the crystal logo is an icosahedron?
<FromGitter> <sdogruyol> what is icosahedron?
<FromGitter> <johnjansen> a 20 sided object
<FromGitter> <sdogruyol> oh, didnt know that
<Liosha> @sdogruyol @johnjansen yes, but why? :-)
<FromGitter> <johnjansen> cause it looks nice and vaguely crystalline ?
<FromGitter> <johnjansen> i resembles ruby but not
<FromGitter> <johnjansen> ???
<Liosha> @johnjansen, ok I understand :-), but maybe an icosahedron as other meaning @asterite
<FromGitter> <johnjansen> entirely possible / likely
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
<FromGitter> <crisward> does crystal support destructuring objects ? I'm guessing not, but thought worth askign
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
<RX14> not really
<FromGitter> <barisbalic> @johnjansen thanks for uploading docs for crystal-stemmer :)
Liosha has quit [Quit: Page closed]
sandelius has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
<FromGitter> <johnjansen> @barisbalic I'll comment the code properly in the next day or two
<FromGitter> <sdogruyol> @johnjansen how's the performance of classify?
Philpax_ has quit [Ping timeout: 244 seconds]
<FromGitter> <johnjansen> Klassify in python?
<FromGitter> <sdogruyol> i meant, you are going to port that to crystal :P
<FromGitter> <johnjansen> Haha not the python one but my own is as fast as our scala code with zero effort
<FromGitter> <sdogruyol> your own one now is in Crystal or?
<FromGitter> <faustinoaq> Hello Crystal community!, Can I use the Crystal logotype in the wikipedia article? I don't how works https://upload.wikimedia.org/wikipedia/commons/thumb/b/bb/Licensing_tutorial_en.svg/720px-Licensing_tutorial_en.svg.png
<BlaXpirit> faustinoaq, uhh seems like the logo is under no license, so technically probably can't use it
pawnbox has joined #crystal-lang
<FromGitter> <faustinoaq> Ok, but How other programming languages have a logo in the wikipedia article? Should Manas create an Licence for the Logo?
<FromGitter> <sdogruyol> @faustinoaq i've seen people before asking for logo usage
<FromGitter> <sdogruyol> and @asterite was ok with it
<BlaXpirit> that's not how people on wikipedia roll
pawnbox has quit [Remote host closed the connection]
<BlaXpirit> faustinoaq, yes, the logo should have a license first
<BlaXpirit> i'm sure nobody minds adding a license but it just wasn't done
pawnbox has joined #crystal-lang
A124 has quit [Read error: No route to host]
<FromGitter> <faustinoaq> <BlaXpirit> @sdogruyol Ok, I think that I should wait for Manas or @asterite opinions. The Wikimedia guys takes the licences seriously :worried:
A124 has joined #crystal-lang
<BlaXpirit> faustinoaq, maybe raise an issue about a license for https://github.com/crystal-lang/crystal-website/blob/master/images/crystal-h.svg
<FromGitter> <faustinoaq> <BlaXpirit> Good idea :+1: thanks for the link!
snsei_ has joined #crystal-lang
snsei has quit [Ping timeout: 244 seconds]
<FromGitter> <faustinoaq> Already :-) ⏎ https://github.com/crystal-lang/crystal-website/issues/8
sandelius has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sandelius has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
matp has joined #crystal-lang
<FromGitter> <rdp> Hey really enjoying crystal for my latest webapp, thanks all [+kemal]
<FromGitter> <sdogruyol> @rdp thanks a lot
Ven_ has joined #crystal-lang
kulelu88 has joined #crystal-lang
soveran has joined #crystal-lang
Ven_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sandelius has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
matp has quit [Quit: ZZzzzZz...]
soveran has quit [Remote host closed the connection]
Ven_ has joined #crystal-lang
Ven_ has quit [Client Quit]
Ven_ has joined #crystal-lang
<crystal-gh> [crystal] ysbaddaden opened pull request #3369: Openbsd support (master...openbsd-support) https://git.io/vPqqm
Ven_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Ven_ has joined #crystal-lang
Ven_ has quit [Client Quit]
optikfluffel has joined #crystal-lang
optikfluffel has quit [Client Quit]
Ven_ has joined #crystal-lang
Ven_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Raimondi has quit [Write error: Broken pipe]
Raimondi has joined #crystal-lang