ChanServ changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.22.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
<FromGitter> <akzhan> @oprypin please review latest issues about Hash.
<oprypin> huh
<oprypin> i will just say do whatever Python did
<oprypin> it has open addressing and keeps order
Kug3lis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<FromGitter> <akzhan> anyway we need to push this change. ‘performance’ label is wrong, because good hash always slower than siphash etc.
<FromGitter> <akzhan> Top,, i want to say ‘xor hash’ :)
Guest97411 is now known as adam12
hightower2 has quit [Ping timeout: 268 seconds]
hightower2 has joined #crystal-lang
<FromGitter> <elorest> @RX14 didn't you say a couple months ago that there was work on Int128?
hightower2 has quit [Ping timeout: 268 seconds]
zipR4ND has joined #crystal-lang
<qard> Is there a way to define a getter such that its value appears in inspect calls?
<qard> I have a class wrapping a struct from a lib I'm working on and I want to expose some of the internal fields through the wrapper class.
zipR4ND has quit [Ping timeout: 240 seconds]
onionhammer has quit [Ping timeout: 240 seconds]
onionhammer has joined #crystal-lang
_whitelogger has joined #crystal-lang
_whitelogger 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]
<FromGitter> <jacobi-78> I encountered a strange issue with crystal-mysql today
<FromGitter> <jacobi-78> I have a working db interface which returns 99.9% of rows correctly, but 1 out of 7878 rows is bad data
<FromGitter> <jacobi-78> Here is the code I’m using:
<FromGitter> <jacobi-78> `SQL = DB.open(connection_string) # this works correctly for sure ⏎ ⏎ from = "2017-06-17 00:00:00" ⏎ to = "2017-06-18 00:00:00" ⏎ ... [https://gitter.im/crystal-lang/crystal?at=59462250ca6d4ae80c2522e4]
<FromGitter> <jacobi-78> `SQL = DB.open(connection_string) # this works correctly for sure ⏎ ⏎ from = "2017-06-17 00:00:00" ⏎ to = "2017-06-18 00:00:00" ⏎ ... [https://gitter.im/crystal-lang/crystal?at=59462277d83c50560c1c33ed]
<FromGitter> <jacobi-78> If I change from and to such that the new range shows rows 2-8001 instead of 1-8000, the error occurs 1 row later (on row 7879). If I skip the first 10 rows and have 11-8010, the error happens 10 rows later (on row 7888)
<FromGitter> <jacobi-78> It looks like it’s not the row itself, but just some corruption that occurs every 7878th row, regardless of the starting point
<FromGitter> <jacobi-78> I went into the code for crystal-db and crystal-mysql and found that the error originates in ResultSet#read, regardless if I’m mapping to a type or passing 0 parameters. I was not able to follow the inner workings of ReadPacket
<FromGitter> <jacobi-78> Does anyone know what’s happening? Is this a known bug?
<FromGitter> <fridgerator> Not one that i've heard of, you might want to open an issue
<FromGitter> <jacobi-78> I'll do that, thanks
hightower2 has joined #crystal-lang
<z64> anyone here played with jennifer.cr w/ postgresql?
<z64> anyone here played with jennifer.cr w/ postgresql?
<crystal-gh> [crystal] akzhan opened pull request #4586: Minor macro interpreter "identify". tr("c", "x") is always slower than gsubs. (master...minor-macro-update-single-char-tr-slower-than-gsubs) https://git.io/vHhF6
livcd has quit [Ping timeout: 240 seconds]
olek_poz has joined #crystal-lang
<oprypin> qard, no, it shows data fields, but of course feel free to define your own inspect
unshadow has joined #crystal-lang
unshadow has quit [Client Quit]
unshadow has joined #crystal-lang
unshadow has quit [Client Quit]
unshadow has joined #crystal-lang
unshadow has quit [Client Quit]
unshadow has joined #crystal-lang
unshadow has quit [Quit: leaving]
unshadow has joined #crystal-lang
qard has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<FromGitter> <abidon> Hi guys, is the crystal grammar definition written somewhere in some documentation ?
<FromGitter> <LuckyChicken91_twitter> When im doing "Time.now" where did crystal then have the time from?
imnotarobot has joined #crystal-lang
<FromGitter> <abidon> @z64 i was thinking of something like a BNF or LL gramar
<FromGitter> <abidon> Something that describes the whole syntax of the language
<FromGitter> <abidon> @LuckyChicken91_twitter you mean how does it gets the time ? (if so its from `LibC.gettimeofday` on mac, `LibC.clock_gettime(LibC::CLOCK_REALTIME)` on others)
_whitelogger has joined #crystal-lang
<FromGitter> <abidon> It calls new without args, which construct a time object from Time.local_ticks
<FromGitter> <abidon> And Time.local_ticks ends up calling LibC.gettimeofday on mac, LibC.clock_gettime(LibC::CLOCK_REALTIME) on others
<FromGitter> <abidon> Which is a binding to the clock_gettime function: https://linux.die.net/man/3/clock_gettime
<FromGitter> <abidon> I don't know Linux that much but it effectively seems to fetch the local time from the OS
<FromGitter> <bew> @abidon no unfortunatly there is no grammar definition file of the language :/
<FromGitter> <bew> I asked during last Q&A on youtube, I don't remember exacty what they said, but it was about their use of a custom lexer/parser, and (currently they said) not a generic lexer/parser generator
<FromGitter> <abidon> @bew ok i'll try to do something from the compiler source then :/
<FromGitter> <bew> what are you trying to do?
<FromGitter> <abidon> i'm trying to add crystal support to the intellij platform
<FromGitter> <bew> someone already tried that iirc
<FromGitter> <abidon> how does it ended up ?
<FromGitter> <abidon> nice i'll take a look
<FromGitter> <bew> yw I don't know, but I'm sure you'll find out ;)
Raimondi has quit [Ping timeout: 268 seconds]
_whitelogger has joined #crystal-lang
<FromGitter> <abidon> @LuckyChicken91_twitter thats a good question i dont now, theres always a time from the os ?
<FromGitter> <abidon> network synced or not (aka reliable or not) but there's always a time ?
<FromGitter> <LuckyChicken91_twitter> i dont think that theres always a time
<FromGitter> <bew> I think there's always a time, maybe not the correct one, but this is one, the only places where there is no time would be some micro controllers I think, and linux doesn't run on thoses... So no crystal..
<FromGitter> <LuckyChicken91_twitter> and where is PI and INFINITY? Can I get it from crystal?
<FromGitter> <bew> The time is given by the real time clock which is on the motherboard, always powered even when the computer is off (it has it's own battery), so the time is correct on reboot
<FromGitter> <LuckyChicken91_twitter> ah okay
<FromGitter> <akzhan> @LuckyChicken91_twitter Math::PI, Float64::INFINITY
<FromGitter> <LuckyChicken91_twitter> thank you
<FromGitter> <bew> The time of the RTC (Real Time Clock) can be the UTC-time or Local time, or something else, the linux kernel has an abstraction over the RTC to apply offset to get the correct time in your timezone for example
<FromGitter> <LuckyChicken91_twitter> "the motherboard, always powered even when the computer is off (it has it's own battery)" but what if the battery is empty after a time?
<oprypin> LuckyChicken91_twitter, then the clock starts at some time in 2000s the next time you start it. and BIOS settings reset. the battery must be replaced.
<imnotarobot> okay and how long can a motherboard battery survive?
<oprypin> up to 10 years in my experience
<oprypin> replacement is expensive, for a good reason :p
<oprypin> well it's actually cheap but that type of battery is relatively expensive
<imnotarobot> but why is the motherboard battery not easily getting a little bit energy too when you charge your computer?
<oprypin> imnotarobot, rechargable batteries are not the default. they make the price go up by a factor and are less reliable.
<imnotarobot> oh okay
olek_poz has quit [Ping timeout: 260 seconds]
<imnotarobot> so this means when the battery is empty then your time always starts at 2000 and nothing more?
<FromGitter> <abidon> except if you have network time sync
<imnotarobot> are there more effects?
<imnotarobot> oh
<imnotarobot> then i think its really stupid to replace the battery
<imnotarobot> because you can easily use network time sync!
<oprypin> it's not good enough, it's important to have correct time before sync kicks in. and bios settings are pretty important..
<imnotarobot> what are with the bios settings?
<FromGitter> <akzhan> Is there a method in the Crystal library for parsing the semantic version?
<imnotarobot> does this means you cant change bios settings then anymore?
<oprypin> you could reapply them manually at each boot
<oprypin> akzhan, check how 'shards' does it
<FromGitter> <akzhan> Thanks, looks like it isn’t extracted as separate class.
<oprypin> oh there's no parsing even
<oprypin> just sorting
<FromGitter> <LuckyChicken91_twitter> how can I open a file with crystal? Is it like in ruby?
<FromGitter> <akzhan> File.read filename or File.open filename { |f| do with f }
<FromGitter> <akzhan> read docs :) https://crystal-lang.org/api/0.22.0/File.html
<FromGitter> <LuckyChicken91_twitter> how can I rescue a Interrupt?
<FromGitter> <LuckyChicken91_twitter> "rescue Interrupt" isnt working. And I have already looked in https://crystal-lang.org/api/0.22.0/Exception.html but i cant find it
<FromGitter> <akzhan> Signal::INT.trap do ⏎ puts "CTRL-C handler here!" ⏎ exit ⏎ end [https://gitter.im/crystal-lang/crystal?at=59467339f6a78eab485ddc43]
<oprypin> i'm having trouble defining some global flags for my application
<oprypin> https://carc.in/#/r/27hm please advise on alternatives
<FromGitter> <LuckyChicken91_twitter> wut?
<FromGitter> <LuckyChicken91_twitter> Signal::INT.trap do ?
<oprypin> sigh. `UNSAFE = !ARGV.delete("--safe"); DEBUG = !!ARGV.delete("--debug")`
<FromGitter> <bew> Nice trick oprypin, but you lose the `--`option if you have filenames named like your options (very unlikely I agree, but possible)
<oprypin> yeah yeah
<FromGitter> <LuckyChicken91_twitter> where can I surround code here so that in this range ctrl c will execute other code: @akzhan ```crystal ⏎ Signal::INT.trap do ⏎ puts "CTRL-C handler here!" ⏎ exit ⏎ end ... [https://gitter.im/crystal-lang/crystal?at=5946754902c480e67256dcef]
<FromGitter> <bew> You cannot surround code and trap the signal only for this code, the signal handler is global to your program
<FromGitter> <LuckyChicken91_twitter> but I want to do it like with begin ; rescue ; end
<FromGitter> <LuckyChicken91_twitter> so that you handle exceptions in this surrounded code
<FromGitter> <bew> The Ctrl-c interupt is not an exception, ruby make it looks like one, but it's not. When someone press Ctrl-c, the program receives a signal corresponding to the INT (=> interrupt), and the program can handle the signal when it's received, by registering a global handler for this signal
unshadow has quit [Ping timeout: 246 seconds]
<FromGitter> <bew> @LuckyChicken91_twitter what do you want to do when a user do Ctrl-c?
Kug3lis has joined #crystal-lang
Kug3lis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zipR4ND has joined #crystal-lang
<FromGitter> <LuckyChicken91_twitter> i just want to prevent it
<FromGitter> <LuckyChicken91_twitter> but i just want to prevent it when its pressed when a certain code is running
<FromGitter> <bew> Then you can use `Signal::INT.ignore`
<FromGitter> <bew> In the beginning of you program.
<FromGitter> <LuckyChicken91_twitter> what does this make?
<FromGitter> <LuckyChicken91_twitter> is there not something like: Signal::INT.trap do; code ; if Interrupt ; this code; end
<FromGitter> <drosehn> No, there is not.
<FromGitter> <LuckyChicken91_twitter> what?!?
<FromGitter> <bew> Or you can also use `Signal::INT.ignore` then your code, then `Signal::INT.reset`. This is the closest thing you can do to ignore the INT signal (sent to the process on Ctrl-c), then after the code, reset
<FromGitter> <LuckyChicken91_twitter> then i think this is a missing crystal feature!
<FromGitter> <drosehn> There is a PR which discusses this.
<FromGitter> <LuckyChicken91_twitter> a PR?
<FromGitter> <drosehn> A github issue.
<FromGitter> <LuckyChicken91_twitter> where
<FromGitter> <bew> In github :trollface:
<FromGitter> <bew> *ok I'm out*
<FromGitter> <LuckyChicken91_twitter> Signal::INT.ignore { } Signal::INT.reset ?
<FromGitter> <LuckyChicken91_twitter> how should i write this
<FromGitter> <bew> There is #3987 by @drosehn about documentation about that
<DeBot> https://github.com/crystal-lang/crystal/issues/3987 (Documenting Signal vs Exceptions)
<FromGitter> <bew> Without the {}
<FromGitter> <drosehn> That issue started out about a simple documentation request, but the discussion also kinda touches on why interrupt-handling is the way it is in crystal.
<FromGitter> <LuckyChicken91_twitter> i hope crystal will implement the Interrupt exeception
<FromGitter> <bew> I don't think it will
<FromGitter> <LuckyChicken91_twitter> why??
<FromGitter> <LuckyChicken91_twitter> this is a missing feature !
<Papierkorb> I hope it doesn't, it's a feature not many need, and those who want to react on it, most likely want to out of band
<FromGitter> <LuckyChicken91_twitter> but i need it! Because i dont find another way!
<FromGitter> <bew> I told you another way
<FromGitter> <drosehn> Need to get the multi-processing support finished first, so whatever solution that comes up will handle that correctly. And once MP is in place, handling process-level signals gets a little trickier.
<FromGitter> <LuckyChicken91_twitter> @bew this way isnt working
<FromGitter> <bew> Can you share some code? (I don't have my computer right now, I can't test, maybe I could using carc.in, I'll try something)
<FromGitter> <LuckyChicken91_twitter> what code should i share?
<FromGitter> <drosehn> testing this in carc.in will be tricky, too!
<FromGitter> <LuckyChicken91_twitter> bew dont need to test it. He knows already everything
<FromGitter> <LuckyChicken91_twitter> right, @bew?
<FromGitter> <drosehn> @bew does go out of his way to be helpful to people on this channel. Very nice thing to do.
<FromGitter> <bew> Ahah no ^^
<FromGitter> <LuckyChicken91_twitter> wut
<FromGitter> <bew> I don't know every thing, but I'm working on it :)
<FromGitter> <LuckyChicken91_twitter> me too
<Papierkorb> The last days in here have been more and more filled with toxicity and rage
<FromGitter> <LuckyChicken91_twitter> why
<Papierkorb> I don't think I have to copy/paste your last statement(s)
<FromGitter> <LuckyChicken91_twitter> my last statements?
<oprypin> LuckyChicken91_twitter, the conversation as I see it, having glanced through it. you want to do something, bew suggested a way, you don't take time to understand it, instead insist that a feature is missing because it does not look how you expect it (presumably expect it to be exactly like in Ruby)
zipR4ND has quit [Ping timeout: 240 seconds]
<FromGitter> <LuckyChicken91_twitter> i dont expect presumably to be exactly like in ruby
<oprypin> the fact that it's undocumented is another matter :/
olek_poz has joined #crystal-lang
<oprypin> LuckyChicken91_twitter, https://carc.in/#/r/27hx
A124 has quit [Ping timeout: 260 seconds]
<FromGitter> <drosehn> Hmm. I didn't need the `require "signal"`
A124 has joined #crystal-lang
zipR4ND has joined #crystal-lang
<FromGitter> <fridgerator> If I was to try and store millions of structs to a data structure, would a `Hash` be ok for that? or is there something more performant?
<FromGitter> <fridgerator> storing socket connections
<FromGitter> <fridgerator> so they need to be able to be added and removed at any time
<FromGitter> <fridgerator> right now I'm using `Hash(UInt64, ClientSocket).new`, and my 512mb droplet fills up with memory around 8000 connections
<FromGitter> <sdogruyol> that should not be the issue
<FromGitter> <sdogruyol> i've stored much more connections in an array
<oprypin> Hash probably isnt the cause anyway
<FromGitter> <fridgerator> kk
<oprypin> even though Crystal's hash is not particularly efficient with memory
<FromGitter> <sdogruyol> @fridgerator if you're benchmarking websocket, connections please be aware that OS configurations might be the cause
<FromGitter> <fridgerator> I have that open in a tab :thumbsup:
<FromGitter> <fridgerator> also https://goroutines.com/10m
<FromGitter> <sdogruyol> great
<FromGitter> <fridgerator> I've set all of those switches
snsei has joined #crystal-lang
<FromGitter> <fridgerator> If thats not likely the cause though, I'll start looking elsewhere
<FromGitter> <fridgerator> thanks!
<FromGitter> <bew> Isn't it a bad design to put structs in an array or a hash or any container? 'cuz it'll probably do some copying of a few bytes everytime (not a big deal, but for big containers it could), you can't change a value element in-place easily with crystal, and some other issues I can't think about right now
<FromGitter> <akzhan> Everything ok until 128 bits per value reached
<FromGitter> <fridgerator> hrm ok
<crystal-gh> [crystal] oprypin opened pull request #4587: Add documentation to Signal (master...signal-docs) https://git.io/vHjTl
<FromGitter> <akzhan> But anyway Hash will be reimplemented due to #4557
<DeBot> https://github.com/crystal-lang/crystal/issues/4557 (Reimplementation a Hash using open addressing)
<Yxhuvud> assuming something comes out of it yes
<FromGitter> <akzhan> Crystal 1.0 should be production ready. So hashing algorithm must be rewritten. Default Hash implementation will fail on these conditions.
<FromGitter> <akzhan> because of HashDoS etc.security issues.
snsei has quit [Remote host closed the connection]
<oprypin> there's a lot of FUD though
<FromGitter> <akzhan> Every vulnerability in Web will be used against software.
<oprypin> and a lot of conflation
<oprypin> randomizing string hashes is just entirely separate. it needs to be done for sure though
<Yxhuvud> rewriting the hashing methods to be more robust is pretty different from reimplementing hash tables from scratch though. The latter is certainly nice but not necessary to be robust enough for production
<oprypin> doesnt help that both of these entirely different things are called "rewriting hash implementation"
<oprypin> worst name ever
<Yxhuvud> +1
<FromGitter> <akzhan> Yes, propose any other
Kug3lis has joined #crystal-lang
A124 has quit [Ping timeout: 240 seconds]
<FromGitter> <akzhan> but just reimplementation of Hash algorithm (I suppose that it should be #4578 way) will down performance of current Hash anyway lower than open addressing hash.
<DeBot> https://github.com/crystal-lang/crystal/issues/4578 (Discussion: Hashing namespace with Hasher classes)
<oprypin> i dont get it
olek_poz has quit [Ping timeout: 240 seconds]
<oprypin> can i pass command line argumets to a program running in `crystal eval`?
snsei has joined #crystal-lang
Philpax has quit [Ping timeout: 240 seconds]
<FromGitter> <bew> Maybe with `crystal eval "code" -- arg1 arg2` ?
<oprypin> tried that
<oprypin> crystal eval "p ARGV" -- --arg1 --arg2 : postfix decrement is not supported, use `exp -= 1`
<FromGitter> <bew> Looking at the compiler eval code it should work
<oprypin> btw i decided against using eval so i dont need anymore
snsei has quit [Remote host closed the connection]
Philpax has joined #crystal-lang
Ven has joined #crystal-lang
Ven is now known as Guest85118
Kug3lis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Raimondi has joined #crystal-lang
snsei has joined #crystal-lang
Raimondii has joined #crystal-lang
Raimondi has quit [Ping timeout: 268 seconds]
Raimondii is now known as Raimondi
snsei has quit [Remote host closed the connection]
Guest85118 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Ven has joined #crystal-lang
Ven is now known as Guest66547
splitty___ has joined #crystal-lang
Guest66547 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
splitty___ has quit [Quit: Leaving]
A124 has joined #crystal-lang
splitty_ has joined #crystal-lang
Ven_ has joined #crystal-lang
zipR4ND has quit [Ping timeout: 240 seconds]
qard has joined #crystal-lang
Ven_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<FromGitter> <puppetpies> Are the any guide to implementing your Database driver under Crystal DB yet anyone ?
<FromGitter> <puppetpies> I would like my MonetDB driver to be compatible and familar anyone to use in the future and third party driver yet keeping its original way of working.
<oprypin> puppetpies, see also https://crystal-lang.org/docs/database/ https://github.com/crystal-lang/crystal-sqlite3 - maybe follow by example?
<FromGitter> <puppetpies> thankyou oprypin thank you for will have a look.
<FromGitter> <puppetpies> Does anyone when crystaldb is likely to become the standard or is it some down the road on the roadmap and not finalized ?
<oprypin> puppetpies, but it is already the standard
<oprypin> or as close as it gets. nothing is really finalized yet.
<FromGitter> <puppetpies> Excellent then i guess i should be compatible :)
<FromGitter> <puppetpies> I remember when bcardiff announced the project and i thought that what looks excellent never seen that before in a language having db support out of the box for major db engines.
<oprypin> python
<oprypin> note that this is not exactly "out of the box"
<FromGitter> <puppetpies> Python not language i have look too much at but how do you mean to exactly out of the box i understand it will merge with the crystal project at point ??
<FromGitter> <puppetpies> I have more been Ruby guy in general
<oprypin> i don't know if it will merge. it does not really need to merge.
<FromGitter> <puppetpies> So it will be the standard but be shard i guess
<FromGitter> <puppetpies> thankyou for the help
<FromGitter> <LuckyChicken91_twitter> can someone please answer this question: https://carc.in/#/r/27ko/edit
<FromGitter> <LuckyChicken91_twitter> (look at the comments!)
<oprypin> LuckyChicken91_twitter, what text editor are you using to view the resulting file?
<FromGitter> <LuckyChicken91_twitter> uuhhm notepad
<oprypin> LuckyChicken91_twitter, notepad does not display '\n' as a newline, only '\r\n'
<FromGitter> <delef> Hi! There is not enough documentation :( ⏎ ⏎ How to bind this struct? ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5946da0b6462d8493c25d867]
<FromGitter> <LuckyChicken91_twitter> but i think its should be possible to too display newlines in msnotepad!
<FromGitter> <LuckyChicken91_twitter> oh this means i should use \r\n ?
<oprypin> LuckyChicken91_twitter, it mostly means you should not use notepad
<FromGitter> <LuckyChicken91_twitter> i just use microsoft notepad to view some files like this
<FromGitter> <LuckyChicken91_twitter> im not coding with this
<FromGitter> <puppetpies> print does not create new lines
<oprypin> delef, just bind the inner union as its own non-anonymous thing. https://crystal-lang.org/docs/syntax_and_semantics/c_bindings/union.html
<oprypin> then bind the struct as containing the union type
<FromGitter> <LuckyChicken91_twitter> i know
<FromGitter> <LuckyChicken91_twitter> @oprypin you are not surpised how I can use crystal with windows?
<Papierkorb> you said you're viewing files
<oprypin> well it was a very brief surprise, i know you're running it through that linux reimplementation
<FromGitter> <delef> oprypin, Will it work? I do not know how unnamed union work in C.
<oprypin> delef, works like named union but can't be used by name
<imnotarobot> from where are you knowing this? D:
<FromGitter> <puppetpies> Line ending Window does \r\n char 10 & 13 Unix line endings are char 10 probably one of the most annoying things in computing over years.
<Papierkorb> Hasn't been an issue in decades
<imnotarobot> I was hoping to be able to surprise you
<Papierkorb> Every decent program can handle any line ending. MS Notepad is just not what I'd consider "decent" in any case.
<FromGitter> <puppetpies> true
<oprypin> delef, in crystal you have no choice but to define a name. also keep in mind that when you're making C bindings, you're really only binding function names and argument types. the actual names of structs and their field names don't come up anywhere, you're just ensuring the same memory layout
<FromGitter> <delef> @oprypin, thank you! I will try :)
Philpax has quit [Read error: Connection reset by peer]
<FromGitter> <LuckyChicken91_twitter> im finding it really stupid that this isnt working: :worried: ``` ⏎ Float32::INFINITY.times do ⏎ print "print me infinity times pls!" ⏎ end ⏎ ... [https://gitter.im/crystal-lang/crystal?at=5946df01cf9c13503c9b3565]
olek_poz has joined #crystal-lang
<oprypin> k
<FromGitter> <LuckyChicken91_twitter> I mean it would be pretty cool if this works
<FromGitter> <LuckyChicken91_twitter> would be very logical
<oprypin> not really
<FromGitter> <LuckyChicken91_twitter> why?
<oprypin> infinity is not real
<oprypin> use `loop do`
<FromGitter> <LuckyChicken91_twitter> i know -.-
<FromGitter> <LuckyChicken91_twitter> but i mean it would be very cool
<oprypin> `3.5.times do` would also be very cool
<oprypin> do the thing 3 times and then one more but stop in the middle!!!
<oprypin> cuz that's what you would have to support if you're supporting floats
<Papierkorb> "Compilers hate this one weird trick"
<FromGitter> <LuckyChicken91_twitter> If i will program my own compiler after many years then this will definitely work!
<oprypin> i can support the feeling that infinity should be something more than a special case in floats
<oprypin> then it would make more sense
<FromGitter> <LuckyChicken91_twitter> yes!
imnotarobot has quit [Quit: Page closed]
Kug3lis has joined #crystal-lang
olek_poz has quit [Ping timeout: 240 seconds]
hightower4 has joined #crystal-lang
hightower3 has quit [Ping timeout: 240 seconds]
zipR4ND has joined #crystal-lang