<FromGitter>
<ansh> If anyone knows how I can recreate the from_rs method to read compressed bytes in JS or Python please let me know
<FromGitter>
<ansh> Or if someone can explain this
<FromGitter>
<3n-k1> without seeing the rest of the code, i assume it reads the resultset as bytes, exits early if the read method returned nil (python calls it None), and then it decompresses that value using the deflate format, and returns the decompressed data as a string
<FromGitter>
<3n-k1> i'm assuming this is used for decompressing data stored in a database
<FromGitter>
<Blacksmoke16> given the name of the module id say yes
<FromGitter>
<ansh> Yes it is
<FromGitter>
<ansh> I am trying to figure out how to write the from_rs method in Python or JavaScript
<FromGitter>
<ansh> Do you guys know how I will be able to do that? @Blacksmoke16 @3n-k1 I tried reading the BYTEA column from the Database but when I try to decompress it, it gives me some random strings
<FromGitter>
<Blacksmoke16> in relation to a db? Or like just create a string from an array of bytes?
<FromGitter>
<ansh> Just create a string from an array of bytes
<FromGitter>
<ansh> Connecting to the DB is the easy part
<FromGitter>
<3n-k1> types, stay away from compile-time stuff until you get a handle on it]
<FromGitter>
<3n-k1> fortunately crystal is forgiving enough that you can basically treat it like a completely dynamic language most of the time
<FromGitter>
<Blacksmoke16> but crystal would be more performant/less bug prone (due to the static typing and compiled nature)
<FromGitter>
<Blacksmoke16> and given it already exists prob less work :p
<FromGitter>
<3n-k1> oh for sure
<FromGitter>
<3n-k1> honestly learning crystal would probably be much less time and work than porting
<FromGitter>
<ansh> Where would I start on learning Crystal?
<FromGitter>
<3n-k1> the references link above
<FromGitter>
<Blacksmoke16> read thru the reference docs, and imo lookup ruby tutorials
<FromGitter>
<Blacksmoke16> once you got a grasp of how ruby works, switch to crystal reference/api docs and get a handle on how types work
<FromGitter>
<ansh> The Backend is written Crystal mostly using the Kemal framework
<FromGitter>
<Blacksmoke16> should port it to Athena 😉 /s
<FromGitter>
<3n-k1> hmmm you might be a bit biased ;p
<FromGitter>
<ansh> I feel like its just super hard cuz I am mostly a frontend dev with some Node experience but I really dont know how to do backend stuff
<FromGitter>
<ansh> And then to learn Crystal I first need to understand backend programming, then ruby, then Crystal
<FromGitter>
<3n-k1> backend stuff is gonna be difficult in any language then, imho
<FromGitter>
<Blacksmoke16> imo what id do here is learn enough of crystal/ruby to at least have a rough idea of whats going on
<FromGitter>
<Blacksmoke16> is it a big code base?
f1reflyylmao has joined #crystal-lang
f1refly has quit [Ping timeout: 264 seconds]
<FromGitter>
<ansh> Its not super large. There are a few endpoints for login/register/forgot password. There are a few endpoints to get questions using topic/id/subtopic (its an ed-tech website). There are a few scripts to load and edit the database at mass. And there is an admin portal that users can log onto and change the questions.
<FromGitter>
<Blacksmoke16> gotcha
<FromGitter>
<Blacksmoke16> yea id just leave it alone, learn enough to know whats going on. Then if/when needed you can port things to a lang you're more familiar with
<FromGitter>
<Blacksmoke16> and possibly do new dev in that more familar lang
<FromGitter>
<Blacksmoke16> its essentially tech debt now, doesn't *need* to be resolved all at once, but could be done part by part as it relates to new dev etc
<FromGitter>
<3n-k1> honestly? i would set up unit tests if you don't have any, and don't touch things unless you need to. when you do start refactoring/porting, you'll have tests to go off of to make sure you don't break anything
<FromGitter>
<Blacksmoke16> sadly because its kemal prob easier said than done
<FromGitter>
<Blacksmoke16> if anything would prob setup like e2e/integration tests with a `test_` db
<FromGitter>
<3n-k1> my experience with kemal wasn't that bad, is it really hard to do tdd with?
<FromGitter>
<Blacksmoke16> its simple yes, but i doubt this app was developed with SOLID principles in mind
<FromGitter>
<Blacksmoke16> that would make testing it easier
Creatornator has joined #crystal-lang
Creatornator is now known as MatteSilver
<FromGitter>
<Blacksmoke16> might be easier to write some e2e tests in cypress
<FromGitter>
<ansh> I would show you guys the codebase but its a private repo
<FromGitter>
<Blacksmoke16> :shrug: hard to say w/o seeing it
<FromGitter>
<Blacksmoke16> yea np
<FromGitter>
<ansh> I could probably send a screen recording
<FromGitter>
<Blacksmoke16> naw its fine
<FromGitter>
<ansh> Also if any of you are looking for some part time work or a job
<FromGitter>
<ansh> I could refer
<FromGitter>
<ansh> lol
<FromGitter>
<Blacksmoke16> :p
<FromGitter>
<Blacksmoke16> are you like the only dev now?
<FromGitter>
<Blacksmoke16> or was that guy the only backend dev?
<FromGitter>
<ansh> There is me + a ML guy
<FromGitter>
<ansh> but yeah thats it
<FromGitter>
<Blacksmoke16> welp, time to brush up on REST :P
<FromGitter>
<grkek> Career move don't use web technologies
avane has joined #crystal-lang
<FromGitter>
<3n-k1> all the money's in web rn
<FromGitter>
<grkek> allt he moneys in my pocket rn
<FromGitter>
<grkek> ay
<FromGitter>
<grkek> yuh
<FromGitter>
<grkek> i flex on you
avane has quit [Ping timeout: 260 seconds]
avane has joined #crystal-lang
<FromGitter>
<3n-k1> all 5 dollars, huh? /s
<FromGitter>
<Blacksmoke16> tree fiddy
<FromGitter>
<grkek> !ban @3n-k1
<FromGitter>
<3n-k1> plz no
<FromGitter>
<grkek> jk haha i aint bannin you
<FromGitter>
<grkek> broke fella
<FromGitter>
<3n-k1> i sure am xd
<FromGitter>
<grkek> i flex on you
<FromGitter>
<grkek> this is what I do
<FromGitter>
<grkek> Btw, are you a webdev ?
<FromGitter>
<grkek> webde🤢
<FromGitter>
<grkek> webde🤢🤢🤢
<FromGitter>
<grkek> webdev🤮🤮🤮
<FromGitter>
<3n-k1> i am. got hired on as a fullstack contractor for a startup and uhhhh what they didn't tell me was that i was going to be the only employee aside from the two execs, and they also know nothing about technology
<FromGitter>
<grkek> Very nice
<FromGitter>
<grkek> seems likw the future is bright for you man
<FromGitter>
<3n-k1> so my job description was "fullstack dev", and my actual job is "fullstack dev, cto, technical consultant, and project lead"
<FromGitter>
<Blacksmoke16> sound stressful
<FromGitter>
<grkek> Do they pay you enough?
<FromGitter>
<3n-k1> it isssssss lol. they didn't give me requirements for 3 months ⏎ $15/hour
<FromGitter>
<3n-k1> so nop
<FromGitter>
<Blacksmoke16> f
<FromGitter>
<grkek> Yeah 15$ for a fullstack is smol pp
<FromGitter>
<Blacksmoke16> id look for a new opportunity
<FromGitter>
<3n-k1> first job tho. i'll take anything to get me into the industry
<FromGitter>
<Blacksmoke16> ah, fair enough
<FromGitter>
<Blacksmoke16> thats kinda even more concerning tho
<FromGitter>
<grkek> I work on backend and I get 15€/h still not enough
<FromGitter>
<Blacksmoke16> "lets throw this new dev at making our entire stack"
<FromGitter>
<3n-k1> they literally have no idea what goes into it
<FromGitter>
<Blacksmoke16> (not downing your abilities but you see where im coming from)
<FromGitter>
<Blacksmoke16> question is do you? :P
<FromGitter>
<3n-k1> like i literally had to explain to them that a sysadmin does more than click a button to start the server
<FromGitter>
<Blacksmoke16> xD
<FromGitter>
<grkek> I hate people like that
<FromGitter>
<grkek> I hate them so much they anger me
<FromGitter>
<grkek> They piss me the fuck off instantly
<FromGitter>
<3n-k1> i don't know much sysadmin stuff, but i've just about finished most of the general functionality. very rough around the edges, i'm sure a lot could've been done better, but considering that i literally built it from the ground up, i think i did pretty well lol
<FromGitter>
<Blacksmoke16> you'll look back in like 6 months and be like "who tf wrote this, its terrible...oh wait"
<FromGitter>
<Blacksmoke16> happens to me all the time :S
<FromGitter>
<3n-k1> they were explicitly looking for a student, so i'm like 99% sure i'm the only person in the state that fits all their requirements lol
<FromGitter>
<grkek> You could use Grip it literally writes itself, no need to write code you can just type in pure english what you want and it spits out the code
<FromGitter>
<3n-k1> oh yeah. as soon as i can, i'm going for as much test coverage as i can and refactoring everything
<FromGitter>
<Blacksmoke16> good plan
<FromGitter>
<Blacksmoke16> using any frameworks? :P
<FromGitter>
<3n-k1> django
<FromGitter>
<Blacksmoke16> ah so not crystal
<FromGitter>
<Blacksmoke16> boo
<FromGitter>
<grkek> Don't use that
<FromGitter>
<3n-k1> i'd love to use crystal, but i have no experience with crystal frameworks
<FromGitter>
<grkek> It is horrible and skow
<FromGitter>
<grkek> slow*
<FromGitter>
<3n-k1> that and the lack of a 1.0 release at the time would've been concerning
<FromGitter>
<3n-k1> i mean, django really isn't that slow, it's used in a lot of huge companies for public-facing applications
<FromGitter>
<grkek> Nooooshush
<FromGitter>
<Blacksmoke16> its more about the lack of type safety tbh
<FromGitter>
<grkek> django is very slow
<FromGitter>
<grkek> and sad
<FromGitter>
<3n-k1> using mypy
<FromGitter>
<grkek> oh okay
<FromGitter>
<grkek> its all good now
<FromGitter>
<grkek> haha
<FromGitter>
<3n-k1> i've got a bunch of contributions to django-stubs because of it haha
<FromGitter>
<3n-k1> honestly at this point i would almost refuse to touch a non-trivial python app without static typing
<FromGitter>
<grkek> have you ever wrote anything open $ource?
<FromGitter>
<3n-k1> nothing big, most of it is abandoned or gone
<FromGitter>
<3n-k1> bunch of contributions tho
<FromGitter>
<grkek> Oh ripperoni
<FromGitter>
<3n-k1> you're the only other person i've met that says ripperoni!
<FromGitter>
<grkek> heh
<FromGitter>
<grkek> I have been spying on you ;)
<FromGitter>
<3n-k1> 👀
<FromGitter>
<grkek> I know your talking tactics and manners
<FromGitter>
<grkek> 👀👀👀
<FromGitter>
<grkek> I have made something rather interesting in crystal
<FromGitter>
<grkek> but I am still waiting for an issue to get resolved by one of the shards authors which I use
<FromGitter>
<Blacksmoke16> oh?
<FromGitter>
<grkek> The layout
<FromGitter>
<Blacksmoke16> ah
<FromGitter>
<grkek> It is pretty good at its state but the codebase needs refactoring
<FromGitter>
<grkek> Have you seen it what it can do?
<FromGitter>
<grkek> Its like React Native but for desktop
DTZUZU has quit [Read error: Connection reset by peer]
DTZUZU has joined #crystal-lang
_whitelogger has joined #crystal-lang
_whitelogger has joined #crystal-lang
_whitelogger has joined #crystal-lang
deavmi has quit [Quit: Eish! Load shedding.]
deavmi has joined #crystal-lang
ua has quit [Ping timeout: 256 seconds]
chloekek has joined #crystal-lang
ua has joined #crystal-lang
<FromGitter>
<j8r> @3n-k1 I guess you're in a "startup"?
<FromGitter>
<kingsleyh> can anyone give me a pointer on how to use JSON::Serializable to write a converter for Array(Hash(String, Float)) to Array(Hash(String,BigDecimal) - see here: https://play.crystal-lang.org/#/r/9yji
<FromGitter>
<kingsleyh> if it's not possible right now with JSON::Serializable I will go with a custom implementation of from_json doing it by hand
<FromGitter>
<Blacksmoke16> you'd want to `require "big/json"` as well
<FromGitter>
<Blacksmoke16> then could prob just take the code from his PR for now
<FromGitter>
<Blacksmoke16> and remove it next release
<FromGitter>
<kingsleyh> oh
<FromGitter>
<j8r> @Blacksmoke16 thx, I didn't read the whole discussion. I was right :)
<FromGitter>
<Blacksmoke16> 👍 np
<FromGitter>
<j8r> combining several jobs in one is typically on small businesses
<FromGitter>
<3n-k1> i'd be much more fine with the workload and small pay if i had known about it up front haha. i know for next time though, ask in the interview if they have a concrete set of requirements and any other employees
<yxhuvud>
yeah, having collegues that are doing the same thing is really nice to have
<yxhuvud>
The upside is you will learn a whole lot :)
<FromGitter>
<3n-k1> i've learned a bit, but i think the best experience i've gotten from it is contributing to all the dependencies i use haha. back before they gave me requirements, they gave me permission to charge them for time spent contributing to projects we relied on, so that was cool
<yxhuvud>
that is more than I ever have gotten :<
<FromGitter>
<3n-k1> yeah. i got *ridiculously* lucky with this position
<FromGitter>
<tenebrousedge> sup peeps
<FromGitter>
<Blacksmoke16> o/
<FromGitter>
<tenebrousedge> hey you 😁 how's it been?
<FromGitter>
<Blacksmoke16> not too bad
<FromGitter>
<tenebrousedge> working on anything fun these days?
<FromGitter>
<Blacksmoke16> not really, been playing a lot of factorio lately :p
<FromGitter>
<tenebrousedge> I'm not sure if I can allow myself to play that game. I might get lost in it 😆
<FromGitter>
<Blacksmoke16> xD, yea im playing with some mods, didnt even scratch the surface
<oprypin>
wtf factorio with mods 🙀
<FromGitter>
<tenebrousedge> cool cool. Any recommendations for Crystal projects that need help?
<FromGitter>
<Blacksmoke16> oprypin ha yea. Krastorio 2 and space exploration
<FromGitter>
<Blacksmoke16> oh and LTN
<FromGitter>
<Blacksmoke16> @tenebrousedge prob a lot :p
<FromGitter>
<j8r> when I see games where we have to "program", more or less, I'm just saying to myself: "Huuu, let's rather program instead" haha
<FromGitter>
<ImAHopelessDev_gitlab> Hi
<FromGitter>
<3n-k1> is there any centralized place for reporting vulnerabilities in crystal packages (other than cve)? thinking about building something to integrate with shards to report vulnerabilities if it doesn't already exist
<FromGitter>
<j8r> no, just create an issue in the repo in question
<FromGitter>
<RespiteSage> I know it's based on existing math libraries, but I shouldn't have to go searching other docs for the method name to figure out what a method does.
<FromGitter>
<tenebrousedge> I had noticed that stuff, and I was just as clueless as to what it might be
<FromGitter>
<RespiteSage> Ah, well. One day someone will know enough and have time to write the docs. :P
<FromGitter>
<tenebrousedge> did you change your handle?
<FromGitter>
<RespiteSage> I did. I used the old one ("kinxer") since my childhood days of Neopets, but I was tired of people assuming its meaning.
<FromGitter>
<tenebrousedge> ah!
<FromGitter>
<tenebrousedge> yeah mine is still from when I was 14
<FromGitter>
<RespiteSage> Why change if you can avoid it? :P
<FromGitter>
<tenebrousedge> I mean I do have an alt that I could / should probably use
<FromGitter>
<RespiteSage> Ah, gotcha. It's nice to have a persistent name, though, and it's hard to give up a name you've grown attached to.
<FromGitter>
<tenebrousedge> yeah and it's been the same on Github for ten years now
<FromGitter>
<j8r> sometimes old issues/PRs are no longer relevant also, and can be closed
<FromGitter>
<tenebrousedge> I haven't really contributed much to crystal. Am I allowed to review PRs?
<FromGitter>
<j8r> of course, but if you put "review required" or "approved", it will only be informative ("non-blocking")
<FromGitter>
<j8r> basically, we can just comment, suggest improvements - which is quite enough :)
<FromGitter>
<tenebrousedge> kay :plus1:
<raz>
TIL about generated columns in postgres. so useful.
yukai has joined #crystal-lang
<FromGitter>
<christopherzimmerman> @tenebrousedge are you interested in scientific computing? https://github.com/crystal-data/num.cr is always looking for contributors.
<FromGitter>
<tenebrousedge> as interested as I am in anything else. I'm not sure what relevant experience I might have with scientific computing. The sqlite issues seem manageable
<FromGitter>
<Blacksmoke16> doc updates to API docs and/or book are always 💯 too