<< 10-05-2019 >>

00:10:12*abm quit (Quit: Leaving)
00:17:15*stefanos82 quit (Remote host closed the connection)
00:56:08*cyberjpn joined #nim
01:36:35FromGitter<arnetheduck> thanks for those fixes clyybber
01:47:49*dddddd quit (Remote host closed the connection)
02:00:16*banc quit (Quit: Bye)
02:13:47*cyberjpn quit (Ping timeout: 246 seconds)
02:17:15*rnrwashere joined #nim
02:22:35*deech joined #nim
02:22:40*banc joined #nim
03:00:05*I_Right_I joined #nim
03:02:41*rnrwashere quit (Remote host closed the connection)
03:06:22I_Right_Ihey all, I have been away for a while how's the new runtime coming along?
03:25:49*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
03:32:17*kapilp joined #nim
03:33:40*rnrwashere joined #nim
03:35:36*rnrwashere quit (Remote host closed the connection)
03:36:18*rnrwashere joined #nim
03:40:30*cyberjpn joined #nim
03:40:32*rnrwashere quit (Ping timeout: 252 seconds)
03:49:59*cyberjpn quit (Ping timeout: 258 seconds)
04:02:24*cyberjpn joined #nim
04:31:14*nsf joined #nim
04:39:02*deech quit (Ping timeout: 246 seconds)
04:43:01*cyberjpn quit (Ping timeout: 246 seconds)
05:09:46*narimiran joined #nim
05:36:57*cyberjpn joined #nim
05:58:35*solitudesf joined #nim
06:07:15*krux02 joined #nim
06:18:55FromGitter<kayabaNerve> Anyone online who knows concepts?
06:19:28FromGitter<kayabaNerve> I'm trying to redo an object hierarchy with a case statement to remove casting. That said, I want to be able to differentiate in my function arguments.
06:19:47FromGitter<kayabaNerve> I figured if I used a concept, I could have a master object with a case, but concepts for each `of`.
06:20:09FromGitter<kayabaNerve> ```type Sub* = concept e ⏎ e is Entry ⏎ e.descendant == EntryType.Sub``` [https://gitter.im/nim-lang/Nim?at=5cd51819da34620ff9172f7d]
06:20:37FromGitter<kayabaNerve> The first line (e is Entry) works fine. The second line says non matching candidates for ==
06:20:44FromGitter<kayabaNerve> (EntryType is an enum)
06:21:08FromGitter<kayabaNerve> I tried running ord, but then it said int didn't have a matching candidate, but it did suggest an enum compatible ==
06:21:20FromGitter<kayabaNerve> Going back to the enum version, no enum == shows up as an hint
06:21:57FromGitter<kayabaNerve> So is there a way to name my subtypes yet remove casting?
06:25:07*PMunch joined #nim
06:27:35FromGitter<kayabaNerve> Does Nim just not detect well enough that a case variable in a type is static?
06:30:58FromGitter<kayabaNerve> Ah. You can only set a case field once, but it doesn't have to be set when you issue the object. Plus, this is a runtime check anyways. My bad.
06:34:39PMunchYou're playing with concepts kayabaNerve?
06:37:46FromGitter<kayabaNerve> Not anymore; now trying static generics and when statements
06:38:10PMunchAha, what problem are you actually trying to solve?
06:38:12FromGitter<kayabaNerve> I don't care how I do it; I just want hierarchical objects and named subtypes
06:38:53FromGitter<kayabaNerve> But of course, this lib I use for access safety doesn't support when statements in types...
06:38:54*I_Right_I quit (Read error: Connection reset by peer)
06:38:57FromGitter<kayabaNerve> Casualty of war?
06:39:55PMunchWait, what do you mean with when statements?
06:40:41PMunchIt sounds like you want to do something like the JSON module does?
06:40:43FromGitter<kayabaNerve> https://pastebin.com/86MpvNYV
06:41:38FromGitter<kayabaNerve> I must say, I hate pure. It no longer does what it used to do, which I wish it did, BUT it still does something. I have code that refuses to compile without it.
06:41:52FromGitter<kayabaNerve> Eh. May be fixed by now. I wrote this code during 0.18/0
06:41:59PMunchYeah.. I agree, pure should've been kept as is
06:42:19FromGitter<kayabaNerve> That said, I have a Mint field in my enum, and I now can't name a type Mint = Entry[EntryType.Mint]
06:42:20PMunchSo why don't you just have a descendant field and a case statement?
06:42:32FromGitter<kayabaNerve> Because then I can't name the subtypes
06:42:32PMunchOoh
06:42:34PMunchI see
06:42:35PMunchYeah
06:42:46FromGitter<kayabaNerve> So I tried concepts, but I realize how it's runtime
06:42:52FromGitter<kayabaNerve> So now I'
06:43:05FromGitter<kayabaNerve> *I'm trying Generics, but now my enum has scope issues
06:44:12FromGitter<kayabaNerve> I had an enum value of mint, and a type named mint, which worked fine. Doesn't anymore.
06:44:36FromGitter<kayabaNerve> May be because I removed some wrapper code, but said wrapper code broke when I added the when statements.
06:45:12FromGitter<kayabaNerve> I'll likely rewrite said lib next week. Friend did it as a favor months ago and he's maintained it faithfully, but he has school and all that.
06:45:18FromGitter<kayabaNerve> Has saved me quite a few times, ngl
06:47:18*cyberjpn quit (Ping timeout: 244 seconds)
06:47:26FromGitter<kayabaNerve> PMunch: So I did solve that problem, but I have another one if you have a sec
06:47:46FromGitter<kayabaNerve> I do think this is impossible though. Can I save the enum value used to create in a generic?
06:48:20FromGitter<kayabaNerve> Like if I create a type which is a generic, which takes in a static int, can I later retrieve said int without reverse calculating it?
06:48:38FromGitter<kayabaNerve> I rather not randomly test fields until I figure out what I'm dealing with.
06:49:34PMunchkayabaNerve: http://ix.io/1Iz5/Nim
06:50:09PMunchJust something I tried to test your initial thing
06:50:22PMunchIt seems like you can pass in the value of a field as a generic parameter
06:52:58PMunchAh wait..
06:53:14PMunchThat was just because the descendants was defaulted to 0 -> Mint
06:54:12PMunchConfusingly this also compiles: http://ix.io/1Iz6/Nim
06:54:35PMunchThe first echo prints 0, the second prints [0, 0, 0, 0, 0, 0]
06:54:43FromGitter<kayabaNerve> Yeah, I think you have to reverse calculate it or double set it
06:54:48PMunchSo myInt is both a field and a variable in this context :S
06:55:20FromGitter<kayabaNerve> `case descendant: EntryType = descendant` RFC?
06:55:44FromGitter<kayabaNerve> Save generic variables to a field in the generic?
06:55:52FromGitter<kayabaNerve> As we've demonstrated, this is a valid feature
06:55:57PMunchHmm, I think it's possible to get those
06:56:01FromGitter<kayabaNerve> There are reasons to use it
06:56:18FromGitter<kayabaNerve> I think you have to reverse engineer, double set, or macro that expands to a double set
06:56:26FromGitter<kayabaNerve> For now, I'm just going to double set
07:00:00*gmpreussner quit (Quit: kthxbye)
07:03:05Mister_Magistercan i install package using nimble directly from github? aka changes that aren't yet in next release
07:03:35Araqyeah via 'nimble develop'
07:04:01Mister_Magisterthank you!
07:04:47*gmpreussner joined #nim
07:06:10*jjido joined #nim
07:06:25FromGitter<kayabaNerve> PMunch: Want to hear something ironic?
07:06:53FromGitter<kayabaNerve> I actually have a function which takes in an Entry, regardless of its subtype, so I think I need a concept to match the master type
07:07:20FromGitter<kayabaNerve> Am I using Nim correctly?
07:07:38*jjido quit (Client Quit)
07:07:52PMunchHaha, yeah it seems like you're trying to do something that's not supposed to work
07:08:55narimiranMister_Magister: `nimble install packagename@#head`
07:09:19Mister_Magisteralso thanks
07:09:51FromGitter<kayabaNerve> I think I'm trying to do something reasonable that Nim tries to make easy on the individual part level, but not with the complex interactions I'm requiring
07:10:06FromGitter<kayabaNerve> Which is cast-less named sub-types that don't destroy the master type
07:10:56FromGitter<kayabaNerve> We have cast-less sub-types with no names but the master type, cast-less named-subtypes which destroy the master type...
07:11:02FromGitter<kayabaNerve> C++ would just yell CAST! and walk away
07:13:53Araqinstead of
07:14:08Araqof enumValue: fieldA, fieldB: T
07:14:10Araquse
07:14:26Araqof enumValue: s: Subobject
07:14:49Araqand when the proc only accepts Subobject, well you can then write that down
07:15:09FromGitter<kayabaNerve> I'm not using case at all right now. I moved on to Generics.
07:15:22FromGitter<kayabaNerve> But thank you for the input :D
07:15:32Araqok, well now you know
07:15:45FromGitter<kayabaNerve> That said, now my Generic is saying it can't generate code, and I don't know when that started.... :thinking:
07:16:10FromGitter<kayabaNerve> It's not that I want to merge fields. It's that my entries into my DB have different fields depending on their types.
07:16:19FromGitter<kayabaNerve> Taking in a subtype on its own would be meaningless to me.
07:20:53Araqwell if in doubt, use more json :P
07:21:38FromGitter<kayabaNerve> I'm not using any here actually :thinking: Maybe that's my problem.
07:22:01FromGitter<kayabaNerve> The concept won't let me generate code. I think I need a case statement object with inlined getters.
07:22:19FromGitter<kayabaNerve> If this succeeds, I think I unlock some chakra and become the next Buddha.
07:23:46*dddddd joined #nim
07:24:08Araqthe 'case object' quickly becomes another json, esp in the context of "databases"
07:26:26FromGitter<kayabaNerve> It's a RAM cache saved to a key/value integrated DB known as LMDB
07:27:40FromGitter<kayabaNerve> So a concept doesn't work. I tried EntryWrapper with a case statement, and that saves potentially any Entry, but you still need a switch at that switch still needs to call get. Is a get any less ugly than a cast?
07:28:05FromGitter<kayabaNerve> And Nim won't let me write a generic get, as it shouldn't.
07:28:16FromGitter<kayabaNerve> And as these are run time values, I can't write a macro.
07:30:32FromGitter<mratsim> if you have a static int in a type say type Foo\[N: static int\] = object you can retrieve it with x.N
07:31:08FromGitter<mratsim> you have plenty of example in our libraries like Stint where we parametrize types with "bits"
07:31:38FromGitter<kayabaNerve> Yet you can also declare a field in Foo of N without causing an error?
07:31:51FromGitter<kayabaNerve> I assume the field takes precedence based on PMunch and I's tests?
07:31:51FromGitter<mratsim> https://github.com/status-im/nim-stint/blob/6853ebe97c21426952ce64c2df6278514797dc3f/tests/test_io.nim#L150-L158
07:32:11FromGitter<mratsim> ah seems like you should raise a bug
07:39:35*cyberjpn joined #nim
07:44:19narimiranany last wishes for some fix to be included in v0.19.6?
07:44:35*solitudesf quit (Ping timeout: 258 seconds)
07:55:59FromGitter<mratsim> we can always have 0.19.8 next week ;)
07:56:35FromGitter<mratsim> where is the tentative branch?
07:58:28FromGitter<mratsim> I guess 0.20 is at least in a month: https://github.com/nim-lang/Nim/issues/7041
08:01:37narimiranhttps://github.com/nim-lang/Nim/commits/version-0-19
08:02:18narimiran(two more backports need to be pushed, i've just backported them)
08:05:46*stefanos82 joined #nim
08:08:10*clyybber joined #nim
08:08:24FromGitter<mratsim> There are some VM int/uint computations that are wrong and I believe are in the backports
08:10:40FromGitter<mratsim> I think this is quite important but actually not in a PR :/ https://github.com/nim-lang/Nim/issues/11138
08:11:47FromGitter<mratsim> so yeah nothing much but fixing that bug warrants an 0.19.8 later
08:12:11narimiranisn't that something for 0.20?
08:13:31FromGitter<mratsim> different result between runtime and compile-time is backport worthy for me
08:19:11*cyberjpn quit (Ping timeout: 246 seconds)
08:22:38*traviss quit (Quit: Leaving)
08:42:18Mister_Magisterim writting bot for telegram and i'm starting to fell in love with nim
08:42:55*xet7 joined #nim
08:46:07*cyberjpn joined #nim
08:49:04Mister_Magistersimple echo bot in nim compared to bot in python is like 100x lighter
08:50:01dom96:D
08:50:29dom96Please share this far and wide via twitter/blog posts or otherwise :)
08:51:17Mister_Magisterya bet i will
08:51:40Mister_Magisterquestion "photo*: Option[seq[PhotoSize]]" what is seq?
08:51:57narimiranMister_Magister: similar to python's list
08:52:09narimiranMister_Magister: but it can't be heterogeneous
08:52:12Mister_Magisteri don't know python so that's not helpful
08:52:16Mister_Magisterarray?
08:52:36narimiranah, i though you're coming from python, based on that comment couple of minutes ago, sorry
08:53:26FromGitter<mratsim> seq is sequence, it's variable size container with all elements of the same type
08:53:27narimiranMister_Magister: https://narimiran.github.io/nim-basics/#_sequences
08:53:32FromGitter<mratsim> an array is fixed sized
08:53:49Mister_Magisternarimiran: nah i understand
08:53:52Mister_Magisterso is it like array?
08:54:02FromGitter<mratsim> similar except that it can be resized
08:54:08Mister_Magisterah
08:54:09narimiranMister_Magister: i would recommend you to go through the whole Nim Basics, based on the questions you asked yesterday and today
08:54:10Mister_Magisterso like vector in c++
08:54:15FromGitter<mratsim> yes
08:54:15Mister_Magisteror QList
08:54:25Mister_Magisternarimiran: sorry
08:54:33FromGitter<mratsim> implementation and perf is similar to std::vector
08:55:05FromGitter<mratsim> but interface has better name than "emplace_back" and all that jazz :p
08:55:26narimiranMister_Magister: no need to be sorry :) i just think you'll find there answers for some of your questions, and it might clear some things up
08:56:20Mister_Magisterokay o7
09:04:51*laaron quit (Remote host closed the connection)
09:06:34*laaron joined #nim
09:07:08*cyberjpn quit (Ping timeout: 245 seconds)
09:11:30FromGitter<sheerluck> hi all, is there some page about blocker bugs preventing release? https://i.imgur.com/HWwriN7.png
09:12:08Araqyup, these are called 'showstopper' bugs and are tagged as such
09:19:00FromGitter<sheerluck> @Araq single 'showstopper' https://github.com/nim-lang/Nim/issues/9825 appears to be fixed in 0.19.4
09:21:54*laaron quit (Remote host closed the connection)
09:24:27*laaron joined #nim
09:26:27dom96If you guys need help with the release this weekend, I can commit /some/ time to it
09:30:04Araqyou all like discussing package managers, don't you, so please give me some feedback: https://github.com/nim-lang/nimble/issues/653
09:30:21AraqI'm sure I've overlooked some potiential issues
09:30:51Araqfor example, what if the git repo hosts multiple nimble packages?
09:31:23Araqnot sure if that's even supported though
09:31:28narimirandom96: nice, i'll ping you if necessary
09:33:08narimiran@mratsim nice to hear that the 8-char outlier is only on my machine!
09:33:29FromDiscord_<exelotl> woww I just lost a lot of time because I assumed del and delete were synonymous :'(
09:33:35dom96Araq, it is
09:34:18narimiranbut, just to make sure, in your script you have `StringSize = 9` — you tested it also with `StringSize = 8`, right?
09:34:26FromGitter<mratsim> yes of course
09:34:49narimiran@mratsim i never know with you and off-by-one errors :P :D
09:35:03FromGitter<mratsim> @narimiran that was off-by-2 :p
09:35:23FromGitter<mratsim> @dom96 interesting, do you have an example of multi-nimble package in one repo?
09:35:25narimiranexelotl: that is now even highlighted in the overview https://nim-lang.github.io/Nim/system.html#system-module-seqs :)
09:36:13narimiran@mratsim i hope you realize i'll ride that horse for quite some time, because this is my once-in-a-lifetime chance to do it :)
09:37:10FromGitter<mratsim> it's not once in a lifetime, I often got off-by-one when implementing division for bigints :/
09:37:48FromGitter<mratsim> this was super tricky: https://github.com/status-im/nim-stint/blob/master/stint/private/uint_div.nim#L146-L152
09:38:08narimiranmight be, but usually all i can do when i look at your code is: shut up and learn from it
09:38:21FromDiscord_<exelotl> narimiran ah thanks, it's good to see how the new docs are shaping up x)
09:40:11FromGitter<mratsim> by the way, when timing the hash, if the proc is fast you should use a template or enforce {.nimcall.} if you pass it to a proc
09:40:33FromGitter<mratsim> sometimes you get closures and their construction will mess up your benchmark
09:41:14FromGitter<mratsim> hash is slow so it's fine but if you wanted to time addition, you need template for sure
09:43:47leorize[m]should the compiler be able to detect automatically if a closure is needed?
09:44:23Araqthe compiler does that
09:54:01dom96narimiran: Those docs are beautiful!
10:01:27Mister_Magister!eval var sth = "e"; var s = sth & "\n"
10:01:29NimBot<no output>
10:01:35Mister_Magisterhmm
10:02:05Araq!eval var sth = "e"; var s = sth & "\n"; echo s
10:02:07NimBote↵
10:04:15*Vladar joined #nim
10:05:04Zevvnarimiran: you should move those nim-basics CSS's into the normal nim docs
10:22:05*abm joined #nim
10:26:45clyybber!eval var sth = @[2, 2]; echo repr sth
10:26:47NimBot0x7fd6ae4f2048[2, 2]↵
10:27:01clyybberhuh, I really thought it would emit
10:27:03clyybber@
10:27:59clyybber!eval var sth: seq[int]; sth.add 1; echo repr sth
10:28:01NimBot0x7f4644868048[1]↵
10:41:27*xet7 quit (Read error: Connection reset by peer)
10:45:53*abm quit (Quit: Leaving)
10:46:34*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
10:46:48*laaron- joined #nim
10:48:54*avsej quit (Quit: Quit)
10:49:03*avsej joined #nim
10:49:03*avsej quit (Changing host)
10:49:03*avsej joined #nim
10:55:01Zevvrepr doesn't
10:56:54Zevvclyybber: http://p.zevv.nl/?bb0a :)
10:58:10*laaron- quit (Quit: ZNC 1.7.1 - https://znc.in)
10:58:51Mister_Magisterquestion. if i want to receive and parse simple json from url what is the simplest way of doing it?
10:59:39ZevvMister_Magister: https://nim-lang.org/docs/httpclient.html
11:00:14Mister_MagisterThanks another question. If i want to get random line from file?
11:00:23*laaron joined #nim
11:00:40Mister_Magisterwithout loading whole file into memory ofc
11:01:11ZevvRead lines, and for each line make a random choice of 1/lineno to keep the new line
11:01:42Mister_Magisterbut how do i get number of lines
11:01:50Mister_Magisteror i don't follow
11:05:47ZevvYou don not need the number of lines in advance, it's a simple statistics thing
11:05:54ZevvMister_Magister: http://p.zevv.nl/?dd04
11:07:02Mister_Magisterinteresting
11:09:18clyybberZevv: I see, somehow deech's comment really confused me
11:09:40Mister_MagisterZevv: but it's possible that result of that will be none
11:09:59Zevvthen I have a off by one error somehwere, I didn't test it properly
11:10:21ZevvThe algorithm is basically: on the first line, you should have 100% chance to keep it. On the second 50%, third 33%, etc
11:11:15ZevvMister_Magister: one sec, I'll fix it
11:13:08Zevvhttp://p.zevv.nl/?3174 fixed
11:14:00Zevvclyybber: maybe a good idea to fix repr for this, the @ is the expected behaviour imho
11:15:15Mister_Magisterso it will overwrite everytime it's 0
11:16:06narimirandom96: thanks :)
11:16:30narimiranZevv: "you should move those nim-basics CSS's into the normal nim docs" -> i'll take that as a compliment :)
11:16:56Zevvit is :)
11:17:12Zevvit's modern and looks sexy
11:17:29Mister_Magisteryeee
11:17:42Mister_Magisteras a web developer i aproove
11:18:41narimiranthank you :) (and i'm complete newbie in those kinds of things)
11:19:25Mister_Magisteri have another "you should read docs" question. if i read file using readFile and have tainedstring how do i count lines in it
11:19:27Zevvclyybber: https://github.com/nim-lang/Nim/pull/11224
11:19:30narimiranbtw, the previous version of nim docs CSS was such a monstrosity (NHF to anyone). currently is....... a bit smaller monstrosity :)
11:20:17ZevvMister_Magister: that kind of depends on what you define a 'line' as. Generally, it's a sequeonce of zero or more characters separated by '\r' or '\r\n'
11:20:36Mister_Magisterso i have to count all "\n"
11:21:00Zevvplus one
11:21:11narimiranMister_Magister: `readFile(file).splitlines`
11:21:26Mister_Magisternarimiran: what is that
11:21:39narimiranthe solution :)
11:21:52Zevv*a* solution
11:21:58Zevvhe wants to *count* lines
11:22:01FromGitter<jrfondren> adding one assumes that the last line doesn't have a newline, which is uncommon ... but not rare? depends on editors. I'd say, count all \n and add one if there's anything after the last \n
11:22:05Mister_Magisterah splits string lines into sequence
11:22:20Mister_MagisterZevv: good enough i just need to get count of sequence
11:22:22Mister_Magisterand random number
11:22:27FromGitter<jrfondren> this is also the number you would get from a simple split
11:23:01ZevvYeah. Minus the overhead of creating a zillion strings that you throw away
11:24:42Mister_Magisterone last question. how do i get number of elements in sequence? can't find docs
11:24:50Zevv.len
11:24:52Zevvor len()
11:25:16Mister_Magisterthanks
11:25:48Zevvit is in the docs: https://nim-lang.github.io/Nim/manual.html#types-array-and-sequence-types says: "The length may be received by len()"
11:27:14Mister_Magisterjokes[rand(jokes.len)]
11:27:21Mister_Magistergets random element
11:28:02Zevvthat's *old*. In the 70's they got that on unix systems, its called "fortune" :)
11:28:47FromGitter<jrfondren> !eval rand("hello")
11:28:48NimBotCompile failed: in.nim(1, 1) Error: undeclared identifier: 'rand'
11:28:57FromGitter<jrfondren> !eval import random; rand("hello")
11:28:59NimBotCompile failed: in.nim(1, 20) Error: expression 'rand("hello")' is of type 'char' and has to be discarded
11:29:19FromGitter<jrfondren> geez. well as you can see there's already a random defined for openArray[T]
11:30:10Mister_Magisterwhaat?
11:30:10ZevvMister_Magister: jokes.rand() also works for you
11:30:15Mister_Magisteroh! whoa
11:31:57narimiranMister_Magister: `jokes[rand(jokes.len)]` -> no, use this: https://nim-lang.github.io/Nim/random.html#sample%2CopenArray%5BT%5D
11:32:14FromGitter<jrfondren> line counting with npeg: https://gist.github.com/jrfondren/1da4a801cf635c810b23ca9cef5266cd
11:32:24Zevvtalking about overkill :)
11:32:46narimiranZevv: talking about https://en.wikipedia.org/wiki/XY_problem ;)
11:33:02*zahary joined #nim
11:33:16Zevvhehe
11:33:54FromGitter<jrfondren> that'd be slightly nicer if I could inc result, but it works for garbage after the last line. the real problem with it is the readFile
11:34:19*cgfuh joined #nim
11:34:35FromGitter<jrfondren> it's only not quite twice as slow as wc -l :p
11:34:58FromGitter<jrfondren> wc -l gets the wrong answer though. doesn't count the final line if it lacks a \n
11:35:52FromGitter<jrfondren> oh with -d:release it's only 1.3 times as slow as wc -l
11:36:02FromGitter<jrfondren> so there you go, use npeg to count lines.
11:36:15Zevvwc must be pretty bad code then
11:36:39FromGitter<alehander42> obviously a version of `.count` should be able to do this
11:36:45FromGitter<alehander42> something like `.count(Newlines)`
11:36:50FromGitter<jrfondren> well the readFile might be helping slightly with the small file I have
11:38:08FromGitter<alehander42> the pag solution is cool, but there really should be a more optimal/simple way
11:38:17FromGitter<alehander42> doesn't count accept a set of chars?
11:38:56FromGitter<jrfondren> sure, strutils has a count
11:39:04FromGitter<alehander42> !NimBot test
11:39:10ZevvFastest would be to iterate memory in 128 bit steps and use the appropriate SIMD instructions to find newlines
11:39:53FromGitter<jrfondren> file.count('\n') + int(file[^1] != '\n')
11:40:03narimiran!eval echo "@alehander42, use !eval ;)"
11:40:05NimBot@alehander42, use !eval ;)
11:40:22FromGitter<alehander42> :P
11:41:12FromGitter<jrfondren> !eval import strutils; echo "a\nb\nc".count('\n') + int("a\nb\nc"[^1] != '\n')
11:41:15NimBot3
11:41:23Mister_Magisterhmm worst part is that i'm getting "Error: unhandled exception: Can't obtain a value from a `none`" and no info about line ;-;
11:41:44FromGitter<jrfondren> try whatever you're doing without -d:release
11:43:02FromGitter<alehander42> you have to check if your value is none
11:43:12FromGitter<alehander42> before trying to getValue from it
11:43:22Mister_Magisterwell i know that
11:43:25Mister_Magisterbut on what line lol
11:43:32FromGitter<jrfondren> oh yeah the npeg version is literally a thousand times slower than wc on a 400MB log. again readFile might be involved.
11:43:34Mister_Magister@jrfondren sadly backtrace is in libs
11:43:52FromGitter<jrfondren> well start from where you invoke the first lib in the backtrace
11:43:54narimiranMister_Magister: it must tell you the line in your file
11:44:05FromGitter<alehander42> ah ok, yeah use `--debugger:native` or `--debugInfo --lineDir:on`
11:44:09narimiranread the top-most line :P
11:44:20Mister_Magisternarimiran: it doesn't
11:44:29Mister_Magistertop line is ../.choosenim/toolchains/nim-#devel/lib/pure/options.nim(181) get
11:44:43narimiranshare your code snippet please: https://play.nim-lang.org/index.html
11:44:54Mister_Magisteri will go back to old good echo debugigng
11:45:04Mister_Magisterah is there debugger for nim?
11:45:29narimiranMister_Magister: lets first see why you don't see the line in your file. that's very unexpected
11:45:30Zevvnim-gdb. it's a wrapper around gdb with support for pretty printing
11:47:36clyybberMister_Magister: Compile without --d:release and a better stack trace should appear
11:48:48Mister_Magisteri got this thanks
11:49:22narimiran"i got this thanks" - famous last words
11:49:54Mister_Magisternarimiran: i mean i fixed it :P
11:50:08Mister_Magisterclyybber: that doesn't give lines tho
11:50:25narimirando you use verbosity:0 or something like that?
11:51:03Mister_Magisterno
11:51:10Mister_Magisterit gives a lot of text but not lines
11:51:33*Mister_Magister plays with nim at work instead of doing work.
11:51:36*Mister_Magister is a bad boi
11:52:11narimiranhere is how errors look on my end: `filename.nim(8, 6) Error: undeclared identifier: 'a'`
11:52:28narimiranyou're saying you don't have parentheses?
11:52:44Mister_Magisteri think
11:54:00FromGitter<alehander42> --linetrace:on ?
11:54:16Mister_Magisterhttp://paste.opensuse.org/view//0ce45c46
11:54:35narimiranbot.nim(220)
11:54:42narimiranthere you go, line 220
11:54:57FromGitter<alehander42> ahh
11:55:20Mister_Magisterwhoa
11:55:40Mister_Magisteri don't think it was 220 tho
11:55:48Mister_Magister220 is declaration of object
11:55:59narimiranat least you see lines which you claimed you didn't see :P
11:56:38Mister_Magisteri don't see the line in which accessing null variable occurs
11:57:57FromGitter<jrfondren> that's the last line, asyncfutures.nim(353) read
11:58:10Mister_Magisterand that's outside of project
11:58:11Mister_Magisterin lib
11:58:17FromGitter<jrfondren> that's just not the error, since you're using asyncfeatures.nim a way that leads the null access
11:59:02Mister_Magisterhm?
11:59:05FromGitter<jrfondren> suppose a lib has a `func getfifth(str: string): char = str[4]` and you call it with an empty string. you're going to get an error in this lib.
11:59:23FromGitter<jrfondren> so use the traceback to find your getfifth() call in your code and look at why you're passing it an empty string
11:59:24Mister_Magisternah i didn't just check isSome
11:59:41*narimiran facepalms
11:59:45Mister_Magister?
11:59:55Mister_Magisteram i understanding something wrong?
12:00:10*Mister_Magister runs
12:00:18narimiranhttps://irclogs.nim-lang.org/10-05-2019.html#11:43:02
12:00:24narimiran"well i know that"
12:00:58Mister_Magisteryeah i read that
12:01:01FromGitter<alehander42> hehe, but he needed the line info
12:01:04FromGitter<alehander42> now its all good
12:01:07Mister_Magisterthe thing is you need to find where you don't check it
12:01:29Mister_Magistercause i use options many times
12:01:37Mister_Magisterso without lines it's hard to find
12:01:50Mister_Magisterand backtrace doesn't say where
12:01:59Mister_Magisterso it's guessing game time
12:02:40narimiranhttps://irclogs.nim-lang.org/10-05-2019.html#11:59:23
12:03:26Mister_Magisterim using that functions also many times, still guessing
12:04:11Mister_MagisterI have another question if i didn't annoy you enough. I want to put text/image on another image. how can i achieve that?
12:05:09narimiranask in some other channel which is better suited for that? :D :D
12:05:13FromGitter<jrfondren> imagemagick or similar. look at 'nimble search image'. imageman might do that.
12:05:58*Snircle joined #nim
12:06:32FromGitter<alehander42> yea
12:06:56FromGitter<alehander42> btw guys when you debug, do you want to sometimes filter your traceback, e.g. not seeing some system/builtin functions
12:07:14Mister_Magisterthanks
12:07:45narimiranZevv: https://github.com/nim-lang/Nim/issues/9677 i also cannot reproduce it with nim devel, can you re-test it on your end?
12:10:16Zevvwow that's long ago
12:10:46narimiranyeah and i would like to close it ;)
12:10:53Zevvwell, close it then
12:11:33narimiranso on your end you also get more helpful message now?
12:11:45ZevvI changed my code
12:12:03ZevvI was trying to handle audio callbacks from an SDL-created thread
12:12:53ZevvI now do only a C memcpy() and SDL things in my callback, so there is no Nim-managed memory used from there, an nod foreignThreadGC needed
12:12:55narimirannow i see in playground that the error is like you reported on v0.19.4; but it is fixed on devel so i'm closing it
12:14:05Zevv\o/
12:14:48Mister_Magisterflippy sounds nice for job
12:15:32FromGitter<alehander42> Araq, why would my config.projectPath be == $HOME
12:15:35narimiran@alehander42 how would you decide what is (not) important?
12:15:37FromGitter<alehander42> is it possible
12:16:00FromGitter<alehander42> well, maybe config
12:16:57FromGitter<alehander42> or maybe at least color differently e.g. "my code", "stdlib code" and 3rd party code
12:17:03FromGitter<alehander42> parts of stack trace
12:17:17FromGitter<alehander42> just trying to think of cool possible custom ideas
12:17:35FromGitter<alehander42> i noticed python had several times custom traceback libs which seemed popular
12:20:37narimirannimble RFC: https://github.com/nim-lang/nimble/issues/653 - share your opinions
12:22:13livcdHow can I do something like this ? readFile a resource to embed it into the binary, when the binary gets executed that assets gets dumped into a specific location and reloaded (read,evaluate) by the same binary?
12:22:49Zevvread it in a const
12:23:06Zevvand at run time, write/read to the file
12:24:33*laaron quit (Remote host closed the connection)
12:25:23narimiranalso, if anybody could run this on their machine just to confirm there's no anomaly when you set line 38 to `StringSize = 8`? https://gist.github.com/mratsim/e5a2d1d74adc2763ab7b080a7c40ef1e
12:26:04Zevvdefine 'no anomaly'
12:26:18*laaron joined #nim
12:26:27narimirantry it with sizes 7, 8 and 9.
12:26:49Zevvit runs in all cases ,but the output differs
12:27:17Zevvoh it's timing
12:27:19Zevvno wonder
12:27:22narimiranfor 7 you should get almost the same last number; for 8 and 9 the number before --- should be larger than the number in the last line
12:28:00narimiranif you hit for 8 that the number above --- is ~40% higher than the number in the last line - that's anomaly
12:28:24Zevvif(v1 > v2*0.4) echo "Anomaly"
12:28:41Zevvlooks ok here
12:28:44narimiranZevv: oh cmon
12:28:47narimiranthat's wrong
12:28:53narimiranif(v1 > v2*1.4)
12:28:57Zevvhaha
12:29:10narimiranand lose the parentheses there ;)
12:29:18ZevvTyping C all day
12:29:20Zevvsorry
12:32:24livcdZevv: hmm I am not sure how...
12:32:40Zevvlivcd: which part?
12:33:40livcdconst script = "foo.ps1"; let res = staticRead(script); -> how do i write it then ?
12:33:54livcdsorry readFile(...)
12:34:23ZevvYou want to write at runtime, right?
12:35:04ZevvwriteFile(fname, res) should do?
12:35:10ZevvOr am I missing something obvious?
12:35:33livcdsorry i did not read properly the docs
12:35:33clyybberconst script = staticRead("foo.ps1")
12:35:34livcdit works now
12:35:44clyybberkk
12:36:14Zevvconst script = readFile() should also work since 0.19.4
12:36:23Zevvbut staticRead is ok
12:40:19FromGitter<mratsim> @alehander42 yeah distinction between system, third party and own lib would be nice
12:42:36*laaron quit (Remote host closed the connection)
12:44:21FromGitter<kaushalmodi> @mratsim may be I am saying in wrong context, but `import std/terminal` would ensure using the terminal from stdlib
12:45:12*laaron joined #nim
12:45:44FromGitter<alehander42> @mratsim i am not sure if that would be better in a 3rd party optional traceback lib tho
12:45:48FromGitter<alehander42> i wouldnt write a rfc yet
12:47:11*Kaivo joined #nim
12:50:25clyybberkaushalmodi: We are talking about stacktraces, so how to differentiate where an error came from visually
12:55:09livcdhttp://ix.io/1IAR/nim am i not doing the interpolation wrong ?
12:58:07FromGitter<kaushalmodi> clyybber: oops! Thanks :)
12:59:56*rnrwashere joined #nim
13:03:05*nsf quit (Quit: WeeChat 2.4)
13:03:59*rnrwashere quit (Remote host closed the connection)
13:08:36*rnrwashere joined #nim
13:11:51FromGitter<sheerluck> how come there are "1674 commits to devel since this tag" after both 0.19.4 and 0.19.6 -- https://i.imgur.com/i5pE4Dk.png
13:14:04FromGitter<alehander42> love you people
13:14:07FromGitter<alehander42> 1674 is huge
13:15:16*natrys joined #nim
13:24:45narimiransheerluck there could be three things: 1. coincidence, 2. github shows wrong number, 3. i fucked up something
13:27:05narimiranah, i think i know what this is
13:27:06ZevvSo, what will be the main release notes for 0.19.6?
13:27:34narimiran"0.19.6, even more boring release than 0.19.4, and that's good"
13:28:10ZevvThat'll get an upvote storm going on HN I guess
13:28:34narimiransheerluck since commits are backported this creates V-shape split in git history, and the root of that spit was 1674 commits ago
13:28:56narimiranZevv: 0.20's job is to take the spotlight
13:29:45Zevvif that's where the new runtime goes, sure!
13:30:10narimiraneven without it, 0.20 brings a lots of goodies to the table
13:30:40narimiransheerluck see https://github.com/nim-lang/Nim/tree/b6d96cafc8bcad1f3d32f2910b25cd11a93f7751 vs https://github.com/nim-lang/Nim/tree/c6f601d48ec81e0d6e052ba0d19a195b55cc68f2, you'll see different number of commits
13:31:57shashlick0.19.6 is a big deal - it means Nim is committed to stability
13:32:59federico3uh?
13:33:06shashlickzero corporates are interested in the bleeding edge
13:33:14federico3sure
13:33:40narimiranshashlick: just the man i was looking for! now that we have 0.19.6 tag - does this trigger nightlies automatically, and if not - can it be done manually?
13:34:02narimiranand even arch isn't interested in bleeding edge when it comes to nim ;)
13:34:14shashlicknightlies will run per usual on the version-0-19 branch
13:34:24shashlickbut we can kick it off right now if needed
13:35:31narimiranshashlick: CI is still running for the latest commit/tag https://github.com/nim-lang/Nim/commits/version-0-19, but if that is not a problem then yeah, creating them now (and not in 12+ hours) would be nice
13:35:54shashlickcool, let me know when CI passes and i can kick off a new build
13:36:11narimiranhttps://www.archlinux.org/packages/?sort=&q=nim
13:36:21shashlickif you have access, you can also trigger a build when you are ready - https://travis-ci.org/nim-lang/nightlies
13:36:47narimiranoh, i just do 'restart build'?
13:37:14shashlickno trigger build in drop down on the right i think
13:37:49shashlickunder More Options
13:38:17narimirannope, i don't have that. i guess you'll be the one pressing the button :)
13:42:30shashlickokay cool
13:48:35*solitudesf joined #nim
13:50:08clyybberAraq: Is there already a way to somehow get the set of all global Syms? Would be pretty handy to enhance the aliasing detection and also for fixing destructors getting called too early on globals
13:51:58Araqit's theoretically possible but bad design, modularity would suffer
13:54:03clyybberAraq: per-module would be good enough
13:54:38clyybberand would suffice for fixing overly eager global destructors
13:57:10*PMunch quit (Remote host closed the connection)
13:57:15*zahary quit (Ping timeout: 248 seconds)
14:03:37clyybbernevermind, theres no need for that.
14:14:29*rnrwashere quit (Remote host closed the connection)
14:20:19*zahary joined #nim
14:25:11*Trustable joined #nim
14:33:06shashlick@Araq - just replied to the nimble RFC, i'm still confused 🙂
14:37:16Araqshashlick, why?
14:41:03*rnrwashere joined #nim
14:42:35FromGitter<arnetheduck> I understand it as pretty straightforward: don't screw around with the directory structure already in the repo
14:43:44*rnrwashere quit (Remote host closed the connection)
14:44:34*rnrwashere joined #nim
14:44:41FromGitter<arnetheduck> which sounds like a step in the right direction.. I don't mind that there's a convention that the tool supports (and no other), even removing the srcdir config and supporting only one convention is better (for example, only supporting sources in `src` which is sane, because it doesn't cost anything when the package is small and you'll thank the tool when the project grows and you also want a doc, tests etc folder..
14:45:29FromGitter<arnetheduck> convention over configuration and all that
14:45:30Araqshashlick, ok, I understand your remarks
14:47:21*laaron quit (Quit: ZNC 1.7.1 - https://znc.in)
14:47:25shashlickConcern is primarily backwards compatibility
14:47:33*laaron- joined #nim
14:47:54shashlickWe can break everyone and force a change
14:48:04shashlickWill make the design simple
14:48:20shashlickBut then packages might not work with older versions of Nim
14:48:35shashlickAnd that's a headache for package maintainers
14:54:02*NimBot joined #nim
14:55:50Araqshashlick, Nim (not Nimble) would read the .nimble file to see srcDir
14:56:01Araqand imports work as they work today
14:56:18Araqbackwards compatible and we don't need to deprecate it either
14:56:57Araqwe *could* deprecate it to remove some logic later from the compiler but I don't care, it's already pretty complex and mostly Nimble specific code
14:59:54clyybberwhy do we have nimble specific code in the compiler anyway? couldn't nimble just use --path ?
15:00:23clyybberor is there functionality which *requires* nimble specific code in the compiler?
15:00:48FromGitter<jrfondren> open a random file and put "import blah" in it. Does that work? It works if the user or Nim does something. The latter is easy.
15:01:08FromGitter<jrfondren> the former is just $PATH or similar in an environment variable.
15:01:33*zahary quit (Quit: Leaving.)
15:02:21FromGitter<jrfondren> You can also choose to make it not work. Users should "import full/path/to/file/ending/in/dotnim". That doesn't seem desirable though.
15:03:26Araqclyybber, 'nimble c p.nim' builds p by giving nim the exact --path, but 'nim c p.nim' also works and uses the latest version of all the involved packages
15:03:26FromGitter<jrfondren> The connection to nimble is that it puts files where Nim independently knows where to look for them.
15:03:54clyybberAraq: Oh, I didn't know that.
15:04:09clyybberjrfonden: I see, thanks
15:10:08FromGitter<brentp> does anyone have an updated valgrind suppression file? this one: https://github.com/nim-lang/Nim/issues/3063#issuecomment-118594928 is insufficient
15:17:08Araqbrentp: no but you can tell valgrind to produce a suppression file for you
15:18:29FromGitter<brentp> @Araq wow. thanks. didn't know about that option. on it.
15:24:39*abm joined #nim
15:26:18*laaron- quit (Quit: ZNC 1.7.1 - https://znc.in)
15:30:44*vivus joined #nim
15:31:33disruptekwhat if nimble were replaced by a group of smaller, unix-cli-style-do-one-thing-and-do-it-well tools that actually integrated with the environments that users actually have? ie. we don't create the whole environment (nimble) but we extend and integrate into whatever we find.
15:32:16vivushello all
15:32:36vivusin this example: https://nim-lang.org/docs/parsecsv.html
15:32:37disruptekwe can just wrap things like git so that we can be introspected and twiddled by the user's git workflows and tools.
15:33:06vivuswhat would I replace for `tabs` here: `echo "##", col, ":", p.rowEntry(col), "##"`
15:33:10*laaron joined #nim
15:33:33disruptek!eval echo "##", col, ":", p.rowEntry(col), "##"
15:33:35NimBotCompile failed: in.nim(1, 12) Error: undeclared identifier: 'col'
15:33:50disruptek!eval echo "##\t##\t##"
15:33:52NimBot## ## ##
15:35:25*laaron quit (Client Quit)
15:35:43Mister_Magisterso if nim compiles (can compile) to C it's possible to program atmega using it right
15:35:53disruptekas another example, we can perform edits to nim.cfg or even .nim files, generate .nim programs that perform a build, a test, or dependency analysis.
15:36:02*laaron joined #nim
15:36:58disruptekMister_Magister: basically, anything you can code in C (ergo asm) you can code in nim.
15:37:13Mister_Magisterdisruptek: ye ye that's what i thought
15:37:19Mister_Magisterso it should be possible to program atmega using it
15:37:24disrupteksure.
15:37:29Mister_Magistercan nim compile to 8/16 bit?
15:37:32Araqdisruptek, I doubt it would work out. Keep in mind that Nimble starts with a dependency graph that is otherwise not available at all
15:37:57Mister_Magisterwhy did i even ask xd https://disconnected.systems/blog/nim-on-adruino/
15:38:47disruptekAraq: i don't understand. if nimble was created, and i'm sure it was, then that means we can do no worse.
15:39:11disruptekMister_Magister: there are a few folks in here who code against microcontrollers.
15:39:29Mister_Magisternice
15:39:39Mister_Magisterthat makes me happy
15:39:47Araqer, that's mildly offensive
15:39:49*laaron quit (Client Quit)
15:40:39disrupteki'm not disparaging nimble; it seemed like you were saying that we cannot achieve was has already been achieved in nimble.
15:40:41vivushmmm, that didn't help
15:41:26disruptekAraq: but, as i said, i don't understand.
15:42:02*laaron joined #nim
15:42:44Araqdisruptek, me neither. the problems I have with Nimble are written down and eventually will be solved
15:46:11disruptekthe problems you have with nimble seem solvable with a 5-line shell script, as is basically any other task for a package manager, honestly.
15:46:45*laaron quit (Ping timeout: 256 seconds)
15:46:52Araqand you can say that because you "don't understand" my problems? :P
15:47:18disruptekwhat i don't understand is your comment to me at 11:37.
15:47:29disruptekor whatever passes for 11 in your timezone... ;-)
15:48:07disrupteki guess what i'm saying is, i don't understand why we cannot implement nimble in shell.
15:48:45FromGitter<alehander42> Programming in shall is not nice
15:48:58*laaron joined #nim
15:49:35disruptekyou don't /have/ to program in shell. it's a thought experiment.
15:50:56disrupteklet me put it this way: it might be easier to write a shell, or a repl for build process, than it is write a package manager.
15:51:58vivusso this is what my CSV file looks like: https://dpaste.de/jQRR
15:53:09vivuswhen I try: `echo "##", col, "\t", p.rowEntry(col), "##"` it shows blank results
15:53:26clyybberdisruptek: You don't use nimble, and apparently have no use for it. FYI nimble uses nimscript.
15:53:53FromGitter<alehander42> Hmm I am not sure I get the example
15:54:00FromGitter<alehander42> But it sounds interesting
15:54:23clyybberdisruptek: But packagemanagers have dependency resolving. This is the most complex thing about package managers.
15:54:32FromGitter<mratsim> Shell management is a hack ....
15:54:55clyybberit works, but not for complex dependencies
15:54:58disruptekshells are bad but repls are good.
15:55:00FromGitter<mratsim> I'm glad I don't have shell based init, nor shell based package manager in Arch
15:55:23disruptekit's a topsy turvy world out there.
15:56:38clyybberdisruptek: a shell is a repl, no?
15:57:14FromGitter<jrfondren> @vivus, that's a tab-separated value. so you're opening it with a separator of '\t', yes?
15:57:16disruptekmy dudes, the point is that when i think about the tasks of a package manager, i see them as units not unlike small scripts. i use the term *script* to indicate a targeted operation, an implicitly conceptually simple or high-level program that connects code to data.
15:57:35disruptekclyybber: a shell is a repl.
15:57:42FromGitter<jrfondren> I'm not sure there's a point in the point
15:58:03FromGitter<jrfondren> nimble has a bunch of subcommands. obviously each of those could be a command in a package-management repl.
15:58:14vivus@jrfondren when I use `\t` as the separator, all results come back blank
15:58:57disruptekthe point is that other package managers are opinionated on what your workflow is. what if nim could let you declare your opinions, either with shell, or nimscript, or nim. we provide a framework from which you can arrange your projects however you please.
15:58:59shashlickPackage management isn't easy, many have tried, it's not wise to trivialize it
15:59:28disrupteki agree, and that's why i've used gentoo for the last decade.
16:00:20FromGitter<jrfondren> once that's done, what would actually change? What would people actually do differently? What would documentation suggest as an alternate workflow? Why not target that instead of a design that might facilitate it?
16:00:54clyybberdisruptek: what leads you to believe that nimble can't let you define arbitrary build tasks?
16:00:59disruptekbecause being opinionated means taking a stand on how everyone is going to work, as opposed to letting people choose.
16:01:01clyybberbecause it can
16:01:35FromGitter<jrfondren> f.e., if you want npm-style dependencies local to your project, you could completely rework nimble and have a repl of scriptable commands... or you could add a localinstall subcommand to nimble
16:01:40disruptekas a result, people are literally worrying about whether source code lives in a src subdirectory.
16:01:43*disruptek boggles.
16:02:01*laaron quit (Remote host closed the connection)
16:02:16vivus@jrfondren okay I figured it out, partially
16:02:16FromGitter<mratsim> That's orthogonal to having a shell script or a package manager written in Nim
16:02:42FromGitter<jrfondren> this worry is happening because someone did something wrong once, and was annoyed by it. People are going to make more mistakes and be more annoyed when there's no clear way to manage packages because you're supposed to figure it out yourself.
16:03:15clyybberdisruptek: gentoo or literally any packagemanager on linux also is opinionated. Every binary is in usr/bin etc.
16:03:37disruptekthere can be a clear way, but what's clearly a problem is that people want the system fractured on different points.
16:03:37FromGitter<jrfondren> @vivus, what was it?
16:04:07disrupteki'm suggesting that maybe the solution is to fracture it more fully and let people edit the pieces before reassembly.
16:04:08vivus`for val in items(p.row): echo "##", val, "##"`
16:04:15FromGitter<mratsim> Well right now there is are 2 ways and anything in betweeen doesn't work
16:04:37vivusnow I am trying to figure out how to tell the parser what the separator is
16:05:06*rnrwashere quit (Remote host closed the connection)
16:05:09disruptekgreat, and more than two ways is too hard to render in shell?
16:05:35disrupteki mean, what are we actually talking about here. can we not let the user make the determination about how they want resolution to work?
16:05:37FromGitter<mratsim> either with everything in "src" or "project.nim" at root and everything in "project/". In the src case what nimble installs has not the same structure as what the dev intended
16:05:45FromGitter<jrfondren> @vivus, p.open("file.csv", separator='\t')
16:05:59FromGitter<jrfondren> @vivus, that example assumes you have a header row as well.
16:06:10disrupteki see, you can explain the problem in one sentence, but none of us can solve it in any amount of nim. /that/ makes sense.
16:06:14vivusyeah I just realized I didn't have a header
16:06:22FromGitter<mratsim> The whole point is that nimble does not respect what the dev intend in once case, but does in the other
16:06:23vivushaven't coded in a while
16:06:29vivusso it's like relearning stuff
16:06:48disruptekpreaching to the choir, my man.
16:07:25FromGitter<mratsim> but nimble could be a shell tool, we would also have this issue (which is social not tech)
16:07:39*laaron joined #nim
16:08:16FromGitter<mratsim> Being opinionated can be a good thing because people expect stuff at a certain place, that's also why we now put nimcache in .cache instead of polluting people's projects
16:08:24vivus@jrfondren that seems to cause each item to display on its own row
16:08:33FromGitter<mratsim> there is still an option to not do that
16:08:37FromGitter<jrfondren> @vivus, that's how the example's written. you can just do something different
16:08:48disruptekso you're telling me that making location or dependency optional is harder than choosing correctly once.
16:08:50FromGitter<jrfondren> @vivus, you also don't need to add a header if you just want to refer to columns by number
16:09:31FromGitter<mratsim> I don't understand what you mean sorry
16:09:48disruptekbecause it seems clear that people have opinions on what that first choice should have been. and despite us only believing that there is one possible, ideal, path, it seems clear that we are batting .000 so far -- we thought there was only one way, and now we're convinced there are only two.
16:10:06FromGitter<mratsim> I only said that nimble should not remove the src folder if the devs wanted to use it because it breaks everything that rely on paths
16:11:11disrupteki understand what you're saying. i agree with you. when you lack the language to describe intent, intent becomes ambiguous. nothing new here.
16:11:20disruptekmy point was more meta.
16:12:45*rnrwashere joined #nim
16:13:55FromGitter<jrfondren> all this time nimble has been "breaking everything that relies on paths" but somehow I can still install packages and use them. Nimble "doesn't respect devs intentions" but the humiliated, unrespected devs get work done somehow. All that talking like this does is make it hard to understand what the actual problem is. It's good for getting attention but after you've got attention you should calm down and speak clearly.
16:14:23vivus@jrfondren can you reproduce this error for me please: (CSV data): https://dpaste.de/xLOg (code+error): https://dpaste.de/Vk0b
16:14:57FromGitter<jrfondren> @vivus, you should be telling it to use \t still
16:15:01FromGitter<jrfondren> p.open("file.csv", separator='\t')
16:15:41dom96+1 to what jrfondren said
16:15:41FromGitter<jrfondren> @vivus, I don't get an error with your code after making that change
16:15:55disruptekthe actual problem is as simple as "i can't find my code". it's ridiculous.
16:16:03disrupteki mean, truly ridiculous.
16:16:13vivuswhat does your output show? does it show each item being output on its own line?
16:16:16disruptekln -s src .
16:16:35FromGitter<mratsim> The problem is "users can't find my code"
16:16:53FromGitter<jrfondren> @vivus, I get "new row:" and then "##206 deu Theoretisch mache ich gerade Mathe. kroko \N 2010-10-14 14:36:23", two lines, one for each row in the file
16:17:32vivusfor me, it outputs each entry onto its own line
16:18:23FromGitter<jrfondren> oh I thought you were mainly concerned with the error. are you wanting to print each column separately?
16:19:08FromGitter<jrfondren> eh I ran this without the separator set somehow.
16:20:05vivus@jrfondren for me, when I ran it without the separator, it give me an error on the same line: 1511 eng "To tell you the truth, I am scared of heights." "You are a coward!" Nero \N 2011-02-06 20:40:33
16:20:15vivus```1511 eng "To tell you the truth, I am scared of heights." "You are a coward!" Nero \N 2011-02-06 20:40:33```
16:20:18Zevvvivus: add `separator='\t'` to your open call
16:20:36vivusZevv: when I do that, it prints each item on its own row
16:20:38vivuslet me show you
16:20:57FromGitter<jrfondren> @vivus, https://gist.github.com/jrfondren/0f27b58670a9902d83b0b0181f5ed9c7 <- a modified version of your code, with separator set, with input, and the output
16:21:06Zevvyes, that is what your code does. You split a row into fields, and then you print each field with '##' in front
16:21:25vivushttps://dpaste.de/tTHV
16:21:43vivusbrb
16:21:53FromGitter<jrfondren> yeah if you want to change the output, the thing to change is your loop. the file is still fundamentally \t-separated and the parser needs to know that regardless of what work you want to do
16:22:11disruptekthe problem is, people think finding code is hard for people and machines.
16:22:53FromGitter<jrfondren> @mratsim is that still a problem, that users can't find your code?
16:22:54dom96mratsim: That problem should have been caught by testing
16:25:16disruptekif you ask me, /problem/ is too strong a word.
16:27:39FromGitter<jrfondren> @vivus, how about this example? https://gist.github.com/jrfondren/0c2a033dd9c77f592556efe363b8f371
16:28:50*rnrwashere quit (Remote host closed the connection)
16:33:15clyybberAraq: Is there a better way to find the main module, than just checking for sfMainModule?
16:33:57FromGitter<mratsim> @dom96 As I said yesterday, I had CI running on both windows and linux
16:34:13FromGitter<mratsim> CI was green so I assume everything worked
16:34:31FromGitter<mratsim> it didn't because nimble changes path upon install so I can't rely on CI for that
16:34:48shashlickIs the only problem that src gets removed? That's far more limited than saying nimble is too involved in package structure
16:35:57FromGitter<mratsim> The fact that you can't rely on what you have on your dev system being deployed on the user system is a problem
16:36:07FromGitter<jrfondren> CI starting with a "nimble install" would ensure that nimble stuff works. after all you could have a bad .nimble file even if all of your code is fine.
16:36:29FromGitter<mratsim> you can't because nimble install doesn't copy your test directory as well
16:36:43Zevvand your docs, and your examples
16:37:38FromGitter<jrfondren> yeah I'd prefer to have that stuff. "nimble test some-installed-package" to run the tests would help confirm that the bug isn't in my code for example.
16:38:59FromGitter<jrfondren> so would that be a PR that also fixes nimble for you, "make it possible to run tests on an installed package"?
16:39:10*rnrwashere joined #nim
16:39:50FromGitter<mratsim> being able to run tests after nimble install would be nice.
16:40:04dom96I'm pretty sure no package manager installs tests when installing a package
16:40:21FromGitter<mratsim> bazel does
16:40:36FromGitter<mratsim> but they do install examples
16:40:42FromGitter<jrfondren> CPAN runs tests on the user's machine whenever you install packages, as a normal procedure. It's kind of soothing.
16:41:04*rnrwashere quit (Remote host closed the connection)
16:41:14dom96Also, you *can* test installed packages
16:41:17FromGitter<mratsim> And in Archlinux at build time you have tests running in many packages like GMP
16:41:42*rnrwashere joined #nim
16:41:59dom96I really don't want tests to run every time I install a package
16:42:16FromGitter<mratsim> cargo also has tests available
16:42:55FromGitter<jrfondren> since it doesn't happen now nobody will miss it, but if there's a flag to do that it might help with stuff like using "nimble install" in CI
16:43:04dom96Did relative imports not raise any alarm bells? https://github.com/mratsim/Arraymancer/blob/master/tests/tests_cpu.nim#L16
16:43:42FromGitter<mratsim> Why would it?
16:44:52dom96because users of your code will not write imports this way
16:44:53*sacredfrog joined #nim
16:45:47*rnrwashere quit (Ping timeout: 248 seconds)
16:45:52FromGitter<mratsim> assuming I want the structure package/src/mycode and package/tests, what do you recommend for testing?
16:47:06FromGitter<mratsim> Nimble also hardcode src here: https://github.com/nim-lang/nimble/blob/master/tests/tester.nim#L10
16:47:55dom96I usually do this: https://github.com/dom96/nim-jsonrpc/blob/master/tests/nim.cfg
16:48:00dom96Although I also consider this sub-optimal
16:48:32dom96Nowadays IIRC Nimble will pass this `path` to the Nim compiler when you run ``nimble test``
16:49:08federico3dom96: running tests at package build time on all architectures is the default in Debian
16:49:54federico3unfortunately Nimble doesn't have a concept of building/uploading/downloading a source package
16:50:23FromGitter<mratsim> So I was about 3 months in Nim, I looked into all those packages and nimble readme on how to package things, I did see the .cfg but though it was suboptimal, I saw some people using src, some people using the package name without src.
16:51:06FromGitter<mratsim> I choose to have a src, but didn't realize that nimble remove that directory upon install.
16:51:33*cspar joined #nim
16:51:37FromGitter<mratsim> That's was not highlighted in the doc, and it still not is.
16:51:47cspar@search taran
16:52:02*cspar quit (Client Quit)
16:52:09FromGitter<mratsim> with init at least it's much better than before
16:52:36FromGitter<mratsim> but still, reducing friction for new people is something we should strive for
16:52:41dom96Nimble doesn't "remove" it. It installs the "srcDir"
16:53:06FromGitter<mratsim> When I develop a package, I expect the package manager to install the package
16:53:18FromGitter<mratsim> expectation vs reality
16:53:57FromGitter<mratsim> There are areas where we can give surprises, because we are innovating in those areas (say static, macros)
16:57:41*xet7 joined #nim
16:59:03vivusty for that awesome alternative gist @jrfondren
16:59:48*rockcavera quit (Remote host closed the connection)
17:00:52federico3mratsim: yes, Nimble is not explicit at all about what it's going to install
17:01:58*vivus quit (Remote host closed the connection)
17:14:43FromGitter<arnetheduck> Yeah the point here was to be clear
17:32:40*rnrwashere joined #nim
17:34:00*rnrwashe_ joined #nim
17:34:10*rnrwashere quit (Read error: Connection reset by peer)
17:37:49*rnrwashe_ quit (Remote host closed the connection)
17:38:15*rnrwashere joined #nim
17:38:18*rnrwashere quit (Remote host closed the connection)
17:43:23*rnrwashe_ joined #nim
17:47:43*rnrwashe_ quit (Ping timeout: 246 seconds)
17:53:14*sacredfrog quit (Ping timeout: 255 seconds)
17:55:10*rnrwashere joined #nim
17:56:16shashlickOk rereading all this clarifies one thing - the RFC is overkill if the issue is simply retaining directory structure
17:57:03shashlickSeems the change is simply to remove the srcDir feature and not exclude install of all folders
17:57:32shashlickWe shouldn't mess with namespace introduction since that's not what people are complaining about
17:58:29*rnrwashere quit (Read error: Connection reset by peer)
17:58:52*rnrwashere joined #nim
18:01:12Araq???
18:01:52*sacredfrog joined #nim
18:02:24Araqcan't say I agree. Simplicity is nice to strive for and I don't see how tasks like 'nimble test/doc' can work with an "installed" Nimble package
18:03:20shashlicki am still on that square - all I'm saying is that adding $project to `$nimbleDir/pkgs/package-x.y.z/$project` is unwarranted if the primary issue is loss of package structure
18:03:21*rnrwashere quit (Ping timeout: 246 seconds)
18:03:43shashlickcause that breaks all existing import statements and introduces the challenge of backwards compatibility and all that
18:04:11shashlickif we keep the namespace issue aside, then we can focus on the package structure topic
18:04:20shashlickwhere src shouldn't go away, tests, docs shouldn't be excluded, etc.
18:04:59shashlickthe namespace issue is basically that two packages can have the same file.nim and nim will pick the first one it finds rather than the one you want - that cannot be solved without adding the $project prefix
18:05:06shashlickbut it is mixing two different issues into the same discussion
18:05:35shashlickand it is partly my fault cause I threw that $project in there 😄
18:05:39*jjido joined #nim
18:10:29Araqshashlick, the "enforced" structure is overkill for tiny projects and wouldn't work for bigger projects like the Nim compiler itself.
18:10:55shashlicki agree and i am for changing that
18:11:21shashlicki just want to remove $project from the install path so that it doesn't introduce an additional backwards compatibility challenge
18:11:36shashlicki am looking at the code to see how srcDir is handled today
18:11:55shashlick@mratsim - does `src` get removed if you don't set `srcDir = "src"`?
18:11:56Araqand this is not only my personal opinion, there is also big wrappers like Godot that struggle with the setup
18:12:26*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
18:12:29shashlicki hate the fact that nimble is picky about files - it has broken my nimgen workflow since the beginning and continues to bother nimterop
18:12:44Araqthere are also mixed language environments where you simply *cannot* follow whatever Nimble dictates you should do
18:12:59shashlicki cannot download upstream source files since nimble doesn't scan them, and if i do it after the fact, nimble doesn't uninstall since they weren't installed by nimble
18:13:37FromGitter<mratsim> src doesn't get removed, but I don't remember why I had to have srcDir in there
18:14:01AraqNimble with its Nimscript/task integration makes a really good build and packaging tool, in theory.
18:14:15Araqand then it falls short with this picky structure it tries to enforce
18:14:25shashlick@mratsim - in some sense, simply removing srcDir from your nimble file should fix you then
18:14:26FromGitter<mratsim> Ah no, I just followed blindly nimble advice: https://github.com/mratsim/Arraymancer/commit/72e8093f6631ed61aed9bf362ae62e74075849b2
18:15:20shashlickwell, i too had to play some games looks like - https://github.com/nimterop/nimterop/blob/master/nimterop.nimble#L11
18:15:52FromGitter<mratsim> ah no it wouldn't work, if you don't put srcDir it only install the folder with the exact name as your package.nim
18:16:16Araqshashlick, I don't understand what you mean by $package
18:18:22shashlick@Araq: in your RFC, you describe packages A and B with the same utils file
18:18:59shashlickthat's the namespace issue, what i'm saying is that that issue has nothing to do with the fact that nimble is picky about the files it installs
18:19:25shashlickso if we can separate that out as a separate RFC/discussion/feature and defer that for now, we can figure out the packaging issues in a cleaner fashion
18:25:00federico3+1
18:26:49FromGitter<arnetheduck> shashlick, sure, backwards compat is fine, but first establish where you want to go - a structured approach or one that swallows anything? the latter gives plenty of (meaningless?) options, the latter allows building convenient tooling that makes use of the conventions to keep complexity down at the expense of loss of theoretical freedom
18:27:30*rnrwashere joined #nim
18:29:41FromGitter<arnetheduck> fwiw, I think nimcache could easily go in the project structure as well.. just collect all outputs in a single `out` folder - cache, binaries etc
18:30:13FromGitter<arnetheduck> no magic global `$HOME/.whoknowswhere` thing that people must learn to clear for every dep resolution bug in the compiler
18:30:55shashlicki think there's only two real changes - one is to get rid of srcDir and all installX directives, second is to install everything in the folder to $nimbleDir/pkgs
18:31:11shashlickwe can leave skipX directives so that users can skip installing stuff they don't think should be installed
18:31:50shashlicki think that should solve the confusion and enable nimble test/doc X
18:31:55*rnrwashere quit (Ping timeout: 248 seconds)
18:32:23shashlickthe problem is that srcDir is recommended and that causes confusion, and without it, you need installDir to get your stuff in which is unnatural
18:32:48*Jesin quit (Quit: Leaving)
18:33:04shashlickin short, there's no structure or swallowing, just pass through everything unless you don't want to with skip
18:33:20dom96I don't think installing everything is a good idea
18:33:29dom96Who knows what users will have in there
18:33:40dom96I routinely have huge csv files and other crap that I don't want installe
18:33:42dom96*installed
18:33:59shashlickwysiwyg since the directory structure will reflect what the imports will look like
18:34:38FromGitter<arnetheduck> I don't think installing is a good idea :)
18:34:49FromGitter<arnetheduck> cloning into package repo seems much more sustainable
18:34:53shashlickwell, then as a package manager, you should skip it rather than having nimble be so conservative
18:35:37shashlickif you put junk in your users' pkg dirs then users will push back and complain
18:35:44shashlickusers here being devs who are discerning
18:36:21shashlick@arnetheduck - that's RFC #3 🙂
18:36:30*Jesin joined #nim
18:37:24shashlickso #1 is wysiwig - don't mess with my files #2 is namespace concerns (not sure how big an issue this is) and #3 is Git it
18:37:56shashlickmaking these changes into small bites will make them achievable
18:38:22FromGitter<arnetheduck> by pkg dir I mean locally inside the package, in the `out` folder somewhere, along with `nimcache` and everything else belonging to that package, so you can have a single location to wipe out and multiple projects side by side.. simple, isolated, no fuss..
18:40:45FromGitter<arnetheduck> #2 is a big issue for us that are developing a slightly larger app and looking to reuse code - the latter gets very fragile with everything sharing namespace
18:42:05shashlickdo you mean across packages?
18:43:08Araq1. there is the '-f' switch to force full recompiles, ignoring nimcache.
18:43:11FromGitter<arnetheduck> across, within, whatever, we run into all flavors
18:43:31Araq2. there are no known "deb resolution bugs"
18:43:57FromGitter<arnetheduck> Araq, "wipe nimcache" is the known, tried and tested solution to any such issues, and it doesn't risk hitting bugs in `-f`
18:44:11Araqthere are no known bugs in -f
18:44:40FromGitter<arnetheduck> no, but I trust `rm -rf` more, due to its relative simplicity :)
18:45:02Araq<insert war story here where 'rm -rf' nuked everything>
18:45:16shashlickhate to force the issue but i want to focus on the RFC for now if possible
18:45:34FromGitter<arnetheduck> you also once said there are no known bugs in dependency/rebuild scanning, and yet here we are, regularly seeing "wipe nimcache fixed all my issues"
18:45:37shashlickdo folks agree that there's 3 separate improvements at this point
18:46:20Araqarnetheduck: there are indeed no bugs in "rebuild scanning", it works as documented
18:46:55Araqyou misuse it, that's ok but that it in direct violation of the whole "only support some well defined subset for tooling axiom"
18:47:00FromGitter<arnetheduck> I don't know how it's documented, but when working with `{.compile.}`, I regularly have to wipe nimcache.
18:47:44Araqwell .compile is not meant for C(++) code development
18:47:53shashlickwell that's cause compile doesn't look at dependencies changing
18:48:03Araq.compile assumes that the code that you seek to compile is static
18:48:05FromGitter<arnetheduck> I suspect the bug is this: if I have file.nim that contains `compile x.c` and `file.c` doesn't need recompile, it will also not recompile `x.c`
18:48:22FromGitter<arnetheduck> or something along those lines, not sure
18:48:34disruptekthat's arguably a bug, arguably a missing feature.
18:48:49disruptekwhere is the expectation set?
18:48:52FromGitter<arnetheduck> I'm always busy with something else when I run into that (like solving an an actual problem), and "wipe nimcache" just works :)
18:48:53Araqand project specific nimcache dirs have been tried, the community wanted them to go away
18:49:16shashlickthat's already in the issue tracker - https://github.com/nim-lang/Nim/issues/10441
18:49:26disruptekwhat's bad about per-project cache?
18:49:46FromGitter<arnetheduck> well, if you collect all outputs in a single folder it's a different story. the problem right now is that binaries and end up littering your git repo so you can't have a clean `git status`
18:49:52Araqit "pollutes" everything with build artifacts and most people are happy and never have to look at the produced C code
18:50:25disruptekit's always achievable with the compiler, right, so whatever...
18:50:40Araqwell indeed there is --nimcache and --out
18:50:45FromGitter<arnetheduck> if you have an `out` and `out/bin` there's also no cost to having `out/cache`, in terms of littering, and you can gitignore a single folder and be happy
18:51:10FromGitter<arnetheduck> does that work with `nim.cfg` now btw?
18:51:20disruptekand i use it and i'm happy. it's pretty handy for llvm bytecode stuff.
18:52:11FromGitter<arnetheduck> I can set both those options from there? because even if the defaults are wrong (litter global unknown location instead of local known) at least it's simple to remedy.. though I remember at first there were issues
18:52:27disrupteki don't use it in nim.cfg, but i suppose i might if you can.
18:53:38FromGitter<arnetheduck> well, defaults are important because that's the first thing people try.. if the first thing they try turns out to be poorly thought out, disappointment ensues
18:54:17*ng0 joined #nim
18:54:45*ng0 quit (Client Quit)
18:55:11disruptekit works in nim.cfg.
18:55:16dom96shashlick, thank you for separating these issues into 3. We really are bad at getting side tracked by off-topic things and having a single focused RFC should help with that
18:55:29dom96This is also why I mentioned to Araq to maybe remove his statement about git from his RFC
18:56:59shashlicki guess it's okay putting all three in the RFC but need clear separation so that they can be solved individually
18:57:06shashlickotherwise it will take too long to achieve this
18:57:45shashlickfocusing on #1 seems achievable near term
18:57:53shashlickdid you have any concerns with my proposal for #1?
18:59:09narimiransorry to interrupt, but: shashlick, can you trigger building of 0.19.6 nightlies? :)
19:00:10shashlickjust kicked it off
19:00:22narimiranthumbs up
19:00:42dom96Araq, I don't believe I got a vote for moving away from project-specific caches :P
19:01:13dom96but I don't mind
19:01:28FromGitter<arnetheduck> and all this stuff about developer experience and so on is part of the reason why it makes some sense to think of it in two parts - a compiler that compiles, and a pm/build tool that delivers a convenient and conventions-based DX
19:01:31dom96shashlick, what is your proposal? Did you write it up in an RFC?
19:01:46shashlicki commented on Araq's RFC
19:02:01shashlickand after some more thinking, i felt splitting out namespaces was warranted
19:03:33shashlickmy proposal for #1 is basically https://irclogs.nim-lang.org/10-05-2019.html#18:30:55
19:08:05dom96There is a lot of questions in your comment shashlick
19:09:07shashlickyes, cannot always have answers 🙂 what i don't know i ask
19:09:38dom96Makes it hard for me to know what I'm actually agreeing to or not though :)
19:10:17shashlickit also goes to say that all concerns need to be addressed before we have a real design that works
19:11:08dom96This RFC is already too noisy for my taste, I wonder if we could take the comment you've linked above and work from that
19:11:27dom96Maybe GitHub issues just aren't productive for this kind of thing
19:11:39dom96Maybe we should start doing things like pros and have meetings
19:12:09dom96or use some other tool
19:12:50shashlicki agree, at my work, most time is spent in design
19:13:05federico3+1 on meetings
19:13:52disruptekmaybe some kinda discord-like system where people can +/- comments and thread them more readily. could be a step in-between real-time systems.
19:14:37disrupteknot discord, disqus.
19:14:39federico3that's not expressive enough compared to a decision matrix where you can put weights
19:15:47disruptekthat sounds more like an app for sketching out the problem domains and weighting different points within.
19:15:59federico3I wish there was one
19:16:08disruptekweighted mindmap. is that a thing?
19:17:01disruptekkialo is pretty cool, i wonder if that could be a good platform to use.
19:18:17federico3https://rationalize.io/ is a poor attempt
19:19:38disrupteki think kialo is much better; it lets you both hash out and simplify, iteratively, with ownership, every pro/con of a decision.
19:20:13federico3did it implement weighting and scoring?
19:20:45disruptekthere's voting, which should be enough.
19:22:05FromGitter<mratsim> But assuming we vote and arrive at a decision, if we want to revisit a year later, is there a way to export that to a Gist or something?
19:24:12*sacredfrog quit (Ping timeout: 246 seconds)
19:24:38disruptekwhere would it go otherwise?
19:26:04FromGitter<mratsim> it would stay on a website that may or may not disappear in a year
19:27:31disruptekwhat would be an acceptable archival medium?
19:28:28Mister_Magisterhttps://build.opensuse.org/request/show/702054 i'm helping :(
19:28:30Mister_Magister:)*
19:29:13Mister_Magisterand i added nim to one more OS https://build.merproject.org/package/show/home:mister/nim
19:29:32FromGitter<alehander42> but how is this different to
19:29:51FromGitter<alehander42> having github issue voting and archiving it directly inplace so people can easily see the discussion
19:30:12federico3disruptek: it's not enough
19:30:30shashlickwhat's preferred is the main RFC is updated based on comments and feedback further down
19:30:39shashlickso that the final requirement is clear from the first comment
19:30:45*arecaceae quit (Remote host closed the connection)
19:30:55shashlickstrike out stuff that's obsoleted
19:30:58disruptekthe way you condense and restate arguments polishes them until they are most accurate, most precise, most succinct. and, they weigh them against each other in a proper hierarchy.
19:31:07*natrys quit (Quit: natrys)
19:31:08FromGitter<alehander42> i feel like a discord-like chat with +/- might be cool
19:31:12*arecaceae joined #nim
19:32:23disruptekwhat's cool about this isn't archival, it's the idea that a rational for decisions is "live" and new or old people can find it, read it, understand the pros/cons, etc.
19:32:26dom96shashlick, this is why I think some projects have RFC repos, someone writes a markdown document and creates a PR. Then people argue about its contents and make amendments until it's agreeable
19:32:36dom96That way you at least know what the latest spec is at all times
19:32:43dom96Updating the main text could work too
19:33:17disruptekthose changes could simply be PRs against a set of docs. we have that now.
19:33:24*sacredfrog joined #nim
19:34:45shashlickor maybe use the wiki
19:35:16FromGitter<mratsim> RFCs repo with PR to track amendment sounds good
19:35:31FromGitter<mratsim> plus with PR everyone can comment the exact line
19:36:26disruptekand it associates the changes with the areas of the spec that they change, for easy reference. free github integration, too.
19:37:28FromGitter<arnetheduck> is it *really* a tooling issue?
19:37:51disruptekonly if you want a way to programmatically document or define the spec.
19:42:36*kapilp quit (Quit: Connection closed for inactivity)
19:43:06livcdanyone atm working on a desktop app ?
19:45:29FromGitter<arnetheduck> here's one I did as a weekend hack: https://discuss.status.im/t/hello-stratus-toying-around-with-nimbus-and-qml/905
19:47:39*sacredfrog quit (Ping timeout: 248 seconds)
19:47:46livcdnice
19:51:18shashlick@livcd - i'm working on a text editor - https://github.com/genotrance/feud
19:53:04shashlickOk so what are the next steps - which repo do we use for this nimble RFC
19:54:36clyybbermratsim: do you mainly develop on os x ?
19:57:35FromGitter<mratsim> not anymore, linux mainly now
19:57:42livcdis there a torrent library ?
19:58:02FromGitter<mratsim> nim/RFCs?
19:58:38clyybbermratsim: Nice, was wondering because apparently nim does threadvar emulation on OS X and I thought that would bother you, seeing that you like HPC
19:58:50livcdi found some libtorrent wrapper hmm
19:58:59FromGitter<mratsim> I use OpenMP for multithreading
19:59:03dom96livcd, write a torrent lib in Nim :D
19:59:16livcddom96: if i would know how..
19:59:40dom96livcd, read the spec, look at other implementations, and do it :)
19:59:46FromGitter<mratsim> Also most of the multithreading in HPC space is stateless
20:01:30FromGitter<mratsim> I have a macro for the tricky cases when I need a state per thread: https://github.com/numforge/laser/blob/master/examples/ex05_tensor_parallel_reduction.nim#L25
20:02:20clyybberha, nice. laser is like a cave full of HPC treasures
20:02:40clyybberthank you for all your work.
20:04:15FromGitter<mratsim> not ready for prime yet :/ too much stuff to do and zero tests (though when I switch it should instantly profit from the tests in Arraymancer)
20:22:00FromGitter<zacharycarter> Was going to do some more work for work this evening, but I left my work laptop in the office and I can't remember the URLs to our slack or confluence, plus I don't know how to check mail remotely yet.
20:22:06FromGitter<zacharycarter> Guess I'm going to write some Nim instead :)
20:28:26clyybberhow "unfortunate" :p
20:30:01*bars0 joined #nim
20:30:24FromGitter<zacharycarter> hehe
20:31:06clyybberwait, so {.global.} doesn't actually break scoping :)
20:31:40clyybbernice.
20:35:54FromDiscord_<treeform> Is it possible to do some thing like this in nim: `var (projectId, datasetId, tableId) = destTable.split(".", 3)`
20:37:01clyybberwhat would the destTable be? A string?
20:37:07FromDiscord_<treeform> yes
20:37:18FromDiscord_<treeform> this is what I do now: ``` arr = destTable.split(".")
20:37:18FromDiscord_<treeform> projectId = arr[0]
20:37:18FromDiscord_<treeform> datasetId = arr[1]
20:37:18FromDiscord_<treeform> tableId = arr[2]```
20:37:49narimirantreeform tuple unpacking doesn't work for seqs
20:37:53narimiranbut i have something for you
20:38:04clyybberyou can do var (projectId, datasetId, tableId) = (arr[0], arr[1], arr[2])
20:38:10narimiranhttps://github.com/technicallyagd/unpack
20:38:42FromGitter<dom96> GitHub package registry huh
20:39:00FromDiscord_<treeform> unpack is neat will try it
20:39:44narimirani've used it for some of my stuff and i really like it
20:40:23FromGitter<dom96> Sounds like a great thing to integrate nimble into
20:46:12shashlick[d2, e2] <-- someSeq should have been someSeq <-- [d2, e2]
20:46:47narimiranum, no
20:47:07narimiranit's unpack, not pack :P
20:47:49shashlickoh okay, nevermind
20:48:01*krux02 quit (Remote host closed the connection)
20:49:33*Trustable quit (Remote host closed the connection)
20:50:41shashlicki like it - seems stdlib worthy
20:51:30FromGitter<dom96> For those that probably have no idea what I'm talking about:
20:51:46FromGitter<dom96> https://github.com/features/package-registry
20:55:18*Vladar quit (Remote host closed the connection)
20:58:31shashlicksounds cool
21:04:45FromDiscord_<kodkuce> @treeform you making some game, i wanted to use udp and shared memory , just thinked to w8 for this new runtime to be happyer , anyway did you fallow that gaffer of games thingy or just made pure from your head
21:09:15*abm quit (Ping timeout: 248 seconds)
21:09:15*Kaivo quit (Quit: WeeChat 2.4)
21:09:18clyybberdom96: Ugh, more dependency on github is not a good thing IMO
21:09:44*nsf joined #nim
21:10:08*djellemah joined #nim
21:14:49*kapilp joined #nim
21:18:39FromGitter<mratsim> Seems like Gitlab as something similar: https://docs.gitlab.com/ee/administration/packages.html
21:19:10FromGitter<mratsim> or not, doesn't seem as polished
21:25:04*jjido joined #nim
21:27:07*sacredfrog joined #nim
21:31:33*nsf quit (Quit: WeeChat 2.4)
21:34:30*sacredfrog quit (Ping timeout: 252 seconds)
21:35:26*Kaivo joined #nim
21:38:17FromDiscord_<treeform> @kodkuce Yes I am making a game. I am using mostly of my own libraries.
21:39:05FromDiscord_<treeform> I am using udp, but not shared memory. I don't know about gaffer.
21:47:34shashlick@narimiran - all 0.19.6 builds are ready if you didn't notice already
21:55:08FromDiscord_<exelotl> does intset provide any guarantees about the iteration order?
21:56:49FromGitter<jrfondren> @exelotl it uses hashes, so I'd expect not
21:57:48narimiranshashlick: i did, thanks
22:00:02*solitudesf quit (Ping timeout: 245 seconds)
22:00:04FromGitter<mratsim> One day will have the BTrees Araq promised (and already wrote) and we can have efficent "SortedSet" and "SortedTable"
22:04:52FromDiscord_<exelotl> wow using IntSet to store color palettes is super efficient it seems :)
22:05:02shashlicki'm testing the armv7a build for nightlies since someone was interested
22:05:14*cgfuh quit (Quit: WeeChat 2.3)
22:11:03shashlickLooks like armv7a works just as well - will add to nightlies soon
22:11:10clyybbermratsim: AFAIK so far the BTrees arent faster (yet?)
22:11:18clyybberthan a normal hashSet
22:11:28FromGitter<mratsim> but they are much more efficient to keep sorted
22:12:15clyybberah, right. you were talkin about SortedSet sorry :p
22:12:26*rnrwashere joined #nim
22:19:39*djellemah quit (Ping timeout: 248 seconds)
22:21:57*abm joined #nim
22:22:27*sz0 quit (Quit: Connection closed for inactivity)
22:23:35*narimiran quit (Ping timeout: 258 seconds)
22:26:16*PrimHelios quit (Max SendQ exceeded)
22:26:36*PrimHelios joined #nim
22:34:37*rnrwashere quit (Remote host closed the connection)
22:42:32*rnrwashere joined #nim
22:58:20*cyberjpn joined #nim
23:02:26*rnrwashere quit (Remote host closed the connection)
23:27:32clyybbergood night
23:27:34*clyybber quit (Quit: WeeChat 2.4)
23:55:25FromGitter<zacharycarter> treeform: do you have any screenshots?
23:59:09*djellemah joined #nim