<FromGitter>
<faustinoaq> @girng I used to use Windows 7 Enterprise at work and in the section "Add/Remove Windows Features" I saw something like "UNIX subsystem", never tried it, though
<FromGitter>
<girng> lol really
<FromGitter>
<faustinoaq> I guess was only available on Windows 7 Enterprise
<FromGitter>
<faustinoaq> Now, I'm using Windows 10 and WSL works out the box 😉
<FromGitter>
<girng> i have windwos 10. but i don't like it anymore, im frustrated at it
<FromGitter>
<girng> i like windows 7...
<FromGitter>
<girng> i have linux mint on a virtual machine with crystal installed. but i want to edit my files in sublime in windows 7
<FromGitter>
<girng> i wonder if that is possible, i guess that could work right
<wmoxam>
You should be able to do it through an nfs share
<FromGitter>
<Blacksmoke16> is there a way to require a method param if another is used
<FromGitter>
<Blacksmoke16> say i have param1 and param2
<FromGitter>
<Blacksmoke16> i.e. if someone calls a method with param1, require them to supply param2 as well
<FromGitter>
<bew> don't give param2 a default value? (this way it's a required arg)
<FromGitter>
<Blacksmoke16> but what if it should be optional if param1 isnt supplied
<FromGitter>
<Blacksmoke16> er not required*
<FromGitter>
<bew> then do 2 methods
<FromGitter>
<bew> one with no args, one with 2 args
<FromGitter>
<Blacksmoke16> as an overload?
<FromGitter>
<Blacksmoke16> ah smart
<FromGitter>
<bew> yes exactly
<FromGitter>
<faustinoaq> > i have linux mint on a virtual machine with crystal installed. but i want to edit my files in sublime in windows 7 ⏎ ⏎ You can use samba share as well 😄
<FromGitter>
<faustinoaq> I used to use it at work
<FromGitter>
<girng> screw it i just go back to w10
<FromGitter>
<faustinoaq> ^ BTW, you should share your folder in Windows 7 before mounting it on Linux
<FromGitter>
<girng> ok
<FromGitter>
<faustinoaq> ^ Remember to enable full access (write/read permissions)
<FromGitter>
<faustinoaq> I checked my zsh_history, seems the command I used was: `mount.cifs //10.42.0.45/Users /home/main/Public/Users -o user=faguilar` 😅
<FromGitter>
<girng> hehe dat space
<FromGitter>
<Blacksmoke16> that worked pretty good @bew thanks
Creatornator has joined #crystal-lang
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Creatornator has joined #crystal-lang
Creatornator has quit [Client Quit]
Creatornator has joined #crystal-lang
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
snsei has quit [Ping timeout: 276 seconds]
<crystal-gh>
[crystal] ddrscott opened pull request #5929: add spec to reproduce sizeof(typeof(v)) bug (master...ISSUE_5717) https://git.io/vxQ4l
ashirase has joined #crystal-lang
snsei has joined #crystal-lang
Yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
Yxhuvud 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 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 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 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 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 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 quit [Ping timeout: 245 seconds]
snsei has joined #crystal-lang
snsei has quit [Ping timeout: 276 seconds]
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
snsei has joined #crystal-lang
snsei has quit [Ping timeout: 245 seconds]
ashirase has quit [Ping timeout: 265 seconds]
ashirase has joined #crystal-lang
<FromGitter>
<bararchy> Morning all :)
<FromGitter>
<bararchy> anyone knows about people who uses Crystal in Belarus ? XD
<FromGitter>
<girng> good morning!!
<FromGitter>
<girng> it's crystal time
<FromGitter>
<bararchy> @girng how goes your game engine?
<FromGitter>
<bararchy> game server
<FromGitter>
<bararchy> sorry
<FromGitter>
<girng> @bararchy it is going good. im very pleased with it. crystal communicates really nice with godot's tcp api. it's seamless to set up
<FromGitter>
<bararchy> awsome!
<FromGitter>
<bararchy> sounds like you're having fun
<FromGitter>
<bararchy> when will your game be ready?
<FromGitter>
<bararchy> also, what's it about?
<FromGitter>
<girng> it's going to be an action RPG similar to diablo 2, but top down / not isometric (don't have enough art for top down sprite animations) :O
<FromGitter>
<girng> once im done wih the master server, i need to implement the game instance server. which handles monster ai / relay players location
<FromGitter>
<girng> with a fixed timestep on the server (tickrate)
<FromGitter>
<girng> it will be harder i think. so glad crystal has good community incase i get stuck some more :D
<FromGitter>
<girng> this is why `loop do sleep xx end` will be my best friend :D
snsei has joined #crystal-lang
<FromGitter>
<Qwerp-Derp> So I have a class Hedron::Box, but I want to use Crystal's Box. How do I specify to use Crystal's Box?
snsei has quit [Ping timeout: 255 seconds]
<FromGitter>
<bararchy> @girng really cool, sounds a little like ultima :) ⏎ Would you be adding gathering, structres etc?
<FromGitter>
<girng> @bararchy nah not really unfortunately. more of killing monsters and getting their loot. it's all about itemization and skills, and farming / multiplayer playing with friends
<FromGitter>
<bararchy> that's cool :)
<FromGitter>
<girng> @bararchy thx for asking me about it. it makes me really giddy. im excited!
<FromGitter>
<bararchy> I see gaming is getting stronger in Crystal
<FromGitter>
<faustinoaq> Yeah, people are making nice things with Crystal 🎉
<FromGitter>
<bararchy> Also saw the sushichain
<FromGitter>
<bararchy> interesting project
<FromGitter>
<faustinoaq> Yeah, I like the crystal ecosystem is pretty decentralized, so crystal can be used on many things and not just web development 😉
<FromGitter>
<girng> im doing a server manager in godot here soon. so i can manage the instance servers from the cheap $5 VPSs. ⏎ not only that, but the ability to watch the usage of the master server, game chat as admin / manage global announcements, etc. it's going to have: players logged in, where they are at in a game, number of connections, number of games open, etc. i'll post screenshots later
<FromGitter>
<bararchy> @girng that's cool :) ⏎ It will be interesting seeing how many users the event loop can manage on a single thread, or, would you use multi-process with `reuse port` ?
<FromGitter>
<girng> and will also show memory usage, cpu usage, etc. that get sent periodically in a `loop do sleep xx end`. which will use godot's UI circular progress bars for it. going to look really cool. all over a simple tcp connection that gets `to_json` very easy to use the data in godot after that.
<FromGitter>
<girng> @bararchy well, the thing is the game instance servers gonna be on cheap single core machines so it's like perfect!
<FromGitter>
<bararchy> why not use MSGPACK instead? JSON is quite large as a TCP based data structure
<FromGitter>
<bararchy> I guess you don't have a web interace doing the json action right?
<FromGitter>
<girng> @bararchy i wasthinking of that, but unfortunately godot afaik doesn't have a msgpack library to decode it :(
<FromGitter>
<girng> @bararchy nah all done with godot's parse_json method :D
<FromGitter>
<bararchy> yeha, seems they don't support it yet
<FromGitter>
<girng> oh wow didn't see that
<FromGitter>
<girng> @bararchy for the game instance server that runs on a tick rate, i think i will not use to_json. but we'll see. i could always just do message|message|message and split them in godot and create my own message decoder. will be harder, but for player movement locations and stuff, using to_json is kinda overkill you are correct
<FromGitter>
<faustinoaq> BTW, Hey @/all !, KDE Team just approved my commits on Kate (KDE text editor) to support crystal highlighting 🎉 ⏎ ⏎ ^^ https://phabricator.kde.org/D7909
<FromGitter>
<girng> @bararchy i commented 12134, thx for issue.
<FromGitter>
<bararchy> @faustinoaq that's good news :) ⏎ @girng happy to help
<oprypin>
maybe you also want to post the diff of what you changed compared to ruby
<FromGitter>
<faustinoaq> oprypin, very nice, Thank you! :)
<oprypin>
faustinoaq, oh man, there are many problems with it :(
<FromGitter>
<faustinoaq> Yeah, I just copied the ruby syntax, I'll try to fix them 😅
<oprypin>
faustinoaq, did you really just copy it without changes D:
<FromGitter>
<faustinoaq> oprypin, no, I just tried to add macros and some crystal keywords
<oprypin>
welp, the example file shows that %} is broken just like when using ruby highlighting
<FromGitter>
<faustinoaq> Oh, I guess I tested it wrong, Let me try to implement macros again 😅
<FromGitter>
<faustinoaq> I mean highlighting macros ;)
<oprypin>
how the hell does one comment on that site?
<FromGitter>
<bararchy> lol
<oprypin>
i managed it! needed to scroll a few times back and forth between the very top and the very bottom of the page
<oprypin>
how do they keep screwing up the UI so badly? just copy github and call it a day
<FromGitter>
<faustinoaq> oprypin, Yeah the phabricator UI is a bit confusing at beginning XD
<FromGitter>
<Qwerp-Derp> So in my module, Hedron, I have a class called Box - I want to use the Crystal default class Box in another class, say Hedron::Foo, how do I reference the Crystal class Box without the compiler getting it confused with Hedron::Box?
<oprypin>
Qwerp-Derp, `::Box`
<oprypin>
faustinoaq, from what i see at least `struct` keyword is missing. hopefully the diff i sent can help with that. also somehow there's a lack of colors https://imgur.com/wVSxpLX
<FromGitter>
<bararchy> I love the way sublime colors
<FromGitter>
<faustinoaq> oprypin, Ok, I'll try to fix that, Thank you again for the diff! 👍
<oprypin>
heh, that diff also needs updating, e.g. `ifdef` is gone
<oprypin>
faustinoaq, i dont think it's deprecated. it's just some haskell-specific stuf that's deprecated
<oprypin>
you
<oprypin>
you're in the right place
<FromGitter>
<girng> lol haskell
robacarp has quit [Ping timeout: 240 seconds]
robacarp has joined #crystal-lang
<FromGitter>
<codenoid> yeah from the first time i learn programming
<FromGitter>
<codenoid> i use sublime
<FromGitter>
<codenoid> bcoz it's simple and lightweight
<FromGitter>
<girng> ye .crystal formatter works great w/ it too
<FromGitter>
<girng> although, each time i save my file i get a cmd pop for 2 seconds but idc lol
<oprypin>
D:
<oprypin>
that must be the formatter
<FromGitter>
<girng> :DD
<FromGitter>
<girng> i've grown to love my cmd popups. feels perfectly normal now
<FromGitter>
<girng> gives me confirmation that the text is being changed
rohitpaulk has quit [Ping timeout: 276 seconds]
<FromGitter>
<bararchy> @girng on Windows ?
<FromGitter>
<bararchy> because i just have a small delay until it finishes on Linux
<FromGitter>
<girng> yah w10 :D
<Groogy>
We use sublime for our own script language at work as well
<Groogy>
one of the content designer put together a linter plugin and stuff
<Groogy>
though I've started seeing some programmers use VS Code as a text editor
<FromGitter>
<Qwerp-Derp> @Groogy I personally use VSCode, it's better than Sublime IMO
<Groogy>
I'm just so used to sublime I guess
<Groogy>
I use VSCode for coding but for script, localisation etc I use Sublime
<FromGitter>
<bararchy> I want to love VSCode, but I can't see how it's better then sublime, I see @faustinoaq does crazy stuff with it but for me it wont even call the formatter
<Groogy>
hmm is there a way to do a setter protected?
<oprypin>
Groogy, maybe just write `protected setter x` lol
<oprypin>
it actually works
<oprypin>
even protected property
<Groogy>
haha lol
<Groogy>
though does it work if I am defining several setters?
<Groogy>
or is it just a quirk because setter expands in place?
<Groogy>
though I realized I need to apply it somehow differently :/ I have an object that should be pretty much immutable after it been read from a file and trying to have the interface correspond to that
<Groogy>
though the manager needs to do a second pass after load to make sure all references are setup correctly.
<oprypin>
Groogy, sounds like you've avoiding the builder pattern
<oprypin>
which really sucks but i havent heard a more perfect use case for it
<Groogy>
haha actually no, the problem is just one of "chicken or the egg" kind of problem
<Groogy>
template1 references template2, but template2 is not created yet
<Groogy>
and trying to figure out how to have the "on_post_load" method but without having it be public
<crystal-gh>
[crystal] MakeNowJust opened pull request #5930: Raise syntax error when method argument name is keyword (master...fix/crystal/dont-use-invalid-internal-arg-name) https://git.io/vxQKZ
<Groogy>
though I guess... hmmm protected method can be called by subclasses right?
<Groogy>
as in classes that are defined within a class
robacarp has quit [Ping timeout: 260 seconds]
robacarp has joined #crystal-lang
rohitpaulk has joined #crystal-lang
That_Guy_Anon has joined #crystal-lang
alex`` has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 260 seconds]
rohitpaulk has joined #crystal-lang
<FromGitter>
<girng> is it possible to use select * with the db module? For example, look here (https://i.gyazo.com/b77986863904c6da88dae620b0f6ab4e.png). i need to select all that data. or do i have to manualy write my own ` DB.mapping({`?
rohitpaulk has quit [Ping timeout: 260 seconds]
<oprypin>
girng, well it certainly cant do anything with the types if you dont at least specify those
<oprypin>
and select * would put them in an arbitrary order probably
<oprypin>
so yeah, it's the most straightforward to write db mapping
<FromGitter>
<girng> ok understood. i should prob stop complaining about it prob would have been half way done hahahaha
<FromGitter>
<faustinoaq> > but for me it wont even call the formatter ⏎ ⏎ @bararchy Doesn't the VSCode formatter work for you? Remember you can't enable auto-formatting on settings using `"editor.formatOnSave": false` in your `settings.json` file
never has joined #crystal-lang
<never>
Hello
<never>
Is there any way to convert a String to a MacroId or a StringLiteral
<FromGitter>
<faustinoaq> > I see @faustinoaq does crazy stuff with it ⏎ ⏎ I guess I have some experience using VSCode 😉
<FromGitter>
<bararchy> what is a Macrold ? sounds like food
<never>
so I can use a constant in both a macro and a normal function
<Groogy>
but for some reason it evaluates to nil for me
<oprypin>
Groogy, pls no pastebin.com, just replace it with bpaste.net for all purposes
<oprypin>
Groogy, for types there's a stupid hack where it checks klass.is_a? Bool
<Groogy>
meh I redid the method signature instead. Instead of trying to narrow down the type I just pass it through. The method was done to single out the base serialized types (String, etc. etc.)
<Groogy>
compared to objects so it can pick the right signature
<Groogy>
don't need to know the exact type for those though
<Groogy>
was a nice to have
<Groogy>
just so I can both have node.unmarshal "categories", Array(String) and node.unmarshal "terrains", Hash(String, TerrainType)
rohitpaulk has quit [Ping timeout: 264 seconds]
never has quit [Remote host closed the connection]
<FromGitter>
<Sjoerrdd> Hi :)
<FromGitter>
<girng> hello Sjoerd welcome back!!
<FromGitter>
<Sjoerrdd> Thanks
<FromGitter>
<faustinoaq> > does vscode cause cmd popup on save like on sublime? ⏎ ⏎ Not, it doesn't 😄
<FromGitter>
<faustinoaq> Groogy, What editor you use? Emacs?
Yxhvd has joined #crystal-lang
<FromGitter>
<faustinoaq> @girng, Oh, that's because sublime is using `cmd.exe` to execute crystal, maybe you should edit the `crystal_cmd`in your sublime settings 😅
<FromGitter>
<faustinoaq> Maybe using some `.vbs` (Visual Basic Script) that hides the cmd window
Yxhuvud has quit [Ping timeout: 260 seconds]
Yxhvd has quit [Remote host closed the connection]
<FromGitter>
<bararchy> @girng its exciting, but lacks real info. Who is the full time developer? What features is he working on? Is it stdlib or compiler? Multi-threading or win support ?
<FromGitter>
<bararchy> Etc..
<oprypin>
i think it's a theoretical concept and nobody is actually going to work full time ...
<FromGitter>
<girng> multi-threading is possible? i thought it was only possible in functional languages like elixir?
<FromGitter>
<bararchy> @Sjoerrdd basically you searched for a hash key (x forwarded...) That didn't exist, the headers are a hash, so if the header key isn't there you will get this error
<FromGitter>
<bararchy> You can use `?` in the end to get nil or value instead of exception
Jenz has quit [Quit: Lost terminal]
<FromGitter>
<girng> can macros in crystal be used like how c++ macros are? i could create my own syntax basically?
aurieeeh has joined #crystal-lang
mps has left #crystal-lang [#crystal-lang]
<FromGitter>
<faustinoaq> @girng No, you can't do that in crystal, because the macros can only create valid crystal code
<FromGitter>
<faustinoaq> I guess there is some tricks, though
<FromGitter>
<girng> @faustinoaq interesting
<FromGitter>
<girng> well im not going to dive into macros im too confused
<FromGitter>
<faustinoaq> > and it will automatically substitute ⏎ ⏎ oprypin, No, the github permalinks, seems to be nice replaced by code just if the permalink is from your own repo
Creatornator has joined #crystal-lang
faustinoaq has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 240 seconds]
<woodruffw>
anybody have any tips on handling `errno` idiomatically in C bindings? i'd like to cover the failure cases of these C functions without writing a bunch of boilerplate for each