<< 27-09-2019 >>

00:00:05*Hideki_ joined #nim
00:02:15FromGitter<zacharycarter> thanks for the help! I'm going to try to go back to sleep now :)
00:04:38*Hideki_ quit (Ping timeout: 268 seconds)
00:05:32*matlock quit (Read error: Connection reset by peer)
00:09:04*exelotl quit (Ping timeout: 264 seconds)
00:13:40FromDiscord<Volund> so I only just learned about this language and am reading up on it. It's looking pretty spectacular so far.
00:19:31*doesntgolf joined #nim
00:24:57*matlock joined #nim
00:27:33FromDiscord<Rika> sets dont have augmented assignment?
00:38:27*mibr quit (Ping timeout: 240 seconds)
00:57:47*owl_000 joined #nim
00:58:29owl_000how to `echo` type objects? do i need to make overloaded `$` for that type?
01:09:24*ng0_ joined #nim
01:11:12*ng0 quit (Ping timeout: 260 seconds)
01:11:18FromDiscord<demotomohiro> try `echo foo.repr`
01:17:21FromDiscord<Rika> is `"a string".items` supposed to not work? how do i make a seq from strings?
01:23:18shashlickI just figured out the boehm crash on feud
01:23:45shashlickOne line code change back in January!
01:24:10shashlickUnbelievable
01:24:36FromDiscord<demotomohiro> @Rika, Do you want to do `for i in "a string":echo i`?
01:24:44shashlickhttps://github.com/nim-lang/Nim/commit/06e3d3ab4dea4aa11a1728c849799ce6aeecb3a4
01:25:29*endragor joined #nim
01:27:17*endragor_ joined #nim
01:29:58FromDiscord<Rika> @demotomohiro i want to group 2 chars together into a seq
01:30:03FromDiscord<Rika> w/o a for loop if possible
01:30:41FromDiscord<Rika> like "aabbcc" into @["aa", "bb", "cc"]
01:30:42FromDiscord<Rika> or so
01:30:52*endragor quit (Ping timeout: 245 seconds)
01:36:47owl_000what happens when we add `[]` after a variable
01:37:20shashlickDereference pointer
01:39:41disruptekshashlick: wow, what was the feud bug?
01:40:55owl_000https://play.nim-lang.org/#ix=1X6R please look at the comments
01:41:37disruptekyes, it's a copy, owl_000.
01:42:57disruptekuse `typeof` instead of `type`. also, the convention is to Uppercase your type names.
01:44:13*endragor joined #nim
01:45:20owl_000thanks, but last two line type(x) is list, i do understand, but why type(y) is list:ObjectType, what does it mean
01:45:26owl_000what is the difference
01:46:33disrupteklist is a reference to an object; when you deref x with [] you return an object. hence the type() output.
01:47:11*endragor_ quit (Read error: Connection reset by peer)
01:47:44disruptekx and y are not the same type, in case that wasn't obvious.
01:48:46owl_000oh, let me think for a moment.
01:49:28disruptekeg. you change ln15 to `let y: list = x[]` and you'll get a compile error.
01:49:50shashlick@disruptek - someone disabled interior pointer checking in boehm
01:50:01shashlickSee the commit link I posted
01:50:04disruptekshashlick: yes, but did you have a pointer into a global?
01:50:46shashlickI need to go back and verify that
01:50:59owl_000`let y = x[]` this line actually copied information of ref object and become object??, not a duplicate of x.
01:51:05shashlickBut disabling that code fixed my crash
01:51:13disruptekah. see, i'm wondering if there's actually a bug that you provoked that isn't in your code.
01:51:24disruptekowl_000: correct.
01:51:54owl_000thanks a lot disruptek :)
01:52:11disruptekyou created a y which has a different type; you stripped the "ref" from the list type you defined.
01:52:42disruptekbecause it wasn't a ref, the value was copied and not the reference.
01:52:49*endragor quit (Remote host closed the connection)
01:53:07shashlickWell I have tables all over the place and there must be pointers in the C generated
01:53:32shashlickI don't see how that change is a good idea
01:53:38disruptekbut as we cannot control the impl, it seems to me that we cannot afford that patch by default.
01:54:00disruptekwe can't be crashing just because you have a table on a global.
01:54:19shashlick"... or on the heap point to the interior of an object rather than the beginning."
01:54:40disruptekthat could be anything, anywhere.
01:54:49shashlickIt isn't just globals
01:54:56disruptekright.
01:55:25shashlickIt crashes cause the data structure gets garbage collected and emptied out
01:55:54disrupteki guess you don't have a repro yet, but it shouldn't be hard to provoke it.
01:56:19disruptekwhat did you do, bisect?
01:56:30shashlickWell I built with and without it and could consistently crash or work
01:57:30shashlickI started with a bisect
01:57:44shashlickbut it didn't work after a point since I ran into broken commits
01:57:58shashlickalso i had to pull old code of every package
01:58:01shashlicktoo many commits
01:58:03shashlick1000+
01:58:22shashlickso then I started looking at the history of changes in the GC related to boehm
01:58:30shashlickthere were only two real candidates
01:58:58disruptekthat's the main reason i'm wanted for murder in ireland. damned broken commits in master.
01:59:30disrupteknot that i'm guilty, of course.
01:59:53shashlicktell me about it
01:59:55disrupteki just, y'know, can't visit the emerald isle anymore.
02:00:08disrupteki can fly through shannon though, so it's fine.
02:00:54shashlickI've wasted literally 6 months fighting this issue - first i was stuck with 0.19.x and after that it was neverland
02:00:58disruptekdoes this mean you're back on the feud horse?
02:01:29shashlicki am but i don't know where to start cause its been months in the doldrums
02:01:50shashlicki'll have to clean up all the junk code i added trying to work around this nonsense
02:02:10disruptekstart with something you can polish and use right away. something user-facing. that'll restore your motivation. 😉
02:02:11shashlickand that whole shared seq and string project
02:02:39disruptekyou're ripping that out?
02:02:43shashlicki need to finish nimterop and nimarchive first, very easy to get distracted
02:02:51shashlickno point keeping it in right
02:03:24disruptekwell, it could be useful. is it in its own lib?
02:03:57shashlickyes it is
02:04:08shashlickhttps://github.com/genotrance/shared
02:04:15disruptekout it goes!
02:04:31shashlickwas great experience working on it tho
02:04:47shashlickwith boehm and newruntime, it doesn't have a long life
02:05:32shashlickanyway, need to see what Araq thinks about removing that commit
02:06:02disruptekdid you test that the env var works to disable the poor behavior?
02:06:29shashlicki was on an airplane so didn't have the env var name to test
02:06:34shashlicki'll try it later
02:06:43shashlickbut i'm wondering whether it is during compile time or runtime
02:06:47shashlickif it is runtime, it's useless
02:07:11shashlickunless i can set it in the exe on startup
02:07:32shashlickregardless, this doesn't seem like something that makes sense for most users
02:08:15disruptekseems to be compile-time.
02:08:42shashlickhow can you tell?
02:09:12disrupteknevermind, this doc says it's runtime:
02:09:16disruptekhttps://github.com/ivmai/bdwgc/blob/3c571c7ad66a90e33e4701afe3dc4d2113c60adc/doc/README.environment
02:11:34shashlickhttps://wiki.freepascal.org/garbage_collection
02:12:27disruptekright, there's some confusing docs out there.
02:12:42shashlickya i need to check if it will work if the exe sets the env on startup
02:12:51disrupteki am inclined to go with the boehmgc text though.
02:13:01shashlickregardless, it is torture for most users to figure this out on their own
02:13:10disruptekyou could twiddle it in your code.
02:13:26disrupteki mean, you shouldn't have to resort to configuring the gc via the user's env.
02:13:32disruptekeven inside your app.
02:13:46shashlicki agree, i think it should be turned on by default
02:14:09disruptekjust too dangerous.
02:14:21shashlickanyway, felt awesome on figuring it out
02:14:27shashlickthen disillusioned that i need to continue working on feud :)
02:14:31disruptekyeah, that's a huge win, man. congrats.
02:14:56disrupteki've watched you struggle with that thing on what feels like weekly basis.
02:15:16shashlickwell, problem was that i sank so much time on it that i didn't do much else
02:15:40disruptektime to come up with some insane ideas on how to use mq in it.
02:15:41shashlickfinally broke off and started working on getHeader else i'd still be frustrated
02:16:23shashlickheeh not anytime soon - near term goal is to split out the plugin system into a package so that anyone can use it
02:16:46shashlickof course, need to fix all the random bugs and start using feud fulltime
02:17:23disruptekyay dogfood
02:17:46shashlicki need to think more about the UX though, i'm not impressed with the workflow
02:18:13shashlickbut i think an editor in Nim will be a good demo of the power
02:18:26*doesntgolf quit (Ping timeout: 240 seconds)
02:19:19disruptekcould be amazing. 🤩
02:19:37shashlickwhat OS do you use
02:20:13disrupteklinux
02:20:42shashlickterminal or gui
02:20:49disruptekterminal.
02:21:04disrupteki just can't seem to be productive with a mouse.
02:21:14shashlickfeud doesn't need a mouse
02:21:29shashlickeverything is shortcuts and command-line like
02:21:36shashlickbut it is GUI so that it can be fast
02:22:21disruptekeverything is fast on my machine. i honestly don't know how anyone else gets anything done.
02:22:36disrupteki sit down at a windows machine and i immediately assume it's compromised.
02:23:00shashlicknot much choice, windows is my daily driver
02:23:28shashlicki prefer linux any day
02:24:03shashlickbut having to maintain cross-platform libs means i need to cover osx as well
02:24:39disrupteki have osx and windows on this box, but thinking about it, i really think windows might be contaminated. it would be a first for me.
02:24:48disrupteki haven't booted osx in almost a year.
02:25:21disruptekthough it used to be my dev env.
02:25:31shashlickpresume you have a browser and stuff tho
02:25:39shashlicknot 100% terminal
02:25:49disrupteki left linux for osx because i felt like i spent most of my time tweaking it. when i came back, i was sorry i left.
02:27:26disruptekyeah, i mean, i'm not a luddite. but i almost never have any wayland clients that aren't chromium or kitty.
02:28:04FromDiscord<SrMordred> question about language design choices: why "for x in array.mitems" instead of something like "for var x in array" ?
02:28:26disruptekyou can `for x in array` but i wouldn't recommend it, stylistically.
02:29:14disruptekthere's no var/let modifier simply because that's not where the mutability stems from and it's gratuitous to have it as return type isn't a source of dispatch.
02:30:05disruptekdoes that make sense? return type isn't a mechanism for method dispatch...
02:31:29disruptekbtw, if you're annoyed that you can't typecheck your loop variables, you can use this: https://github.com/disruptek/foreach
02:31:46FromDiscord<SrMordred> @disruptek i´m coming from D where u have "foreach(ref x ; array )" when u want to modify values on the loop. so i'm looking for equivalents 😛
02:32:37disrupteki'd guess the equivalent is `for x in arr.mitems:` ...
02:33:16disrupteki dunno why they chose an `m` prefix beyond the obvious.
02:33:45FromDiscord<SrMordred> @disruptek yes, but thats my point wouldnt be interesting to have a syntatic sugar to lower code to that with "for var x in arr" for ex?
02:34:10disruptekyes, i'd rather it worked that way because it'd be more explicit.
02:35:00FromDiscord<DeltaPHC> Or `for x in var arr`
02:35:13shashlick@disruptek - well I'm off for now, thanks for celebrating
02:35:21disruptekshashlick: have a good one.
02:38:09FromDiscord<SrMordred> @DeltaPHC yes, but its odd for me. i see var as a new variable that´s mutable. so var array didnt make sense for me.
02:38:43*rayman22201 quit (Quit: Connection closed for inactivity)
02:38:45disruptekbut you need to be thinking that the target isn't the array per se, it's a special iterator instantiated for the loop.
02:39:28disruptekthat's part of why i now use `.items` or `.pairs` explicitly; it helps convey the behavior.
02:39:51FromDiscord<DeltaPHC> The meaning of `var` is slightly oveloaded anywho. Like in a proc argument: `proc foo(a: var MyObject) = ...`
02:40:01disruptekpoint being, it could be a "mutable iterator", in which case the "var" symbolizes that pretty well.
02:40:32disruptekeither one works. i'm not sure which could be easier to implement, but probably DeltaPHC's version.
02:41:18disruptekmaybe i can even add that to `foreach`.
02:43:03FromDiscord<SrMordred> yes, thinking as iterators this make sense.
02:43:03FromDiscord<SrMordred> i´m used to think on mutability of the variable side. (as D, C++ etc)
02:43:25disruptekright.
02:43:51disrupteki think this would be a for loop macro and it'd be DeltaPHC's syntax.
02:43:52FromDiscord<SrMordred> that´s something that i´m liking in nim:
02:43:52FromDiscord<SrMordred> looked at your code and realized that i can emulate this with macros 🙂
02:44:11FromDiscord<DeltaPHC> You can do a heckuva lot with macros
02:44:25disruptekyeah, that silly thing came out of this same sorta shit-shooting because i was whining about it.
02:44:39disruptekfinally realized i could just do it myself and 20mins later, it was done.
02:45:29*laaron quit (Quit: ZNC 1.7.4 - https://znc.in)
02:45:38FromDiscord<SrMordred> i frying my head today learning about macros. never worked with ast manipulation before
02:45:41FromDiscord<SrMordred> im
02:45:44FromDiscord<DeltaPHC> Bit of a tangent, but macros and templates are kind of a double-edged sword to me. Very powerful, and allows you express some very readable, concise syntax. But on the other hand, use it a *lot* and doesn't really resemble Nim anymore, lol
02:46:17disruptekright, that's the risk. you want people to be able to understand what's happening if they have to read the code.
02:46:34*laaron joined #nim
02:46:58disruptekhere's 1.2MM loc all generated by macros: https://github.com/disruptek/atoz
02:47:50FromDiscord<SrMordred> @DeltaPHC yes, i can understand this. too much power 😛
02:47:50FromDiscord<SrMordred> the first thing that i did with nim when saw templates was making`+` do minus internally. just to see if was possible xD
02:48:16FromDiscord<DeltaPHC> That sounds evil. I like it
02:48:47disrupteknim is the kinda language that would let you shoot yourself in the foot and even load the gun.
02:48:51disrupteki love that about it.
02:49:55FromDiscord<SrMordred> @disruptek yes, loving it because of this too. i really loved D because of its meta-capabilities and nim is way "worst" 😛
02:51:01disruptekyou should do the `var` as a for loop macro. maybe call it `mutable`. it'll just help document/check the iteration, maybe? i don't think you'd want to create mutable vars from immutable inputs.
02:51:29disruptekhah, nim is way worse! that's great. 😁
02:52:14disruptektechnically, you could automatically invoke `mitems` or `mpairs` if you wanted to be clever.
02:53:01FromDiscord<SrMordred> @disruptek that´s a nice first macro 'project', ill give it a try
02:53:22disruptekyou'll be surprised how easy it is.
02:54:24FromDiscord<DeltaPHC> Most of the learning is just figuring how Nim code translates to AST types. Beyond that, it's just normal Nim code
02:57:42*theelous3_ joined #nim
02:58:46*theelous3 quit (Remote host closed the connection)
02:59:10*theelous3 joined #nim
02:59:47*theelous3 quit (Read error: Connection reset by peer)
03:02:32*theelous3_ quit (Ping timeout: 245 seconds)
03:09:01*endragor joined #nim
03:16:51FromDiscord<SrMordred> oh, i just discovered dumpAstGen. now things got easier
03:24:11*matlock quit (Read error: Connection reset by peer)
03:50:44*rockcavera quit (Remote host closed the connection)
03:51:48FromDiscord<SrMordred> now that i get it, is indeed easy
03:57:21*chemist69 quit (Ping timeout: 246 seconds)
03:59:28*chemist69 joined #nim
04:07:12FromDiscord<Shield> is there a library to translate AST back to normal nim code?
04:13:26leorizeecho it
04:13:38leorizeuse `repr` actually
04:14:53FromDiscord<treeform> disruptek, do you have a similar thing for google APIs?
04:15:00FromDiscord<treeform> as you do for aws?
04:15:45FromDiscord<treeform> I started manually doing that for GCP and its not pretty... https://github.com/treeform/googleapi
04:16:46*theelous3_ joined #nim
04:18:10FromDiscord<Shield> @leorize can I get a small example?
04:19:45leorize`echo repr NimNode`
04:20:55leorizeif you need more context then: https://play.nim-lang.org/#ix=1X7t
04:21:07leorizeswitch to debug view or else you won't see anything
04:21:37leorizeZevv, disruptek: so.. I've added a shiny new "find project file" feature
04:21:42leorizeanyone wanna try?
04:21:58leorizeyou can now open any file in your project and nim.nvim will find the correct project file
04:24:50*navinmistry joined #nim
04:27:27*navinmistry quit (Remote host closed the connection)
04:30:02*theelous3_ quit (Ping timeout: 245 seconds)
04:37:56*laaron quit (Remote host closed the connection)
04:40:57FromDiscord<Shield> leorize: thanks!
04:54:51*mpcjanssen quit (Ping timeout: 240 seconds)
04:55:21*laaron joined #nim
04:56:27*nsf joined #nim
04:56:53*pbb quit (Ping timeout: 276 seconds)
04:57:46*pbb joined #nim
04:59:06*laaron quit (Client Quit)
05:00:02*laaron joined #nim
05:02:03*pbb_ joined #nim
05:02:39*owl_000 quit (Ping timeout: 265 seconds)
05:04:41*pbb quit (Ping timeout: 276 seconds)
05:14:10Zevvleorize: do you even sleep?
05:16:44*pbb_ quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
05:17:15*pbb joined #nim
05:22:25*navinmistry joined #nim
05:23:20*NimBot joined #nim
05:35:51*narimiran joined #nim
05:45:30FromDiscord<Shield> https://forum.nim-lang.org/t/5232
05:45:45FromDiscord<Shield> i think this post require a more correct answer
05:46:09*navinmistry quit (Remote host closed the connection)
05:46:13FromDiscord<Shield> especially about 'not' needing the shared libraries for boehm and go
05:53:10leorizeZevv: maybe :)
05:53:41leorizejokes aside I just implement this based on Araq's project finding logic in the compiler
05:53:57leorizewith a few tweaks so that it works better
05:54:14*skoude joined #nim
05:54:19leorizeif everything goes well I'll adjust the one in the compiler
05:55:38*teimosso joined #nim
05:57:01*laaron quit (Quit: ZNC 1.7.4 - https://znc.in)
05:58:04*laaron joined #nim
06:00:29*laaron quit (Client Quit)
06:03:15*laaron joined #nim
06:04:20Araqleorize, can you backport these tweaks to the compiler please?
06:05:32leorizeI'll give them a test drive in nim.nvim
06:05:46Araqnice, thanks
06:06:35*laaron quit (Client Quit)
06:07:19leorizedisruptek, narimiran, Zevv: please pull from 'find-project' branch if you're interested in testing the "automated project file finder" :)
06:07:36*skoude quit (Ping timeout: 240 seconds)
06:08:14*solitudesf joined #nim
06:08:55leorizeso far it worked well for the compiler and some nimble packages, but please let me know if it targets the wrong file :)
06:20:09*laaron joined #nim
06:22:51*laaron quit (Client Quit)
06:29:43*skoude joined #nim
06:33:45*dddddd quit (Ping timeout: 268 seconds)
06:34:40*dddddd joined #nim
06:36:48*teimosso quit (Quit: teimosso)
06:37:22YardanicoYay, Patreon is available for Nim now. How much % Patreon gives the authors?
06:44:46AraqI don't know :-)
06:46:50*dddddd quit (Remote host closed the connection)
06:53:09FromDiscord<Kiloneie> 9% for existing and 12% for new users patreon takes
06:53:34FromDiscord<Kiloneie> not THAT much but... why the fucking difference for new and old users...
06:54:35FromDiscord<Kiloneie> about that, it says based on high earnings it changes bla bla..
06:54:46leorize[m]guess the 9% was a guarantee to people signed up back then
06:55:19FromDiscord<Kiloneie> i had that mail sitting in my inbox for a month, then i didn't make one...
06:55:24FromDiscord<Kiloneie> -.-....
06:55:51FromDiscord<Kiloneie> Also yay my #1 beat my most viewed video of all times
06:57:07Yardanico@Kiloneie how old should my account be? I just found out my Patreon account was registered in Jan 2016
06:57:25FromDiscord<Kiloneie> it was like 6 months ago, so you get the low fee
06:57:29YardanicoOr you mean it depends on author's time since registration?
06:57:41FromDiscord<Kiloneie> pretty sure it said on registration date
06:57:56FromDiscord<Kiloneie> but really, it doesn't matter
06:58:20FromGitter<zacharycarter> If anyone knows of any game dev / Nim related jobs - please let me know as I'm looking again
06:58:22FromDiscord<Kiloneie> 9-12% cut is negligable, and it depends on your monthly income on patreon.... something
06:58:28*Vladar joined #nim
06:59:34FromDiscord<Kiloneie> Imma probably setup my patreon in like a good week, then pray to the sun i will get some love D:
07:00:00*gmpreussner quit (Quit: kthxbye)
07:04:08*laaron joined #nim
07:04:42*gmpreussner joined #nim
07:05:53FromDiscord<Kiloneie> why does google say different information on ads monetization on classic and studio beta... classic says you need 10K subs and or 5000 watched hours, whilst the studio beta says just be 18... oO weird stuff
07:08:29FromDiscord<Kiloneie> no wait, they changed it a bit, 4000 hours, 1000 subs... okay that is far more feasible, but 4000 watch hours uff... im at like 1% D:
07:09:26Yardanicowhy would you want monetization so early?
07:09:35YardanicoI think you wouldn't earn anything real until you get like 10k subs
07:09:51FromDiscord<Kiloneie> i don't know how much i would actually get...
07:10:20FromDiscord<Kiloneie> well patreon first anyways, pretty sure that would be more than ads
07:10:34*ng0_ is now known as ng0
07:12:09*krux02 joined #nim
07:15:45Zevvzacharycarter: oh sorry to hear that, how long were you here? A year and a bit?
07:16:20FromGitter<zacharycarter> not even - 5 months
07:16:23FromGitter<zacharycarter> studio got shut down
07:16:30*mibr joined #nim
07:17:00FromGitter<zacharycarter> it's all good though - I get severance and there are a lot of opportunities here and elsewhere I'm having luck with
07:17:05Araqwait what? they hired you and then went out of business 5 months later?
07:17:09FromGitter<zacharycarter> but just in case anyone has an in or knows of a sweet job coding in Nim
07:17:25FromGitter<zacharycarter> well Wargaming isn't going out of business, but they decided to shutdown our studio yeah
07:17:26FromDiscord<Kiloneie> Where do you live ?
07:17:35FromGitter<zacharycarter> I'm currently in Helsinki, Finland
07:18:02FromDiscord<Kiloneie> if you found a Nim job there, wau, pretty sure in my country that will be in like 20 years
07:18:19FromGitter<zacharycarter> well - I'm not really tied to any location, I'm originally from the states
07:18:28Yardanico@Kiloneie what country are you in if that's not a secret?
07:18:32FromGitter<zacharycarter> as long as I can bring my dog with me, I'm willing to work pretty much anywhere
07:18:41FromDiscord<Kiloneie> oh yeez, did you just fly an ocean for a job D: ?
07:18:49FromDiscord<Kiloneie> im from Slovenia, not much going on here
07:19:20FromGitter<zacharycarter> I did indeed
07:19:32FromDiscord<Kiloneie> you can drive from the furthest part of slovenia to the other in like 3 hours smthing
07:19:39Yardanicothat's very good
07:19:50FromGitter<zacharycarter> I don't regret it though, getting to live in a new country half way across the world is a neat experience many don't get
07:20:13FromGitter<zacharycarter> and Finland / Helsinki are cool - I don't think I'd want to retire here but you never know :)
07:20:21FromDiscord<Kiloneie> not my cup of tea, i don't like new situations xD
07:22:37FromGitter<zacharycarter> I could always transfer to another wargaming studio - but I don't know
07:22:48FromGitter<zacharycarter> the project they're working on is ambitious to say the least
07:36:21*skoude quit (Ping timeout: 265 seconds)
07:36:48*skoude joined #nim
07:37:36*asymptotically joined #nim
07:41:34*laaron quit (Quit: ZNC 1.7.4 - https://znc.in)
07:42:17*laaron joined #nim
07:47:55ZevvOny of my customers is always looking for engineers; video/streaming/android(system level)/OpenGL.
07:48:06ZevvBased in the middle of NL, but no dogs in the office (I asked)
07:48:43FromGitter<zacharycarter> I'm okay with no dogs in the office
07:48:54FromGitter<zacharycarter> although I did have cooper in the office yesterday haha
07:49:01FromGitter<zacharycarter> it was his first and last time there though
07:49:17FromGitter<zacharycarter> I brought him in kind of as a joke to offer "emotional support"
07:53:14*laaron quit (Remote host closed the connection)
07:57:14*sealmove quit (Quit: WeeChat 2.6)
07:57:31Araqwow this is a great read: https://code.kx.com/q4m3/0_Overview/#00-the-evolution-of-q
07:58:28Zevvzacharycarter: how is your OpenGL?
07:59:32FromGitter<zacharycarter> good
07:59:52FromGitter<zacharycarter> I've done quite a bit with OpenGL - https://github.com/zacharycarter/zengine
08:01:34FromGitter<zacharycarter> so with `strformat` is it possible to do &"{obj.prop}"
08:02:07ZevvAh that was you :) We have a project where we're mass virtualizing Android and remoting the GL stream to thin clients. There's $magic involved in optimizing the GL, it's not a simple serialization because we want to avoid round trips. Stuff is working at the POC level, but the original GL guy wants to step out and noone (Except me a bit) knows anything about GL. So if you're interested to move to .nl, I can
08:02:13Zevvintroduce you. Very international team, all over europe
08:02:26Yardanicohow can I pass a top-level proc as a closure?
08:02:43FromGitter<zacharycarter> Zevv: that sounds very neat - yeah I'd definitely be interested in an introduction :)
08:03:09Yardanicoeven when I define it it like `obj.field = proc ...` it says "asyncstreams.nim(226, 73) Error: type mismatch: got <proc (s: AsyncStream, size: int): Future[system.string]{.gcsafe, locks: <unknown>.}> but expected 'proc (s: AsyncStream, size: int): Future[system.string]{.closure, gcsafe.}'"
08:03:19Yardanico(trying to fix vegansk's AsyncStreams module for latest nim)
08:03:21leorize[m]Yardanico: you can't if it doesn't capture anything
08:03:42Zevvzacharycarter. Can you drop your resume at [email protected]?
08:03:50FromGitter<zacharycarter> doing so now
08:03:57Yardanicohe used cast[type(res.readDataImpl)](sockReadData) to do that but it's not possible anymore
08:04:15leorize[m]isn't there asyncstream in the stdlib?
08:04:34FromGitter<zacharycarter> Zevv: sent
08:05:12Yardanicoleorize[m]: vegansk's AsyncStream contains implementation for async socket , async string and async file
08:05:44Zevvzacharycarter: Thanks. I'll put it in the normal recruiting pool and give a little personal introduction with it.
08:05:50Yardanicowell maybe I'll implement my own async socket stream based on asyncstreams stdlib module
08:06:32FromGitter<zacharycarter> much appreciated!
08:06:41leorize[m]that module got the unstable tag though
08:07:15Yardanicoleorize[m]: well it's okay :)
08:07:47FromGitter<zacharycarter> okay weird
08:08:15FromGitter<zacharycarter> `echo &"{i} : {prop.name} : {prop.description}"` results in : `template/generic instantiation of `&` from here`
08:08:37FromGitter<zacharycarter> but `echo &"{i} : {{prop.name}} : {{prop.description}}"` compiles
08:08:51FromGitter<zacharycarter> however I have a feeling it's not correct
08:09:07leorize[m]well, what's the error?
08:09:57leorize[m]that message is just a note
08:09:58FromGitter<zacharycarter> `undeclared field: 'name' for type vulkan.VkLayerProperties [declared in C:\Users\carte\projects\fore\vulkanim\vulkan.nim(833, 3)]`
08:10:06FromGitter<zacharycarter> oh
08:10:10FromGitter<zacharycarter> yeah I guess I should have tried compiling
08:10:17FromGitter<zacharycarter> :P
08:10:20FromGitter<zacharycarter> sorry for being dumb
08:10:26leorize[m]well you should still open a bug though
08:10:38leorize[m]i don't think that message should be there unless there are errors
08:10:48FromGitter<zacharycarter> okay I will
08:10:58FromGitter<zacharycarter> yeah - it's slightly confusing
08:12:24leorize[m]lol
08:13:05*skoude quit (Ping timeout: 265 seconds)
08:14:36FromGitter<zacharycarter> I will say - not having to go into work but still getting paid is nice
08:23:24*skoude joined #nim
08:23:47*floppydh joined #nim
08:27:48*skoude quit (Ping timeout: 245 seconds)
08:29:27Zevvzacharycarter: how long will that last?
08:30:55*navinmistry joined #nim
08:34:27*asymptotically quit (Remote host closed the connection)
08:34:47*asymptotically joined #nim
08:37:38FromDiscord<mratsim> @ Shield > is there a library to translate AST back to normal nim code?
08:37:38FromDiscord<mratsim> I use toStrLit
08:37:49FromDiscord<mratsim> @Shield ^
08:37:56Zevvrepr
08:40:04FromGitter<zacharycarter> Zevv: well - I probably won't have a job anymore sometime next week
08:40:07FromGitter<zacharycarter> so only a few more days :P
08:40:14FromGitter<zacharycarter> but until then I'm going to enjoy / make the most of it!
08:40:27ZevvWell, I'll tell HR you're available next week then :)
08:41:23FromGitter<alehander42> Schield : or renderer.nim
08:41:31FromGitter<alehander42> if you need it on runtime
08:42:30*laaron joined #nim
08:42:44FromGitter<zacharycarter> Zevv :D cool - I probably am going to go back to the states for a few weeks to visit with the family but I'm pretty flexible in terms of timing
08:43:33*laaron quit (Client Quit)
08:46:59*owl_000 joined #nim
08:59:35*skoude joined #nim
09:05:33FromDiscord<Kiloneie> how much does the flight cost you ?
09:07:10FromGitter<zacharycarter> it was about $900 USD to get over here
09:08:11FromDiscord<Kiloneie> Uff, that's almost 3 months of living for me here
09:08:13FromGitter<zacharycarter> it's about $1500 round trip to go back to the states and back to Helsinki
09:08:32FromDiscord<Kiloneie> well you probably earned a lot more than i did with my last job xD
09:08:39FromGitter<zacharycarter> oh wait that's wrong
09:08:45FromDiscord<Kiloneie> bloody physical labor, pays dirt
09:08:58FromGitter<zacharycarter> I'm seeing round trip fares in Mid october for < $700 USD
09:09:10FromGitter<zacharycarter> well - I took a big pay cut to come over here
09:09:18FromDiscord<Kiloneie> yeah it depends on the time
09:09:20FromGitter<zacharycarter> but that's the games industry for you, you get paid shit and treated like shit
09:09:22FromGitter<zacharycarter> but you get to work on games
09:09:38FromDiscord<Kiloneie> pretty sure you got payed over 2x of me still 😛
09:09:49FromGitter<zacharycarter> everything is relative :)
09:09:56FromDiscord<Kiloneie> i know games industry is the worst in the programming world
09:10:17FromDiscord<Kiloneie> well i got like 20-25% more than minimum wage
09:10:41FromGitter<zacharycarter> I wouldn't say the games industry is the worst - I think it largely depends on what's important to the individual
09:10:54FromGitter<zacharycarter> if you want to make the highest salary then yes, you'd be better off looking elsewhere
09:11:13FromGitter<zacharycarter> but IMO money isn't the most important thing
09:11:25FromGitter<zacharycarter> enjoying what you do is
09:11:30FromDiscord<Kiloneie> i know, that's why i quit my job xD
09:11:41FromDiscord<Kiloneie> i like making videos like 1000x times more than that crap
09:11:45FromGitter<zacharycarter> :)
09:11:54FromDiscord<Kiloneie> it was supposed to be 2-3 months, then well big badluck
09:12:02FromGitter<zacharycarter> well - if you want to make money programming, you might want to pick a more popular language
09:12:08FromGitter<zacharycarter> hard to get hired as a Nim developer
09:12:24FromDiscord<Kiloneie> i just need 350$ a month making videos that's all
09:12:32FromDiscord<Kiloneie> and im all good
09:12:39FromGitter<zacharycarter> but if you want to make videos, Nim is probably a good candidate for that as it's only going to grow in popularity after hitting 1.0
09:12:47FromDiscord<Kiloneie> that was the plan
09:12:53FromDiscord<Kiloneie> and im the first making these
09:13:04FromDiscord<Kiloneie> so one day it should pay off
09:13:10FromGitter<zacharycarter> well I wish you luck! I personally cannot stand video tutorials, but I know a lot of people like them
09:13:24FromDiscord<Kiloneie> i can be doing this for about 6+ months till i start running out of money
09:13:31FromDiscord<Kiloneie> thanks 🙂
09:13:48FromGitter<zacharycarter> then you can start your pro twitch game streaming career :P
09:13:53FromGitter<zacharycarter> since you'll already have the setup
09:14:25FromGitter<zacharycarter> maybe my stupid game will be done by then :P
09:14:25FromDiscord<Kiloneie> well i do want to be a GM
09:14:35FromGitter<zacharycarter> game master?
09:14:41FromDiscord<Kiloneie> i am a master in heroes of the storm, i wanna get to GM, i don't have the time D:
09:14:54FromGitter<zacharycarter> oh haha
09:15:02FromDiscord<Kiloneie> because i was beating the crap out of GMs easy, that's how i know
09:15:16FromGitter<zacharycarter> shows you how much I know about HotS
09:15:37FromDiscord<Kiloneie> i didn't know how good i was until i found on a stats website that it ranked me Master, so i went on the ladder, and yep, Master lol
09:15:44FromDiscord<Kiloneie> yeah i know, nothing
09:16:07FromGitter<zacharycarter> I decided what kind of game I'm going to make though
09:16:22FromGitter<zacharycarter> I was going down the RTS route, and eventually I do want to make an RTS
09:16:31FromDiscord<Kiloneie> i really want to stream and play with people watching, but that's a far harder path to take than making these videos
09:16:33FromGitter<zacharycarter> but for my first game, I'm going to do my golf battle royale idea
09:16:41FromDiscord<Kiloneie> if you do make RTS, make sure it's unique
09:16:46FromDiscord<Kiloneie> noone will care otherwise
09:16:56FromGitter<zacharycarter> well - everything has been done before
09:17:03FromDiscord<Kiloneie> no, it hasn't
09:17:12FromGitter<zacharycarter> I think it's more about having a fun game
09:17:19FromDiscord<Kiloneie> well as mods a lot has, but as actual games, no
09:17:33FromGitter<zacharycarter> if your game isn't fun, no one is going to play it no matter how unique it is
09:18:03FromDiscord<Kiloneie> i have a very fun game in mind because i played a mod that was extremely fun in Warcraft 3, but lol did i not get to finish it with my limited knowledge at age 15, in Game Maker which could not deliver, it was too slow
09:18:56FromDiscord<Kiloneie> what i tried to tell you is, a lot of people make game clones, TOO similar to existing good ones, and it ends up not getting looked at, at all.
09:19:12FromDiscord<Kiloneie> make a platformer game ? Good luck, there are so many
09:19:19FromGitter<zacharycarter> ah yes, that's definitely not my goal
09:19:37FromGitter<zacharycarter> eh, you can always put a personal spin on a genre
09:19:48FromDiscord<Kiloneie> people actually make very good games that don't sell at all because they are almost copies of other games, too similar
09:19:49FromGitter<zacharycarter> but yes if you try to make a buck by re-creating mario good luck
09:20:05FromGitter<zacharycarter> although this is a pretty widespread practice in the mobile space
09:20:07*thomasross quit (Remote host closed the connection)
09:20:13FromDiscord<Kiloneie> yes those assholes...
09:20:16FromGitter<zacharycarter> and lots of people do make lots of money
09:20:31*thomasross joined #nim
09:20:35FromGitter<zacharycarter> by ripping assets and writing the same game someone else published
09:20:48FromDiscord<Kiloneie> someone makes a flash game a good one, yay a few million plays, makes a angry birds clone of that, makes millions or a billion even...
09:20:53FromGitter<zacharycarter> but no - my golf game idea is pretty unique, I dont think it's been done before
09:21:31FromDiscord<Kiloneie> i view mobile games, and people who got rich on them as a joke, fake money.
09:21:37*thomasross quit (Remote host closed the connection)
09:22:01*thomasross joined #nim
09:22:12FromDiscord<Kiloneie> like the richest guy in my country made Tom Cat, made a billion, the damn thing is a ripp off, of so many things, it's nothing special, and it made a billion because kids and clicking everywhere including the ads
09:22:48FromDiscord<Rika> im thinking of making a version of youtube-dl in nim but i have no time lmao
09:22:51FromDiscord<Kiloneie> like Bill Gates you earned that money, some people just didn't
09:23:23FromGitter<zacharycarter> earning money is more about opportunity and initiative than doing anything to be honest
09:23:40FromDiscord<Kiloneie> yeh... and blatant steal
09:24:01FromGitter<zacharycarter> well - if you can get away with it
09:24:05FromGitter<zacharycarter> more power to you
09:24:33FromDiscord<Kiloneie> like i think Smosh youtube channel once asked for 100K $ to make a game, when they were making millions... like YOU WOT MATE !?
09:25:00FromDiscord<Kiloneie> and people still watch such assholes
09:25:13FromDiscord<Kiloneie> they are clueless
09:25:18FromGitter<zacharycarter> I mean did King invent match 3? No those games existed before video games were a thing
09:25:31FromGitter<zacharycarter> yet they make billions of dollars of revenue off of it per year
09:25:47FromGitter<zacharycarter> should we hate them for it? probably not - they just took an idea and refined it into a money making machine, so good for them
09:26:00FromGitter<zacharycarter> it'd be smarter to try and learn from their success and figure out a way to emulate it
09:26:22owl_000marketing can sell poop
09:26:31FromDiscord<Kiloneie> fortnight 😛
09:26:39FromDiscord<Kiloneie> the #1 game marketing of the century
09:26:52owl_000artist shit, https://en.wikipedia.org/wiki/Artist%27s_Shit
09:27:24FromDiscord<Kiloneie> that game was a flop, then they decided lets make a battle royale, and throw millions at the screen, and now they own probably the best cow cash in the world
09:27:31*skoude quit (Ping timeout: 265 seconds)
09:28:03FromDiscord<Kiloneie> xD lol 127K for that xD, some people
09:28:34owl_000white canvas, 15million
09:29:02owl_000https://www.bloomberg.com/opinion/articles/2014-11-14/why-pay-15-million-for-a-white-canvas
09:29:47FromDiscord<Kiloneie> might have been a transaction really
09:30:14FromDiscord<Kiloneie> hei let me buy this for 15 million, for that service/product of yours that is not that painting of nothing at all 🙂
09:30:29FromDiscord<Kiloneie> rich people make very shady things often lol
09:31:13FromDiscord<Kiloneie> Banks of America, they make economic crysis, and they get to keep all their money and position. ETA on the next crysis, SOON.
09:31:52owl_000later the can of poop proved as fraud, there was no actual artist shit inside the can
09:32:07FromDiscord<Kiloneie> xD
09:32:14owl_000lol
09:32:20*laaron joined #nim
09:38:01*skoude joined #nim
09:40:02*navinmistry quit (Ping timeout: 240 seconds)
09:40:11*navinmistry joined #nim
09:42:02*skoude quit (Ping timeout: 240 seconds)
09:48:17*laaron quit (Quit: ZNC 1.7.4 - https://znc.in)
09:48:44*laaron joined #nim
09:48:51livcdthere's one studio in France that specializes in ripping off games
09:48:55livcdmakes a lot of money
09:50:53livcdHonestly $3m would be enough for me for the rest of my life
09:51:33Araqfor most people that would be enough
09:56:30*skoude joined #nim
09:56:32livcdwell it's 50y of 60k pa which is not that much. But if it's net income after taxes it's a lot more than one can hope for.
09:57:17FromGitter<alehander42> ripping off is not nice
09:57:44Zevvunless you're the one doing the ripping
09:58:09FromGitter<alehander42> and i cant imagine not working at all for 50y
09:58:29FromGitter<alehander42> Zevv, noo
09:58:33FromDiscord<Shield> can you even not rip off somebody somewhere sometime? creativity is dead
09:58:57FromGitter<alehander42> i prefer like having a short ~20 hour work week
09:59:00FromDiscord<Shield> everything that can be done is already done
09:59:04livcdalehander42: you could work on things that do not have to make money
09:59:05FromGitter<alehander42> and doing what i want in the other time
09:59:39FromGitter<alehander42> which i can do with a short work week as well
09:59:50livcdsure if it pays enough i guess
10:00:11ZevvShield: that's what I used to think. But still I sometimes make stuff that seems to amaze tens or hundreds of people, and I'm not the artist type or an especially creative guy.
10:00:29*Perkol joined #nim
10:00:31Zevvand it is always the stupid obvious things I just make for myself which kind of leak out
10:00:32owl_000living in city is becoming more expensive, which increasing thirst of money.
10:01:04PerkolWhen I compile executables with -d:ssl, is SSL linked statically?
10:01:33livcdalso most (if not all?) of commerce is driven by consumption. You could focus on things that will probably never make enough money to sustain your lifestyle. Things that will never stimulate more consumption
10:03:52FromGitter<alehander42> livcd ok, i tried that once or twice and i have to tell you
10:03:58FromGitter<alehander42> i wasnt very productive or creative
10:04:06FromGitter<alehander42> maybe i was for short periods of time
10:04:22FromGitter<alehander42> but for probably 80% of the time, eh
10:04:54narimiranthere is a difference between "don't have to work" and "don't work"
10:07:00FromGitter<alehander42> i agree, just trying to say doing meaningful stuff on your own is often harder
10:07:06FromGitter<alehander42> than usual work
10:07:07FromDiscord<Shield> it's not easy to be productive
10:07:08Zevvwell, if there is no unit test, it don't have to work.
10:08:40*navinmistry quit (Remote host closed the connection)
10:09:09livcdalehander42: that's true. self discipline is hard. But I would prefer to have to work on my self discipline than to work in a mundae corporate job :-)
10:09:45FromGitter<zacharycarter> +1
10:10:00FromGitter<alehander42> i agree, but there are many jobs which are not
10:10:05FromGitter<alehander42> the typical corporate job
10:10:46FromGitter<zacharycarter> yeah but they are hard to find
10:11:03FromGitter<zacharycarter> if the company is large enough - you're almost guaranteed to run into the same bullshit politics / policies no matter where you go
10:11:14FromGitter<alehander42> but there are so many small companies
10:11:18*navinmistry joined #nim
10:11:21FromGitter<alehander42> especially in software
10:11:26FromGitter<zacharycarter> and if it's not large enough to include those, you're probably not making much money / future of the company is uncertain
10:11:44FromGitter<alehander42> well, maybe it's ok to make less money
10:11:49FromGitter<alehander42> for a job that makes me happier
10:11:53FromGitter<zacharycarter> oh I agreee
10:11:55FromGitter<alehander42> or less miserable
10:11:56FromGitter<zacharycarter> that's why I'm in gamedev :P
10:12:09FromGitter<alehander42> yes, just trying to figure it out :P
10:12:56Zevvconsider going freelancer
10:13:30Zevvit might take some guts, and you need to start a bit of a network, but the risks are not any higher then working a regular job (look at zachary), the flexibility is amazing and the pay is fair
10:14:18FromDiscord<Shield> starting as a freelancer is hard...
10:14:32FromDiscord<Shield> (still there)
10:14:36livcdalehander42: my corporate job is providing me the safety of the comfort zone I've built. It's hard to change once you have established a life balance with a fat paycheck (well by fat I mean..better than what you get in a small company)
10:14:43owl_000freelancing is bad
10:14:53Zevvowl_000: elaborate
10:14:59FromGitter<alehander42> Zevv i've donesomething like a bit of freelancing when i was young
10:15:03FromGitter<alehander42> er*
10:15:08federico3you are all welcome to #nim-offtopic :)
10:15:29Zevvfederico3: as soon as anyone starts talkin Nim, we'll shut up :)
10:15:36livcd+1
10:15:36*navinmistry quit (Ping timeout: 240 seconds)
10:15:43FromDiscord<Shield> btw don't some companies force you to not code even in your free time if there's a conflict of interests?
10:15:48FromGitter<alehander42> this is almost valid syntax
10:15:52owl_000in short, in freelancing nothing is certain. i hate uncertainty most.
10:16:27Zevvowl_000: I beg to differ. I have three customers I work for through the week. One can kick me out, and I still work for the others. Zachary had one job, and now he has none.
10:16:46FromGitter<alehander42> but he has a dog
10:16:56Zevvdang, you got me there :(
10:18:28narimiranso, nim talk needed? ok, lets see....
10:18:46narimirandid you know that you can now support nim on patreon? https://www.patreon.com/araq
10:18:55FromGitter<alehander42> Araq, i still need some clarifications for the `init` part of the spec
10:20:29FromGitter<alehander42> what happens if one writes type A = object nonNilable: NonNilable .. ⏎ var a = A() ⏎ call(a) ⏎ proc call(a: A) = ⏎ echo a.nonNilable.field [https://gitter.im/nim-lang/Nim?at=5d8de26d741d186e7e676691]
10:20:55Araqyou can't write 'var a = A()'
10:21:01FromGitter<alehander42> ok
10:21:01Araqyou need to fill out A's fields
10:21:10FromGitter<alehander42> but then what if it's autoinit
10:21:15FromGitter<alehander42> e.g. the proc returns A
10:21:35FromGitter<alehander42> so if you don't write anything, it just returns A()
10:21:46Araqthat's why this idea is closely connected to 'no implicit init'
10:22:02FromGitter<alehander42> yeah, i can feel that, but wasn't sure how no implicit init works
10:22:10Araqevery path through the proc must set 'result'
10:22:30*navinmistry joined #nim
10:23:00FromGitter<alehander42> but only for nonref object return type?
10:23:43FromGitter<alehander42> oh, it should be for all types that have a non-autoinitable subfield somewhere
10:24:00FromGitter<alehander42> e.g. A(b: B(nonNilable: value))
10:24:45FromGitter<alehander42> so the non-implicit-initness is lifted from sub fields
10:26:50*navinmistry quit (Ping timeout: 240 seconds)
10:30:07*navinmistry joined #nim
10:31:48*skoude quit (Ping timeout: 265 seconds)
10:34:42*navinmistry quit (Ping timeout: 265 seconds)
10:37:40*navinmistry joined #nim
10:41:04*neceve joined #nim
10:42:02*navinmistry quit (Ping timeout: 240 seconds)
10:45:14*navinmistry joined #nim
10:46:07*skoude joined #nim
10:49:16*navinmistry quit (Ping timeout: 240 seconds)
10:52:50*navinmistry joined #nim
10:54:15FromDiscord<Kiloneie> Can the compiler determine data type for any value ? (other than the ones made in type sections, which shouldn't work)
10:57:14*navinmistry quit (Ping timeout: 240 seconds)
11:00:25*navinmistry joined #nim
11:00:37leorize[m]there's a type for every value in nim :p
11:01:21FromDiscord<Kiloneie> what about the wacky ones you can make in type section, the compiler shouldn't be able to figure that one out with an initialiation value ?
11:01:54FromDiscord<Kiloneie> If Nim can figure it all out, then declarations of types are only useful for sizes ?...
11:03:39FromGitter<alehander42> can you givean example
11:03:59FromDiscord<Kiloneie> Uhh maybe...
11:04:06ZevvI think he means if you say `var a = 3`, you don't need to make it explicit that you want an int
11:04:46FromGitter<alehander42> i see, so yeah, some languages work with less type annotations for functions, and more inference
11:04:49FromGitter<alehander42> e.g. haskell and crystal
11:04:53*navinmistry quit (Ping timeout: 245 seconds)
11:04:58FromDiscord<Kiloneie> yeh that, so the compiler can figure out the type for ANY type ? But it won't figure out if you type var a = 127 which should be int8, so no sizes
11:05:01FromGitter<alehander42> but you still need the base type definitions like our type sections
11:05:19FromGitter<alehander42> well, thats one example
11:05:34ZevvKiloeine: So you can do either `var a = 127'8` or `var a = 127.uint8`
11:05:35FromGitter<alehander42> but not only that, overally inference has other issues
11:05:41FromGitter<alehander42> full program inference*
11:05:53FromGitter<alehander42> it's much slower iirc
11:06:34FromDiscord<Kiloneie> yeah but then you are telling the compiler you want an int8, which it won't know by itself, it will make a default int which is int64 depending on your OS BIT... edition ?..
11:07:06leorize[m]it's the reasonable default
11:07:27FromDiscord<Kiloneie> will it make it a int32 if you got a 32 bit Nim version ?
11:07:30FromGitter<alehander42> so you ask if there are types
11:07:41FromGitter<alehander42> where you can't write var a = <value of it>
11:07:45FromGitter<alehander42> and nim figure it out
11:07:50leorize[m]yep, unless the value is bigger
11:08:02*navinmistry joined #nim
11:08:24FromDiscord<Kiloneie> and if you made a lot of variables by not stating it's type, the program would run slower ?
11:08:33FromGitter<alehander42> no
11:08:38FromGitter<alehander42> it doesnt have anything to do with that
11:08:47FromGitter<alehander42> the compiler always figures out types for each variable
11:08:51leorize[m]no
11:08:53FromGitter<alehander42> otherwise you'll get a compiler error
11:09:00FromGitter<alehander42> e.g. if you writa var a = @[]
11:09:04FromGitter<alehander42> iirc thats error
11:09:23leorize[m]!eval var a = @[]
11:09:25NimBotCompile failed: /usercode/in.nim(1, 9) Error: cannot infer the type of the sequence
11:09:44FromGitter<alehander42> so here you indeed need to var a: seq[stuff] or to cast
11:10:50FromDiscord<Kiloneie> so if i were to say type inference only works for basic types would that be correct ?
11:11:13leorize[m]not really
11:11:30leorize[m]!eval echo typeof (1,2)
11:11:33NimBot(int, int)
11:11:51leorize[m]^ the compiler still knows that this is a tuple
11:12:47FromDiscord<Kiloneie> it seems to me like you don't really ever need to declare a type yourself like in Python.
11:12:53*navinmistry quit (Ping timeout: 265 seconds)
11:12:57FromDiscord<Kiloneie> as long as you give it a value
11:13:04leorize[m]I'd say that type inference will always work unless it's too ambiguous
11:13:09leorize[m]python uses dynamic typing
11:13:27leorize[m]the type can change during the course of the program
11:13:42FromDiscord<Kiloneie> i know it does, other than not being able to change a variable's type, it works pretty much the same no ?
11:14:10leorize[m]well it's slower in python case
11:14:25FromDiscord<Kiloneie> static typing for the win
11:14:37FromDiscord<Kiloneie> i don't get why people like dynamic...
11:14:44leorize[m]since you'll have to keep track of the type of every variable as the program runs
11:15:29FromDiscord<Kiloneie> you have to do that in any case, static typing just makes it easier, if you do it wrong the compiler will whine usually even before compilation, if not, during one
11:15:36FromDiscord<Kiloneie> python won't... ever...
11:15:41*navinmistry joined #nim
11:15:55leorize[m]nah, python can still whine
11:16:01FromDiscord<Kiloneie> and then one wonders why their code isn't acting the way it should
11:16:04FromDiscord<Kiloneie> yeah but rarely...
11:16:07leorize[m]it's just too late by the time you saw that
11:16:14FromDiscord<Kiloneie> yep
11:16:58leorize[m]if you really wants to wonder why your code don't work as you wanted it to
11:17:00leorize[m]try JS
11:17:15FromDiscord<Kiloneie> no thanks, had that in Game Maker
11:17:18FromDiscord<Kiloneie> lost my mind
11:17:43FromDiscord<Kiloneie> write big chunks of code, then run it, and nothing works...
11:17:57leorize[m]python still have a fair share of safeguards
11:17:59FromDiscord<Kiloneie> compiler says nothing... no errors... just nothing xD
11:18:06leorize[m]everything is possible in js
11:18:37FromDiscord<Kiloneie> isn't that a good reason to use Nim to compile to JS ? so you avoid that crap ?
11:18:58leorize[m]yep
11:19:17leorize[m]i have never written any native js :p
11:19:22FromDiscord<Kiloneie> That is very nice ^^.
11:19:39FromDiscord<Kiloneie> Nim has a lot of use cases
11:19:55FromDiscord<Kiloneie> and people keep comparing it to languages that can't do those things
11:20:02*navinmistry quit (Ping timeout: 245 seconds)
11:20:24leorize[m]nim can do everything, but it's hard to spell that out :p
11:20:36FromDiscord<Kiloneie> yeh people are very touchy about saying that
11:20:51FromDiscord<Kiloneie> "there can't be a language that does it all !!!"
11:20:57FromDiscord<Kiloneie> blashphemy !
11:21:05*Vladar quit (Read error: Connection reset by peer)
11:21:19leorize[m]to be fair you can do everything in every language if you're brave enough
11:21:32FromDiscord<Kiloneie> yeah ... and die trying
11:22:21leorize[m]it's just that Nim got the right balance
11:22:52FromDiscord<Kiloneie> Yep.
11:24:03FromDiscord<Kiloneie> So when do people declare types in Nim other than when it's too ambigous/complex ? ? I think a use case is for like GBA to declare smaller types like int8, smaller float and such
11:24:40leorize[m]when they need it :p
11:25:50FromDiscord<Shield> can anybody help here? I get an "invalid http version [Protocol error]" when i give the bot multiple requests to send the file at the same time
11:25:50FromDiscord<Shield> https://play.nim-lang.org/#ix=1X98
11:26:05FromDiscord<Kiloneie> I am trying to show declaration in my video, but it would nice to have a reason for it, and now i don't know anymore xD
11:27:32*skoude quit (Ping timeout: 276 seconds)
11:27:43FromDiscord<Kiloneie> okay i have one, for when you make a variable for later and you need it empty
11:28:31*navinmistry joined #nim
11:29:47FromGitter<alehander42> var a: seq[int] = @[]
11:30:13FromGitter<alehander42> but indeed var a: seq[int]
11:30:17FromGitter<alehander42> should be the same
11:30:23FromGitter<alehander42> yeah, empty values
11:30:35FromGitter<alehander42> basically where literals are ambigious
11:30:39FromGitter<alehander42> e.g. var a = nil
11:30:46FromGitter<alehander42> what is nil? it can be many things
11:30:52FromGitter<alehander42> var a: NilableRef
11:32:37FromDiscord<Kiloneie> okay, i have 2 use cases now
11:33:27*navinmistry quit (Ping timeout: 268 seconds)
11:33:29leorize[m]to be fair, the only ambiguous values are empty values :p
11:33:31FromDiscord<Kiloneie> i know someone is making a game for GBA, pretty sure he declares his types because GBA is very limited
11:33:52FromDiscord<Kiloneie> ah okay ^^
11:34:00leorize[m]yes, but no
11:35:09FromDiscord<Kiloneie> wouldn't it matter if you used a ton of variables of int64 ALL the time with lots of objects when you could use INT8 or Int16 ?
11:35:34leorize[m]nope
11:35:35FromDiscord<Kiloneie> actually... probably no...
11:35:46leorize[m]the cpu access them at the same pace :p
11:36:01FromDiscord<Kiloneie> yeh... i just remembered that
11:36:08*navinmistry joined #nim
11:36:13FromDiscord<Kiloneie> the reason why i had to switch from windows xp to win 7...
11:36:22FromDiscord<Kiloneie> i didn't want to D:... but i had to
11:36:43FromDiscord<Kiloneie> also windows 10, because ryzen doesn't like win 7 D:
11:36:47leorize[m]if you miss win xp there's reactos :p
11:36:53FromDiscord<Kiloneie> NAH
11:37:09FromDiscord<Kiloneie> once i switched and used win 7 and now win 10, i realized its pretty awesome
11:37:29FromDiscord<Kiloneie> but before that, i was glued to win xp, because i used it since i was like 5-6 years old
11:37:34leorize[m]win 10 is anything but awesome :p
11:37:50FromDiscord<Kiloneie> yeah it's missing stuff... but it's a lot nicer to use than win 7
11:38:00FromDiscord<Kiloneie> some old games don't work...
11:38:09FromDiscord<Kiloneie> last i tried was crysis 1, it would not open...
11:38:13FromDiscord<Kiloneie> -.-
11:38:33leorize[m]it shuts down my system while I was doing compute stuff
11:38:37leorize[m]because updates
11:38:51FromDiscord<Kiloneie> uhh that's your fault
11:38:55FromDiscord<Kiloneie> you didn't set that up
11:38:59FromDiscord<Kiloneie> mine NEVER does that
11:39:14leorize[m]and turns out that microsoft won't let you work on a computer for more than 5 hours a day
11:39:15FromDiscord<Kiloneie> always gives me, restart and update, update and shutdown options
11:39:24FromDiscord<Kiloneie> WHAT !?
11:39:29FromDiscord<Kiloneie> im here all day
11:39:44leorize[m]they improved the situation now
11:39:52FromDiscord<Kiloneie> when did that happen ?
11:40:14leorize[m]windows 10 older than 1607
11:40:14FromDiscord<Kiloneie> i've never heard of that
11:40:16*navinmistry quit (Ping timeout: 240 seconds)
11:40:23FromDiscord<Kiloneie> i got win 10 like...
11:40:29FromDiscord<Kiloneie> 1 year 1-2 months ago
11:40:56FromDiscord<Kiloneie> well Microsoft does listen to users, removing dumb ideas
11:41:25FromDiscord<Kiloneie> basically with microsoft every second OS they make sucks because their new ideas aren't refined enough
11:41:39FromDiscord<Kiloneie> win xp YAY, vista NOPE, win 7 YAY, win 8 NOPE, Win 10 YAY ?
11:41:54leorize[m]ofc they will listen if you threaten them with a lawsuit :p
11:42:06FromDiscord<Kiloneie> companies did that ?
11:42:31leorize[m]individuals
11:42:37FromGitter<zacharycarter> I think I might be half way through required vulkan setup :P : https://gist.github.com/zacharycarter/4791d46dee831ba78bb0d643fc66babc
11:42:44FromDiscord<Kiloneie> i don't watch much news, only last year i started watching tech news for gpus and processors
11:42:44*navinmistry joined #nim
11:42:55FromDiscord<Kiloneie> other than that im on youtube and coding and stuff
11:42:57Zevvmasochist
11:43:34*clyybber joined #nim
11:43:48FromDiscord<Kiloneie> Who oO ?
11:44:14FromGitter<zacharycarter> pretty much!
11:44:18*navinmistry quit (Remote host closed the connection)
11:44:18leorize[m]zacharycarter
11:44:38FromGitter<zacharycarter> yessir
11:44:41FromDiscord<Kiloneie> i had to google that meaning xD
11:44:43leorize[m]you can't be more masochist than trying to use vulkan :p
11:45:01FromDiscord<Kiloneie> i've heard it's really really low level and a pain in the ass... yeh...
11:45:11FromGitter<zacharycarter> well - my line of thinking is that I'm better served trying to learn Vulkan than continuing to use BGFX
11:45:13leorize[m]well other than writing vimscript :p
11:45:46clyybberleorize[m]: Vulkan is great
11:45:47FromGitter<zacharycarter> also - since vulkan is so low level I think at the same time you're learning it, it can lead to a stronger understanding of the graphics pipeline overall
11:45:54clyybberExactly
11:46:26FromGitter<zacharycarter> but it's definitely a LOT of effing boilerplate setup code
11:46:36FromGitter<zacharycarter> if anyone feels like making a library
11:46:41FromGitter<zacharycarter> ;)
11:47:00leorize[m]the library is called opengl :p
11:47:17FromGitter<zacharycarter> true true
11:49:26Calinouwell, OpenGL will be reimplemented over Vulkan one day
11:49:28ZevvI need to do vulkan in the forseeable future. Not sure if I want that, but we need that for gen2
11:49:34Calinou(there are WIP implementations out there right now)
11:49:57clyybbergfx-rs is also really interesting.
11:50:54FromGitter<zacharycarter> I still don't see that as a reason not to learn / use Vulkan
11:51:09FromGitter<zacharycarter> Vulkan kind of exposes you to the things OpenGL does behind the scenes
11:51:17FromGitter<zacharycarter> understanding all of that isn't necessarily a bad thing
11:51:27leorizeyea, it's good to learn vulkan
11:51:55leorizebut you shouldn't use it just because it's there
11:52:01*navinmistry joined #nim
11:52:37Zevvzacharycarter: I still don't see that as a reason not to learn / use assembly. Machine code kind of exposes you to the things C or Nim do behind the scenes. understanding all of that isn't necessarily a bad thing.
11:52:49ZevvAll very true, but is it *fun* I ask?
11:52:51clyybbervulkan isn't really that bad
11:53:00clyybberand yeah it is *fun*
11:53:05Zevvyou're hired
11:53:06Zevv:)
11:53:11clyybberlol
11:53:11Zevvwhen can you start
11:53:17*rockcavera joined #nim
11:53:18FromGitter<zacharycarter> well the setup code isn't that fun but once you've written it you've written it
11:53:44Zevvyou should just rip it somewhere
11:53:45FromGitter<zacharycarter> and if I can eventually replace it all with an OpenGL over vulkan call, perks
11:54:05clyybberOne thing that really isn't fun is writing sType: <HEYLETSWRITETHENAMEALLOVERAGAIN>
11:54:17clyybberBut I blame that on nim not having default object field values (yet)
11:54:24Zevvor casting a GL extel function pointer in C++
11:55:15leorizeooh, narimiran updated nim basics
11:55:21narimiranyeah he did :)
11:55:26leorizeand the first thing I saw was fira mono/code
11:55:32ZevvHe ripped my stylesheet, did you guys know that?
11:55:32narimiranfinally a readable pdf version
11:55:39narimiranleorize: that was there before
11:56:08*navinmistry quit (Ping timeout: 245 seconds)
11:56:13leorizeuse a better font :P
11:56:25narimiranZevv: now i tweaked some details, just to cover my ass :P
11:56:38Zevvghehe:)
11:56:45narimiranleorize: let me hear, what do you prefer?
11:56:58leorizebut I do like the free advertisement for nim.nvim :P
11:57:06*navinmistry joined #nim
11:57:07narimiranyep, that part is new
11:57:13leorizeI use iosevka
11:57:33leorizebut since most people can't consume the narrow fonts, source code pro would do
11:57:50shashlick@Araq you here? Did you see this: https://irclogs.nim-lang.org/27-09-2019.html#01:23:18
11:57:55narimirani used to use it personally, and i tried to use it for nim basics, but i decided for something wider
11:58:10leorizeto be fair I just hate fira code over the letter 'r'
11:58:14leorizeit's a fine font otherwise
11:59:21*laaron quit (Quit: ZNC 1.7.4 - https://znc.in)
12:00:19leorizeso, uh, anyone tried nim.nvim 'find-project' branch?
12:00:33narimirannot yet, and i'm not sure what does it even do
12:00:51clyybberit finds your project :P
12:01:21leorizeyep, open any file in compiler/ and you'll see that nimsuggest will be launched against compiler/nim.nim \o/
12:01:33*navinmistry quit (Ping timeout: 245 seconds)
12:01:39narimiranclyybber: oh, that's great! 'cause i've been wanting to start some new personal project, but didn't know what exactly. if this plugin can tell me.... wow!
12:01:55leorizeno more red texts when you start editing an include file \o/
12:01:58Zevvstupid question, but what does that solve, nimsuggestwise?
12:02:03clyybbernarimiran: A real productivity booster
12:02:15*navinmistry joined #nim
12:02:16ZevvIf I edit a file I am only interested in its imports, because that is where its stuff comes from, right?
12:02:20narimiranZevv: iiuc, you don't have to first open some file in the root of the project
12:02:44ZevvBut I don't? I can just open my sub-file and happily work and suggest in there?
12:03:00leorizeit's useful in projects where include files are used
12:03:03leorizelike the compiler
12:03:15leorizeyou wouldn't have to open the root file for the module graph to populate first
12:03:56narimiranso this should prevent multiple nimsuggest instances for the same project?
12:04:08leorizeyes
12:05:11Zevvah ok
12:06:25leorizeI start worked on a project and found opening the root file everytime just unproductive :P
12:06:45*navinmistry quit (Ping timeout: 268 seconds)
12:06:53narimiranyeah, it will save me some time too
12:07:15leorizeif you complained I'd have fixed it sooner lol
12:07:32narimirannaaah, i bother you enough with other stuff
12:07:33*rockcavera quit (Read error: Connection reset by peer)
12:07:50*rockcavera joined #nim
12:07:51*rockcavera quit (Changing host)
12:07:51*rockcavera joined #nim
12:07:51leorizeanyhow, if everything goes well, this is going to the compiler
12:08:12*nif quit (Quit: ...)
12:08:12*thomasross quit (Remote host closed the connection)
12:08:23*navinmistry joined #nim
12:08:24*nif joined #nim
12:08:24leorizethen even vscode-nim can benefit from it
12:08:35*thomasross joined #nim
12:08:57leorizeand I'm pretty sure PMunch wanted something like this for nimlsp also
12:09:37*mwbrown quit (Ping timeout: 245 seconds)
12:10:19leorizenarimiran: I can't have more users if the module doesn't work well ergonomically :P
12:11:40clyybbernarimiran: Do you have a means of contacting GULPF? I would love to get https://github.com/GULPF/tiny_sqlite/pull/1 merged because its a blocker for a Nim bugfix.
12:11:45PerkolI remember there was function for getting cpu arch somewhere in stdlib.
12:11:48narimirani really think a readme/wiki instructions for non-asyncomplete would be beneficial. i'm ok with AC, but others might prefer something else, and might not know that your plugin is not limited just on AC
12:11:54*mwbrown joined #nim
12:12:14narimiranclyybber: nothing better than pinging him by @GULPF, sorry
12:12:15leorizeI'll be waiting for @zetashift :P
12:12:49*navinmistry quit (Ping timeout: 265 seconds)
12:12:52clyybberPMunch == zetashift?
12:13:06leorizewhat?
12:13:25clyybberThat was a question ;p
12:13:25*navinmistry joined #nim
12:13:33leorizeno lol
12:17:38*navinmistry quit (Ping timeout: 240 seconds)
12:20:04*navinmistry joined #nim
12:20:58FromGitter<awr1> @zacharycarter i would reccomend trying V-EZ
12:21:30*dddddd joined #nim
12:21:58FromGitter<awr1> you can get a stronger understanding of the pipeline overall without vulkan, vulkan is just explicit and says "okay, you have t synchronize everything, have fun"
12:22:56FromDiscord<Kiloneie> if someVariable.type == string #this doesn't work i know, you can't do this because string is a TYPE not a value right ? if i put $ infront of both it works like intended.
12:23:27leorizeecho typeof("var") == string
12:23:30leorize!eval echo typeof("var") == string
12:23:32NimBotCompile failed: /usercode/in.nim(1, 20) Error: type mismatch: got <type string, type string>
12:23:52leorize!eval echo typeof("var") is string
12:23:55NimBottrue
12:24:10leorize@Kiloneie: ^ there you go
12:24:17*navinmistry quit (Ping timeout: 240 seconds)
12:24:20leorizeit's just that we don't use the `==` operator for typedesc
12:25:06leorizealso, you should use `typeof` instead, it has less bugs
12:25:11FromDiscord<Kiloneie> so string, int, float are called typedesc ?
12:25:12*navinmistry joined #nim
12:25:26FromDiscord<Shield> async is driving me insane, why would calling a function twice crash the bot they should be queued?
12:25:33leorizeyep, the type of types are typedesc
12:25:58Zevvand the type of typedesc?
12:26:19leorize!eval echo typeof typeof typeof string
12:26:22NimBotstring
12:26:39leorizenope that doesn't exist :P
12:27:00leorize!eval echo typeof typedesc[typedesc[string]]
12:27:02NimBotstring
12:27:25clyybberThats about the only "bug" with type() instead of typeof()
12:28:53FromGitter<zacharycarter> @awr1 `V-EZ` does indeed look nice
12:29:03FromGitter<zacharycarter> are there Nim bindings for it?
12:29:57FromGitter<zacharycarter> doesn't look like it
12:30:03*navinmistry quit (Ping timeout: 264 seconds)
12:31:29FromGitter<awr1> also Vulkan is still a layer of abstraction and its impl towards its design purpose is not without controversy
12:31:52*navinmistry joined #nim
12:31:55FromGitter<awr1> for instance the whole Subpass-inside-RenderPass thing is basically not helpful in non-tiled GPU archs
12:32:01FromGitter<awr1> i dont think so
12:32:05FromGitter<awr1> RE: V-EZ
12:32:08FromGitter<zacharycarter> might have to cook some up
12:32:22FromGitter<zacharycarter> or just go back to using OpenGL / BGFX
12:32:44FromGitter<zacharycarter> I don't know what the right answer is :P
12:32:57leorizewell if it's a personal project, go for the fun route
12:34:23ZevvReal men program GPU
12:34:35ZevvGPU's from the datasheet, straight into the MIO registers and DMA buffer
12:34:36Zevvs
12:34:38FromGitter<zacharycarter> I guess I'll just continue on the vulkan path I'm going down
12:35:00FromGitter<zacharycarter> since I'd probably spend just as much time writing bindings to V-EZ
12:36:00FromGitter<awr1> what was wrong with bgfx
12:36:26*navinmistry quit (Ping timeout: 276 seconds)
12:36:38FromGitter<zacharycarter> nothing necessarily - I just figured that using OpenGL / Vulkan might look better on a resume than using BGFX
12:36:50FromGitter<zacharycarter> since I'm interested in eventually procuring work in the field
12:36:57*navinmistry joined #nim
12:37:46FromGitter<awr1> gotcha
12:37:47FromGitter<zacharycarter> also bgfx is a pretty big dependency
12:39:21*Serrellanos joined #nim
12:40:16*laaron joined #nim
12:40:54FromGitter<awr1> just be wary that vulkan is very tricky to use, setting up the boilerplate and initializing everything might as well be the easy part
12:41:20*navinmistry quit (Ping timeout: 252 seconds)
12:41:33clyybberYeah, synchronization and memory management is oof.
12:42:06FromGitter<awr1> sync is a nightmare and the debug layers will only help you up to a point
12:42:39clyybberBut hey, you learn something worthwhile while at it
12:43:36*navinmistry joined #nim
12:46:20*laaron quit (Quit: ZNC 1.7.4 - https://znc.in)
12:46:23FromGitter<zacharycarter> I'm leaning towards just starting with opengl and if I want vulkan later, adding an additional rendering backend then
12:46:46FromGitter<zacharycarter> Maybe sokol gfx would be a good option as well
12:47:57*navinmistry quit (Ping timeout: 245 seconds)
12:48:16clyybberZevv: Real man program in AMDGCN
12:48:24Calinouheh, bgfx isn't magic :)
12:48:27*laaron joined #nim
12:48:55FromGitter<awr1> lol i was looking at a GCN assembler a while ago
12:49:15FromDiscord<kodkuce> hi i frogot and this is not easy to find fast, but how to i get last element or 2 before last, as i remmeber in python there is [:-1] or soemthing like that hows in nim
12:49:24FromGitter<awr1> if you do use Vulkan i strongly reccomend using something like VMA
12:49:25FromGitter<zacharycarter> I think BGFX is good, just a large dependency
12:49:44*navinmistry joined #nim
12:50:12clyybberkodkuce: [^1]
12:50:38FromDiscord<kodkuce> ty
12:52:06*laaron quit (Client Quit)
12:53:34clyybbernp
12:54:00*daddoo joined #nim
12:54:22FromGitter<awr1> agh i have a physics exam later today
12:54:38FromGitter<zacharycarter> ooph
12:55:24*laaron joined #nim
12:55:43*navinmistry quit (Ping timeout: 250 seconds)
12:56:20clyybberawr1: Good luck. What are you studying?
12:56:33FromGitter<awr1> thermodynamics, electric fields
12:56:43*navinmistry joined #nim
12:57:14FromGitter<awr1> neither of which i'm very interested in but its a required class for my to finish my CS bachelors
13:00:00*laaron quit (Client Quit)
13:01:09*navinmistry quit (Ping timeout: 265 seconds)
13:01:13*laaron joined #nim
13:02:03*navinmistry joined #nim
13:03:28*sealmove joined #nim
13:06:17*navinmistry quit (Ping timeout: 240 seconds)
13:07:21FromGitter<zacharycarter> krux02: https://github.com/nim-lang/sdl2/pull/121
13:08:56*navinmistry joined #nim
13:11:13FromGitter<alehander42> " ⏎ The ^ operator, which specifies that an index is relative to the end of the sequence."
13:11:14FromGitter<alehander42> https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-8#indices-and-ranges
13:11:18FromGitter<alehander42> c# got ^1
13:13:14*navinmistry quit (Ping timeout: 240 seconds)
13:14:18*navinmistry joined #nim
13:17:57clyybberkrux02: Do you have an idea on what might cause https://github.com/nim-lang/Nim/issues/12282 ?
13:18:18FromGitter<awr1> why is backwards indexing not relative to the high end of a seq
13:18:38FromGitter<awr1> and instead its length
13:18:52FromGitter<awr1> i.e. why ^1 and not ^0
13:19:02*navinmistry quit (Ping timeout: 265 seconds)
13:19:04clyybberawr1: There is no particular reason other than that it makes sense too.
13:19:21clyybberWhen you start indexing at 0 from the start you can start at 1 from the end
13:19:25clyybberAnd the other way around
13:19:40FromGitter<awr1> It would make more sense if ranges were exclusive in Nim
13:19:42FromGitter<awr1> but they aren't
13:20:27FromGitter<awr1> which is why the slice syntax works in D - i.e. `x[0 .. $]` even though $ is length
13:20:44*navinmistry joined #nim
13:21:08clyybberI think inclusive ranges are much more intuitive than exlucsive ones
13:21:38*narimiran quit (Ping timeout: 240 seconds)
13:21:38FromGitter<awr1> i mean i agree
13:21:47clyybberBut yeah that ^1 thing is arguable. Python does it this way I think. So nim just copied it
13:22:30FromGitter<alehander42> no i dont agree
13:22:33FromGitter<awr1> i'm saying `^0` could have been used if ranges were exclu.
13:22:33*laaron quit (Quit: ZNC 1.7.4 - https://znc.in)
13:22:35FromGitter<alehander42> because you have `..<`
13:22:40FromGitter<alehander42> which is better as exclusive
13:22:42FromGitter<awr1> ahhh hmmmmmm
13:22:56FromGitter<alehander42> i think a[0 .. ]
13:23:05FromGitter<alehander42> can still be equivalent to a[0 .. ^1]
13:23:06FromGitter<awr1> wait does `[0 ..< ^0]` even work
13:23:12FromGitter<alehander42> not sure why it is not
13:23:16clyybberawr1: Probably not
13:23:32FromGitter<alehander42> i dont think `^0` makes sense in the nim model
13:23:55FromGitter<alehander42> probably it's a grammar thing
13:23:59FromGitter<alehander42> `..` not being postfix
13:24:06FromGitter<alehander42> and prefix but only infix
13:24:48clyybberWell you could implement a ..< or a .. which takes a BackwardsIndex as the 2nd param
13:25:05clyybberBut afaik array indexing with .. is special cased somewhere for some reason
13:25:41*navinmistry quit (Ping timeout: 268 seconds)
13:27:03*navinmistry joined #nim
13:27:43clyybberdisruptek: Hey, I found a way to make string streams work at compile time
13:28:41disruptekwhaaa how?
13:29:06clyybberWith a `when nimvm:` in readChar
13:29:13clyybberI'm gonna send a PR out.
13:29:41disruptekhmm, did it ever work?
13:29:44clyybberBut I'm gonna try making it work for the js backend too first.
13:30:20disruptekmaybe that will get us closer to parsing json for the js backend.
13:30:35clyybberdisruptek: I think that will make it "just work" TM
13:30:37disruptekyou give me hope that i could actually figure out the problem there.
13:30:43disrupteksweet!
13:31:09FromDiscord<kodkuce> i decided i will do 2 exercism a day in Nim, i forgot a lot of stuff
13:31:13clyybberImma get something to eat first tho
13:31:36*navinmistry quit (Ping timeout: 265 seconds)
13:33:29*navinmistry joined #nim
13:37:37*navinmistry quit (Ping timeout: 240 seconds)
13:37:44clyybberdisruptek: Whats the error you get when you tr parsing json for the js backend?
13:38:04clyybberIs it "undeclared identifier: 'newStringStream'"?
13:38:56ZevvI have this nagging question about streams in nim. They're called "streams", but the are not really - file and string stream are both backed by one single complete blob of data that lives somewhere. I can not use a stream like a real stream: feeding it on one end while consuming it at the other. Then what is the use, apart from abstracting away the type of blob under the hood?
13:39:22ZevvIs there something obvious I miss?
13:39:48*navinmistry joined #nim
13:39:53Araqwell streams are not queues or channels
13:40:02Araqso they are uni-directional
13:40:35Zevvok, but I was doing all this fuzz to get npeg work on top of streams, until I realized I can just seek back at leasure to collect whatever I need after parsing
13:40:53ZevvBut then again, why would I even bother putting it on top of a stream, if the backed data is available either as as string or memFile?
13:41:42Zevvleorize was discussing the scenario where he wanted to parse network data as it came in, incrementally. But you can't use a stream for that either, only by appending all incoming data into the string backing the stream
13:43:00*floppydh quit (Quit: WeeChat 2.6)
13:43:40disruptekZevv: you want true stream parsing so you can truly parse an unending stream. it happens sometimes.
13:43:56disrupteki mean, good on you for going down that road.
13:43:57*navinmistry quit (Ping timeout: 240 seconds)
13:44:02*navinmis_ joined #nim
13:44:33sealmovehum...
13:44:57AraqZevv, I'm not following you. I can parse 16GB json files without needing 16GB of RAM with Nim's streams
13:45:10Araqand that's what matters, it's lazy
13:46:12disruptekclyybber: i dunno anymore; since npeg doesn't support js backend, i don't have a test that triggers it.
13:46:42disruptektreeform ping
13:46:50Zevvclyybber: well, yes, no, wait. Npeg supports js backend, but the js backend broke npeg-on-js just 8 commits before 1.0
13:47:10Araq:D
13:47:21Araqthe more we work, the more we break
13:47:24ZevvAraq: ok, fair enough, we use streams as a window to slide over huge data.
13:47:24clyybberdisruptek, Zevv: Just put some test in a static: block and run nim js
13:47:59*navinmistry joined #nim
13:48:05*navinmis_ quit (Read error: Connection reset by peer)
13:48:28Zevvclyybber: also one of these things that confuse me: I can make a proc, put i full with npeg stuff and have it return its value into a cons. Then it is called compile time and that is fine. But I can not run inside a static: block
13:48:32Zevvhow is that different?
13:49:03clyybberZevv: Huh, whats the error?
13:50:08Zevvclyybber: please ignore that last one, I'm mistaking
13:50:12disruptekclyybber: well, parseJson wants to importc parseNativeJson so that's a dealbreaker.
13:50:42ZevvI'm confusing with the js backend problem - that gives me "Error: request to generate code for .compileTime proc: newGrammar"
13:50:45disruptekmaybe we can fix npeg and then i can use that to parse json at compile-time. 😜
13:51:07clyybberdisruptek: Or we just put a few when nimvm: here and there
13:51:53clyybberZevv: Oh, so its not as easy as doing when nimvm?
13:52:49*navinmistry quit (Ping timeout: 268 seconds)
13:54:53*navinmistry joined #nim
13:56:49ZevvI don't follow, I should probably shut up a bit.
13:57:04ZevvBut my lines turn yellow when someone types 'npeg' or 'zevv' and I feel obliged to type letters
13:57:11clyybberlol
14:00:57FromDiscord<Shield> what client are you using Zevv?
14:01:16*navinmistry quit (Ping timeout: 240 seconds)
14:01:32Zevvirsi
14:02:20Zevvbut to get back to the streams again: if all stream backends always support seeking back, it should be fairly trivial for me to integrate, although it only adds overhead over raw strings or memfiles.
14:02:25*navinmistry joined #nim
14:04:19Araqlook man, I use 'lexbase', I know, I know, nobody likes it. but lexbase doesn't have "seek back", you can only go forward, a 8K buffer is good enough for processing unlimited length files, it's magic
14:06:29clyybberdisruptek: Done, though its a bit messy
14:06:45disruptekdon't tease me, brah!
14:06:52ZevvYeah, I know lexbase of course. but this was more about the philosphy behind streams. Your 4G-file-without-4G-mem is a good reason indeed
14:07:25ZevvI have no problems with lexbase, but it does not add anything for me - I can just eat chunks of arbritary size and handle them as they come in
14:07:26*navinmistry quit (Ping timeout: 276 seconds)
14:07:27clyybberdisruptek: Now I gotta test with json, but this small example works: http://ix.io/1Xa5
14:07:43shashlick@Araq ping
14:08:01Zevvclyybber: so how did you fix that?
14:08:42clyybberI just duplicated the procs, made them {.compileTime.} put it in a when defined(js) and removed the stuff thats not working at compile time anyways.
14:08:48Araqshashlick, pong
14:08:48disruptekugh i don't think streams should support random seek.
14:09:03*navinmistry joined #nim
14:09:05shashlick@Araq figured out the boehm issue yesterday
14:09:07Araqdisruptek, they don't it's optional
14:09:13Araq:O
14:09:14shashlickhttps://irclogs.nim-lang.org/27-09-2019.html#01:23:18
14:09:17Araqtell me!
14:09:52shashlickCelebrated with @disruptek yesterday
14:10:08shashlickBut need to know whether we can revert that commit
14:10:35AraqI'd rather figure out where the interior pointer comes from
14:10:48Araqbecause in theory it's very safe to do this for ordinary Nim code
14:11:25Araqand it's a bit annoying because I actually thought about this change, never told you about it because I tought "can't be the problem"
14:11:34disrupteklol
14:11:51disrupteksorry, i shouldn't laugh, that was bloodletting right there.
14:12:04Araq'lol' is always fine
14:12:11clyybberlol
14:12:15disrupteklol
14:12:44shashlickCan you define what would be an interior pointer in Nim
14:13:03shashlickCause I thought boehm would work on the c implementation
14:13:10shashlickWhich would have pointers all over the place
14:13:12disruptekseems to me this should happen all the time.
14:13:16*navinmistry quit (Ping timeout: 240 seconds)
14:13:35AraqNim's native GCs don't give a shit about "interior" pointers either
14:13:41Araqit looks something like
14:14:11AraqmyheapObject.p = addr(otherHeapObject.bar) # don't collect otherHeapObject itself
14:14:11*navinmistry joined #nim
14:14:23clyybberdisruptek: Should FileStreams work at ct?
14:14:31clyybberOr rather, do they?
14:14:36Araqonly 'addr' can produce these in Nim land
14:14:53Araqbut 'addr' is unsafe and GC unfriendly and everybody knows this
14:15:15disruptekdunno about filestreams. i think not but i was able to remove them.
14:16:41shashlickThey may be unsafe but this is an obscure limitation
14:17:20shashlickSince boehm does support it by default
14:17:47Araqbut it slows down boehm and it's our best option for many things still
14:17:58Araqsee our attempts to support threading or dlls
14:18:01*navinmis_ joined #nim
14:18:05*sealmove quit (Quit: WeeChat 2.6)
14:18:28shashlickOk let me look at my code and see how this is impacting me
14:18:43*navinmistry quit (Ping timeout: 268 seconds)
14:19:16Araqdo you use 'addr' in your code?
14:19:23shashlickFor sure
14:20:05Araq:O what? why?
14:20:14*Hideki_ joined #nim
14:22:02*navinmis_ quit (Ping timeout: 240 seconds)
14:23:47Araqbtw do you use thread local storage emulation=
14:23:49Araq?
14:24:07*navinmistry joined #nim
14:25:45shashlickyes i use threads and tls
14:25:51shashlickemulation
14:26:58Araqturn off TLS emulation
14:27:16Araqemulated TLS might introduce these evil interior pointers
14:28:13*navinmistry quit (Ping timeout: 245 seconds)
14:28:27shashlicknot a single use of addr is interior, mainly for interacting with C libs
14:30:29Araqcourse it isn't they are not common at all
14:32:33clyybberdisruptek: PR is up, can you test it: https://github.com/nim-lang/Nim/pull/12284 ?
14:33:32shashlickokay i'll try without tls and get back
14:34:50FromDiscord<Shield> @shashlick how did you even find that out
14:35:43shashlicki was trying a full nim bisect between 0.19.0 and 0.20.0
14:35:49shashlickbut ran into commits that didn't work at all
14:35:54clyybberStreams seem like a perfect candidate for inheritance or concepts.
14:36:04shashlickthen just thought of looking at the boehm specific changes
14:37:05shashlickwho knew 1 line could torture me for 6 months
14:37:31krux02clyybber: sorry I don't know
14:38:17FromDiscord<Shield> i thought you gave up, glad you didn't, good job
14:38:38clyybberkrux02: Thanks for looking at it anyways :)
14:38:40FromDiscord<Shield> does 'addr' return an interior pointer or a start pointer?
14:41:13shashlickit depends - like Araq's example
14:41:42*Hideki_ quit (Remote host closed the connection)
14:41:53disruptekclyybber: yeah, i'll test it.
14:42:24*Hideki_ joined #nim
14:43:10Araqit's not "just one line of codd"
14:43:18Araqthere is something going on we still don't understand
14:43:19Araqbbl
14:46:36*Hideki_ quit (Ping timeout: 240 seconds)
14:46:55zedeuswill Nim participate in Hacktoberfest this year?
14:47:02*Perkol quit (Quit: Leaving)
14:47:27disruptekclyybber: what can i test?
14:47:54disrupteklooks like stringstreams.
14:48:36disruptekmy issue is that we can't importc the native json parser in js mode, though.
14:48:50*Hideki_ joined #nim
14:49:32disruptekand a yellow line: now that npeg doesn't work, i dunno what my next blocker is.
14:50:06*Hideki_ quit (Remote host closed the connection)
14:51:27shashlicknope, turning off tlsEmulation didn't help
14:52:20clyybberdisruptek: Arrgh, I see
14:53:03Zevvshould I type something?
14:53:03disruptekhow could you not have interior pointers frequently? seems you couldn't do much pointer work at all otherwise.
14:53:10disrupteklol
14:53:48disruptekclyybber: but, stringstreams in js is certainly useful, thanks. 😊
14:53:54shashlickthat's what i think
14:54:55disrupteki mean, i wouldn't expect normal alloc to yield interior pointers, obviously, but i'd definitely expect other stuff to reach in as a matter of course.
14:55:25clyybberdisruptek: Unfortunately I can't fix the json parsing, since that would require when nimvm in toplevel code, which isn't possible rn.
14:56:11disruptekit's okay; maybe we can get zevv to type something. 😉
14:56:18Zevvtell me
14:56:27ZevvI just finished my beer
14:56:30disrupteklol
14:56:47ZevvWhat do I pull for the stringstreams?
14:57:04disruptekwell, openapi could maybe work on js. it doesn't matter to anyone today, but maybe some day. so let's not assume going forward that npeg will never run on js.
14:57:14clyybberZevv: https://github.com/nim-lang/Nim/pull/12284
14:57:59Zevvclybber/strstratct?
14:58:04clyybberyeah
14:58:15Zevvyou were in my remotes already
14:58:28disruptekit'll yield the same newGrammer err.
14:58:28clyybberI feel honored :)
14:59:55ZevvHa isn't this fun. I have a t.nims and a t.nim in the same directory. Guess what happens when I do `nim c t.nim`
15:00:36disrupteki wish `nim c t` didn't append a `.nim`.
15:02:01Zevvyeah well, streams now imports, but the newGrammar .compileTime proc is still there of course
15:02:30zedeusZevv: nim e t.nims ?
15:02:43Zevv/home/ico/external/Nim/lib/pure/streams.nim(261, 7) Error: undeclared identifier: 'copyMem'
15:02:52Zevv:)
15:02:58ZevvI'm your nimbot today
15:03:09zedeuslol
15:03:25clyybberOh yeah. Only readLine and readChar and lines works
15:03:39clyybberBecause read[T] isn't possible with the VM
15:03:55clyybberThough maybe I can make readAll work
15:05:02clyybberIdeally the VM should ignore when defined(js) I suppose
15:06:11clyybberAraq: WDYT?
15:06:50*vsantana joined #nim
15:06:56ZevvI guess there should be some other common define instead
15:08:04*Vladar joined #nim
15:09:15clyybberZevv: There should be `when defined(jsct)` which won't be ignored by the VM
15:09:24clyybberSimilarily for all other backends
15:10:06Zevvwhat is the 'ct' part?
15:10:43clyybbercompile time
15:12:53Zevvright
15:16:32*vsantana quit (Quit: leaving)
15:17:15*abm joined #nim
15:18:34*theelous3 joined #nim
15:20:22disruptekthat would work but i'm not sure that's what we want.
15:21:18clyybberdisruptek: The alternative is duplicating code yay
15:21:20disrupteki haven't looked at any code, but just looking at the error message i can tell you that i dunno why i can't have importc in my compiler without regard to my backend.
15:21:52disruptekto me, that's the first define to fix.
15:22:32*couven92 joined #nim
15:22:44disruptekwhy do we need to know it's js ct versus any other backend ct?
15:23:15disruptek"Q programs are stored and executed as simple text files called scripts."
15:23:16clyybberdisruptek: Those `when defined(jsct)` will be rare
15:23:21disruptekQ IS BLOWING MY MIND RIGHT NOW
15:23:33disrupteki don't even think they should exist.
15:23:59clyybberdisruptek: They should. Sometimes they could be useful I suppose.
15:24:14clyybberBut I'm not sure this can even work
15:24:19disruptekcan't we just `defined(ct) and defined(js)`?
15:24:26clyybberThats the thing
15:24:31clyybberThere is no defined(ct)
15:24:41clyybberthere is only `when nimvm`
15:24:54disrupteki know, but i'm saying conceptually...
15:24:56clyybberAnd you cant do `when defined(js) and nimvm`
15:25:10disruptekwhy do you want a separate ct codepath for _any_ backend?
15:25:31clyybberI don't know, but surely there is someone who wants that
15:25:44*Hideki_ joined #nim
15:25:57disruptek👍this guy👍 doesn't want it.
15:26:38FromDiscord<moigagoo> Will Nim participate in Hacktoberfest this year?
15:26:42*couven92 quit (Ping timeout: 245 seconds)
15:28:56federico3ah, we should
15:34:26FromGitter<awr1> what is Q
15:34:38clyybberSome APL
15:35:48FromGitter<awr1> does APL have any actual significance
15:35:56disruptekhell yeah.
15:36:02FromGitter<awr1> i know it only as the language that uses its own char set
15:36:20FromGitter<awr1> and that math people like it or something.
15:37:20disruptekit's a bit hard to describe in a sentence or two, but it's mathematically pure in that it's designed to model math in a way that is more native to that discipline.
15:42:44FromGitter<alehander42> araq
15:42:55FromGitter<alehander42> what can be redefinition of helper`gensym23434
15:43:02FromGitter<alehander42> (not a quote, similar)
15:43:13FromGitter<alehander42> i know you changed gensym
15:43:16disruptekthe idea of having pl data structures memory mapped to the fs is intriguing, i gotta say.
15:43:21FromGitter<alehander42> but i get the error from inocation of proc helper(o: JsObject): JsObject ⏎ ⏎ ``` {.importcpp: `importString`, gensym.}``` [https://gitter.im/nim-lang/Nim?at=5d8e2e19741d186e7e6766c8]
15:43:22FromGitter<alehander42> in jsffi
15:43:29FromGitter<alehander42> macro .
15:43:39FromGitter<alehander42> so its not obvious to me what is wrong
15:43:45clyybberHow can I create a mutable slice?
15:43:49clyybberOf a string?
15:43:58clyybberAs in a view
15:44:28FromGitter<awr1> @disruptek in the context of what
15:44:38disruptekthis is why i like the idea of collection mutability as slice-based views, ditto iteration.
15:44:58disrupteki'm reading this Q overview.
15:45:23FromGitter<awr1> like in general mmap() or some kind of broader notion about working within a language
15:45:34disruptekimagine a pl where any data is persisted to disk 100% of the time. any data in memory.
15:45:53disruptek(the key innovation being that it's across the whole language)
15:45:55FromGitter<zacharycarter> will cstrings by default be nil or empty?
15:46:25FromGitter<alehander42> i think openarray
15:46:30FromGitter<alehander42> should work as a view
15:46:32FromGitter<alehander42> but not sure
15:47:24disruptekholdon, lemme just run `javascript:(function() { $('#chat-input-wrapper').remove(); $('.right-toolbar').classList.add("collapsed"); $('div .root').remove(); })();` so i can actually read the gitter web-page.
15:48:46clyybberalehander42: Yeah, it should but I can't do this `someProcThatTakesVarOpenarrayChar(somestring[1..3])`
15:49:09clyybberbecause string slicing copies and is immutable
15:49:21*Hideki_ quit (Ping timeout: 265 seconds)
15:49:38lqdev[m]@zacharycarter afaik it should be nil since it's merely a `char *` under the hood
15:49:56FromGitter<zacharycarter> thanks
15:51:03disruptekyes, but is it a string holding only one element, '\0', and if so is it == nil or is it merely == "" or is it merely == "\0"?
15:51:24disruptekor is it foo[] == nil?
15:53:23disruptekthe answer is that an uninit'd cstring != "" but == nil and .len == 0
15:54:42disruptekand set it to "" and the zero'th element is == 0, ('\0', so to speak)
15:58:06shashlick@disruptek - need your help - does this help describe my issue? https://github.com/nim-lang/Nim/issues/12286
16:00:55FromDiscord<SrMordred> is possible to use allocators in nim?
16:02:25clyybberkrux02: Regarding https://github.com/nim-lang/Nim/pull/10746/files#diff-26f94e9f706df25bd6d075ca5f41cf0aR365, is that for loop still neccessary for performance?
16:02:36leorize@SrMordred what do you mean?
16:02:45clyybberOr can it be replaced by a string slice
16:04:37FromDiscord<SrMordred> @leorize something like `newSeq[int, CustomAllocator]()`
16:05:02leorizethat's not available yet
16:07:29FromDiscord<SrMordred> @leorize so there are plans? 🙂
16:07:44leorizeyea, allocators are part of new runtime
16:07:55leorizeno documentations exist atm though
16:09:20FromDiscord<SrMordred> nice, i can wait ^^
16:09:43leorizedo you have an usecase in mind?
16:09:46disruptekshashlick: it's pretty good, but it gets fuzzy between when the data is in the table and the table gets cleared. after callbacks is setup, is it immediately operated upon to call a callback? because it doesn't look that way to me.
16:12:07FromDiscord<SrMordred> @leorize i think the most used case is arenas. but maybe nim does this internally? don´t know, i´m just a few days into nim
16:12:17disrupteklook at regions.
16:12:56leorizenah, gc regions doesn't do that
16:13:18disruptekyou could build it.
16:13:44leorizeyou can't reuse a region's memory
16:14:06disruptekso?
16:14:15shashlick@disruptek - it's not immediate but whenever it gets called
16:14:32*kevinsjoberg joined #nim
16:14:35leorizeisn't arenas == memory pool?
16:15:10disruptekwell, this is the problem, shashlick. ;-) can you gc log and/or put some debug in before the crash?
16:15:27kevinsjobergGreetings! 👋 I just decided to start learning Nim. Coming from 10+ years of Ruby/JavaScript and some limited C-programming knowledge.
16:15:43disruptekwelcome 😁
16:16:20shashlickI could log when gc does it's cleanup, not sure how to intercept that
16:16:20FromDiscord<SrMordred> Welcome 🙌
16:16:50leorize@SrMordred well there's something similar to what you'd want
16:17:04leorizenim now have pluggable GCs
16:17:08shashlickBut my point is that it is a table of procs and still there seems to be interior pointers involved
16:17:10leorizethe interface is not documented
16:17:12disruptekyou might even do your logging outside boehm and learn what you need to know about what's happening in boehm path.
16:17:23FromGitter<zetashift> @kevinsjoberg enjoy the ride!
16:17:36leorizebut here's one of those "pluggable" gcs: https://github.com/araq/araqsgc
16:17:41kevinsjobergThank you all.
16:17:44disrupteki know, it's a problem.
16:18:41disruptekwhen you can define your own region you can define you own allocator that uses that region.
16:19:54FromDiscord<SrMordred> @leorize thanks, ill take a look.
16:19:54FromDiscord<SrMordred> i can implement some simple structures to handle this anyway. just curious if there was part of the language (so i don´t have to create anything 😛 )
16:20:08FromDiscord<SrMordred> @disruptek there are docs about this regions?
16:20:25*nif quit (Quit: ...)
16:20:35*nif joined #nim
16:21:01leorizehttps://github.com/nim-lang/Nim/blob/devel/lib/system/gc_regions.nim
16:26:26*mo87 joined #nim
16:26:34FromDiscord<treeform> I think --gc:regions are all or nothing. You can't mix existing ref counting with --gc:regions... unless you make your own region thingy with malloc.
16:26:34*mo87 left #nim (#nim)
16:26:49leorizeyea, you can't mix gcs
16:28:51FromGitter<awr1> @disruptek "all data persisted to disk 100% of the time" seems to me a kind of futuristic ideal
16:28:53disruptektreeform: i'm using openapi to generate all the google stuff.
16:29:08FromGitter<awr1> contingent on the development of https://en.wikipedia.org/wiki/Universal_memory
16:29:25FromDiscord<treeform> disruptek, is it working?
16:29:36FromDiscord<treeform> do you have a github repo?
16:29:42disruptekyes, but i haven't written the request signing yet.
16:30:05disrupteksee my `openapi` tree, though it won't work for you without a compiler hack.
16:30:08FromDiscord<treeform> request signing is hard, you can copy my code which I copied from some place else
16:30:38disruptekokay, i will push it today and you can add it or at least get started.
16:31:36Araqany news on shashlick's problem?
16:31:59FromDiscord<treeform> the thing with the Google APIs as they are usually so nearly, but what you want is a single thing out of them... so you write your own wrapper around whatever you need anyways.
16:32:28disruptekright, and that's kinda the design with my openapi impl. it lets you create a custom client with just the bits you want.
16:32:35shashlick@Araq - I created https://github.com/nim-lang/Nim/issues/12286
16:32:45disruptekit's pretty low-level but it does the heavy lifting for you, in theory.
16:32:56clyybberAraq: Is it possible to patch the VM so it ignores `when defined(js)` ? So that one can use things at CT regardless of the backend you are compiling to.
16:32:58shashlicki tried without tlsEmulation, didn't help
16:33:00disruptekit needs your websocket, btw.
16:36:18clyybberdisruptek, Zevv: readAll should now work at CT too
16:36:21Araq onDepends*: proc(plg: var Plugin, cmd: var CmdData)
16:36:33Araqbut Plugin is a 'ref' already, suspicious
16:36:46Araqnot the cause of the bug though, just a random remark
16:37:18Zevvclyybber: sweet
16:37:21FromDiscord<treeform> Araq, can you tell us more about https://github.com/Araq/araqsgc ? Will this replace --newruntime?
16:37:33shashlicki pass Plugin all over the place so ref was most sensible
16:37:46Araqshashlick: sure but then you don't need the 'var' parameter
16:38:02Araqtreeform: that's the competing design
16:38:39FromDiscord<Shield> why so many designs?
16:38:48FromDiscord<treeform> because GC is hard?
16:39:15leorizememory management is never solved :P
16:40:43*nif quit (Quit: ...)
16:40:48Araqshield: well it's two new designs, the old stuff either works or is abandoned
16:40:49FromDiscord<Shield> why not have the ability to mix newruntime with gc? not everything needs to be one thing or the other, i'd rather still use gc for things that don't need fine control
16:40:53*nif joined #nim
16:41:22Araqbut that's what both designs do
16:41:56Araqthey use all the work that went into destructors
16:42:05Araqthey disagree on what to do with 'ref'
16:43:14leorizeso... what is the different between --gc:destructors and --newruntime?
16:43:15FromDiscord<Shield> isn't countref enough for them
16:43:19leorizedifferences*
16:44:13clyybberowned
16:44:25Araqleorize: --gc:destructors is a shared heap GC, --newruntime introduces 'owned ref'
16:44:43shashlickshould be pwned
16:44:46Araqand 'owned ref' is a breaking change, it affects most libs
16:44:54FromDiscord<treeform> --gc:destructors can be used with threads?
16:44:58Zevvnarimiran[m]: nice pdf render!
16:45:04FromDiscord<Shield> also instead of forcing a a whole gc collection, i would like to force an immediate collection on certain variables, something like 'reset'
16:45:08Araqtreeform: yes
16:45:30AraqShield: You just described the the GC's 'dispose' feature
16:45:34leorizein araqsgc you said the user has total control
16:45:37leorizewhat does that mean?
16:45:50Araqit means you need to 'collect' on your own
16:46:17*endragor quit (Remote host closed the connection)
16:46:27Araqas they are no sync-points (yet?)
16:46:34clyybberZevv: Does that make npeg work?
16:46:52Zevvclyybber: well, not yet because of the other issue, sorry
16:46:52FromDiscord<Shield> dispose isn't even documented.. a lot of things go unnoticed because of this
16:47:00FromDiscord<treeform> Araq, so with this system you can ship your own GC? The thing I want to use is normal GC for high level and then arenas for tight loops.
16:47:13shashlick@Araq - any ideas yet? let me know if you need any more info
16:47:28FromDiscord<SrMordred> @treeform that´s what i want too
16:47:59FromDiscord<Shield> i agree with treeform
16:49:11FromDiscord<treeform> Thats similar to what C++ AAA game devs use. They use arenas for tight loops such as frames/levels and manual alloc/free for high level stuff.
16:49:34FromDiscord<treeform> They figured out how to write the fastest memory code...
16:49:51clyybberZevv: What other issue?
16:50:02ZevvI'm privmsg you
16:50:20clyybberAraq: So WDYT about making the vm ignore `when defined(somebackend)`? Could that work?
16:50:22FromDiscord<treeform> disruptek, why does it need my websocket? The google API?
16:51:03FromDiscord<Shield> okay i checked 'dispose' and it seems that it unrefs a cell, what i want is the gc doing something like "freeing any specified variable i mark exactly when i call it, then automatically handle anything else"
16:52:17*owl_000 quit (Ping timeout: 240 seconds)
16:52:37leorize@treeform: fwiw the current gc does accumulate small allocations for a big free later on
16:55:19FromDiscord<treeform> leorize, cool
16:58:41leorizeAraq: so what does --gc:destructors alone do? or do you have to use it with an external gc?
17:05:33disruptekclyybber: i think you broke something in your branch. 😢
17:08:02*narimiran joined #nim
17:08:47disruptekyeah, i'm getting an undefined reference to some random symbol in my c code.
17:09:12clyybberdisruptek: Huh, how?
17:09:20clyybberI'm not doing anything crazy afaict
17:09:33disrupteki think it's a constant of tuples of enums and strings.
17:09:49disruptekconstant seq that is.
17:10:01disruptekyou know i like my seqs constantly.
17:11:14disruptekit's a line that looks like this: var remainder = input.hydratePath(segments[1 ..^ 1])
17:11:19clyybberdisruptek: Can you paste me the error?
17:12:05disruptekhttps://gist.github.com/disruptek/13e1f9aa7dd0724f01794b7a5e0d4d58
17:12:07clyybberdisruptek: Also, you sure that broke with one of my commits?
17:12:31krux02clyybber: regarding your comment if the for loop is stiff neccessary for performanc, I don't know what for loop you are talking about.
17:13:29clyybberkrux02: I linked it here: https://github.com/nim-lang/Nim/pull/10746/files#diff-26f94e9f706df25bd6d075ca5f41cf0aR365
17:13:47clyybberIf the link doesnt work its in lib/pure/streams.nim line 365
17:14:25clyybberAfter you click on the link you have to scroll up a bit (because github is retarded), it should be marked in yellow
17:14:35disruptekclyybber: your compiler can't build the compiler for me.
17:14:50clyybberdisruptek: I didn't change the compiler :P
17:14:52Zevvhaha
17:15:00Zevvdisruptek: I just did that, so it's probably something else
17:15:08disruptekon his branch?
17:15:24Zevvyes. After that I *did* accidently check out master instaed of devel, which barfs on the 'is' thing
17:15:28Zevvbut that wouldn't happen to you, right?
17:15:34*bigode10 joined #nim
17:15:39disrupteknah.
17:16:03Zevvbummer. Would be sweet if you did just that :)
17:16:06disruptekjeeze, i just did two build alls to try to be sure and they both failed and now i switched back and it works again.
17:16:29disruptekbut my code still fails.
17:16:47disruptekah, and now i can't rebuild the compiler.
17:16:56disruptekcuriouser and curiouser.
17:17:05clyybbernuke the cache just in case
17:17:46Zevvleorize: find-project wants me to hit enter at startup, is that a debug thing?
17:18:04disruptekit's a test.
17:18:38disruptekclyybber: well, my code still breaks with your branch and not devel.
17:18:59clyybberthe same error as before?
17:19:05disruptekyeah.
17:20:11bigode10Does anyone here uses CentOS 6? I cannot install nim from source on that distro, koch fails to compile...
17:20:13clyybberI'm pretty sure thats not my changes
17:20:25clyybberdisruptek: As you can see I only changed streams.nim
17:21:05disruptekokay, lemme update devel and see.
17:21:18disrupteki think you were ahead of me.
17:21:21Zevvbigode10: I don't have a centos running, can you dump your error logs on a pastebin somewhere?
17:21:52disruptekah, yeah, something recent broke me.
17:22:06disruptekyou're off the hook, clyybber. 😜
17:22:10clyybberheh
17:23:30leorizeZevv: nope, that's a bug
17:23:36Zevv\o/
17:23:37leorizehow did you get it?
17:23:44ZevvJust open a nim file
17:24:25leorizeI... can't reproduce?
17:25:16Zevvhttps://asciinema.org/a/ed4yte3tvRBqwn7r5GmrbjnaP
17:26:05Zevvhm I hit enter a too fast, but at 00:06 it stalls waiting for ENTER
17:26:18krux02clyybber: if you can replace the for loop with something better, go ahead. I could not at the time of writing it.
17:26:35leorizeZevv: I think i know why
17:26:42krux02a for loop iterating bytes is basically the worst thing you can have at compile time
17:26:46leorizeit might be a debugging artifact
17:27:02Zevvleorize: 'k. And then the second question: how do I actually see if the finding *works*?
17:27:08clyybberkrux02: Ok, imma try
17:27:30leorizeZevv: you open htop and see if nimsuggest was launched against the correct file :P
17:27:57bigode10Zevv: The error is: fatal.nim(39) sysFatal
17:28:00Zevv:q
17:28:22leorizeI should probably add a message everytime a project is spawned :P
17:28:23bigode10How can I get a more verbose/debug error?
17:28:52leorizebigode10: can we hav the entire build log?
17:28:52Zevvbigode10: you don't get a more complete stack trace?
17:29:13disruptekdon't use the d:danger or d:release switches.
17:29:43bigode10@Zevv Nay, just that... It occurs when I run "bin/nim c koch"
17:30:04Zevvbigode10: that's nasty. Let me see if I can spawn a centos somewhere
17:30:06bigode10The first step (compiling nim itself) runs fine
17:30:38Zevvleorize: yes, confirmed that works. I don't see any change in actual *Behaviour* though, nimsuggest seems to be hapyy for me to be launched on the wrong file, but I don't care: stuff works!
17:31:03bigode10@Zevv Ok! Thanks for looking into it! I am running: CentOS release 6.10 (Final)
17:32:18leorizeZevv: here's a perk then: you can now get all nimsuggest features in a new file within your project without having to save it to disk
17:32:33Zevvhm dang, I wanted to use the vms at work, but there's only centos 7.2 in there these days, the recently migrated the old stuff out.
17:32:50Zevvleorize: aah, that makes sense!
17:33:30Zevvbigode10: downloading live centos 6.2 iso
17:34:13bigode10Zevv: Ok! :)
17:36:53ZevvHa, centos is so old it can't even connect to nim-lang.org on https
17:37:13*NimBot joined #nim
17:38:00bigode10Yep, you need to update some ssl related stuff
17:39:29leorizeZevv: I tried to add some notifications upon starting a project so you can find out which file it started with
17:39:34leorizethe message just doesn't show up
17:40:34Zevvha
17:41:58Zevvbigode10: takes longer, live CD does not want to run properly, so need to install a vm
17:42:54bigode10:(
17:42:57bigode10Hmmm
17:43:09bigode10I can create a user for you on my machine
17:43:16bigode10If that helps...
17:43:34Zevvnah I should be ok here
17:43:55bigode10Ok, let me know if you need anything
17:44:06Zevvand you should't trust strangers on the internet, my mommy told me!
17:44:22Zevvjust giving me your front door key like that
17:44:43disruptekzevv is about as strange as they come; i don't trust him.
17:44:47bigode10Well, it is one of my "toys" servers
17:45:04disrupteki don't trust him with my honeypot.
17:45:04Zevvi wouldn't trust me
17:45:14bigode10Lol
17:46:20bigode10I tend to trust people, maybe I am too naive
17:47:48*ni291187 joined #nim
17:47:57*ni291187 quit (Remote host closed the connection)
17:48:40FromDiscord<Kiloneie> I tend not to trust anyone 😛
17:48:53ZevvI trust dogs
17:49:00FromDiscord<Kiloneie> i don't trust dogs
17:49:06leorizethe last time the nim playground trusted Zevv he broke it for several months
17:49:12FromDiscord<Kiloneie> i prefer cats that don't just instantly love you
17:49:35disruptekyeah that's no cats.
17:49:40bigode10The only people I don't trust is people that don't drink alcohol
17:49:46disruptek'cept for this arubian woman i knew who was bi-polar.
17:50:04FromDiscord<Kiloneie> xD
17:50:06disruptekmy dog doesn't like fat people.
17:50:24FromDiscord<Kiloneie> he would me, a lot of meat D:
17:50:31disruptekhe hates buffering, too.
17:50:36Zevv"oh I'm so sorry madam... No, no, he only does that to fat people"
17:50:43disruptekpretty much.
17:50:48FromDiscord<Kiloneie> bones then
17:50:56disruptekhe doesn't like republicans, either.
17:51:51Zevvyou liead bigode10, there's a second error message!
17:52:04bigode10Not on my side...
17:52:06daddoookay, I've been on here for a few days and quiet until I learned "the lay of the land", but I have to ask, disruptek - how does he know?
17:52:11ZevvError: unhandled exception: index -16 not in 0 .. 9 [IndexError]
17:52:20disrupteki think he can smell fear.
17:52:21Zevvwhat an utter useless crap excuse not to build koch
17:52:22bigode10Yes, i pasted it
17:52:27Zevvoh I missed that :)
17:52:30daddooheh
17:52:36bigode10Dont call me a liar sir!
17:52:41bigode10Haha
17:52:55Zevvhmm yes so now what
17:53:18Zevvfolks, how do I build the csources compiler with debugging? I want a stack trace
17:53:31disruptekhe's an insane dog. he watches tv avidly and gets excited when he sees any kinda animal -- not just trump, but like, cartoons, 2d images, even a stylized logo or an animal made from animated objects.
17:53:33leorizeyou generate a new one
17:53:42disrupteksuper smart doge.
17:54:36Zevvleorize: bwah
17:56:52Zevvwhat's the recipe for that then?
17:57:03leorize./koch csource
17:57:07Zevvta
17:57:30Zevvdoes *boom* for me
17:57:50Zevvhttp://ix.io/1Xb2
17:57:53Zevvon fresh 1.0.0
17:58:05leorizefrom what I can see, csource seems to be the normal compiler
17:58:34Zevvwell, I'll build devel
17:59:16narimiranZevv: are you trying to do `./koch boot`, or am i missing something?
17:59:18leorizeZevv: try grabbing the prebuilt binaries: https://nim-lang.org/install_unix.html
17:59:38ZevvAnd see if that can build itself on centos, right
18:00:43Zevvyeaaah dream on
18:00:48Zevva prebuilt on a 1998 OS
18:01:06Zevvwith a glibc looong past
18:02:33Zevvnope, ld-linux.so.2 and similar complaints
18:02:52Araqtreeform: you can do that, yes
18:03:08leorizeZevv: want me to build you a musl-libc based one? :P
18:03:09Araqleorize: --gc:destructors only works with a custom GC, yes
18:04:15Zevvleorize: building a static
18:04:30Zevv*if* that wants to run on a 2.6 kernel
18:04:41Araqbut 'ptr' exists since forever, managing memory in arenas is not hard with Nim v1, you don't need this newer fancy, undocumented stuff
18:04:55leorizeZevv: if it doesn't work I'll give you a static musl one
18:05:17Zevvthis is so much fun, it's just like work
18:05:22Araqand probably I'm over-thinking it a bit. 'ptr' vs 'ref' is very well designed
18:06:10ZevvFATAL: Kernel too old. Whaaaha
18:06:45disruptekZevv: lol
18:07:11leorizeZevv: so do you want the binary with stacktrace?
18:07:32Zevvthe story is that I built a nim from csources, but this nim is not able to build nim or koch
18:07:46Zevvso I probably need csources for a debug compiler
18:09:21disruptektreeform: https://github.com/disruptek/gcplat
18:09:41narimiranok, let me try once again with the stupid question: Zevv, wouldn't `koch temp` be enough for what you're trying to do?
18:09:53leorizehe can't compile koch
18:09:56Zevvnope :)
18:10:05narimiranleorize: oh!
18:10:08Zevvbut I just did a 'nim c -c compiler/nim.nim' on my own pc
18:10:18Zevvand are now copying the .cache/nim c sources to the target
18:10:38leorizelol
18:11:04leorizewell I got a static nim binary now
18:11:10leorizeit should work with kernel 2.6
18:11:17leorizedo you want it?
18:11:22Zevvyes please
18:11:31Zevvunless my compile succeeds in 5 seconds
18:13:18leorizethere's a problem... idk where to upload this :P
18:13:21Zevvgcc 4 just ate the nim sources for breakfast!
18:13:28Zevvnevermind, progress
18:14:13Zevvwhat now. unknown magic might crash the compiler
18:15:00Zevvoh stuff has changed since 1.0.0 already? I can't build 1.0.0 with devel
18:18:02*sealmove joined #nim
18:18:42ZevvSorry for all the rambling, but does http://ix.io/1Xb2 make sense to anyone?
18:18:44AraqZevv: the CIs are green though
18:18:55lmariscalIs there a way in Nim docs to set new line like in markdown double space or latex \\?
18:19:03Zevvaraq: yeah but this is on centos 6.2, is that CI'ed ?
18:19:08disruptekthis is what i'm dealing with zevv.
18:19:25Araqno, your centos/gcc miscompiled Nim and then Nim fails to process system.nim
18:19:42Zevvright
18:20:10Zevvand to be clear, it's not *my* centos! I'm not touching that stuff
18:20:30shashlickAraq: do you think I should remove ref from Plugin or not use var in proc signature?
18:20:48Araqdo not use 'var' in the proc signature
18:21:06shashlickany other tips?
18:21:34sealmovesecret black magic
18:21:41*narimiran quit (Remote host closed the connection)
18:22:05AraqZevv: what's the GCC version?
18:22:33Zevv4.4.7 B.C.
18:22:35Araqlmariscal: RST has the | | | construct
18:22:43Araq4.4.7 is ancient crap
18:22:52ZevvB.C. -> before christ
18:23:01sealmoveancient secret black magic
18:23:31ZevvBut but but Lua 5.4 compiles on Turbo C 1.0!
18:23:50disruptekturbo c... i remember that.
18:24:06disruptekhad the big book, the whole nine.
18:24:07Zevvhttps://www.youtube.com/watch?v=-jvLY5pUwic
18:24:38ZevvThis is the last one I published, but it still works for 5.4 :)
18:25:45lmariscalThanks Araq
18:25:47Araqcheck out an old version of C sources
18:25:56*Hideki_ joined #nim
18:25:58Araqlike 0.16 or something
18:26:08Araq(yes, C sources are tagged too)
18:26:22Araqbuild an old Nim
18:26:36Araqand then .. I dunno, use an old Nim?
18:26:37Araq:D
18:26:39Zevvhaha
18:26:56Araqor try to bootstrap through the versions...
18:27:23Zevvbigode10: Well, you heard the man. I'm not sure if it makes sense to continue from here...
18:27:24Araqbut some version will produce the C sources that your GCC miscompile, so ...
18:28:14Zevvok, one more try then, using tcc :)
18:28:14FromDiscord<treeform> I am trying to compile an older nim as I am trying to track down an issue in my code. But old nim does not want to compile this version here: 1a770402784ed99099f1905e1e4c201020e03bca says `Error: ambiguous call; both system.alloc(size: Natural) [declared in /p/Nim/lib/system.nim(2359, 10)] and system.alloc(size`gensym117652: Natural)`
18:28:24FromDiscord<treeform> Do you guys have any tips on how to compile older nim version?
18:29:13FromDiscord<treeform> Is this a problem with csrouces bering newer then the new I am trying to compile it with?
18:29:52FromDiscord<treeform> hmm csources are saying `Wed Jun 5 20:52:57 2019` so probably not that
18:31:17*Hideki_ quit (Ping timeout: 245 seconds)
18:31:35shashlick@Araq - changed all instances of `var X` => `X` where X was a ref object - still crashes
18:34:12bigode10@Zevv Yep, thanks a lot for looking into it! I guess I will have to update my server ;)
18:35:57Zevvthat's generally a good idea for anyony running centos 6.2
18:36:12*disruptek runs for the exit.
18:36:41FromDiscord<Kiloneie> """ """ is this called 3 double quotation marks ?
18:36:52disrupteklooks like six to me.
18:37:03FromDiscord<Kiloneie> so they are called quotes then
18:37:18FromDiscord<Kiloneie> my english needs more knowledge
18:37:31disruptekit's called a `triple double`, as popularized in the song.
18:38:00FromDiscord<Kiloneie> okay
18:38:03FromDiscord<Kiloneie> thanks 🙂
18:38:52*daddoo quit (Quit: Leaving)
18:42:09*abm quit (Quit: Leaving)
18:42:58clyybberI've got a puzzle..
18:43:07clyybbercan you spot the difference? http://ix.io/1Xb7
18:43:23clyybberhttp://ix.io/1Xb7/nim
18:44:24FromDiscord<Kiloneie> there isn't any
18:44:32Zevvthere is
18:44:39clyybberOh, sorry not between the snippets, between the two blocks
18:44:42clyybberlol
18:45:10FromDiscord<Kiloneie> one has nim ?...
18:45:28solitudesfbetween `block` statements
18:45:28clyybber<Quote> Not between the snippets
18:45:31Yardanico@kiloneie in the code itself, there are two blocks
18:45:42*bigode10 left #nim (#nim)
18:45:52Araqtreeform: it's not hard but you need to use a newer version of system.nim and of alloc.nim
18:45:58Araqor an older one
18:46:26Araqshashlick: ok, but the code is better now :P
18:46:35FromDiscord<treeform> Araq, but I am using the one that comes from git at that version?
18:46:39*exelotl joined #nim
18:47:17Araqare you?
18:47:31Araqbut your Nim is too new, new Nim binary is picky
18:47:48Araqa new Nim cannot compile an old Nim, an old Nim can usually compile a newer one
18:48:06FromDiscord<Kiloneie> Yeah im not qualified to answer that.
18:48:08FromDiscord<treeform> I don't think it using choosenim version
18:48:20FromDiscord<treeform> I am just using github and csource which is Jan build?
18:48:34AraqI don't know what you use
18:48:35shashlick@Araq - okay, was super easy with nimgrep
18:48:39clyybberZevv: But should there be?
18:49:15Araqshashlick: anyway, did you try to set the envvar to influence boehm?
18:49:25shashlickthat didn't work for me - i did try
18:49:38Araqbut changing that one line did the trick?
18:51:11Araqtreeform: https://nim-lang.org/download/nim-$version.tar.xz unpack, build it, success. the tarballs only depend on GCC and stuff
18:51:38Araqand ship with C sources that work
18:51:48FromDiscord<Kiloneie> Man my english teaching of programming gets me lost so hard so fast that i make a ton of mini clips xD... i got like 19 for 4-5 minutes of video and i got over a full page of A4 long of a script D:
18:51:53Araqthat's how I build old Nim versions and it never failed me
18:52:03FromDiscord<treeform> got it
18:52:13FromDiscord<treeform> My goal is to find which git commit broke my code.
18:52:44Araqoh not this again
18:52:59Araqit's "von hinten durch die Brust ins Auge"
18:53:22Araqjust tell me your problem, it's likely I can tell you how we broke it
18:53:48shashlickYes changing one line was enough to get everything working
18:54:21Araqshashlick: windows specific problem?
18:55:21FromDiscord<treeform> Araq, I am hitting this error in in ccgexprs.nim internalError(p.config, n.info, "expr: param not init " & sym.name.s & "_" & $sym.id)
18:55:34FromDiscord<treeform> Araq, i have a ton of nested templates
18:56:02Araqtreeform: my gensym fixes. does --oldgensym:on work?
18:56:04*al_ joined #nim
18:56:12FromDiscord<treeform> https://gist.github.com/treeform/9c981ce4b549dcac7558d00a04bdeafc
18:56:22FromDiscord<treeform> I'll try --oldgensym:on
18:57:37FromDiscord<treeform> Yes --oldgensym:on does work.
18:58:25shashlickNo way to tell since the app is only for Windows
18:58:35shashlickThough the plug-in system should work on Linux as is
18:58:51Araqit's my commits to compiler/evaltempl.nim compiler/semtempl.nim
18:59:19shashlickIf I ref object has a ref object as one of its fields why wouldn't that be an interior pointer from boehm's perspective
18:59:19FromDiscord<treeform> Looking at https://nim-lang.org/docs/manual.html#templates-hygiene-in-templates
18:59:21Araqbut given that no bugs are known for the new gensym handling, we're in a world of fun
18:59:29FromDiscord<treeform> so I need to {.inject.} to get it to work
19:00:17Araqshashlick: because the pointer does not *point* inside a different object
19:00:30Araqit points to the beginning of the object
19:00:42Araqthere is no other way unless you use addr/unsafeAddr
19:01:05Araqtreeform: sure but the compiler shouldn't crash :-/
19:02:06disruptekright, the gc doesn't know anything about the hierarchial structure of the data in your code. it just has blobs of memory. that's why i don't understand how you could do any pointer work and not end up pointing to an interior unsafely.
19:02:06Araqshashlick: interior pointers are not "oh inside some other object", interior pointers point into the middle of some other object
19:02:46disrupteki guess it's possible that none of those values are known to the gc though.
19:05:27FromGitter<Varriount> shashlick: What's nimarchive?
19:06:55*laaron joined #nim
19:08:58*laaron quit (Client Quit)
19:11:56*teimosso joined #nim
19:14:13*laaron joined #nim
19:19:52*nsf quit (Quit: WeeChat 2.5)
19:19:56*laaron quit (Ping timeout: 260 seconds)
19:20:19*skoude joined #nim
19:21:00shashlickSo I don't have any addr calls araq
19:21:09shashlickI'm not sure what to look for
19:21:33shashlick@Varriount: it is a wrapper for libarchive
19:22:45shashlick@Araq so your point is that this shouldn't affect me unless we do pointer arithmetic
19:23:16shashlickBut I presume the generated c code doesn't do that either
19:24:36*skoude quit (Ping timeout: 240 seconds)
19:24:50*clyybber quit (Quit: WeeChat 2.6)
19:25:41FromDiscord<treeform> @Araq, thank you with your help I fixed my code. I was making proc inside a template (for encapsulation only) which made a generated a ton of procs. I moved the proc outside the template - everything works. I tried to make a minimal example but I can't make it happen on a minimal example.
19:28:36*rayman22201 joined #nim
19:29:57Yardanicowow https://twitter.com/github/status/1177614249754972160
19:30:04FromDiscord<exelotl> :O
19:30:08Yardanico(github retweeted nim's 1.0 tweet)
19:32:45rayman22201oh dang! That's big. cool
19:35:45FromGitter<zetashift> first reaction is "@CrystalLanguage will follow soon :)", that's not cool.
19:35:57FromGitter<zetashift> However still glad it got tweeted by github
19:45:06FromDiscord<exelotl> hey, so as far as I remember, this kind of macro will work across modules https://play.nim-lang.org/#ix=1Xbm
19:45:45FromDiscord<exelotl> will that still be the case with incremental compilation enabled?
19:46:25disruptekmicrosoft azure apis https://github.com/disruptek/bluu
19:47:54*Jesin quit (Quit: Leaving)
19:51:04*al_ quit (Quit: al_)
19:51:52*nsf joined #nim
19:53:58Araqexelotl: yes but you need to use the macrocache lib
19:54:44shashlick@Araq - what next? i can work with a custom nim but we need to understand what's going on here
19:55:02shashlickelse boehm won't be as useful to everyone
19:57:05FromDiscord<exelotl> ah, thanks
19:57:23*Jesin joined #nim
19:57:36Araqshashlick: we can undo it and ship it for 1.0.2
19:57:52Araqbut I'm still thinking what the cause might be
19:58:06shashlickokay I'll leave you alone for some time, will use the workaround for now
19:58:16shashlickthere's an issue to remind us
19:58:20Araqdo you use channels?
19:58:25shashlickno
19:58:35Araqreally?
19:58:44FromDiscord<treeform> dispruptek, it looks like a lot of the API's you just pass JSON to it? Example: https://github.com/disruptek/gcplat/blob/master/src/gcplat/bigquery_v2.nim#L3228 Is this expected?
19:58:47Araqbut you do use threads:on
19:59:03shashlicki use shared objects
19:59:54FromDiscord<treeform> dispruptek, in theory call calls could just be call(url, json) ? Where you draw the line at this is json and this is not json?
20:00:43FromDiscord<treeform> dispruptek, i guess, expected nim objects that are typed checked then passed to the calls that turns to json on the inside.
20:01:33*sschwarzer joined #nim
20:01:47shashlick@Araq - do you think a table of procs makes any difference?
20:01:57disrupteknot sure what you mean, but there are generally (at least) two forms of call: one with json inputs, and one with native inputs.
20:02:12disruptekboth are typechecked.
20:02:12sschwarzerHi, I know I'm a bit late, but congratulations on version 1.0! You made it! Thank you. :-)
20:02:23Araqsschwarzer: oh thanks!
20:03:21Zevvclybber: what exactly is your problem with the two-block snippet? The second one is different, s[c..<b] is s[1..<1], which ends up as nothing, right? So you just throw out b[0], leaving an empty string
20:03:28disruptekbut atoz might be a better source of examples; the gcp and azure apis are just temporary until i add signing and start to deconstruct everything. ie. nim object types are gonna go in; you can see them in the openapi code...
20:05:56FromDiscord<treeform> disruptek, oh I see the two calls now. In my experience google API wants these big deep nested objects. I just want to see where the object are 🙂
20:07:56disruptekyeah, it's part of a progressive rendering that i'm finishing in openapi. i just want to make sure it works for all swagger definitions first.
20:07:59FromDiscord<Kiloneie> Here i go again !: https://youtu.be/a0qAcCC_Mhk
20:08:33disruptekfor example, azure uses objects with names that aren't valid nim identifiers, etc.
20:11:39FromDiscord<Kiloneie> I wanted to keep recording, it felt like i made a 3-4 minute video xD, guess i was wrong. It's getting easier and easier making these(besides Da Vinci Resolve giving me headaches)
20:20:43rayman22201have you heard of this @kiloneie? https://owickstrom.github.io/komposition/
20:21:02rayman22201I don't make videos, but it looks like neat software. I've wanted to try it.
20:23:28disruptektreeform: which gcp api do you need specifically, and can you point me at what you have for the auth flow?
20:28:18*Hideki_ joined #nim
20:28:37FromDiscord<moigagoo> Is it possible to add a default value for DateTime type? Because it doesn't, I can't have Option[DateTime] without the "Cannot prove is initialized" warning, even if it's none DateTime.
20:29:12FromDiscord<moigagoo> If it's doable, I'd like to submit a PR during Hacktoberfest 🙂
20:29:44*solitudesf- joined #nim
20:31:12FromDiscord<Kiloneie> i seen a part that he could drop silent parts, that seems useful, other than that it's 0.01% of what Da vinci resolve is
20:31:28FromDiscord<Kiloneie> da vinci is massive... i don't think i will ever learn it all...
20:32:26*Hideki_ quit (Ping timeout: 240 seconds)
20:32:37*solitudesf quit (Ping timeout: 240 seconds)
20:32:43rayman22201I understand. I used to do a lot of work with Adobe Premiere and Adobe After Effects in another life. You might not need all 99% of it. Which is kind of the point of specialized software.
20:33:41FromDiscord<Kiloneie> yeah, will give it a try
20:34:54*Vladar quit (Remote host closed the connection)
20:34:59rayman22201no pressure though. I just thought it was neat software :-P at the end of the day, you have to use what ever works best for you :-)
20:35:52FromDiscord<Kiloneie> yep, and whatever can help speed my process up is appreciated. i don't like making micro edits because i make delays in some parts talking
20:36:09FromDiscord<Kiloneie> i do that... i make micro scopic edits xD
20:36:18FromDiscord<Kiloneie> like 0.1 seconds and all
20:37:35rayman22201lol. Yeah. It's easy to get sucked in to trying to make the frame-perfect cut.
20:38:40FromDiscord<Kiloneie> i don't wanna prolong the video unnecessarily, if i can cut 20 seconds like that, that's good
20:39:00Araqmoigagoo: maybe if you change Option[T] to use a case object inside
20:39:01FromDiscord<Kiloneie> usually i just do 0.5 cuts in between talkings, sometimes i lose my words
21:05:52*daddoo joined #nim
21:16:43*sschwarzer quit (Quit: leaving)
21:24:53*Serrellanos quit (Ping timeout: 245 seconds)
21:48:53*solitudesf- quit (Ping timeout: 268 seconds)
21:58:51FromGitter<alehander42> https://github.com/alehander42/Nim/blob/nilcheck-spec/doc/nilcheck.rst
21:59:59FromGitter<strokirk> Hi, is there any good guide on handling `nil` types and working with JSON data? I'm getting a lot of errors that I can't really figure out https://play.nim-lang.org/#ix=1XbX
22:00:00FromGitter<alehander42> Araq : i updated with the `proc` and other fixes
22:00:21FromGitter<alehander42> and sketched of the initialization section
22:00:48FromGitter<strokirk> The compiler doesn't seem to warn when I try to echo something that can be potentially `nil`. Is there any type annotation I can manually add to get that kind of check?
22:00:50FromGitter<alehander42> but i need to understand if my todo list seems right
22:01:32FromGitter<alehander42> @strokirk i am just working on a spec for the last thing (non-nilable vs nilable types)
22:01:55FromGitter<strokirk> Ah, lovely.
22:01:59FromGitter<alehander42> currently you can use `Typename not nil` in some cases for some ref objects
22:02:05disrupteknil is the absence of a reference; a valid value for JsonNode, since it's a ref. an empty JObject isn't nil, but a JNull node isn't either -- it's a representation of JSON's `null` value.
22:02:11FromGitter<alehander42> but most of the checking is still todo
22:02:33Araqalehander42: I don't understand how "procedures" can be locations
22:03:33FromGitter<strokirk> @disruptek: Ah, that makes sense. So you need to be careful. I noticed it's not possible to catch nil referencing errors with try-catch, is there some other idiom to use there?
22:03:51disrupteksure; `if somevariable != nil: ...`
22:03:55Araqdon't you dare, don't catch bug, avoid bugs
22:03:56FromGitter<alehander42> that's right, i should just mention them in the "what is dereference" list
22:04:07FromGitter<strokirk> (I come from a Python background and usually work with pretty sketchy data so error management is important to me. Very long time since I did any C....)
22:04:16Araq"if, while, case, and, or"
22:04:21Araq^ not for 'case'
22:04:43FromGitter<alehander42> well, in my previous PR i had a bit contrived
22:04:45FromGitter<alehander42> test case
22:04:56FromGitter<alehander42> i think it was `case a.isNil: of true: .. of false: ..`
22:05:02rayman22201@strokirk, or check if the key is in the table: https://play.nim-lang.org/#ix=1XbY
22:05:35disruptekwell, no point in {} in that case -- just use [].
22:05:36FromGitter<strokirk> @Araq: While I can appreciate that, when it comes to JSON you can't trust the source data so you have to catch the bugs rather than "avoid" them.
22:05:54disruptekexceptions should be exceptional, not normal control flow.
22:06:10disruptekin contrast to python...
22:06:29*Slagar joined #nim
22:06:40FromGitter<alehander42> @strokirk do you have many missing values, or do you have many actual `null` json values ?
22:06:58Araqstrokirk: the json api compensates for that
22:07:25FromGitter<strokirk> Missing, as in I'm not trusting the APIs I'm calling to return consistent data structures (and I want to return as good an error log as possible)
22:07:42AraqnewSeqWithInit(length):
22:07:42Araq Object(a: it)
22:07:52Araqalehander42: don't introduce this, it's not necessary
22:08:05Araqdon't add features before the need arises
22:08:32FromGitter<strokirk> @disruptek: I'm not really concerns if it's exceptions or nil checks or whatever, as long as I can quit gracefully (or recover from the error).
22:08:33FromGitter<alehander42> well, the json api should raise an exception e.g. if you use [], or you can use getOrDefault if a default exists
22:08:46FromGitter<alehander42> Araq, well this fixes several sequtils
22:09:01FromGitter<alehander42> methods without needing `unsafeDefault` iirc
22:09:14Araqbut so does unsafeDefault which you *also* added anyway
22:09:15FromGitter<strokirk> @disruptek: As long as you can get helped by the type system both approaches are good in my book
22:09:20disruptekjust stay away from exceptions when they aren't absolutely necessary, which is practically never imo.
22:09:24FromGitter<alehander42> i think you added it :P
22:09:34Araqexactly
22:09:43FromGitter<alehander42> well, i'd say newSeqWithInit is fully safe
22:09:51FromGitter<alehander42> and unsafeDefault is *the* escape hatch
22:09:58FromGitter<alehander42> but i agree its a bit on the edge
22:10:01Araqand even that is probably overkill, 'default' already exists and can be documented to produce 'nil'
22:10:02disruptekyou will find yourself doing this: assert foo != nil and foo.kind == JString, "i expected a string but..."
22:10:05FromGitter<strokirk> @disruptek: Any reason why? If the code you're calling throws them you don't really have a choice, right?
22:10:16disruptekwhat code throws them?
22:10:39disruptekparseJson is the only thing you need to catch.
22:10:42FromGitter<alehander42> @strokirk exceptions vs errors is a big ideological battle, everybody has his own opinion on that
22:10:53rayman22201@strokirk, use `[]` instead `{}` in your case, as @disruptek was saying. It will behave more as you expect.
22:10:56FromGitter<alehander42> Araq, maybe that's true
22:11:00FromGitter<strokirk> @disruptek: JsonNode[] for example https://nim-lang.org/docs/json.html#%5B%5D%2CJsonNode%2Cstring
22:11:21disruptekif you are going to handle the case where the key is missing, then you may as well just handle it without an exception.
22:11:23FromGitter<strokirk> @alehander42 Sure, just asking for clarification.
22:11:24Araqalehander42: but it's really good work, don't get me wrong
22:11:39Araqit's my job to cut out 50% of it
22:11:48disruptekif key in node: ... node[key] ... else: ... key ain't in the node!
22:12:03Araqnode.getOrDefault(key, ...)
22:12:04FromGitter<strokirk> Sure, much cleaner.
22:12:12Araqthe {} accessor
22:12:18Araqlearn the API.
22:12:35rayman22201the {} does a bit too much magic imo
22:12:37disruptekfoo = node{key} ... if foo != nil: ... i found it
22:12:38FromGitter<strokirk> @Araq There's rarely a default in the cases I'm experimenting right now
22:12:42Araqplenty of people used it in anger and it never failed them. exception: disruptek
22:12:56FromGitter<strokirk> But `in` works perfectly, I'm kind of facepalming I didn't try that right away...
22:13:01FromGitter<alehander42> i just see <withInit> as a natural extension of the shrink/grow idea : ⏎ ⏎ we cut setLen into shrink and grow, because shrink is safe ⏎ we cut grow into (growWithLoop or growWithInit) and just grow + default, because growWithLoop is safe ⏎ we keep the last thing because no choice [https://gitter.im/nim-lang/Nim?at=5d8e896c428cda40131c1992]
22:13:05disrupteki am probably one of the heaviest users of json, honestly.
22:13:06rayman22201in is very python-y lol
22:13:28Araqalehander42: new runtime already has 'grow' and 'shrink'
22:13:45Araqdisruptek: tried my packedjson?
22:13:54disruptekpointless for me.
22:14:02FromGitter<strokirk> @disruptek: Thanks for the examples!
22:14:09Araqhmm fair enough, I guess
22:16:24FromGitter<strokirk> @ rayman22201: Thanks for your fiddle-link, that explains why I got errors earlier. Missing import... Was a bit unclear from the error message. As soon as I added `import tables` I could call `j.getEntries()`
22:16:33disruptekstrokirk: lotsa examples of json validation in this tree: https://github.com/disruptek/atoz/blob/master/src/atoz/s3_20060301.nim -- all of this is use of the json api that was written by macros.
22:17:20rayman22201ah, sorry, I should have mentioned the import. I did that almost on instinct! you need to import `tables` to get the `$` tostring operation for tables.
22:17:24FromGitter<strokirk> @disruptek: Thanks, I'll look into it. Validation is important!
22:17:49FromGitter<strokirk> And echo does tostring / `$` by default, right?
22:17:53rayman22201yes
22:18:05FromGitter<strokirk> Lots of vocabulary to learn when trying out a new language. :)
22:18:32FromGitter<alehander42> Araq, but if we dont have newSeqWithLoop by default, maybe it still makes sense to add `unsafeDefault` , similarly to the other `unsafe`-s:
22:19:09FromGitter<alehander42> as there would be more cases where we would have to trust the programmer to fill his seq-s
22:19:25disruptekexceptions are not purely ideological: https://github.com/nim-lang/Nim/issues/11081
22:20:25Araqbugs are not ideology
22:20:56disrupteki appreciate your agreement.
22:21:14FromGitter<strokirk> Error management have many paths, though.
22:21:18*traviss joined #nim
22:21:25*Travis__ joined #nim
22:21:25*Travis__ quit (Client Quit)
22:22:21Araqdisruptek: as I keep saying, I don't like exceptions but so far nothing better was proposed, except maybe my own "quirky" variant of it but the last thing Nim needs is yet more controversial features
22:22:29*traviss quit (Client Quit)
22:22:49*traviss joined #nim
22:23:16disrupteki don't disagree, but that doesn't mean i don't think the use of exceptions as they sit isn't controversial. i don't think people should use them, period. i expect that you disagree. we can agree this is controversy, right?
22:23:41AraqRust is full quit() calls instead that do stack unwinding to cleanup resources ... which is exception handling as far as I'm concerned
22:23:55disrupteki like quirky. i even like alloc-free exceptions. but i don't like #11081 and you won't change my mind easily.
22:24:09disrupteki like quit() too. it hasn't failed me yet.
22:24:25Araqdisruptek: 1. I will try to fix 11081
22:24:50Araq2. we don't disagree at all, I also think people shouldn't use exceptions :-)
22:25:02disrupteki think that would make it much easier for me to go to bat for you. 😉
22:25:03rayman22201#11081 is obviously a codegen bug in cpp? right? all philosophical stuff aside.
22:25:31disrupteki don't want to tell people not to use exceptions. i only feel i must warn them.
22:25:50*Kaivo quit (Quit: WeeChat 2.6)
22:26:04*traviss quit (Client Quit)
22:26:21*traviss joined #nim
22:26:27*Travis__ joined #nim
22:27:05Araqrayman22201: I don't even know what kind of bug it is, it's strange
22:27:14disruptekalso, quirky doesn't need to be controversial in the same way that other features co-exist and aren't controversial, such as different gc, newruntime, etc.
22:27:34rayman22201lol. Well, it sure as hell shouldn't segfault, whatever it does :-P
22:27:49disruptekit's pretty uncomfortable, isn't it?
22:28:06*asymptotically quit (Quit: Leaving)
22:28:32Araqmake newruntime the default with its "dangling ref detected, quitting" and watch it become controversial
22:29:17*traviss quit (Client Quit)
22:29:17*Travis__ quit (Client Quit)
22:29:18disruptekwell i can see that getting exciting.
22:29:30disruptekfair point. 🤣
22:29:33*traviss joined #nim
22:29:55*Traviss__ joined #nim
22:32:50FromGitter<alehander42> ok Araq updated with more visible examples and less features
22:33:41FromGitter<alehander42> preserving the additional features in a `nilcheck_maybe.rst` to make me feel well
22:33:49Araq„case can be used as well“ no, it’s silly, nobody uses it
22:34:17FromGitter<alehander42> well technically you can write such an example
22:34:24FromGitter<alehander42> and it would lead to a segfault
22:34:31Araqtechnically I don't care
22:34:33FromGitter<alehander42> i guess the cfg deals well with `case` anyway
22:35:36Araqcase a.isNil:
22:35:36Araqof true:
22:35:36Araq discard
22:35:38Araqof false:
22:35:40Araq echo a.a # doesn’t compile, use an if statement you hippie
22:35:54*daddoo quit (Quit: Leaving)
22:35:55Araqhowever
22:36:01Araqwhat about:
22:36:07Araqif x == nil: return
22:36:17Araquse x[] everywhere else
22:36:40FromGitter<alehander42> yes, this should be written down as well
22:37:00AraqI think this edge case should be decided by the implementation
22:37:09Araqwith the CFG it'll be easy though
22:37:22FromGitter<alehander42> well, it doesn't feel like an edge case to me: and i did support it in the ast-based impl as well
22:37:30FromGitter<alehander42> so it shouldn't be so hard
22:37:39Araqanyway this is getting good enough for an RFC and then people can vote about the syntax and whether we should do it
22:37:53FromGitter<alehander42> one can easily auto-insert else for the other section for this analysis
22:43:18Araqok, so add it to the spec
22:43:52FromGitter<alehander42> ok, i did
22:43:57AraqI wanted to suggest you show how a red-black-tree-rotation would look like with these rules
22:44:12Araqbut with .nilChecks: off it's pointless
22:44:12*nsf quit (Quit: WeeChat 2.5)
22:44:30Araqfor heavy pointer stuff I can disable it. but shouldn't
22:44:53FromGitter<alehander42> 1) a specific "If we do a check in a e.g. if, the other branches (e.g. else) assume the opposite fact about the nilability of a value." i wanted to explained it with a "fork" but it's too low level
22:45:00FromGitter<alehander42> anyway
22:45:14Araqtrue
22:45:57FromGitter<alehander42> the nilCheck pragma would work as a normal pragma, right? on a function level, push-able and on a module level
22:46:10FromGitter<alehander42> what i wonder is should it work on a block level
22:46:18FromGitter<alehander42> e.g. `{nilCheck:off}: some code`
22:46:32FromGitter<alehander42> eh + {. .}
22:47:00FromGitter<alehander42> it's another escape hatch basically
22:50:21Araqjust another pushable pragma
22:50:31Araqbut it's not important, I don't expect it to be used much
22:50:43Araqthe rules we have are really good
22:51:37FromGitter<alehander42> ok
22:51:38FromGitter<alehander42> https://github.com/alehander42/Nim/blob/nilcheck-spec/doc/nilcheck.rst#initialization-of-non-nilable-pointers
22:51:50FromGitter<alehander42> mostly this section remains not really finished
22:53:18*Serrellanos joined #nim
22:56:08*Serrellanos quit (Client Quit)
22:56:53Araqthey are, but you need to remove the TODO
22:57:04Araqit's precisely what must happen
23:00:38FromGitter<alehander42> i rewrote them
23:00:49FromGitter<alehander42> ops, now i did
23:00:58*Hideki_ joined #nim
23:01:08FromGitter<alehander42> to order them a bit better and remove unsafeDefault
23:01:18FromGitter<alehander42> ok, i can put this in the RFC repo i guess
23:04:36Araqcool
23:05:33FromGitter<alehander42> oh man i can write rst in issues
23:05:37FromGitter<alehander42> cant*
23:05:46FromGitter<alehander42> i guess i have to PR it then
23:11:17rayman22201^ this is another cool feature I didn't even know was being worked on.
23:16:39FromGitter<alehander42> https://github.com/nim-lang/RFCs/pull/169/files
23:16:50FromGitter<alehander42> https://github.com/nim-lang/RFCs/pull/169/ *
23:16:52FromGitter<alehander42> ok
23:17:38Araqrayman22201: after we released 1.0 I thought "wait a sec, we can detect an ExecuteScriptingLayer effect but can't get 'nil' right..."
23:17:58Araq"that's just so wrong..."
23:20:50*krux02_ joined #nim
23:21:00rayman22201I agree. It also appeals to my "screw the Rust people" feelings :-P
23:23:07FromGitter<alehander42> to be perfectly honest, i expect i might still use sometimes nilable ref-s purely as an `option` alternative
23:23:18FromGitter<alehander42> but it be safe usage
23:23:38*krux02 quit (Ping timeout: 245 seconds)
23:24:17FromGitter<alehander42> would be *
23:24:30Araqgood night
23:28:44rayman22201gn
23:29:39FromGitter<alehander42> good night
23:30:53*Traviss__ quit (Quit: Leaving)
23:31:10*Traviss__ joined #nim
23:38:49sealmovecurious about this: https://github.com/nim-lang/Nim/issues/12287
23:39:08*krux02_ quit (Remote host closed the connection)
23:54:54sealmove!eval system.Inf
23:54:56NimBotCompile failed: /usercode/in.nim(1, 7) Error: expression '0x0000000000000000'f64' is of type 'float64' and has to be discarded
23:55:24sealmove!eval system.Inf == 0.0
23:55:26NimBotCompile failed: /usercode/in.nim(1, 12) Error: expression 'false' is of type 'bool' and has to be discarded
23:56:00sealmove!eval echo system.Inf == 0'f64
23:56:03NimBotfalse
23:56:59*traviss quit (Quit: Leaving)
23:56:59*Traviss__ quit (Quit: Leaving)