ChanServ changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.24.2 | Fund Crystal's development: http://is.gd/X7PRtI | GH: https://github.com/crystal-lang/crystal | Docs: http://crystal-lang.org/docs/ | API: http://crystal-lang.org/api/ | Gitter: https://gitter.im/crystal-lang/crystal
Yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
Yxhuvud has joined #crystal-lang
Yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
Yxhuvud has joined #crystal-lang
Yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
Yxhuvud has joined #crystal-lang
Yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
Yxhuvud has joined #crystal-lang
Yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
Yxhuvud has joined #crystal-lang
<FromGitter> <girng> @faustinoaq hey, crystal for windows on save the cmd pop for sublime takes 4-5 seconds now, used to be instant
<FromGitter> <girng> i wonder what i did, i havn't messed with the WSL environment at all not sure
<FromGitter> <girng> im not sure how to debug it / check what's causing it
<FromGitter> <faustinoaq> @girng You can try to modify your sublime-text plugin for crystal, see: https://github.com/crystal-lang-tools/sublime-crystal/issues/42
<FromGitter> <faustinoaq> I think you can add some code to your crystal sublime plugin and solve your issue
<FromGitter> <girng> gonna try that =]
Yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
illy__ has joined #crystal-lang
illy_ has quit [Ping timeout: 260 seconds]
Yxhuvud has joined #crystal-lang
<FromGitter> <girng> holy hell
<FromGitter> <girng> sublime makes it so difficult to edit files
<FromGitter> <girng> you have to extract the files from the sublime-package, edit the file? then re-save it as the sublime-package format
Yxhuvud has quit [Client Quit]
Yxhuvud has joined #crystal-lang
duane has joined #crystal-lang
<FromGitter> <girng> ok changed it, no cmd pop up anymore, but formatter doesn't wokr
<FromGitter> <girng> i went to view-> show console in sublime. nothing shows up when i save i can't give any more information sorry :(
<FromGitter> <girng> wait! i got something
<FromGitter> <girng> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5ad7f3bb270d7d3708e0aa2b]
duane has quit [Ping timeout: 260 seconds]
<FromGitter> <girng> line 32: `rc = subprocess.call([settings.get("crystal_cmd"), "tool", "format", "-", "--format", "json"], stdout = pipe, stderr = pipe,startupinfo = startupinfo)`
That_Guy_Anon1 has joined #crystal-lang
That_Guy_Anon has quit [Ping timeout: 265 seconds]
duane has joined #crystal-lang
Yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
Yxhuvud has joined #crystal-lang
p0p0pr37 has quit [Quit: Going offline, see ya! (www.adiirc.com)]
duane has quit [Ping timeout: 260 seconds]
DTZUZO has quit [Read error: Connection reset by peer]
DTZUZO has joined #crystal-lang
<FromGitter> <PlayLights_twitter> Heye guys !
<FromGitter> <PlayLights_twitter> Did you have work with xlsx files on crystal?
<FromGitter> <faustinoaq> @girng Are you sure you have the right `import` at top of the Python file ?
<FromGitter> <faustinoaq> @PlayLights_twitter see http://crystalshards.xyz/?filter=xlsx 😄
<FromGitter> <girng> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5ad81ca315c9b0311410bc51]
rohitpaulk has joined #crystal-lang
johndescs_ has joined #crystal-lang
johndescs has quit [Ping timeout: 264 seconds]
johndescs_ is now known as johndescs
<FromGitter> <faustinoaq> @girng Where `pipe` come from? remember Python is very explicit, so no var or methods coming from everywhere, (unless you use `import * from foo` [bad practice])
rohitpaulk has quit [Ping timeout: 256 seconds]
<FromGitter> <girng> no idea lol i replaced it with subprocess.PIPE https://github.com/crystal-lang-tools/sublime-crystal/issues/42#issuecomment-382583895
<FromGitter> <girng> however, now getting `NameError: global name 'proc' is not defined on line 33` lol
rohitpaulk has joined #crystal-lang
<FromGitter> <bararchy> @PlayLights_twitter I didn't see any shards for docs handling , there is CSV in the std but not full xls xlsx
That_Guy_Anon1 has quit [Remote host closed the connection]
<FromGitter> <faustinoaq> @girng Try `pipe = open(os.devnull, 'w')`
<FromGitter> <sdogruyol> Morning 👋
alex`` has joined #crystal-lang
<crystal-gh> [crystal] sdogruyol closed pull request #5963: Use Char instead of String in split/join calls whenever possible (master...followup-to-pr-5882) https://git.io/vpLvn
<FromGitter> <girng> morning!
<FromGitter> <girng> @faustinoaq ok just tried that
<FromGitter> <girng> now getting `NameError: global name 'os' is not defined`
rohitpaulk has quit [Ping timeout: 276 seconds]
rohitpaulk has joined #crystal-lang
<FromGitter> <girng> ok so i did `import os`, that went away
<FromGitter> <girng> now, im getting `NameError: global name 'operating_system' is not defined`
<FromGitter> <girng> ok so i removed that if operating_system statement, since im on windows (WSL) don't relly need it
<FromGitter> <girng> but now getting: `NameError: global name 'proc' is not defined`
rohitpaulk has quit [Ping timeout: 260 seconds]
rohitpaulk has joined #crystal-lang
flaviodesousa has joined #crystal-lang
alex`` has quit [Ping timeout: 256 seconds]
rohitpaulk has quit [Ping timeout: 256 seconds]
rohitpaulk has joined #crystal-lang
<crystal-gh> [crystal] sdogruyol closed pull request #5842: Fix ASTNode#to_s to use escape sequence correctly (master...fix/crystal/to-s-for-string-like-literal-escape) https://git.io/vxGjz
<wuehlmaus> i have a problem, i want to generate docs with crystal git but it needs openssl so it stops generating the docs.
<wuehlmaus> i have openssl installed but it's not linked with apple
<wuehlmaus> -I/usr/local/opt/openssl/include -L/usr/local/opt/openssl/lib
<wuehlmaus> this can be used when using clang or gcc but i am not sure what to use with 'crystal docs'
<wuehlmaus> it used to just generate the docs but now it doesn't anymore.
<FromGitter> <TeddyDD> Hi. I'm trying to serialize enum to JSON as lowercase string like this: https://hastebin.com/uboninojay.rb I get error: Expected string for object name
<FromGitter> <TeddyDD> any ideas how I could do that?
<travis-ci> crystal-lang/crystal#9f589a0 (master - Fix ASTNode#to_s to use escape sequence correctly (#5842)): The build was broken. https://travis-ci.org/crystal-lang/crystal/builds/368548843
<DeBot> https://github.com/crystal-lang/crystal/pull/5842 (Fix ASTNode#to_s to use escape sequence correctly)
<wuehlmaus> https://bpaste.net/show/70e93edfea29 # this is my error when doing `` make docs ''
<jokke> TeddyDD: just write a converter
<jokke> see in the docs for JSON::Mapping
<jokke> *JSON.mapping
<FromGitter> <drum445> @sdogruyol morning mate, do you happen to know the cause for the EOF SSL issue I was having above?
<FromGitter> <sdogruyol> @drum445 it's prbably Crystal related
<FromGitter> <sdogruyol> what's your Crystal version?
<travis-ci> crystal-lang/crystal#9f589a0 (master - Fix ASTNode#to_s to use escape sequence correctly (#5842)): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/368548843
<DeBot> https://github.com/crystal-lang/crystal/pull/5842 (Fix ASTNode#to_s to use escape sequence correctly)
<FromGitter> <drum445> Crystal 0.24.2 [4f9ed8d03] (2018-03-08) ⏎ LLVM: 4.0.0
<FromGitter> <Sjoerrdd> Somebody here who ever has uploaded a crystal application?
<FromGitter> <Sjoerrdd> with NGINX etc?
<jokke> what do you mean?
<jokke> deployed?
<jokke> i've deployed many
<FromGitter> <Sjoerrdd> How x)
<FromGitter> <Sjoerrdd> I never have installed a VPS etc
rohitpaulk has quit [Read error: Connection reset by peer]
rohitpaulk has joined #crystal-lang
<crystal-gh> [crystal] straight-shoota opened pull request #5964: Fix Object.delegate to setter (master...jm/fix/delegate-setter) https://git.io/vpL9J
davic has joined #crystal-lang
<17SAA1LO9> [crystal] sdogruyol closed pull request #4635: [WIP] Added --include and --exclude options to format tool (master...tool-format-exclude-option) https://git.io/vQlAL
<17WAA79HD> crystal/master 591580e Johannes Müller: Added --include and --exclude options to format tool (#4635)
<17WAA79HD> [crystal] sdogruyol pushed 1 new commit to master: https://git.io/vpL5w
<DeBot> https://github.com/crystal-lang/crystal/pull/4635 ([WIP] Added --include and --exclude options to format tool)
<DeBot> https://github.com/crystal-lang/crystal/pull/4635 ([WIP] Added --include and --exclude options to format tool)
alex`` has joined #crystal-lang
<crystal-gh> [crystal] RX14 pushed 1 new commit to master: https://git.io/vpLdq
<crystal-gh> crystal/master 34078b8 Johannes Müller: Fix Object.delegate to setter (#5964)
alex`` has quit [Ping timeout: 248 seconds]
duane has joined #crystal-lang
<FromGitter> <faustinoaq> @girng I left a comment in the sublime-crystal issue 👍
<travis-ci> crystal-lang/crystal#34078b8 (master - Fix Object.delegate to setter (#5964)): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/368617279
<DeBot> https://github.com/crystal-lang/crystal/pull/5964 (Fix Object.delegate to setter)
phaed has joined #crystal-lang
<phaed> hi, is there any way to define a union type so I can reuse it without having to repeat it?
<z64> yes, `alias`
<phaed> thanks
<FromGitter> <faustinoaq> > Python has brought taken us backwards, not forwards. 40/50 years ago, automatically declaring variables as real or integer in FORTRAN caused so many wasted hours of chasing down typos that it was decided to forcefully type everything. Companies saved millions (as an entire industry) just by having the compiler find those typos in 500,000+ lines of code programs. Why are we going backwards??? ⏎ ⏎ ^^
<FromGitter> ... http://lenkaspace.net/blog/show/111 ⏎ ⏎ Should we consider declaring variables in crystal? 😅 ... [https://gitter.im/crystal-lang/crystal?at=5ad8a9dd6bbe1d273902e533]
<FromGitter> <yxhuvud> That blog post was clearly not written with inferred types in mind.
<FromGitter> <faustinoaq> Yeah, I just realize of that 😅
<FromGitter> <Givralix> hi, I tried to make bindings for a C struct and a C function which returns that struct, but when trying to access its values, they're all wrong and some of them are random, does someone have a clue why it would happen?
rohitpaulk has quit [Ping timeout: 240 seconds]
<FromGitter> <asterite> I don't think you can safely return structs in C
<FromGitter> <Givralix> oh
<FromGitter> <asterite> at most you return a pointer somewhere... what's the function?
<FromGitter> <Givralix> it's xcb_setup_roots_iterator
<FromGitter> <Givralix> supposedly it directly returns the struct? I've never programmed in C
<FromGitter> <Givralix> (https://xcb.freedesktop.org/manual/xproto_8h_source.html here's the source)
<FromGitter> <asterite> Hm, maybe it doesn't, not sure how well that's supported in Crystal
<FromGitter> <Givralix> ok! thank you, I'll keep searching for some way to make it work
<FromGitter> <asterite> Hm, actually, I think that should work... and if not, it's a bug in the compiler (and that won't be fixed anytime soon)
<FromGitter> <sdogruyol> @asterite new avatar? Nice 💯
rohitpaulk has joined #crystal-lang
<Vexatos> I don't see a new avatar
<FromGitter> <j8r> @sdogruyol It's also the first time I see @asterite in gitter 🎉
flaviodesousa has quit [Ping timeout: 256 seconds]
<crystal-gh> [crystal] j8r opened pull request #5967: Add Gitter badge (master...gitter_badge) https://git.io/vptnI
benharri has quit [Quit: The Lounge - https://thelounge.github.io]
benharri has joined #crystal-lang
pbodev1 has joined #crystal-lang
<FromGitter> <Givralix> I made a function in C to get a pointer to the struct I want and now it works! thanks a lot for the help
<FromGitter> <bew> @Givralix you're trying to make ab xcb binding? I have one that barely work to spawn a window, and draw points/lines in it
<FromGitter> <Givralix> yeah! and nice
<FromGitter> <Givralix> I don't think I'll get far but it's already good
<FromGitter> <bew> It's still a private repo, because I'm currently working on a pure crystal implementation of the X11 protocol, but maybe I can make the other one public so you could use it in some ways
<FromGitter> <Givralix> I wanna try making it myself but thank you! good luck on your implementation
<FromGitter> <bew> Ok, no problem, have fun :)
<FromGitter> <bew> Don't hesitate to ask if you have questions
<crystal-gh> [crystal] RX14 closed pull request #4584: Implement no-copy subarray iteration (Implements #3386) (master...feature/nocopy_subarray_each) https://git.io/vHhok
<FromGitter> <j8r> @bew X11 implementation, wow! Happy, but in the same time sad about not being Wayland :-/
<travis-ci> crystal-lang/crystal#74cf7c4 (master - Implement no-copy subarray iteration (Implements #3386) (#4584)): The build has errored. https://travis-ci.org/crystal-lang/crystal/builds/368739352
<DeBot> https://github.com/crystal-lang/crystal/issues/3386 (Sub-array iterateration without clone to new array) | https://github.com/crystal-lang/crystal/pull/4584 (Implement no-copy subarray iteration (Implements #3386))
<FromGitter> <bew> Yeah I considered Wayland, but it doesn't fit at all with what I want to do
<FromGitter> <sdogruyol> I like Wayland..but it doesn't support full screen sharing
<oprypin> Givralix, yeah likely you ran into a bug that won't be fixed. nice that you made a workaround with the pointer, that's the correct one. though i think having a C component will make your bindings harder to distribute
<oprypin> (off topic) ok why the hell was i logged out of all accounts (including work) on all computers (including work)
alex`` has joined #crystal-lang
<crystal-gh> [crystal] sdogruyol opened pull request #5968: Remove TODOs from class spec (master...remove-class-spec-todos) https://git.io/vptwh
Ven`` has joined #crystal-lang
That_Guy_Anon has joined #crystal-lang
<FromGitter> <meraxes_twitter> a question: when doing `include ModuleName`can you import a `def initialize`? Doesn’t seem to work.
<FromGitter> <asterite> it should work, unless you also have `initialize` in the class that includes it
<FromGitter> <meraxes_twitter> That would be my problem. No way to override an `initialize` via an `include`?
<FromGitter> <j8r> @meraxes_twitter that seems wrong if you need to do this. Have you thought about abstract classes?
<FromGitter> <asterite> nope
<FromGitter> <meraxes_twitter> gotcha. thx for clearing that up for me
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<FromGitter> <asterite> Actually, it works if you put those initialize inside `macro included`
<FromGitter> <Sija> @phaed `alias MyType = String | Int32`
<FromGitter> <asterite> Like this: https://carc.in/#/r/3wjp
<FromGitter> <meraxes_twitter> Interesting. @j8r - Had, but looking at someone elses code and was looking to doing a little refactoring. not sure the author would be open to this refactor.
<FromGitter> <meraxes_twitter> Good to know though.
<FromGitter> <meraxes_twitter> thx @asterite
Ven`` has joined #crystal-lang
Ven`` has quit [Read error: Connection reset by peer]
Ven` has joined #crystal-lang
Ven`` has joined #crystal-lang
Ven`` has quit [Client Quit]
Ven` has quit [Ping timeout: 256 seconds]
<crystal-gh> [crystal] straight-shoota opened pull request #5969: Compiler: Add symbol literals support equal sign `=` as last char (master...jm/fix/symbol-literal-equals) https://git.io/vptDU
<FromGitter> <meraxes_twitter> damn this is fun
<FromGitter> <asterite> yup, it's designed to be fun for the users but a PITA for the compiler developers :-) :-(
<FromGitter> <Givralix> honestly thank you (compiler developpers) a lot because Crystal's a really nice language to use !!
<FromGitter> <meraxes_twitter> ^ what he said
<FromGitter> <meraxes_twitter> I’ll stick to this higher level stuff and just thank you for the rest of it. :D
early` has quit [Quit: Leaving]
early has joined #crystal-lang
That_Guy_Anon has quit [Remote host closed the connection]
That_Guy_Anon has joined #crystal-lang
<FromGitter> <straight-shoota> oprypin, what's breaking in #5969?
<DeBot> https://github.com/crystal-lang/crystal/pull/5969 (Compiler: Add symbol literals support equal sign `=` as last char)
Ven`` has joined #crystal-lang
<FromGitter> <asterite> not a breaking change in my opinion
<FromGitter> <straight-shoota> unfortunately, it is :/
<FromGitter> <asterite> oh, because `:a==:a`? that should parse as `:a == :a`. it's like that in Ruby
<RX14> :a==:a shouldn't parse
<FromGitter> <straight-shoota> well it makes sense: `(:a=)=(:a)` is invalid and `:(a)==(:a)` the only logical interpretation
<FromGitter> <asterite> ^ that
<FromGitter> <straight-shoota> *`(:a)==(:a)`
<RX14> (:a==)(:a)
<RX14> which is two expressions seperated by 0 whitespace
<RX14> can't parse
<RX14> it's like doing nilnil
<FromGitter> <straight-shoota> huh?
<FromGitter> <straight-shoota> `:a==` would be invalid
<RX14> why?
<FromGitter> <straight-shoota> = should only be allowed as last character
<FromGitter> <asterite> because you can't assign to a symbol
<RX14> meh
<FromGitter> <straight-shoota> same as `:a??`
<RX14> i'd just parse from : until writespace
<RX14> hmm
<RX14> nah that's dumb
<RX14> so many edge cases
<FromGitter> <straight-shoota> it makes great sense to me if symbols follow the same naming rules as methods
<FromGitter> <straight-shoota> *that
<RX14> yeah I guess
<RX14> but yeah I see now
<RX14> it should parse as :a= = :a
<RX14> which is invaid
<RX14> but then again :a===:a is also stupid
<RX14> and by that logic should parse as
<RX14> :a= == :a
<RX14> just remove symbols
<RX14> which is fantastic
<FromGitter> <sdogruyol> @oprypin blame the full system upgrade..somehow chrome got updated and logged me out of everything
<RX14> it frees up the syntax for use as a shortcut for enums
<RX14> I never use symbols, they're weird and should be replaced by enums
<FromGitter> <sdogruyol> even Matz regrets having symbols...
<FromGitter> <sdogruyol> it made sense back in 90s though
<RX14> in crystal using string literals has the same overhead as symbols
<RX14> because strings are immutable
<RX14> if it's the same pointer it's the same string
<FromGitter> <straight-shoota> in Ruby they can be really handy. But Crystal eliminates most of their use cases
<FromGitter> <sdogruyol> yeah..even in MRI they've optimized Strings a lot that it doesn't worth much to use symbols anymore
<FromGitter> <asterite> That's true, symbols should be removed
<FromGitter> <asterite> (and the whole language changed too :-P)
<RX14> removing symbols makes using symbol syntax as a shortcut for enum members in methods
<RX14> so you can finally do Process.run(..., error: :close)
<RX14> :Close*
<FromGitter> <sdogruyol> let's remove symbols, haha
<RX14> @asterite the language is pretty alright in general
<FromGitter> <straight-shoota> @RX14 that sounds promising
<RX14> its already been discussed
<FromGitter> <asterite> RX14 Nah, it's stuck, no progress because it's so damn hard to continue developing such a beast. The language should be simplified, methods fully typed, etc.
<RX14> @asterite no, there's no progress because there's no people with the time
<FromGitter> <sdogruyol> beast..I take it as beauty :P
<RX14> @asterite you managed to accomplish so much in your years developing the crystal compiler we've barely needed to touch it since you left
<RX14> that's my opinion
<RX14> yeah it needs a few changes - it's not perfect - but it's far better than anything else i've used
<FromGitter> <straight-shoota> I agree
<FromGitter> <asterite> sounds good
<RX14> we have a very unique typing system which is the only typing system i've ever used which feels like using a dynamic language
<RX14> throwing that away would be stupid
<FromGitter> <asterite> or wise :-P
<FromGitter> <sdogruyol> union types are so awesome
<FromGitter> <asterite> algebraic data types are better
<RX14> once we throw that away then what is crystal?
<RX14> go with ruby syntax
<FromGitter> <sdogruyol> @asterite I'm not sure..they're much verbose for me
<FromGitter> <asterite> go with ruby syntax that also compiles fast, has good IDE support, etc. :-P
<RX14> don't need ide support in crystal
<FromGitter> <sdogruyol> it's already ok..doesn't have to be perfect
<FromGitter> <sdogruyol> we need to get 1.0 then do optimize the shit out of the compiler e.g
<FromGitter> <asterite> yeah, I guess it'll never be perfect
<RX14> the only IDE support I ever reach for is textual refactors
<RX14> such as "extract variable"
<RX14> or "inline variable"
<RX14> and that's easy enouh to get 99.9% right with regex
<FromGitter> <sdogruyol> I think..Crystal is the only compiled language that I haven't needed an IDE
<FromGitter> <straight-shoota> :D
<FromGitter> <sdogruyol> I've did a lot of Java...can't imagine doing all that without an IDE lol
<FromGitter> <asterite> i guess you all win :)
<FromGitter> <sdogruyol> we win @asterite 👍
<RX14> @asterite my point is that ADTs are cool but that design space is already pretty much full
<RX14> you could write crystal again with ADTs but you'd end up with a language which basically already exists
<FromGitter> <sdogruyol> I'd go with Haskell if I were into adt that much
<RX14> and judging by the response to crystal, people are really likeing crystal's position in design space
<RX14> @sdogruyol ocaml is better :P
<FromGitter> <sdogruyol> I'm only interested in Ocaml cause of Mirage
<FromGitter> <sdogruyol> and maybe Reason
<FromGitter> <asterite> maybe someday someone will come and hopefully rewrite the compiler with readability and performance in mind
<FromGitter> <sdogruyol> the compiler is actually super easy to read...
Jenz has joined #crystal-lang
<RX14> @asterite i'm not saying that the compiler isn't a mess
<FromGitter> <asterite> maybe you didn't reach MainVisitor yet :-P
<oprypin> > I think..Crystal is the only compiled language that I haven't needed an IDE
<oprypin> yep
* Jenz eyes
<FromGitter> <asterite> oprypin what about nim?
<FromGitter> <sdogruyol> oh well, you're being hard on your own creation asterite :)
<FromGitter> <j8r> I will send you a PR soon about files in `src/compiler/crystal/semantic/` , some if blocks rewrited
<FromGitter> <asterite> nah... I just think it was a nice experiment
<Jenz> It is irritating at times, not having scrollback
<oprypin> cmon, asterite
<RX14> get a bouncer
<FromGitter> <j8r> so what new language to go? Rust, Nim, Go?
<oprypin> these are trash
<FromGitter> <j8r> Elixir/Julian maybe
<FromGitter> <asterite> Pony!
<FromGitter> <asterite> Nah, I don't know...
<RX14> oprypin, rust's cool - for limited usecases
<RX14> nim's cool but not in a good way
<FromGitter> <sdogruyol> I still don't understand why you think Crystal is just experimental..it's pretty much the best upcoming language out there
<RX14> and go's boring
<dom96> asterite: It seems you and Araq want similar things for your own respective languages. He talks a lot about simplifying Nim too :)
<FromGitter> <sdogruyol> there comes the Nim guy :D
<oprypin> it's too late for nim
<RX14> @sdogruyol depends what you think is experimental
<FromGitter> <asterite> In my mind we should have Go, Crystal (Go with Ruby syntax) and Nim (Go with Python syntax)... (just kidding)
<RX14> it's nearly too late for crystal oprypin
<FromGitter> <sdogruyol> kinda
<FromGitter> <asterite> dom96 simpler how?
<FromGitter> <sdogruyol> the big boys have so much momentum...and it's really hard to catch
<RX14> @asterite simplifying things is great - but not where we loose too much expresability
<dom96> asterite: less features
<FromGitter> <sdogruyol> Nim is trying to achieve too many things...compiling to JS, opt-in GC e.g
<RX14> lots of languages shoot themselves in the foot by optimizing for newcomers at the expense of experienced users
<FromGitter> <sdogruyol> quite ambitious and hard to achieve with limited resources
<FromGitter> <asterite> oh, don't let Nim go the "opt-in GC"... I think D went for that route too...
<RX14> not to mention that it chose the wrong starting syntax :P
<FromGitter> <asterite> so, with limited resources it's a good idea to simplify things ;-)
<FromGitter> <sdogruyol> hahah
<oprypin> as an aside: I'm pretty amazed by foresight of Ruby for its constructs to be so directly applicable in a compiled language
<RX14> @asterite but we already have all the complex stuff built
<dom96> asterite: It's been possible to disable the GC in Nim for a while now
<FromGitter> <sdogruyol> dude, we're already good enough to get some stuff and make $$$ with it :P
<RX14> @asterite, I honestly cannot imagine new compiler features for crystal apart from casting explcitly typed method arguments - then typing those methods only once
<RX14> and then a bit of literal type backtracking
<FromGitter> <sdogruyol> and for god's sake...please don't underestimate Crystal
<oprypin> yeah
<RX14> but honestly the literal type backtracking is fine if it only works for literals in method args
<RX14> and that's "easy"
<FromGitter> <j8r> Let's restart from scratch and build a new language, Scree - what an elegant name :-)
<RX14> so it's honestly ""just"" casting explicitly typed method args to fix the compile times
<oprypin> rx14, isn't that last part just unrelated syntax sugar?
<RX14> yes oprypin
<FromGitter> <drum445> My office is always surprised by how quickly you can write something in Crystal and still have very solid performance
<FromGitter> <asterite> that doesn't fix the compile times
<RX14> but very useful syntax sugar
<FromGitter> <asterite> it's just lower thems by a constant
<RX14> meh
<RX14> I doubt that
<FromGitter> <asterite> to fix compiles times we need modularized or incremental compilation
<RX14> I expressed this before
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<FromGitter> <sdogruyol> +100 --> My office is always surprised by how quickly you can write something in Crystal and still have very solid performance
<FromGitter> <bararchy> @asterite compile times are not that big of an issue, and the thin-lto really helped
<RX14> shards with well-typed interfaces will naturally form modules @asterite
<FromGitter> <asterite> oh, really? I never tried that thin-lto
<dom96> RX14: cool but in a bad way, how so? :)
<RX14> and then you're O(shards) not O(methods)
<RX14> which is much better
<FromGitter> <sdogruyol> rx14 I think Rust is doing that
<RX14> @bararchy thinlto only helps for release builds
<FromGitter> <bararchy> @asterite it's usefull for release mode
<RX14> @sdogruyol not really
<FromGitter> <bararchy> RX14 which are the main issue when talking about compile times
<FromGitter> <j8r> I think this not that if we never reach 1.0 - a rolling release programming language
<RX14> rust has always compiled creates seperately
<FromGitter> <sdogruyol> when talking about compile times...people mostly refer to --release mode
<FromGitter> <asterite> well, forget about all I just said... what's the roadmap? what's on your mind? (not on my mind because I don't know what's missing, other than fixing those many bugs)
<FromGitter> <bararchy> Windows, Multi-thread
<FromGitter> <bararchy> and I'm tottaly fine :)
<RX14> yeah
<RX14> i'm working on windows
<FromGitter> <asterite> but something that the community can do? :-)
<RX14> windows
<FromGitter> <bararchy> bind CUDA ? ;)
<FromGitter> <asterite> windows is good, I guess... i can review PRs for it
<FromGitter> <sdogruyol> it's the community doing windows
<FromGitter> <drum445> If you could cross compile to windows we'd be laughing
Ven`` has joined #crystal-lang
<RX14> @sdogruyol well it's mostly me for now...
<FromGitter> <sdogruyol> @drum445 what do you use Crystal for?
<FromGitter> <asterite> why laughing? is windows a joke?
<RX14> windows isn't at a place where it's bootstrapped far enough to work on seperately
<FromGitter> <drum445> I agree but you can't ignore it's market share
<FromGitter> <sdogruyol> rx14 you're the community :)
<RX14> not really
<FromGitter> <bararchy> @asterite RX14 said that next thing regarding Windows (after File\Folder) is working on getting crystal.exe on Windows
<FromGitter> <drum445> For any APIs I need up and running quickly, or I recently re-wrote our python sql import job in crystal and the performance increase was crazy
<FromGitter> <bararchy> it's already working but some wierd codegen error
<FromGitter> <bararchy> maybe you can check it out?
<RX14> i'm in the core team so i'm definitely not what I think @asterite means by community
<FromGitter> <sdogruyol> yup, I got what he said...
<FromGitter> <sdogruyol> what I actually meant is that..we were actually from the community and not from Manas itself
<FromGitter> <drum445> Saying that, I think I'd use it for big projects too tbh, with Kemal it gives you a lot of flexibility without losing performance
<FromGitter> <asterite> with community I just mean people actively working on the language
<FromGitter> <sdogruyol> they're the future potential core contributors :P
<FromGitter> <asterite> that includes you, RX14, and also straight-shoota, oprypin, MakeNowJust, Sija, sdogruyol, and many others
<FromGitter> <sdogruyol> yeah, a lot of awesome people 💯
<oprypin> people just make small fixes
<RX14> @asterite I take community to mean people outside the core team
<oprypin> I'm not doing even that D:
<RX14> otherwise the only people not community is manas
<RX14> and manas shouldn't be treated specially
<Vexatos> I am not community, either!
<Jenz> In my opinion, you guys are all at the very core of the community :D
<FromGitter> <sdogruyol> let's just finish windows and multi-thread...tag 1.0 and go
<FromGitter> <bararchy> oprypin you help lots of people in gitter , that's a BIG help
<FromGitter> <bararchy> @sdogruyol k, 10 min
<FromGitter> <sdogruyol> the rest will follow :)
<RX14> yeah definitely
<crystal-gh> [crystal] asterite pushed 2 new commits to master: https://git.io/vptxI
<crystal-gh> crystal/master 7b32e25 Ary Borenszweig: Merge pull request #5968 from sdogruyol/remove-class-spec-todos...
<crystal-gh> crystal/master c109bb5 Serdar Dogruyol: Remove TODOs from class spec
pbodev1 has quit [Quit: ChatZilla 0.9.93 [Firefox 56.0/20170903140023]]
<RX14> oprypin and Papierkorb are both super super helpful and knowledgeable
<FromGitter> <sdogruyol> they're the best
<oprypin> I was just thinking, what if fibers weren't there and were just replaced with threads
<FromGitter> <sdogruyol> thank you oprypin and papierkorb 👍
<FromGitter> <asterite> multi-thread, mmm... many Go projects recommend going with GOMAXPROCS=1 to avoid the performance lost because of all the context switching... so maybe something different will have to be done
<FromGitter> <sdogruyol> lol, is that for real?
<RX14> @asterite I would have 0 complaints about being single-threaded forever
<RX14> it's just everyone else seems to really like it
<FromGitter> <asterite> sdogruyol: yeah, they recommend firing up multiple processes...
<FromGitter> <asterite> i can't remember which app it was
<FromGitter> <sdogruyol> now, I feel really sad for all that money G spent on it :D
<dom96> Did they perform any benchmarks to show that it actually makes things faster?
<RX14> it can't be because of context switches
<FromGitter> <sdogruyol> after 1.5 they've really improved GC and sync stuff
<RX14> I can't imagine getting less context switches using multiple processes vs a single one
<FromGitter> <drum445> Go routines are v powerful
<RX14> unless you just pin to each core
<Vexatos> multi-threading only is faster when you actually have lots of threads doing things for long periods of time, completely separately from one another
<RX14> actually yeah thats proabbly it
<RX14> Vexatos, define long
<FromGitter> <drum445> If we're talking about things we'd like in Crystal, I'd love to see a MongoDB driver
<RX14> because long is 1us
<Vexatos> long enough to be worth the additional overhead coming from thread creation
<FromGitter> <asterite> here https://docs.traefik.io/benchmarks/
<RX14> but threads have little overhead Vexatos
<Vexatos> and if the threads talk to one another, you already have major drawbacks
<FromGitter> <sdogruyol> I love fibers tbh
<FromGitter> <asterite> "Run a separate server instance per CPU core with GOMAXPROCS=1 (it appears during benchmarks that there is a lot more context switches with Traefik than with nginx)"
<FromGitter> <bararchy> @drum445 that's a shard not really something for Crystal core team
<FromGitter> <drum445> @bararchy this is true, I would still like to see it from someone more intelligent than I am though ;)
<FromGitter> <sdogruyol> asterite couldn't see the go version in the post
<RX14> I kinda like the idea of having crystal be single-threaded by default
<RX14> with an option to make it multithreaded
<RX14> but then you encourage people to make their shards only support singlethreaded
<RX14> and ehh
<oprypin> RX14, it's a false sense of security
<RX14> thats a mess
<FromGitter> <sdogruyol> IMHO it's yay or nay
<FromGitter> <sdogruyol> no optional please
<FromGitter> <bararchy> By default is fine, as long as I can compile --threads or something
<oprypin> concurrency causes the need for synchronization
<oprypin> not parallelism
<RX14> i'd be like go @bararchy
<FromGitter> <j8r> Windows and multi-thread aren't that big brakes. Thinks about Node.js (mono thread) and Go (mostly used on Linux servers honestly)
<RX14> just en env var
<FromGitter> <asterite> other than windows and multi-thread, what's missing in the standard library and language? (in your opinion)
<Vexatos> If I am allowed to throw in my two cents, I _really really_ like the way Julia handles concurrency
<RX14> @asterite path :P
<RX14> and most of it needs removing
<FromGitter> <sdogruyol> asterite better generic
<FromGitter> <sdogruyol> generics*
<RX14> @asterite I basically outlined my vision for the stdlib in your issue about removing most of it
<FromGitter> <bararchy> @asterite more colors for colorize ;)
<FromGitter> <sdogruyol> lol
<FromGitter> <asterite> RX14 well, then merge Path. I have mixed feelings about it, but if you all like it, you know better (I don't use the language these days, so...)
<RX14> @asterite i don't want to merge path if people object
<FromGitter> <bararchy> @asterite have you tried the new ruby mjit ?
<dom96> Vexatos: How does Julia handle concurrency?
<RX14> of course i'd like to see it merged, but not by merging against other people
<FromGitter> <asterite> barachy: nope, not yet
<FromGitter> <bararchy> RX14 isn't half of windows support depends on it ?
<FromGitter> <sdogruyol> we need to get to 1.0 before Ruby 3.0 :D
<RX14> dom96, i think csp like crystal
<RX14> not 100%
<FromGitter> <asterite> RX14 there will always be people against something
<RX14> @asterite yeah but I tend to listen to those people more when they're in the core team
<FromGitter> <j8r> IMHO If we really think about Crystal as an User, most of the hard work is already done (syntax, shards etc). Lots of works are still in the underlying compiler
<oprypin> bararchy, Path is just a nice wrapper, no, it's not related
<RX14> because you're going to have to work with them for the indefinite future
<FromGitter> <sdogruyol> well, what I don't like about that is...sometime we've stuff stale for eternity
<FromGitter> <BrucePerens> Am I missing how you can call fsync(), or do I need to define a C lib? I want to do crash-safe file replacement using fsync and then rename over old file.
<FromGitter> <j8r> All the world is in the Chan today, Awesome :-D
<Jenz> That’d be nice
<oprypin> isn't renaming over the old file the whole safe replacement? why fsync?
<FromGitter> <sdogruyol> rx14 can't you delegate any windows work to anyone else?
<RX14> @BrucePerens the best way for atomic file replace is a rename
<RX14> and that needs no fsync
<FromGitter> <BrucePerens> Fsync assures you that the blocks have actually been written to disk before you rename. If there is a crash before then, you get a file with garbage blocks if you don't fsync.
<FromGitter> <j8r> like an intern at Manas haha
<RX14> @sdogruyol they're free to if they want
<RX14> I don't see anyone offering
<FromGitter> <sdogruyol> who?
<RX14> @straight-shoota's done a lot of really good work
<RX14> like cleaning up the specs
<RX14> and stuff
<FromGitter> <sdogruyol> ah yeah, he's doing some fantastic work
<RX14> like @straight-shoota's helped the crystal effort nearly as much as me
<RX14> s/crystal/windows
<RX14> especially with Path
<oprypin> BrucePerens, thanks. https://github.com/crystal-lang/crystal/search?q=fsync is pretty conclusive. yeah, define a C fun
<FromGitter> <BrucePerens> OK, thanks.
Jenz has quit [Read error: Connection reset by peer]
<FromGitter> <sdogruyol> asterite I think it'd be great if you actually review some Windows PR :)
<FromGitter> <sdogruyol> windows-related*
<FromGitter> <asterite> probably FileDescriptor is missing fsync...
<RX14> fsync isn't on FD
<FromGitter> <asterite> I think there's the File and Dir PR, but it's marked with a red cross
<RX14> oh never mind
<RX14> I'll eat my words
<FromGitter> <BrucePerens> Yes, IO:FileDescriptor needs it.
<RX14> @BrucePerens renames are already atomic though
<RX14> I don't see what renaming files has to do with fsync
<RX14> sync() maybe
<RX14> syncfs() maybe
<RX14> not fsync()
<RX14> sync() causes all buffered modifications to file metadata and data to be written to the underlying file systems.
<RX14> fsync() transfers ("flushes") all modified in-core data of (i.e., modified buffer cache pages for) the file referred to by the file descriptor fd to the disk device
<FromGitter> <sdogruyol> damn..github is so slow and 500s when trying to see the commit diff from 0.24.2. I think we should help them switch to Crystal haha
<FromGitter> <BrucePerens> I don't believe that all Unix-like systems assure you that the blocks of the file are actually written when you rename a file. So, it is atomic as far as the directory is concerned. But not the file contents. Don't sync(), it's too expensive and requires root. Only need to assure that the contents of your file are written.
<RX14> @BrucePerens yep, gotcha
<RX14> you create file, fsync, close, rename over old file
<RX14> after the rename you either have the new one or old one entirely on disk
<RX14> actually I don't think fsync would be neccesay here
<RX14> if you did a file write then a rename
<FromGitter> <BrucePerens> Plus link old file to <name>.old before rename, if you want it.
<RX14> I cannot see it not being a bug that that wasnt atomic
<RX14> because what would you get?
<oprypin> RX14, again, the point is that the system might crash
<RX14> yes
<RX14> I get that
<RX14> but you're still going to get either the old or new file - intact
<RX14> without fsync
<oprypin> you renamed to the new file, and that's nice and all, but the contents of the new file have not been properly written yet
<RX14> otherwise what other possible state could there be?
<FromGitter> <BrucePerens> @RX14 you can have garbage blocks in a file after a disk crash, and no problem with the filesystem structure (because that is written synchronously). We delay writes on most Unix filesystems as an optimization. Usually that is fine.
<RX14> yeah never mind, I was wrong
<RX14> I just wasn't imaginative enough on the failure states
<RX14> the rename could be ordered before writing out all the data
<RX14> so yeah you could get half-written new file
<FromGitter> <BrucePerens> No problem. Most often this is just because someone pulls the plug at the wrong time. I am a systems programmer and have excessive paranoia. It's a job requirement.
<RX14> oh of course
<RX14> I'm pretty aware of all that ugliness
<FromGitter> <BrucePerens> Application is a localization editor. People get upset if you munge their source code.
<RX14> fsync and fdatasync should be exposed I guess
<FromGitter> <sdogruyol> thanks everyone and have a good night
<RX14> nn
<FromGitter> <drum445> gn
<travis-ci> crystal-lang/crystal#7b32e25 (master - Merge pull request #5968 from sdogruyol/remove-class-spec-todos): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/368848920
<DeBot> https://github.com/crystal-lang/crystal/pull/5968 (Remove TODOs from class spec)
pabs has quit [Ping timeout: 260 seconds]
pabs has joined #crystal-lang
<FromGitter> <girng> good afternoon!!
<FromGitter> <girng> glad to see main developers chatting in gitter since 10 days
<FromGitter> <girng> i really like crystal a lot hope that is re-occurring thx
duane has quit [Ping timeout: 246 seconds]
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Ven`` has joined #crystal-lang
<FromGitter> <girng> btw, this hash key with begin raise exception is very nice
<FromGitter> <girng> basically, my player is submitting data over tcp from godot. and if they don't have the required fields from a json string (bio, location, gender). crystal will actually throw an exception if one of those are missing, and i currently disconnect the user
<FromGitter> <girng> because at that point, i assume a client is being naughty and sending bad packets/streams over the pipe (hackers, or clientless bot).
<oprypin> good
<FromGitter> <girng> @oprypin btw, since moving from nodejs my server has been way more stable than before
<FromGitter> <girng> obviously it's not in production, but you know what i mean. im speaking just from development, in nodejs used to crash all the time, and had to put try catch statements over every block, etc
<FromGitter> <girng> now in crystal, i junst have 1 exception handler and im good to go
alex`` has quit [Ping timeout: 264 seconds]
<FromGitter> <BrucePerens> I blogged my experience so far in learning Crystal and Lucky (https://perens.com/2018/04/19/learing-crystal-langauge-and-lucky-web-framework/).
<FromGitter> <faustinoaq> @BrucePerens Oh, very nice! 😄 👏 ✨
<FromGitter> <bew> Title learing => learning :D
Yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
<FromGitter> <bew> The post is nice 👏
Yxhuvud has joined #crystal-lang
<RX14> @BrucePerens static strings are already in the readonly part of the ELF
<RX14> or do you mean actually manually mapping the pages readonly?
<RX14> that doesn't sound healthy in a GC language
<FromGitter> <j8r> I've a for loop inside a macro exactly like that https://github.com/crystal-lang/crystal/blob/master/src/yaml/mapping.cr#L71 - how can I access to a string located at `_properties_[key][:info]`?
<FromGitter> <asterite> that should work (unless I'm misunderstanding something)
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<FromGitter> <j8r> I have ``` ⏎ wrong argument for StringLiteral#[] (SymbolLiteral): :info ⏎ ⏎ `````` [https://gitter.im/crystal-lang/crystal?at=5ad92d145d7286b43a493ceb]