<< 29-06-2019 >>

00:01:03*lf-araujo quit (Ping timeout: 252 seconds)
00:01:44shashlick_@Araq: https://gist.github.com/genotrance/b835bd9318dadb7541c0db5d9fe45ec7
00:35:07dom96djazz: Why did you have to do this for Celeste?
00:36:07dom96Zevv: maybe you'd like to put that nim memory into an article for nim-lang.org? :)
00:46:36*envoyt joined #nim
00:50:39FromDiscord_<djazz> dom96: Celeste is a fun and quite known game!
00:51:30FromDiscord_<djazz> Why not?
00:51:31dom96Yes, I know. But why did you need to process its assets?
00:51:36dom96or why did you want to?
00:52:15FromDiscord_<djazz> RPi3 cant handle Celeste's 4096x4096 texture atlases
00:52:36FromDiscord_<djazz> Rpi3 supports max 2048x2048
00:52:50FromDiscord_<djazz> So I had to repack them
00:54:56FromDiscord_<djazz> Sorry I misread your first question
00:54:59FromDiscord_<djazz> I need sleep
00:55:05FromDiscord_<djazz> 3 am here now ..
01:10:06*lritter quit (Ping timeout: 258 seconds)
01:47:46*oculuxe joined #nim
01:48:49*oculux quit (Ping timeout: 258 seconds)
01:55:02*Senketsu_ joined #nim
01:58:12*Senketsu quit (Ping timeout: 272 seconds)
02:00:19*envoyt quit (Ping timeout: 258 seconds)
02:00:35*Snircle quit (Read error: Connection reset by peer)
02:01:27*Snircle joined #nim
02:03:52*JStoker quit (Read error: Connection reset by peer)
02:04:44*mrgaturus joined #nim
02:10:26*mrgaturus quit (Remote host closed the connection)
02:13:56*JStoker joined #nim
02:34:56*theelous3_ joined #nim
02:35:02*theelous3 quit (Ping timeout: 245 seconds)
02:38:21*sagax quit (Ping timeout: 244 seconds)
02:40:25*steshaw joined #nim
02:45:20*laaron- joined #nim
02:47:52*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
02:48:52*leorize quit (Ping timeout: 260 seconds)
02:49:35*leorize joined #nim
03:20:01*vlad1777d__ quit (Ping timeout: 248 seconds)
03:45:06*theelous3 joined #nim
03:49:37*theelous3 quit (Ping timeout: 245 seconds)
03:58:33*laaron- quit (Remote host closed the connection)
04:00:31*laaron joined #nim
04:00:58*actuallybatman joined #nim
04:10:30*laaron quit (Remote host closed the connection)
04:10:56*laaron joined #nim
04:28:12*dddddd quit (Read error: Connection reset by peer)
04:54:31*brett-soric joined #nim
05:09:11*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
05:39:27*hoijui joined #nim
05:40:10*brett-soric left #nim (#nim)
05:45:42*hoijui quit (Ping timeout: 252 seconds)
05:52:51*jmiven quit (Quit: co'o)
05:53:37*jmiven joined #nim
05:53:38*brakmic joined #nim
05:58:04*brakmic quit (Read error: Connection reset by peer)
05:58:14*solitudesf joined #nim
05:58:42*brakmic joined #nim
06:00:28*narimiran joined #nim
06:43:20*eterps joined #nim
07:00:00*gmpreussner quit (Quit: kthxbye)
07:04:26Zevvdom96: Let me see if I get to finish it first, lots to do still. But feel free to use it of course
07:04:40*gmpreussner joined #nim
07:10:02*actuallybatman quit (Ping timeout: 245 seconds)
07:14:39*eterps quit (Ping timeout: 250 seconds)
07:23:22*narimiran quit (Ping timeout: 245 seconds)
07:36:39*stefanos82 joined #nim
07:47:48*theelous3_ quit (Ping timeout: 272 seconds)
07:54:06*dwdv joined #nim
07:58:30*laaron- joined #nim
07:58:59*laaron quit (Remote host closed the connection)
08:49:50*NimBot joined #nim
08:51:36*cyraxjoe quit (Quit: I'm out!)
09:02:08*brakmic quit (Ping timeout: 245 seconds)
09:02:12*brakmic_ joined #nim
09:02:50*brakmic joined #nim
09:06:41*brakmic_ quit (Ping timeout: 248 seconds)
09:09:52*nsf joined #nim
09:10:20*tjmac joined #nim
09:16:48*natrys joined #nim
09:39:24*kungtotte joined #nim
09:43:34FromDiscord_<djazz> I am awake. Only 1 message in 9 hours? Hmm
09:45:33*fredrik92 joined #nim
09:46:05*fredrik92 quit (Remote host closed the connection)
09:46:10*freddy92 joined #nim
09:46:23*freddy92 quit (Client Quit)
09:50:53leorize@djazz: #11621 should take care of the leaky paths in the generated binary
09:51:22*Vladar joined #nim
09:52:26FromDiscord_<djazz> Yay
10:23:52*jokul quit (Ping timeout: 244 seconds)
10:27:46cfv[m]I remember I saw a good resource about type conversions in Nim but I can't recall where. Could someone send a link?
10:29:31*zyklon joined #nim
10:29:39ZevvMore nim terminology: the manual does not speak of scalar or compound/aggregate types. Are these the right terms to use in Nim lingo when referring to native types vs objects/tuples?
10:29:57FromGitter<alehander42> hm
10:31:52*uvegbot quit (Ping timeout: 246 seconds)
10:34:05cfv[m]<cfv[m] "I remember I saw a good resource"> Like string to int, char to int and so on
10:39:24FromGitter<alehander42> probably @kaushalmodi
10:39:26FromGitter<alehander42> s blog
10:39:47lqdev[m]Zevv: I just call them primitive types and compound types, no fancy terminology
10:39:53lqdev[m]I don't think there is any
10:42:24Zevvright
10:50:39*jokul joined #nim
10:52:45*sagax joined #nim
10:54:06*PMunch joined #nim
11:25:06FromGitter<kaushalmodi> @alehander42 Thanks for the ping.
11:25:26FromGitter<kaushalmodi> cfv[m]: You mean this? https://scripter.co/notes/nim/#representing-one-type-in-another
11:27:29*solitudesf quit (Ping timeout: 248 seconds)
11:31:53*lf-araujo joined #nim
11:43:59*stefanos82 quit (Quit: Quitting for now...)
11:53:07*sz0 quit (Quit: Connection closed for inactivity)
11:59:59FromGitter<Toshiyuki-Tega> Is there any way to compile in release mode with nimble? Something like `nimble install`, but I'd just like to build without installing the executable.
12:00:16PMunchnimble build -d:release?
12:00:46FromGitter<Toshiyuki-Tega> Oh, it works. Thanks :)
12:01:56PMunchNo problem, all the flags you pass to nimble build will just get passed on to the nim compiler
12:16:34*lf-araujo quit (Ping timeout: 252 seconds)
12:17:40*narimiran joined #nim
12:18:42*Snircle joined #nim
12:20:02*steshaw quit (Quit: Connection closed for inactivity)
12:24:37*lritter joined #nim
12:26:42*lf-araujo joined #nim
12:31:25*lf-araujo quit (Ping timeout: 250 seconds)
12:45:55*natrys quit (Ping timeout: 246 seconds)
12:46:06*nsf quit (Quit: WeeChat 2.4)
12:55:09*jchev joined #nim
12:57:36*natrys joined #nim
12:59:28jchevhi all, when i write (1..20) what type is it?
13:01:42jchevcurrently i have to call .toSeq before i can map the values, is there some other way to avoid the intermediate step?
13:05:34PMunchIt's a range
13:05:46PMunchBasically it's stored as the upper and lower limit
13:06:05PMunchWhat are you trying to do with it?
13:06:20*brakmic quit (Read error: Connection reset by peer)
13:06:48*brakmic joined #nim
13:09:02*brakmic_ joined #nim
13:09:52*clyybber joined #nim
13:11:19*stefanos82 joined #nim
13:12:18*brakmic quit (Ping timeout: 258 seconds)
13:15:41*xet7 quit (Quit: Leaving)
13:17:48ZevvIf anyone is bored and wants to do some early reviewing: http://zevv.nl/div/nim-memory.html
13:17:54*brakmic joined #nim
13:18:39ZevvI'm not sure if I'm happy with the RFC-style drawings, but that will do for now
13:18:50PMunchZevv, just a sec and I'll give it a read
13:19:03*xet7 joined #nim
13:19:05PMunchPeeked at it yesterday, and I like the RFC-style drawings :)
13:19:13*jchev quit (Ping timeout: 245 seconds)
13:19:39Zevvhehe
13:20:51xaceZevv: did you use a program to generate those drawings?
13:21:13xace*was a program used to draw them...
13:21:17*brakmic_ quit (Ping timeout: 245 seconds)
13:21:25*dddddd joined #nim
13:21:45*theelous3 joined #nim
13:22:22Zevvyeah, vi
13:22:43xacehehe okay
13:22:58ZevvThis is my default style, sometimes I feed them through ditaa or plantuml, but I don't particulary like the output of these
13:23:42ZevvI tried colorful hand drawings, which works quite well but it is a lot of work do right. It does raise my kids' interest though "Hey dad, what are you doing with my markers?!"
13:25:03xaceYeah I get it. I know i've been looking for a program to draw ascii diagrams with before but never managed to find something i was happy with... but I like the style of your post as it is now...
13:25:45ZevvI believe vim has some modes to make this easer to allow cursor movement beyond the end of line, but I always forget how to enable it
13:27:31xaceZevv: yeah, im aware of such things but to me it feels like suddenly im forcing my text editor to do things out of my designed workspace...
13:27:49Zevvthen you're using the wrong editor :)
13:28:24xacelol... nah i try to keep my vim as vanilla as possible...
13:28:45xaceso that when i move to another machine i dont feel too far away from home...
13:29:30PMunch:set ve=all
13:29:39PMunchve for virtualedit
13:29:59xaceim suppose to trim down the nim neovim plugin for regular vim, but i dont recall which computer i was working on when i made some changes...
13:30:29ZevvPMunch: yeah that was it, thanks
13:33:02leorize[m]xace: remove all the calls from ftdetect/nim.vim which will disable the nimsuggest integration
13:34:45xaceleorize[m]: Thanks Ill write it down incase i never find the version i had tinkered with
13:41:03*narimiran quit (Remote host closed the connection)
13:42:32PMunchNice explanation of a stack there Zevv, but maybe introduce the concept of a stack "frame" before the illustration? And make it clearer that temporary data is stored within the stack frame of the current procedure
13:43:06PMunchIt's kinda hard to read this kinda stuff when you know the details already, but I think that might not be obvious if you don't already know how this works
13:46:09*jchev joined #nim
13:50:28*jchev quit (Ping timeout: 245 seconds)
13:55:40Zevvyeah, same problem here. I originally intended to assume all that known to the reader, but then my first proof reader seemed to have only a global understanding of stacks and heaps, and I decided to put it all in
13:55:50Zevvgood catch about the stack frame, will change that
13:56:18Zevvand its just full of lies for sake of simplicity
13:57:17PMunchOh yeah, but it kinda has to be :P
13:57:35PMunchAfter all it's a short article about memory in Nim, not a course on computer architecture :P
13:58:38*clyybber quit (Quit: WeeChat 2.5)
13:59:23Zevvtrue :)
13:59:43Zevvand now I'll have a beer out in the shade
14:00:01PMunchBastard..
14:00:08PMunchHere it's raining and 3C degrees..
14:07:23FromGitter<rokups> im so good at breaking nim it seems πŸ˜† https://github.com/nim-lang/Nim/issues/11622
14:12:42stefanos82PMunch: where do you live, in North Pole or something?! O.o
14:12:46stefanos82here it's so darn hot
14:12:55stefanos8243+ Celsius
14:13:53*couven92 quit (Quit: Client disconnecting)
14:14:15FromGitter<rokups> is there a replacement for deprecated list comprehensions from sugar module? docs do not mention anything, nor do i find info in changelogs
14:18:26disrupteki use this for creating graphics in vi: http://nomnoml.com/
14:18:54*jchev joined #nim
14:21:03PMunchstefanos82, I live closer to the North Pole than to Paris..
14:21:19stefanos82PMunch: I'm in Cyprus, not Paris
14:21:24jchevsorry for slow reply
14:21:42PMunchI know, but Paris is closer to me than Cyprus
14:21:48stefanos82but yeah, the entire Europe is under super heatwave with lots of deaths and wildfires
14:21:54jchevi am solving project euler question 5 by breaking each number into its prime factors then combining the maximum number of each factor required
14:21:56jchevhttps://gist.github.com/jchevertonwynne/b782e16ef05e89dcd062dccf3c030051
14:22:14PMunchAnd at about the same angle from where I am
14:22:28PMunchstefanos82, not the entire Europe..
14:22:33PMunch(I'm in Europe)
14:22:35stefanos82so where are you exactly?
14:22:38stefanos82Finland?
14:22:38jchevas in to make 20 you need 2x2x5 and to make 8 you need 2x2x2. so you need minimum 3 2s to make somethign that has 20 and 8 as factors
14:22:44PMunchTromsΓΈ, Norway
14:22:50stefanos82ah cool
14:23:20jchevso i take 1..20, find the prime factors for all of those and combine them
14:23:25PMunchYes, very cool, about 3 degrees C..
14:23:30PMunch:P
14:25:10jchevso is there a way i can remove the .toSeq before i map the values?
14:27:18PMunchWell, you can probably use the list comprehension stuff from the sugar module
14:31:16PMunchOh wait, maybe not..
14:33:59PMunchI mean you could just do what map does: https://github.com/nim-lang/Nim/blob/master/lib/pure/collections/sequtils.nim#L223-L240
14:34:07PMunchOr implement that for iterators
14:34:40PMunchOr ranges rather, iterators don't have a length so you can't easily initialize the sequence
14:34:58leorize@rokups: use a for loop, it's superior :p
14:35:59jchevi was hoping for some way to avoid building all of a seq at once :(
14:36:32leorizewhat do you mean?
14:37:00jchevi was looking for some way to just generate the next value as i need it
14:37:10jchevrather than make a potentially big seq right at the start
14:37:28leorizeclosure iterator is what you want
14:39:46jchevjust updated my gist with a proc that returns an iterator that *should* run through a range but it fails on compilation 'Error: execution of an external compiler program 'clang -c -w -I/<path> -I/<path> -o <path>/test.nim.c.o <path>/test.nim.c' failed with exit code: 1
14:40:28jchevfunnily enough, it compiles if i remove the echo command from the end
14:40:40*nsf joined #nim
14:41:17*rockcavera quit (Remote host closed the connection)
14:41:25leorizelooks like a compiler bug
14:41:36leorizecan you file a bug report for this?
14:42:49jchevsure!
14:43:07jchevwhat's the process?
14:43:21leorizehttps://github.com/nim-lang/Nim/issues
14:43:34leorizethen click "new"
14:43:46leorizethere's a template available for this
14:44:17jchevthanks!
14:44:19*jchev quit (Quit: WeeChat 2.5)
14:44:35leorizealso, from what I can see here, your latest revision doesn't change anything from the prev...
14:44:45*nsf quit (Client Quit)
14:50:07leorize@rokups: here's a non-deprecated list comprehension: https://github.com/alehander42/comprehension
15:12:36PMunchZevv, slight mistake in the "Memory organization in Nim" section
15:12:58PMunchYou say that addr(x) and unsafeAddr(x) on an object of type T has a result of type addr T
15:13:06PMunchBut it's actually of type ptr T
15:13:24PMunchAnd you use the correct name in the next sentence
15:14:13*PMunch quit (Remote host closed the connection)
15:25:48*lritter quit (Read error: Connection reset by peer)
15:27:41*solitudesf joined #nim
15:50:37Zevvyeah right, thanks!
15:57:31ZevvMan. 3Β°C, that's quite a contrast. I guess the good thing of being where you are is that you can go out and sit in the shade 24 hours a day this time of year...
16:04:03*gmpreussner_ joined #nim
16:04:16*gmpreussner quit (Ping timeout: 268 seconds)
16:06:56FromGitter<kaushalmodi> Zevv: very cool to see your post on Nim memory.
16:07:08FromGitter<kaushalmodi> You converted our discussion into a real post :)
16:09:06FromGitter<kaushalmodi> I read the very early first draft yesterday. I see that now you have more figures, will give another read tonight. Thanks for putting this together.
16:10:11FromGitter<kaushalmodi> What does the "div" folder stand for?
16:12:20FromGitter<kaushalmodi> Zevv: that "maintains" word looks extra in "the program maintains needs to keep .."
16:20:23*actuallybatman joined #nim
16:23:04noonienare there any zero size types that i can pass as a generic parameter?
16:28:07leorize`void`?
16:30:58*Jesin quit (Quit: Leaving)
16:35:10*Jesin joined #nim
16:44:22disruptekZevv: this memory article is going to be a valuable contribution, thanks for taking the time to put it together. i would submit some PRs if you put it on github, where edits could be performed trivially right from the site.
16:46:47*eterps joined #nim
16:49:44Zevvkaushalmodi, good catch, wil fix
16:49:56Zevvdisruptek: it is on github, check the top of the document for the url
16:51:19Zevvkaushalmodi: /div is my autocleaning stash bin
16:51:22*eterps quit (Read error: Connection reset by peer)
16:51:35ZevvI put stuff in there, and it gets moved out automatically after 7 days
16:51:45Zevv'div' is of 'diversen', which is 'miscellanious' in dutch
16:52:33Zevvthe rest of my site is all outdated stuff, I should clean it up one day
16:56:58deech__Operationally is there a difference between 'proc f(i: static int):int {.compileTime.} = ...' and 'proc f(i:int):int {.compileTime.} = ...'?
16:57:30*obn07 joined #nim
16:58:13leorizeI think not
16:58:29disruptekoh duh, lol :-P
17:07:30FromGitter<deech> Currently static default arguments are evaluated whether they are used or not, so this will "launch the missiles" at compile time whether the function is called or not: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5d179ad2aa095d404cdf5a16]
17:08:15FromGitter<deech> A default argument should not be evaluated unless needed.
17:11:29FromGitter<deech> Not what I'm working on but came across it ...
17:28:10*nsf joined #nim
17:30:19deech__Static proc arguments also don't currently work: 'proc p(f: static proc(a,b:int):int)...'
17:34:03deech__But this does: type P = proc(a,b:int):int; proc p (f: static P) ....'
17:35:53deech__Once 1.0 is officially released people will run into these left and right.
17:36:02FromGitter<rokups> leorize thanks
17:37:37leorizedeech__: static[T] is an experimental feature
17:38:05leorizeI doubt people would touch it
17:38:30deech__It does not say that in the manual: https://nim-lang.org/docs/manual.html#special-types-static-t
17:39:18leorizelooks like the experimental annotation has been removed
17:39:42deech__leorize, I disagree. When C++ people see that Nim has compile time evaluation they will push on it.
17:40:05leorizestatic proc is a bit too much :p
17:40:17leorizeand people have already done compile time evaluation with Nim
17:40:53deech__I meant the larger population of C++ devs, those who will only try it if it's 1.0.
17:41:23leorizeiirc Araq disliked static[T]
17:42:09leorizeand static[T] is not even CTFE
17:42:30leorizeit's really misleading
17:42:47deech__leorize: it is though, https://gitter.im/nim-lang/Nim?at=5d179ad2aa095d404cdf5a16
17:43:08leorizeproc smt(param: static int) means that everytime the `smt` proc is called the compiler will generate a version with that parameter inlined
17:44:01leorizeyes, it evaluates the parameter at compile time
17:44:08leorizebut it won't generate the result at compile time
17:44:10*obn07 quit (Ping timeout: 268 seconds)
17:44:17leorizeit will generate a proc with that parameter inlined instead
17:45:47deech__I agree with Araq that it needs to go away.
17:47:14leorizeas of currently I think @mratsim is static[T] biggest user
17:48:20leorizeI'd say that static expressions and blocks are great, but static param is terrible
17:48:39deech__Yep, agree.
17:51:05*ertp07 joined #nim
17:52:06leorizethe compiler should also try to evaluate more stuff at compile time imo, but it might not be as easy as I would think
17:57:48deech__That would be nice but I'm happy to have to explicitly do that if it means sound semantics and a simpler compiler.
18:02:10*lf-araujo joined #nim
18:02:13FromGitter<danielecook> having trouble posting on the forum
18:04:31FromGitter<danielecook> I'm putting together a CLI tool for working with datasets similar to XSV (https://github.com/BurntSushi/xsv) and wanted to get feedback on it if anyones interested in taking a look: https://github.com/danielecook/tut/tree/development. Hope to build out added functionality and unique tools. Currently it's quite a bit slower than xsv though and hoping to speed it up.
18:04:44FromGitter<Varriount> @danielecook What problem are you encountering?
18:06:00FromGitter<danielecook> with regard to the forum - when I click create thread nothing happens
18:06:14FromGitter<Varriount> Hm. Do you have JavaScript enabled?
18:06:34FromGitter<danielecook> `Failed to load resource: the server responded with a status of 400 ()`
18:06:38FromGitter<danielecook> yes
18:06:48FromGitter<Varriount> Hm, odd
18:07:06FromGitter<danielecook> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5d17a8cada128007c694039f]
18:07:52*SenasOzys joined #nim
18:11:38FromGitter<Varriount> What browser are you using?
18:12:34FromGitter<Varriount> @danielecook I'm able to create a post.
18:13:34FromGitter<Varriount> Could you put the raw text (title and body) in a gist/paste service? One theory is that the server is choking on some piece of formatting
18:18:04*laaron- quit (Quit: ZNC 1.7.1 - https://znc.in)
18:18:34*laaron joined #nim
18:20:22*tjmac left #nim ("-bye")
18:22:36*actualman joined #nim
18:24:15*actuallybatman quit (Ping timeout: 268 seconds)
18:32:19FromGitter<danielecook> ah hah!
18:32:20FromGitter<danielecook> {"errorFields":[],"message":"You need to confirm your email before you can post"}
18:32:27FromGitter<danielecook> But I don't see that message anywhere
18:33:21FromGitter<danielecook> I also don't have any email to confirm..lemme look in settings
18:36:37lqdev[m]GitHub Nim syntax highlighting is broken: https://github.com/liquid600pgm/planet-overgamma/blob/rapid/src/planet_overgamma.nim#L40 only highlights `&` after strings, but not other tokens'
18:46:36*nsf quit (Quit: WeeChat 2.4)
18:46:36*ertp07 quit (Read error: Connection reset by peer)
18:48:04*lf-araujo_ joined #nim
18:51:32*lf-araujo quit (Ping timeout: 272 seconds)
18:51:33*lf-araujo_ is now known as lf-araujo
18:55:49*SenasOzys quit (Remote host closed the connection)
19:05:56dom96yeah, there are multiple bugs in GitHub's syntax highlighting of Nim
19:06:02dom96AFAIK it uses the Sublime Text highlighter
19:06:08dom96We need to collect these bugs somewhere
19:15:46lqdev[m]does `json.to` support default values?
19:18:38dom96nope
19:18:54dom96but you can have optional values, and then use `get` on them with a default value
19:19:11*lf-araujo quit (Quit: lf-araujo)
19:21:37*lf-araujo joined #nim
19:24:48*ertp07 joined #nim
19:26:56lqdev[m]nice, that should do the trick
19:35:23zestyr_dom96: https://github.com/github/linguist
19:35:33*zestyr_ is now known as zestyr
19:43:23FromGitter<palash25> If I want to refer to a field in my object as a table type, what is the correct syntax for that? ⏎ ⏎ Lets say I want to do this ⏎ ⏎ ```type ⏎ Cache ref object of RootObject ⏎ ttl: int ⏎ objectDict: Table``` ... [https://gitter.im/nim-lang/Nim?at=5d17bf5b490abf627a4294ca]
19:44:37leorizejust like for when you create a table, use: `Table[<type for key>, <type for value>]`
19:47:04FromGitter<palash25> thanks πŸ‘
20:10:51FromGitter<palash25> ok so I did that ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ this gives me an error `type mismatch: got <Table[system.string, system.string], string, string>` [https://gitter.im/nim-lang/Nim?at=5d17c5cbddd2c007c72cec0c]
20:11:04FromGitter<palash25> on the last line
20:11:14*moigagoo joined #nim
20:11:56leorizeif you want to mutate a table, change CacheMap to `var CacheMap`
20:12:37FromGitter<palash25> but I wanted CacheMap as an object to be able to define methods on it
20:13:08leorizeI mean changing `self: CacheMap` to `self: var CacheMap`
20:13:16leorizewhich is needed to modify the parameter
20:13:27FromGitter<palash25> oh
20:14:35dom96You might want to change CacheMap to be a ref
20:15:51FromGitter<palash25> you mean `CacheMap = ref object of RootObject` something like that? sorry for the silly questions, just started Nim today πŸ˜…
20:16:49leorizeyou might want to read the manual a few times :p
20:17:09leorizeI believe you come from Go, right?
20:17:26FromGitter<palash25> yeah I know, I have been a little impatient so I jumped straight into writing a small lib
20:17:38FromGitter<palash25> yup mostly Go and previously python
20:18:02dom96palash25: yep, that's what I mean :)
20:18:58leorize@palash25 the capitalized proc name is a dead giveaway :p
20:19:23leorizeusually in Nim we only capitalize the type name and constants
20:19:55FromGitter<palash25> oh yes πŸ˜… been writing too much Go lately πŸ˜„
20:19:56leorizesee https://nim-lang.org/docs/nep1.html for a style guide
20:20:49leorizethis might also be useful: https://github.com/nim-lang/Nim/wiki/Nim-for-Python-Programmers
20:21:13FromGitter<palash25> I am installing the vs code plugin to warn me for such stylistic errors
20:22:01leorizeI don't think it will
20:22:38leorizeunlike Go we don't have a concrete format like `gofmt`
20:23:01leorizethere's a `nimpretty` tool in development, but I'm not even sure what it does
20:23:22*lf-araujo quit (Ping timeout: 246 seconds)
20:23:56FromGitter<palash25> that sucks, but I can understand that language is still pretty young so the tooling will take time to mature, nvm will keep referring to the style guide till then
20:24:00FromGitter<palash25> thanks for all the help
20:24:55*abm joined #nim
20:25:14leorizefwiw nim is older than go :P
20:26:07FromGitter<JasperJenkins> There is `--styleCheck:hint`
20:26:13FromGitter<kaushalmodi> nimpretty acts like gofmt
20:26:36FromGitter<kaushalmodi> just try it out..
20:26:39leorizeI'm not sure, last time I tried it didn't camelCase everything for me :p
20:26:59FromGitter<kaushalmodi> it does do a lot of other things though
20:27:11FromGitter<kaushalmodi> indenting lines to 2 spaces, etc.
20:27:21FromGitter<palash25> > *<leorize>* fwiw nim is older than go :⁠P ⏎ ⏎ what? didn't know that.
20:27:57FromGitter<kaushalmodi> look at the amount of tests for nimpretty: https://github.com/nim-lang/Nim/tree/dd252ce640c7f624acc08a6702193ec15fd7359b/nimpretty/tests
20:28:36FromGitter<kaushalmodi> it takes this ( https://github.com/nim-lang/Nim/blob/dd252ce640c7f624acc08a6702193ec15fd7359b/nimpretty/tests/exhaustive.nim ) and converts to https://github.com/nim-lang/Nim/blob/dd252ce640c7f624acc08a6702193ec15fd7359b/nimpretty/tests/expected/exhaustive.nim
20:30:59leorizeit needs to be better at indenting though, because my nim.nvim plugin has already beat it to an extent :p
20:32:04*Vladar quit (Remote host closed the connection)
20:34:53*abm quit (Quit: Leaving)
20:35:02*steshaw joined #nim
20:35:22shashlick_@Araq - appreciate a review when you get a chance
20:35:26shashlick_https://gist.github.com/genotrance/b835bd9318dadb7541c0db5d9fe45ec7
20:35:46shashlick_Shared string and seq
20:36:17shashlick_Still very early times and inefficient but a good foundation
20:36:41FromGitter<arnetheduck> if anyone wants to work on nimpretty, the state of the art can be found in `clang-format` and `yapf` which use scoring-based formatting - basically, it assigns costs to different variations for line breaks and chooses the one with the lowest cost, resulting in really good handling of tricky stuff
20:37:34FromGitter<arnetheduck> https://github.com/google/yapf#algorithm-design
20:53:28*actualman quit (Ping timeout: 246 seconds)
21:01:19FromGitter<arnetheduck> Araq, which of `system.hostOs` and `system.platform.targetOS` and `when defined(XXX)` is the official way of detecting for which os the code is being compiled for?
21:04:32Zevvshashlick_: why do you do locking at the global level instead of on the sharedObj? And convention is type names start with a capital, so that would be SharedObj I guess :)
21:05:12FromDiscord_<djazz> My first public nim code ^^ https://github.com/daniel-j/celeste-textureshrinker
21:05:56Zevv\o/
21:06:33*laaron quit (Remote host closed the connection)
21:06:34lqdev[m]wow, I didn't know you could run Celeste on an RPi :o
21:08:20*laaron joined #nim
21:08:50FromDiscord_<djazz> https://youtu.be/iTBUNb6IKHo
21:08:56*nolanv quit (Quit: WeeChat 2.4)
21:09:08FromDiscord_<djazz> I just finished writing the guide for it ^^
21:10:28Zevvplatformers were never my thing, but I've heard celeste is worth a try
21:10:40lqdev[m]it totally is
21:10:57lqdev[m]it's so great I played through it multiple times
21:11:25FromDiscord_<djazz> yeah its great
21:14:07*laaron quit (Remote host closed the connection)
21:14:29*laaron joined #nim
21:20:43FromGitter<arnetheduck> also interestingly, compiler/platforms supports more cpu's than system.nim ... hmm ...
21:22:43*dwdv quit (Quit: quit)
21:25:04*brakmic quit ()
21:44:01*ertp07 quit (Ping timeout: 248 seconds)
21:45:19*ertp07 joined #nim
21:46:40*actualman joined #nim
21:53:11FromDiscord_<djazz> lqdev[m]: https://hackmd.io/@djazz/HyMRXfreS
21:55:28*solitudesf quit (Ping timeout: 245 seconds)
22:05:20*ertp07 quit (Ping timeout: 272 seconds)
22:24:24*lritter joined #nim
22:32:15*natrys quit (Quit: natrys)
22:44:09*steshaw quit (Quit: Connection closed for inactivity)
23:41:35shashlick_Thanks Zevv makes sense - any other suggestions?
23:43:33*actualman quit (Remote host closed the connection)
23:43:41shashlick_Actually I have a global lock since the sharedString can be copied across threads, only the ssptr is shared
23:43:56shashlick_And you cannot access the ssptr without a lock
23:44:19*actualman joined #nim
23:44:33shashlick_So only place would be a global array of locks of anything
23:44:39*actualman is now known as actuallybatman
23:44:47shashlick_If
23:44:58*actuallybatman quit (Client Quit)
23:53:37*lritter quit (Ping timeout: 258 seconds)