<FromGitter>
<cserb> what is a ` FBigInt` and why do I receive this as a result from a calculation on my local machine while on play I don't: https://play.crystal-lang.org/#/r/6zwf
<FromGitter>
<cserb> Ok so this seems to be something that appears only in the tests
<FromGitter>
<alex-lairan> Look how Kemal work. ⏎ ⏎ Why you are not using a framework ?
<FromGitter>
<cserb> This works on play but doesn't on my local machine: https://play.crystal-lang.org/#/r/6zwt Because it compares the `target` which is a `FBIgInt` with the BigInt (which is what it should be)
<FromGitter>
<asterite> @drum445 just pass the websocket handler to the HTTP::Server constructor, in an array. Check HTTP::Server docs, there it explains about handlers
<FromGitter>
<tenebrousedge> @cserb are you using the same version of Crystal on your local machine?
<FromGitter>
<cserb> yes: 0.28.0
<FromGitter>
<tenebrousedge> what error do you get? what OS are you running?
<FromGitter>
<tenebrousedge> it works for me on Ubuntu
<FromGitter>
<drum445> @alex-lairan I'm writing my own but thanks ⏎ @asterite thanks a lot sir, that did the trick
<FromGitter>
<bararchy> Did anyone else noticed that there is a different in behavior for `HTTP::Client.exec` and `client = HTTP::Client.new; client.exec`
<FromGitter>
<bararchy> where HTTP::Client.exec works, the initialized version will return BAD_REQUEST
<FromGitter>
<bararchy> for exactly same calls
<FromGitter>
<bew> Did you checked the code of `HTTP::Client.exec`, see what it does?
<FromGitter>
<mwlang> @drum445 build each side's functionality inside classes. Instantiate each with spawn then main loop sleeps forever. At least that's what I'd do.
<FromGitter>
<bararchy> @bew Ok, interesting, so I tried to do the same but
<FromGitter>
<bararchy> changed it to `false` instead of `nil`
<FromGitter>
<Blacksmoke16> 👍
<FromGitter>
<girng> 👍
<FromGitter>
<Blacksmoke16> o/
<FromGitter>
<girng> o/
<FromGitter>
<Blacksmoke16> what have you been up to
<FromGitter>
<girng> i got my first job at a warehouse (Costco), and thought since i'd be working part-time, i'd be able to code crystal and work on my game still. however, i didn't realize how physical intense the job was, so i'm sleeping and my feet are in pain all the time. it's very sad and it's not even full-time hours. i'm now more depressed because i feel like i'm abandoning something i've worked on for so long. and don't
<FromGitter>
... really get time for crystal + game development like i used to. ⏎ ⏎ and my entire paycheck (90%) basically goes to my mom for mortgage payments, so yeah. i'm just happy to see crystal alive and well, and i miss everyone
<FromGitter>
<Blacksmoke16> im pretty sure its not an official thing
<pracabor>
Crystal Ann is run by @veelenga
<FromGitter>
<girng> @Blacksmoke16 thank you, that means a lot. i am trying to see if i maybe i can get a less physical intense job so i can be comfortable when i'm home, so i can start coding again. i really miss the joy of crystal / programming.
<FromGitter>
<Blacksmoke16> yea sounds like a plan
<FromGitter>
<bararchy> @girng Where are you from?
<FromGitter>
<bararchy> Also, I'm still waiting to beta-test the game ;)
<FromGitter>
<girng> @bararchy Washington State, USA
<FromGitter>
<bararchy> hmmm Is it hard to find a Dev position there ?
<FromGitter>
<girng> I'm too eccentric, I don't think any employer wants to hire me for coding hahah
<FromGitter>
<girng> i could try though, that's a good idea thanks
<FromGitter>
<bararchy> Aren't you a dev by profession ?
<FromGitter>
<girng> nope, just as a hobby :P
<FromGitter>
<Blacksmoke16> having a background in it ,just by hobby can make it a bit easier. but yea, might want to brush up on best practices coughialwaysusetuplescough :P
<FromGitter>
<bararchy> XD
<FromGitter>
<Blacksmoke16> if you wanted to go the actual dev career path
<FromGitter>
<bararchy> It's amazing that there are people who take programming as a hobby and don't also do it as a job, I never knew anyone doing it
<FromGitter>
<girng> @Blacksmoke16 😆
<FromGitter>
<Blacksmoke16> 😉
<FromGitter>
... players can upgrade to an electric pallet jack, etc. i think it'd be fun, but i'm sure it's a niche game.
<FromGitter>
<girng> i wear one of these (https://cdn.barcodesinc.com/images/models/lg/Motorola/wt4070.jpg) at work, and want to create an Order Picker game using godot with crystal as the backend. make it multiplayer where players can compete in a warehouse (a level), by selecting (scanning barcode of an item) and palletizing the items on their pallets as fast as possible. player movement will start on a hand-pulled jack, then
<FromGitter>
<girng> @bararchy damn. i wish i didn't delete my previous account. i had bug reports back from the end of 2017. then i made a new account and this one only goes to November of 2018. Not like it would help, but just saying :O
<FromGitter>
<girng> @Blacksmoke16 what have you been up to, i heard you made a new project with crystal
<FromGitter>
<Blacksmoke16> just work
<FromGitter>
<Blacksmoke16> yea, logging framework based on one we use at work
<FromGitter>
<Blacksmoke16> been working on integrating it into athena, along with the DI stuff i been doing would add some cool features. i can send you a draft of the article associated with it if you'd want to read it
<FromGitter>
<asterite> I wonder why you use structs everywhere instead of classes
<FromGitter>
<Blacksmoke16> because im under the impression of you dont need to pass an obj around a struct is better
<FromGitter>
<Blacksmoke16> its not like a processor has mutable data that would require it to be a class?
<FromGitter>
<asterite> Well, you don't know if you don't need to pass an obj around. That's up to the user. Imagine `def configure(formatter)`, if it's a struct then you can't do that
<FromGitter>
<asterite> Plus in the future unions like A | B | C | D will be represented in memory like type_id | space for A | space for B | space for C | space for D to support parallelism
<FromGitter>
<asterite> and an abstract struct is internally represented as a union
<FromGitter>
<asterite> so trying to save a few heap bytes will actually result in having to pass a lot of data around
<FromGitter>
<asterite> But maybe it's not an issue, I don't know
<FromGitter>
<asterite> I always think of structs as immutable stuff like Point or Vector
<FromGitter>
<asterite> Also, the base types don't seem to define anything concrete, so an interface might be better... in our case that's a module, but unfortunately that is also represented as a union... I guess I really wish to have interfaces and have all methods typed :'-(
<FromGitter>
<Blacksmoke16> +1 for interfaces ^
<FromGitter>
<asterite> Nevermind what I said, probably abstract structs are fine because they are stored in an array of things (handlers, formatters, etc.)
<FromGitter>
<Blacksmoke16> yea exactly, also i cant really reason you would want to pass them around. i been thinking people would just configure it in the `.configure` block and can do whatever they want in there, i.e. new up a single handler to use in multiple loggers or whatever
<FromGitter>
<Blacksmoke16> but its still in its early stages so im not strongly attached to anything atm. if a valid use case comes around id be open to it
griddle has quit [Read error: Connection reset by peer]
<FromGitter>
<girng> isn't there a way for ` Athena::Routing::Exceptions::UnauthorizedException` to be referenced like how an `alias` works? I mean for a long path. ⏎ ⏎ Example, in gdscript, you can do ⏎ ⏎ ```var left_character_arm = $my_node/path_to_the_character/arm/left_arm/arm``` ... [https://gitter.im/crystal-lang/crystal?at=5ced7d8de41fe15e75d39f74]
<FromGitter>
<Blacksmoke16> which i dont really want to do
<FromGitter>
<Blacksmoke16> since i use my modules like namespaces to keep the docs nice and clean
<FromGitter>
<Blacksmoke16> if the user wanted to do that it would be an optoin
<FromGitter>
<girng> yeah I was just thinking of ways to mitigate the 3+ double colon lines. Just looks redundant, but I mean it's more expressive. Just my personal opinion though
<FromGitter>
<Blacksmoke16> id rather it just be `UnauthorizedException` but would like a way without polluting the top level namespace
<FromGitter>
<girng> redundant might be the wrong word, I mean too verbose i guess. I don't know anymore, just looks like a lot of damn code for what it's doing LOL
<FromGitter>
<Blacksmoke16> i mean you're not wrong :P
<FromGitter>
<Blacksmoke16> well yea, but someone using athena isnt going to have all their controls in the `Athena` module
<FromGitter>
<Blacksmoke16> i suppose they could just do like a `include Athena::Routing::Exceptions` then would be able to just to `raise UnauthorizedException.new ""`. that would prob be the way to go
<FromGitter>
<girng> I'm definitely gonna have some dreams tonight about double colons
<FromGitter>
<Blacksmoke16> this is the public ch you know, might want to edit your message ^
<FromGitter>
<Blacksmoke16> but yes, it will until i release it
<FromGitter>
<Blacksmoke16> is in its own branch atm as its still a bit WIP
<FromGitter>
<girng> ohhh kk
<FromGitter>
<Blacksmoke16> still some things id like to figure out
<FromGitter>
<girng> i was thinking, maybe pracabor, blacksmoke, asterite, jhass, or anyone else who is here
<FromGitter>
<Blacksmoke16> main challenge now is relating to the DI stuff, since each HTTP request gets its own fiber you have to configure your logger, i.e. new up processors and stuff, within that request. since im storing the container on the fiber so that each request has its own
<FromGitter>
<girng> i want to create a DESKTOP app using Godot with crystal on the backend. i'm trying to find ideas of things to create, but i've only found "games" and "mobile app" ideas. but I want a desktop app idea, not a mobile or game idea. any ideas?
<FromGitter>
<Blacksmoke16> if you didnt the instance you inject into a processors for example would be different than the one in the request
<FromGitter>
<girng> Any problems you guys run into that could be solved with a desktop app? That might help you throughout your day?
<pracabor>
find a repetitive task you do on the computer, and build a tool to either automate it or make it easier, faster, etc
<FromGitter>
<Blacksmoke16> ^ would be a good place to start
<FromGitter>
<Blacksmoke16> if you're into any video games could always look into writing a tool to help you with that game, is what i did
<pracabor>
welp, I did a bad thing... I added a gif to my git repo. but it's now in the readme so I guess it works
<FromGitter>
<Blacksmoke16> looks like its just html with a src
<FromGitter>
<Blacksmoke16> :S that works
<pracabor>
I am my own worst enemy
<pracabor>
I cannot emphasize how much time that tool cost me, but even more how much time that tool _saves_ me every month.
<pracabor>
and how much easier it is to find things as a result
<pracabor>
oh this demo is only the first half of the tool
<FromGitter>
<girng> I was thinking of doing an open source native app forum w/ Godot. And use crystal for the backend (forums, topics, posts, private messaging, profile bio, permissions, guilds, forum gold currency, etc, etc). Think of the `discourse` forum, but having a native app feel through a program instead of through a browser. I don't think there is a market there though. But from experience, native apps are way smoother than
<FromGitter>
... web / electron based ones. Godot's animation system can do this easily and very smoothly. I've actually done parts of this before using Godot and FluxBB (php on backend, not crystal). ⏎ ⏎ But the question is why would people download an app and use a forum instead of just typing in the URL and accessing the forum. Most p ... [https://gitter.im/crystal-lang/crystal?at=5ced89609b50f6393543ca3f]
<FromGitter>
<Blacksmoke16> can godot be used to make things that are not games?
<FromGitter>
<Blacksmoke16> never really thought about it
<FromGitter>
<girng> Hell yeah
rohitpaulk has joined #crystal-lang
<FromGitter>
<alex-lairan> @girng can you write articles about Godot/Crystal integrations ? :D
<FromGitter>
<girng> gosh I feel like I'm wasting time, I want to create something so bad!!
griddle has joined #crystal-lang
<pracabor>
a CLI forum browser for Discourse would be an interesting exercise
<pracabor>
forget the GUI nonsense, CLI has all the 3d I need
<FromGitter>
<forkev_twitter> @girng -interesting news on the new job. You on the East side, or westside of WA? My counsel would be to adjust your expectations for development time in conjunction with the time you have to commit. do like an few hours a week dev. give you something to think about while on your feed, and you'll not loose as much momentum as you'd expect.
<FromGitter>
<forkev_twitter> feed = feet
<FromGitter>
<girng> Westside. thanks for the advice =]. it's only been 1 month so maybe I just need to get used to the hours and sleep schedule too
<FromGitter>
<girng> almost 1 month*, 3 weeks*
<FromGitter>
<r00ster91> why doesn't Crystal support bases higher than 62?
<FromGitter>
<Blacksmoke16> you prob dont have to give the instance version your host in exec
<FromGitter>
<Blacksmoke16> since you supply it in thew `.new`
<FromGitter>
<bararchy> ohhh
<FromGitter>
<bararchy> now it works XD
<FromGitter>
<Blacksmoke16> i.e. if you new up a client with like `api.mydomain.com` you give do `client.exec '/people'`
<FromGitter>
<bararchy> uri.path
<FromGitter>
<Blacksmoke16> yes
<FromGitter>
<bararchy> damn
rohitpaulk has quit [Remote host closed the connection]
<FromGitter>
<bararchy> hm... ok so it needs the path, and fragment, and query
<FromGitter>
<bararchy> seems a bit overkill
<FromGitter>
<Blacksmoke16> hm?
<jhass>
fragment doesn't get send to the server usually
<jhass>
query, of course
<FromGitter>
<bararchy> nvm found `.full_path` :)
<FromGitter>
<bararchy> TBH I won't even need the initialized version if I could set timeout to the class or something
ShalokShalom has quit [Remote host closed the connection]
lucasb has joined #crystal-lang
<FromGitter>
<bew> @alex-lairan your trick actually work? `{{with DSL::Router.new(router, valve, scope) yield}}` I'm trying to use a `with yield` in macros, but can't get it to find methods or macros in the block I give it..
<FromGitter>
<alex-lairan> This work inside the Amber Router macro micmac :D
<FromGitter>
<bew> lol, I wrote part of that micmac, specially `routes` & `pipeline`, but t didn't occur to me to use with yield in the macro expression, maybe we can simplify some things later if we manage to make it work x)
<FromGitter>
<bew> hmm
<FromGitter>
<bew> did you try by just putting `{{yield}}`?
<FromGitter>
<alex-lairan> Yes, and it is not working ^^
<FromGitter>
<alex-lairan> Oh, wait ! :o ⏎ ⏎ It work
<FromGitter>
<girng> LOL
<FromGitter>
<alex-lairan> It wasn't working with `{{yield DSL::Router.new(router, valve, scope)}}` but with just `{{yield}}` it's all good :)
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
<FromGitter>
<dscottboggs_gitlab> @girng is back :D
<FromGitter>
<girng> @dscottboggs_gitlab i'm gonna try to be. i have to leave in 3 hours and i'm going to be tired af at work lol. but honestly, idc. i don't find joy in life w/o programming. so gonna still try to code as much as i can. i just want to be happy :D
<FromGitter>
<girng> @dscottboggs_gitlab good to see you
<FromGitter>
<dscottboggs_gitlab> Yeah I was just reading your post about the warehouse job, it sounds great tbh
<FromGitter>
<dscottboggs_gitlab> good to see you too
<FromGitter>
<dscottboggs_gitlab> you'll (probably) get used to the workout before too long, and have way more energy as a result
<FromGitter>
<dscottboggs_gitlab> I did amazon delivery a couple summers ago and I felt so fucking good after a while
<FromGitter>
<girng> i've been lurking but just not posting cause iuno feels weird lol.
<FromGitter>
<girng> need to get back in the groove i guess. oh wow really? they have that over here, but it's like 10 hour days
<FromGitter>
<girng> or did you do like amazon flex where you use your own vehicle?
<FromGitter>
<dscottboggs_gitlab> yeah I did flex. would not recommend
<FromGitter>
<dscottboggs_gitlab> trashes your car
<FromGitter>
<girng> you are probably right, i bet getting healthier will make me a better programmer too. i've read articles about how your health can affect/effect your programming skills / knowledge in general
<FromGitter>
<dscottboggs_gitlab> it's true. I like to think that maybe someday when I have a legit coding job I can get a physical job on the weekends or evenings to keep myself in shape
<FromGitter>
<dscottboggs_gitlab> you feel way better if you're in shape, which I am no longer lol
<FromGitter>
<dscottboggs_gitlab> it sucks about your mom taking most of the money though, I'd be pretty upset about that. :(
<FromGitter>
<dscottboggs_gitlab> (Back on-topic) ⏎ @girng it's a really interesting concept you had -- using godot to make a desktop app. But I feel like you'd spend most of your time defining primitives like dialogs, windows, and text boxes. Have you looked at the desktop shards for crystal?
moei has quit [Quit: Leaving...]
<FromGitter>
<bew> @alex-lairan good! for the record, it's because the whole `routes` block is in a `with .. yield`
mps has quit [Ping timeout: 245 seconds]
<FromGitter>
<girng> @dscottboggs_gitlab godot basically has all that as ui nodes. which is awesome and why i feel like i need to utilize this with the power and knowledge i have with godot + crystal. i feel like i can create something awesome
mps has joined #crystal-lang
<FromGitter>
<girng> @dscottboggs_gitlab yeah, the cost of living over here is kinda insane. i want to move out but i also want to continue to help my sister and mom. we'll see how long i can last :O. plus, my mom basically has gave me everything in my life so far.. so i guess it's fair to give her $ back. but i just don't know for how long lol.
<FromGitter>
<dscottboggs_gitlab> Yeah, I mainly just feel bad that you're in such a situation. I hope things get better for you and your family
<FromGitter>
<dscottboggs_gitlab> @girng if you can create a repo with a few examples of like using godot to create some dialogs and simple desktop widgets that would be really cool and I would love to play around with it
<FromGitter>
<girng> it's appreciated, thank you <3 it does mean a lot. crystal's community is really awesome =]
<FromGitter>
<girng> i'll look into the desktop shards now
<FromGitter>
<dscottboggs_gitlab> yeah I can't remember what the one was called... halium maybe? lemme try to look
<FromGitter>
<girng> oh.. i was just going to use godot for the ui stuff (it's ui node system is bonkers good, and underrated). then use crystal on the backend
<FromGitter>
<dscottboggs_gitlab> like a client/server system?
<FromGitter>
<girng> basically yeah. that's my specialty lol
<FromGitter>
<dscottboggs_gitlab> HTTP or otherwise?
<FromGitter>
<dscottboggs_gitlab> do you have any examples of this system? it seems interesting
<FromGitter>
<girng> just basically tcp
<FromGitter>
<girng> i don't know what i want to create yet though
<FromGitter>
<girng> i don't know if you saw my large @ss post above lol
<FromGitter>
<dscottboggs_gitlab> i haven't read everything from today
<FromGitter>
<dscottboggs_gitlab> oh about the forum?
<FromGitter>
<girng> yeah, i've always wanted to do something like that. since i was a kid i remember seeing a forum based software in adobe flash
<FromGitter>
<girng> it was the most fluid user experience ever
<FromGitter>
<dscottboggs_gitlab> oof flash :(
<FromGitter>
<dscottboggs_gitlab> I wish it wasn't so bad
<FromGitter>
<dscottboggs_gitlab> I would think that using a game engine to create desktop applications could create a more sleek experience while using it, but I feel like startup times might take a bit? although, godot runs on phones, so it's probably not too heavy
<FromGitter>
<girng> yeah but the problem is the native app experience vs web based. i don't think a lot of people can actually feel the difference. however, i can, it's night n day lol
<FromGitter>
<dscottboggs_gitlab> no matter what you'd be doing better than electron
<FromGitter>
<girng> exactly!!
<FromGitter>
<Blacksmoke16> the benefit of web based is you can access it from anywhere
<FromGitter>
<Blacksmoke16> and its not OS/platform dependent
<FromGitter>
<Blacksmoke16> i..e you dont need a windows version, a linux version, and a mac version etc
<FromGitter>
<girng> yeah that's true
<FromGitter>
<girng> i don't know, i just want to create a desktop app using crystal on backend. ui is not an issue. i just am trying to get ideas
<FromGitter>
<girng> i need to solve a problem and create a solution
<FromGitter>
<dscottboggs_gitlab> most people start with a calculator or notepad
<FromGitter>
<dscottboggs_gitlab> It's a small, useful project that teaches you the core primitives
mps has quit [Ping timeout: 272 seconds]
mps has joined #crystal-lang
RyanMcCoskrie has joined #crystal-lang
<FromGitter>
<dscottboggs_gitlab> Why can't you do `pointerof 0` instead of `pointerof(0)`? It's the same with annotations...
<FromGitter>
<girng> @j8r it's in limbo right now, since i got a really physical job, i've been struggling to maintain time to work on it, etc. but i'm doing my best and miss crystal and the community so much. so i just need time i guess, ty for your support
<FromGitter>
<Daniel-Worrall> That was the asterite response on the matter though
<FromGitter>
<dscottboggs_gitlab> however, that issue seemed to be more about coercing `Int` into `String`, etc., rather than initializing a `Params` from an `Array(String)` which it rightly ought to. I think you should raise a new issue/PR, referencing the old one, but specifically about initializing from a `String => Array(String)` which should defnitetly be possible
<FromGitter>
<dscottboggs_gitlab> and, IMO, lead to the outcome @asterite suggested we might expect
<FromGitter>
<jwoertink> What's the difference in a macro between doing `\{{ yield }}` and `{{ yield }}`?
<FromGitter>
<jgaskins> The `\` is for when the macro generates other macros
<FromGitter>
<jwoertink> ah
<FromGitter>
<Daniel-Worrall> Nested macros
<FromGitter>
<jwoertink> ok, that makes sense
<FromGitter>
<jwoertink> thanks
<FromGitter>
<tenebrousedge> @girng I don't know if you ever have doubts about whether this programming thing will work out, but I would definitely like to offer any reassurances that I may: if you are persistent, you will find success. And I do wish you the best of luck
<FromGitter>
<dscottboggs_gitlab> I mean, I wouldn't be that sure of myself, but it's certainly as safe of a bet as any.
<FromGitter>
<girng> @tenebrousedge thank you. i'm going to just stay positive and persistent
<mps>
girng: hello, best wishes!
<FromGitter>
<girng> hi mps
<mps>
hi girng, with your positive attitude you will find you nice place under sun :)
<mps>
I am sure
<FromGitter>
<girng> :D
<mps>
and, nice to see you again here :-})
<FromGitter>
<girng> ty. i've been lurking but hope to be more active
RyanMcCoskrie has quit [Remote host closed the connection]
<FromGitter>
<tenebrousedge> @dscottboggs_gitlab if you can't be sure of yourself, who can you be sure of? 😄 I am just getting past the working-a-lot-for-seemingly-no-reward point to the point where I feel like I'm successful, so I'm feeling pretty optimistic about the future, personally
lucasb has quit [Quit: Connection closed for inactivity]
<mps>
Chinese proverb: one thousand time I fall and one thousand and one time I arise