<< 15-11-2019 >>

00:06:30*vsantana quit (Remote host closed the connection)
00:10:23*vsantana joined #nim
00:17:41FromGitter<erhlee-bird> I'm trying to start hacking on the Nim compiler for the first time. ⏎ In particular, I'm looking at #6198. I'm working in compiler/ccgstmts.nim. ⏎ ⏎ Is it reasonable to sprinkle echo statements in the code or is there some other logging mechanism I haven't discovered yet for debugging the compiler? [https://gitter.im/nim-lang/Nim?at=5dcdeea56ba2347d2d958d7c]
00:17:43disbothttps://github.com/nim-lang/Nim/issues/6198
00:17:45disbot^ is pragma constructor Unavailable?
00:17:47disbot^ snippet at https://play.nim-lang.org/#ix=21DV 😏
00:17:57disruptekuse echo statements.
00:18:31FromGitter<erhlee-bird> cool, thank you
00:19:12disruptekhey, it works.
00:20:24FromGitter<erhlee-bird> totally, just wanted to make sure I wasn't missing out on some other awesome machinery
00:21:00disrupteki don't know of anything awesome and it seems that everyone just uses echo, so... 🤷
00:21:35FromGitter<deech> @erhlee-bird There are better ways, https://github.com/nim-lang/Nim/blob/devel/compiler/msgs.nim#L245 for example.
00:22:37FromGitter<deech> If you're in a proc that has a `PContext` and `PNode` you can use that to make it so debug messages only print when you're in a test file, eg: ⏎ ⏎ ```if `??`(c.config,n.info,"my-test-file.nim"): ⏎ echo ...``` [https://gitter.im/nim-lang/Nim?at=5dcdefcdeeb63e1a83b51615]
00:28:01FromGitter<erhlee-bird> the procs in ccgstmts.nim are mostly `p: BProc, e: PNode)` and I'm not immediately seeing a way to go from either of those to a PContext though I see the PContext type used in some of the `sem{xxx}.nim` files
00:28:56FromGitter<erhlee-bird> @deech side note, I really enjoyed your lambda world talk
00:30:06FromGitter<deech> Hey thanks!
00:30:25FromGitter<deech> You can still use `config`. https://github.com/nim-lang/Nim/blob/39290cf88c5047e86dc4894e3190c63d5985f56f/compiler/cgendata.nim#L167
00:33:10FromGitter<erhlee-bird> awesome, I'm going to try that out
00:33:48*uu91 quit (Read error: Connection reset by peer)
00:34:03*uu91 joined #nim
00:44:23*vsantana quit (Remote host closed the connection)
00:49:35madpropsis vscode as annoying with python?
00:49:41madpropsthe automatic indentation thing is almost broken
00:50:50disruptekmany of us use vim and emacs with excellent nim support.
00:50:54*vsantana joined #nim
00:53:47*Jjp137 quit (Read error: Connection reset by peer)
01:00:41madpropsis there a preferred license for libraries?
01:01:40disruptekMIT
01:02:55FromDiscord<treeform> MIT
01:04:43FromDiscord<k1tt3hk4t> M I T
01:06:34madpropsi read that as freeform MIT and got confused
01:09:30disruptekhttp://ix.io/21E2
01:11:07*msmorgan quit (Ping timeout: 252 seconds)
01:11:07*euantor quit (Ping timeout: 252 seconds)
01:11:13*LyndsySimon quit (Ping timeout: 250 seconds)
01:11:13*nimblepoultry quit (Ping timeout: 250 seconds)
01:11:13*zielmicha__ quit (Ping timeout: 250 seconds)
01:11:17*msmorgan joined #nim
01:11:30*l1x quit (Ping timeout: 252 seconds)
01:11:30*zielmicha__ joined #nim
01:11:51*MD87 quit (Ping timeout: 252 seconds)
01:11:52*matti quit (Ping timeout: 252 seconds)
01:12:05*d10n-work quit (Ping timeout: 250 seconds)
01:12:14*euantor joined #nim
01:13:14*MD87 joined #nim
01:13:16*nimblepoultry joined #nim
01:13:23*LyndsySimon joined #nim
01:13:25*l1x joined #nim
01:13:42*matti joined #nim
01:13:48*d10n-work joined #nim
01:14:50*GordonBGood quit (Ping timeout: 240 seconds)
01:16:35*GordonBGood joined #nim
01:23:51rockcaveradisruptek I found something similar already reported https://github.com/nim-lang/Nim/issues/11764
01:23:54disbot^ HashSet[uint64] slow insertion depending on values
01:23:55disbot^ snippet at https://play.nim-lang.org/#ix=21E6 😏
01:28:57*Kevin5 joined #nim
01:29:36clyybber1erhlee: If you need more info on a node you can print its ast via `debug node`
01:30:19clyybber1erhlee: Otherwise just echo the nodes and you will get the ast rendered as is
01:30:37clyybber1as it would look as code
01:30:39FromGitter<erhlee-bird> thanks @clybb
01:31:02FromGitter<erhlee-bird> clyybber1
01:31:18clyybber1np
01:31:44*clyybber1 is now known as clyybber
01:32:04FromGitter<erhlee-bird> I wanted to see what flags were being set on a particular PSym and so I have ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5dce001452b73c7cb21cbe76]
01:32:55clyybberyou should also be able to just do `echo v.flags`
01:33:44FromGitter<erhlee-bird> nice, I've changed to that
01:39:42*vsantana quit (Remote host closed the connection)
01:40:51*vsantana joined #nim
01:45:43*abm quit (Quit: Leaving)
01:48:31*crem quit (Ping timeout: 252 seconds)
01:51:00*crem joined #nim
01:53:05*clyybber quit (Quit: WeeChat 2.6)
01:59:12madpropswondering if you could take a look before sending the pull request https://github.com/madprops/nap
02:02:27*uu91 quit (Ping timeout: 252 seconds)
02:03:04*uu91 joined #nim
02:08:02madpropsdid some readme fixes
02:16:20*agohoth joined #nim
02:16:29agohothhello
02:16:59*notgne2 quit (Quit: ZNC 1.7.4 - https://znc.in)
02:17:22agohothhttps://github.com/pragmagic/karax where is the database connection part?
02:22:37*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
02:24:23*ng0_ joined #nim
02:26:48*ng0 quit (Ping timeout: 260 seconds)
02:33:59disruptekrockcavera: nice catch.
02:43:44*cgfuh quit (Quit: WeeChat 2.5)
02:46:02*lritter quit (Ping timeout: 240 seconds)
02:47:11*lritter joined #nim
02:52:33*agohoth quit (Remote host closed the connection)
02:53:00*Jjp137 joined #nim
03:22:19*endragor joined #nim
03:25:38*endragor quit (Remote host closed the connection)
03:25:44*endragor joined #nim
03:50:13madpropsis {a:1, b:2} something?
03:50:24madpropsor do i always need toTable to achieve some sort of hashmap
04:14:30*nif quit (Quit: ...)
04:14:39*nif joined #nim
04:24:29*Kevin5 quit (Ping timeout: 250 seconds)
04:27:31FromDiscord<Kaynato> Normal to find this inside nimcache?
04:27:31FromDiscord<Kaynato> https://cdn.discordapp.com/attachments/371759389889003532/644755333742592021/unknown.png
04:42:51*chemist69 quit (Ping timeout: 246 seconds)
04:45:04*chemist69 joined #nim
04:48:04*nsf joined #nim
05:15:27*nif quit (Quit: ...)
05:15:36*nif joined #nim
05:28:55madpropsif i make a module's proc * is it * to the user if i import/use it in the main file?
05:29:35disruptekit's only exported from the module where it's exported. it's only imported into the module where it's imported.
05:31:43*Kevin5 joined #nim
05:32:35madpropsok i was moduralizing .. but most functions are from the public api
05:32:44madpropsin the end i had an empty main file
05:32:47madpropswhich made no sense
05:36:21*dddddd quit (Remote host closed the connection)
05:42:24*theelous3 joined #nim
05:45:23madpropsjust discovered nim if/else returns an expression like rust, which is great
05:45:34madpropsor returns a value i mean
05:46:05disruptekso does case and block.
05:46:12madpropsawesome
05:47:29FromDiscord<demotomohiro> @Kaynato, it is normal in windows.
05:49:23FromDiscord<demotomohiro> @madprops, they are called if/when/case/block expression
05:49:32FromDiscord<demotomohiro> https://nim-lang.org/docs/manual.html#statements-and-expressions-if-expression
05:51:09FromDiscord<demotomohiro> there is also try expression
05:52:48FromDiscord<demotomohiro> There is forExpr in Grammar, but I don't know about for expression.
05:52:49FromDiscord<demotomohiro> https://nim-lang.org/docs/manual.html#syntax-grammar
06:02:28*uu91 quit (Read error: Connection reset by peer)
06:02:42*uu91 joined #nim
06:03:20madpropshow can i do this better? https://play.nim-lang.org/#ix=21ED
06:05:02madpropsis there a way to access variables by a string?
06:07:25madpropsapart from making a table
06:07:49*narimiran joined #nim
06:11:50madpropshow can i do what im trying to do? https://play.nim-lang.org/#ix=21EF
06:12:02madpropsbasically i want some to have an empty string seq
06:19:16madpropsoh tables can't have mixed types
06:19:43narimiranuse json for mixed types
06:23:12*ltriant quit (Quit: leaving)
06:29:26*oculuxe joined #nim
06:30:52madpropsis there no way to have a redefined reusable variable for repetitive intermediary steps?
06:30:54*letto_ joined #nim
06:31:53madpropsnvm
06:31:59*nif quit (Quit: ...)
06:32:29*jfoutais1 joined #nim
06:32:58*ng0_ quit (Remote host closed the connection)
06:34:09*ng0_ joined #nim
06:34:10*nif joined #nim
06:37:30*letto quit (*.net *.split)
06:37:30*sacredfrog quit (*.net *.split)
06:37:30*jxy quit (*.net *.split)
06:37:30*onionhammer quit (*.net *.split)
06:37:30*disbot quit (*.net *.split)
06:37:31*oculux quit (*.net *.split)
06:37:31*junland quit (*.net *.split)
06:37:31*dv^_^ quit (*.net *.split)
06:37:31*shadowbane quit (*.net *.split)
06:37:31*lj00nal quit (*.net *.split)
06:37:31*jfoutaise quit (*.net *.split)
06:37:32*mal`` quit (*.net *.split)
06:37:32*Mister_Magister quit (*.net *.split)
06:37:38*Araq quit (*.net *.split)
06:37:38*acidx quit (*.net *.split)
06:37:38*mipri quit (*.net *.split)
06:37:39*gsingh93 quit (*.net *.split)
06:38:00*shadowbane joined #nim
06:39:03*Kevin5 quit (Ping timeout: 246 seconds)
06:42:06*u9898287 joined #nim
06:42:45*mipri joined #nim
06:42:45*Araq joined #nim
06:42:45*acidx joined #nim
06:42:45*gsingh93 joined #nim
06:43:19*jfoutais1 quit (Quit: leaving)
06:44:14*solitudesf joined #nim
06:46:56FromDiscord<demotomohiro> I don't understand your question so much, but I think this macro and template are what you want.
06:46:57FromDiscord<demotomohiro> https://play.nim-lang.org/#ix=21Gj
06:48:51*sacredfrog joined #nim
06:48:51*jxy joined #nim
06:48:51*onionhammer joined #nim
06:48:51*disbot joined #nim
06:48:51*junland joined #nim
06:48:51*dv^_^ joined #nim
06:48:51*lj00nal joined #nim
06:48:51*mal`` joined #nim
06:48:51*Mister_Magister joined #nim
06:50:44*mipri left #nim (#nim)
06:53:59*uu91 quit (Ping timeout: 250 seconds)
06:54:24*uu91 joined #nim
07:15:18*uu91 quit (*.net *.split)
07:15:18*sacredfrog quit (*.net *.split)
07:15:18*jxy quit (*.net *.split)
07:15:18*onionhammer quit (*.net *.split)
07:15:18*disbot quit (*.net *.split)
07:15:18*junland quit (*.net *.split)
07:15:19*dv^_^ quit (*.net *.split)
07:15:19*lj00nal quit (*.net *.split)
07:15:19*mal`` quit (*.net *.split)
07:15:19*Mister_Magister quit (*.net *.split)
07:16:57*uu91 joined #nim
07:16:57*sacredfrog joined #nim
07:16:57*jxy joined #nim
07:16:57*onionhammer joined #nim
07:16:57*disbot joined #nim
07:16:57*junland joined #nim
07:16:57*dv^_^ joined #nim
07:16:57*lj00nal joined #nim
07:16:57*mal`` joined #nim
07:16:57*Mister_Magister joined #nim
07:19:57*nif quit (Quit: ...)
07:20:07*nif joined #nim
07:22:36*hemite left #nim (#nim)
07:23:36*letto_ quit (Quit: Konversation terminated!)
07:25:10*letto joined #nim
07:25:49*jjido joined #nim
07:26:13*theelous3 quit (Ping timeout: 252 seconds)
07:30:00*tane joined #nim
07:44:28*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
07:45:59*PMunch joined #nim
07:47:33FromDiscord<Kaynato> Thanks, demotomohiro
07:49:01*lritter quit (Ping timeout: 250 seconds)
07:53:41*lritter joined #nim
08:00:00*gmpreussner quit (Quit: kthxbye)
08:00:28PMunchHmm, is it theoretically safe to have a global GC-ed variable that is initialised before threads and which is only read from in threads?
08:01:49Araqprobably not
08:02:09PMunchWhy not?
08:02:23PMunchIf it never changes and the threads only read from it
08:04:56*gmpreussner joined #nim
08:06:04PMunchWhat is the correct way to do read-only GC-safe memory in Nim then?
08:06:38Araqdon't use GC memory
08:07:07Araqrefcounting turns reading operations into potential writes, it's not safe enough to allow it
08:07:11PMunchIs there a convenient way to do that?
08:08:17PMunchTake a string for example
08:09:18*ng0_ is now known as ng0
08:09:48PMunchOf course I could allocate a cstring, but that means I need to convert it to a string every time I want to use it somewhere that only accepts strings..
08:14:24Araqwelll now you figured out Nim's main point of pain IMO :P
08:16:08PMunchHaha, I guess yeah..
08:16:57PMunchI guess a ptr string isn't safe to read from either then?
08:17:55*lritter quit (Ping timeout: 252 seconds)
08:18:25PMunchIt's so weird, everything else in Nim just feels so easy and correct. But doing anything multi-threaded just feels wrong
08:18:54PMunchIt's immediately into passing pointers around, and throwing out a lot of safety
08:24:51*floppydh joined #nim
08:28:16Araqyup but --gc:arc is coming
08:28:20FromGitter<yglukhov> Hey guys, is there any way to "emulate" let behavior with a pointer? Like `const T&` in cpp. I tried `template foo: int = pInt[]`, but it still can be assigned to, despite the template "return" type is not var.
08:28:28FromGitter<yglukhov> Is it bug btw?
08:28:41Araqnot in my opinion
08:28:48PMunchAraq, what is --gc:arc? And how soon is it coming?
08:31:00FromGitter<yglukhov> Araq: but then is there any difference between `T` vs `var T` when used as template return type?
08:31:51Araqno. templates have inlining semantics
08:32:08PMunchyglukhov: https://play.nim-lang.org/#ix=21Oi
08:32:15Araqlikewise 'var T' as a template parameter type hardly matters
08:32:38*uu91 quit (Read error: Connection reset by peer)
08:32:51Araqbut there are other bugs related to this so maybe we should flesh out the spec and change it, dunno
08:32:54PMunchBy the way it doesn't need () on line 19
08:32:58PMunchIt could just be foo as well
08:33:01PMunchSame error
08:33:07*uu91 joined #nim
08:33:28FromGitter<yglukhov> PMunch: but it will make a copy on every reference. My goal is to make it a dereference
08:33:39FromGitter<yglukhov> i.e. to avoid copies
08:36:04PMunchAh, well that probably isn't possible..
08:36:13*uu91 quit (Read error: Connection reset by peer)
08:36:26*uu91 joined #nim
08:36:29PMunchFor that functionality you would probably need to create some types and accessor templates
08:36:55FromGitter<yglukhov> Araq: yeah it feels like var should be accounted for during overload resolution, and return type semantics. I mean it just makes sense, no? :)
08:37:28FromGitter<yglukhov> In fact I thought it is the case already for overload resolution.
08:38:07Araqfor OR it is respected I think
08:38:41Araqbut mutability is not attached to a type so if you do template t(): int = xvar
08:38:50Araqthen xvar is as mutable as it always was
08:38:53FromGitter<yglukhov> hmmm... The following works as expected ``` ⏎ template bar(a: var int) = a = 5 ⏎ ⏎ let b = 123 ⏎ bar(b) ... [https://gitter.im/nim-lang/Nim?at=5dce641d92a84f79fe6e2359]
08:39:20Araqit IS logical.
08:39:22FromGitter<yglukhov> error: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5dce643968ad1c4a0fcd1769]
08:40:00FromGitter<yglukhov> so var is checked during overload resolution, right? then why the var in res type not checked? :)
08:40:12Araqmutability is an aspect of the location, not of the type, there is no 'const int' type
08:42:29FromGitter<yglukhov> Aah i see. But then with `template foo: int = pFoo[]`, `foo` will produce a location, right? Can we add the var/let aspect at this point?
08:43:51Araqno because mutability is not even tied to a location, but to a symbol, pFoo can be "immutable", pFoo[] *never* is immutable
08:45:25FromGitter<yglukhov> ok, i see.
08:48:21*Vladar joined #nim
08:52:51PMunchBut yeah Araq, what is --gc:arc, and when will it be available?
08:53:13PMunchDo you have a link to anything explaining it? I've seen you mention it, but never really seen an explanation of what it is :P
08:57:05*u9898287 quit (Quit: u9898287)
08:57:23*u9898287 joined #nim
08:57:36PMunchhttp://ix.io/21Om/nim <- that seems to work fine by the way
08:57:46PMunchWell, at least it doesn't corrupt the string
09:03:07AraqPMunch, https://github.com/nim-lang/RFCs/issues/177
09:04:35Araqit exists in the permanent state of 'vaporware'
09:19:18PMunchSo not coming anytime soon then..
09:22:35taneDo I read the manual right in: UncheckedArray[T] results in a C-style array of type T?
09:23:16PMunchtane, pretty much yeah
09:24:11PMunchIt's really only meant to be used for C interop I think
09:24:34taneyes, can I construct an UncheckedArray[T] from a ptr T + length?
09:24:52PMunchWell you don't really need the length
09:24:57*solitudesf quit (Ping timeout: 246 seconds)
09:25:02PMunchThat's the "Unchecked" part
09:25:31taneah yes, the length comes into play when using toOpenArray
09:25:49tanemy point is: given that I'd get data from C, I'd like to use all the fancy stuff that works on openArrays
09:25:55tanee.g. "reverse" etc
09:26:24PMunchYeah, then toOpenArray(myUncheckedArray, myLen)
09:29:39tanePMunch, so, let's say `var x : ptr int`, I performed `var y = cast[ptr UncheckedArray[int]](x)` and used converted it to an openArray of the right size. Is this the way to go?
09:30:01tane-used :)
09:30:33tanevalgrind doesn't complain so far, so it works, question is, will it work in the future too
09:31:57PMunchPretty much yeah: http://ix.io/21Ou/nim
09:32:24taneok, this is great! :) thanks
09:32:31PMunchNot sure why you would have a "ptr int" to begin with though
09:32:36PMunchIf it points to an array of integers
09:32:55tanePMunch, if you get such data from outside, i.e. a C library, you cannot do much
09:33:12PMunchWell you could declare that it was a ptr UncheckedArray[int] to begin with :P
09:33:27tanesure, but that's the same thing
09:33:44tanealso, if you wanted to do manual management with `create` and `dealloc` you'd have the same problem
09:34:01tanefor whatever reasons one would need that, all that matters to me is that it's possible
09:34:10PMunchYou shouldn't use create and dealloc with C interop I think
09:34:24PMunchWell, you could in some cases I guess
09:34:45PMunchOh yeah, anything is possible :)
09:34:48tanemy point is: you can `create` memory and leverage the algorithms working on `openArray`s
09:34:58PMunchYeah
09:36:03taneI work on optimization heuristics most of the time, after the obvious correctness requirement, speed is my main concern :)
09:41:23dom96Araq: isn't ARC what Swift/ObjC does?
09:48:30Araqdom96, yup
09:53:08FromGitter<alehander92> hm, so thats why
09:53:10FromGitter<alehander92> its called arc
09:54:26FromGitter<alehander92> do you guys use nested loops often
09:54:51FromGitter<alehander92> i am trying to figure out if one feature i work on should support them specifically
09:55:21FromGitter<alehander92> i feel like they happen rarely, but it might be just my bias to not think of this case
09:55:36Araqthey are everywhere
09:56:10FromGitter<alehander92> oh now i have to make statistics
09:57:48narimirannested loops happen rarely? not in the code i write/read :'(
09:58:18FromGitter<alehander92> hmm, what i mean is that often
09:58:33FromGitter<alehander92> one has a for, another for but extracts the internal logic into another function
09:58:38FromGitter<alehander92> so its not directly nested sometimes
09:58:49FromGitter<me7> hi all, anyone can help answer me about using db_sqlite with jester?
09:59:13FromGitter<me7> I saw in htop that my app memory usage keep rising when run jester with sqlite
09:59:44FromGitter<me7> my question is how to properly return memory
09:59:56FromGitter<me7> e.g. close database with jester shutdown
09:59:58FromGitter<mratsim> @alehander92 nested loop happens so often for me that I wrote a million lines of code to deal with them and I'm still not happy :p
10:00:17FromGitter<mratsim> million LOC according to Nim when it compiles Arraymancer tests :p
10:00:44FromGitter<me7> my code open database at the top ⏎ let db = open("chinook.db","","","")
10:00:59FromGitter<alehander92> @mratsim yeea
10:01:01FromGitter<me7> get "/": ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5dce775dca778c1fbf0864d3]
10:01:08FromGitter<alehander92> in math-y code i expect it a lot indeed
10:01:16*endragor quit (Remote host closed the connection)
10:01:22Araqputting the for loop into a different proc happens frequently but not nearly frequently enough
10:01:33Araqyour stuff is better ready for nested loops :P
10:01:35FromGitter<alehander92> yes, valuable feedback thanks
10:02:12FromGitter<alehander92> ugh, the problem it makes it like 3dimentional
10:02:22Araqhint: nesting 'if' statements is also common ;-)
10:02:26FromGitter<alehander92> and i cant even imagine 3-nested loops
10:02:50FromGitter<alehander92> if-s are ok, its' about repeated visits of the same line
10:03:06FromGitter<alehander92> (so label: ... goto also qualified
10:07:24AraqPMunch, use devel, avoid closures try --gc:arc
10:09:45Araqand I just found the closure problem
10:09:47Araq:-)
10:10:48PMunchYay :)
10:10:52Araqhow many bugs can there be in 700 lines? turns out. a lot.
10:11:00livcdfearless multithreading with Nim when ?
10:11:08PMunchAvoid closures because of the problem, or because it doesn't work with --gc:arc?
10:11:27*tklohna joined #nim
10:13:20Araqlivcd, christmas but we don't know the year :P
10:13:35AraqPMunch, because of implementation bugs, in theory it'll work
10:13:49PMunch@me7, use a `close` on the database at the end of your program?
10:16:45livcdbut unless i need to share data between the threads it is not that bad right ? right ?
10:19:08Araqright
10:19:46Araqbut Nim users are not buying Erlang-like designs :P
10:22:01FromGitter<mratsim> let's do fearless concurrency first :p
10:25:45Araqmratsim: ever noticed that "trial deletion" and "can I move this ref to a different thread" are the same problem?
10:26:55FromGitter<mratsim> Regarding my progress on Picasso, I finished the spawn/sync mechanism yesterday after rebuilding the PoC from scratch. But I will probably have to redo it a 3rd time. The control flow is too tangle and even me often get lost. I.e. since 2 weeks ago (https://github.com/nim-lang/RFCs/issues/160#issuecomment-549199561). I've reimplemented all the logic while splitting them in coherent files, but while doing that I realized
10:26:55FromGitter... that I still had mainainability problems which will require the following updates: ⏎ ⏎ 1) refactoring the bitsets to support more than 32 CPUs, while having efficient random number generation support or efficient uncompression into a stack array ⏎ 2) Removing globals because it's very bad for unit-testing ⏎ 3) I ... [https://gitter.im/nim-lang/Nim?at=5dce7d6f6ba2347d2d99873a]
10:27:48FromGitter<mratsim> @Araq, yes but from the other angle, can I take a raw pointer to this ref without the GC moving town
10:29:22Araqso ... do you need movable ref/closure based tasks?
10:29:34Araqbecause that's pretty much the problem I'm solving
10:42:07FromDiscord<mratsim> mmmmmm that would be one way
10:42:41FromDiscord<mratsim> but otherwise I prefer to serialize the value captured
10:42:45FromDiscord<mratsim> values*
10:43:15FromDiscord<mratsim> I don't want to have to deal with 2 Tasks structure, one for nimcall and one for closure
10:43:34FromDiscord<mratsim> and the potential memory management of GC.
10:44:21FromDiscord<mratsim> for example allocating Futures on the stack with alloca improved my perf reduced my overhead by a lot on short-lived task like Fibonacci
10:44:40FromDiscord<mratsim> 1s for fib(40) with heap and 0.4 with alloca
10:44:50FromDiscord<mratsim> Intel TBB is at 0.6
10:45:07FromDiscord<mratsim> i.e. the less I have to deal with memory management, the better
10:46:12Araqbut this stuff must be compatible with async, no?
10:46:42*tklohna left #nim ("Leaving")
10:46:47Araqyou can't avoid closures and refs in the long run so they'd better be shareable
10:47:31FromDiscord<mratsim> for async, I think the best is to start an event loop per thread
10:48:05FromDiscord<mratsim> but passing closures between threads is useful
10:48:27FromDiscord<mratsim> passing refs, yes if you pass ownership and the source thread cannot access them anymore
10:48:43FromDiscord<mratsim> i.e. the Send/Sync traits in Rust
10:52:28Araqwe don't need these traits once we moved to precise refcounting
10:52:37Araqyou can simply check for refcount == 1
10:52:49Araqwell, not quite
10:52:54Araqbut it's simple enough
10:55:33FromDiscord<mratsim> And assuming we move to threads:on by default, will it be possible for the dev to choose per type between Arc and Rc
10:55:55FromDiscord<mratsim> because lot of code will stay single-threaded and wouldn't need to pay the Arc tax
10:56:40AraqI'm still thinking about this
10:57:39Araqseems like we can live with non-atomic refcounting if we enforce moves between threads
10:57:44*Vladar quit (Quit: Leaving)
10:58:15Araqthen atomic refcounting for sharing can remain the task of a dedicated shared pointer type
10:58:37Araqseems the best design so far
11:00:14Araqthis move check needs to see if there are other outer refs pointing inside the-to-be-moved subgraph
11:00:37Araqwhich is the same thing as trail deletion for cycle detection ;-)
11:00:42FromDiscord<itmuckel> Hey guys, is there some documentation on how to document types? 🤔
11:01:29FromDiscord<itmuckel> I tried this, but I'm not sure if this is right:
11:01:29FromDiscord<itmuckel>
11:01:29FromDiscord<itmuckel> Rotation* = object
11:01:29FromDiscord<itmuckel> ## Represents a rotation in degrees.
11:01:29FromDiscord<itmuckel> ## Cannot overflow/underflow.
11:01:30FromDiscord<itmuckel> value: int
11:01:51narimirantry this: Rotation* = object ## \
11:02:25Araqso we solve both problems with the same algorithm, quite elegant. beating Swift and Rust... *cough*
11:03:55*krux02 joined #nim
11:04:00FromDiscord<mratsim> We need a new slogan "Fearless ???"
11:05:56Araq"Fearless heap memory"
11:06:08FromDiscord<mratsim> I agree that shared data structure should be done in libraries, we can provided a Arc wrapper, but stuff like shared tables, shared queues requires a lot of work
11:06:11FromDiscord<itmuckel> @narimiran Tried that, still VSCode doesn't pick it up. Which is weird, because the nimble package sdl2_nim does the exact same thing, but I can get its docstrings, when I hover its types.
11:06:25Araqbecause as far as I'm concerned Rust doesn't model a heap.
11:06:27FromDiscord<mratsim> and then you get into hazard pointers, and other fancy memory management schemes
11:06:50FromGitter<alehander92> i never understood well this `rust doesnt model a heap well` thing
11:06:53Araqyeah but once the allocs are shared you can put a lock around the std tables and sets and it works ok'ish
11:06:59*solitudesf joined #nim
11:07:11FromDiscord<mratsim> when you have 2-4 threads
11:07:13FromGitter<alehander92> can you give a short example where it shows
11:07:56FromDiscord<itmuckel> Guys, can we get more channels here? Like "editors", "beginners", "compiler" etc.? I feel like everything is stuffed into "general". 😄
11:09:10FromDiscord<mratsim> I think we should start on the forum for that, to get a feel of the size of each community
11:09:23FromGitter<alehander92> we had several requests for that, but i am not sure if people would find a `nim-beginner` chat easily
11:09:44FromGitter<alehander92> e.g. in slack it's obvious , but no idea how people find new channels in irc
11:10:12FromDiscord<itmuckel> In Discord it's the same thing
11:10:12FromDiscord<itmuckel> https://cdn.discordapp.com/attachments/371759389889003532/644856668794126369/unknown.png
11:10:12FromDiscord<mratsim> there can be a message in the welcome message
11:10:30FromDiscord<mratsim> yes but we don't want a discord only beginner questions
11:10:37FromGitter<alehander92> maybe with `#nim` which cant be usable and just points to "choose one of those channels"
11:10:43FromDiscord<mratsim> and we also want them logged into irclogs.nim-lang.org
11:10:44FromGitter<alehander92> but i guess this is a no-go
11:10:56*nsf quit (Quit: WeeChat 2.6)
11:11:07FromDiscord<itmuckel> Lisp Discord does it really well
11:11:07FromDiscord<itmuckel> https://cdn.discordapp.com/attachments/371759389889003532/644856901477335080/unknown.png
11:11:27FromDiscord<mratsim> but do they have IRC and Gitter relay?
11:11:43FromGitter<alehander92> yeah a lot of nim community is on irc
11:11:45FromDiscord<itmuckel> I think so. A lot of people moved to IRC or so 😦
11:12:02FromGitter<alehander92> from what ive seen usually some channels are mapped to irc
11:12:09FromGitter<alehander92> e.g. in proglangdesign
11:12:24FromDiscord<mratsim> That would be a good bot project 😉 the Discord <-> IRC relay is a bit flacky
11:12:28FromDiscord<itmuckel> At least in the gamedev channel I get a lot of relay messages which look like shit^^
11:12:46FromDiscord<itmuckel> Compare this
11:12:46FromDiscord<itmuckel> https://cdn.discordapp.com/attachments/371759389889003532/644857308417097728/unknown.png
11:12:52*u9898287 quit (Quit: u9898287)
11:13:04FromDiscord<itmuckel> To this
11:13:04FromDiscord<itmuckel> https://cdn.discordapp.com/attachments/371759389889003532/644857390717468689/unknown.png
11:13:26FromDiscord<mratsim> That's the bot
11:13:34FromGitter<alehander92> this can be easy to solve
11:13:38FromGitter<alehander92> by using 2 bots
11:13:46FromDiscord<itmuckel> Yeah, but it feels like I'm reading through a text file instead of using a chat program. lol.
11:13:47FromGitter<alehander92> which pass to each other
11:13:50FromGitter<alehander92> on each change of name
11:13:55FromDiscord<mratsim> The bot doesn't create a new context per person that writes a message on Gitter/IRC
11:13:57FromGitter<alehander92> thats what i mean
11:14:11FromGitter<alehander92> that it can create at least two contexts and switch between them
11:14:13FromDiscord<itmuckel> @mratsim exactly^^
11:14:16FromGitter<alehander92> if creating a new one for each nick
11:14:18FromGitter<alehander92> is too much
11:14:37FromGitter<alehander92> but notice that its similar for us on gitter/irc
11:14:43FromGitter<alehander92> e.g. discord edits / code pastes look bad
11:14:50FromGitter<alehander92> but this can be fixed quite well
11:15:00FromGitter<alehander92> with some additional logic
11:15:03FromDiscord<mratsim> So the solution is to find a better bot.
11:15:03FromDiscord<mratsim> At Status we have one that relay Gitter <-> discord, it works well, it supports Discord code and even message edition
11:15:17FromDiscord<mratsim> but for Ni we have Discord <-> IRC <-> Gitter AFAIK
11:15:20FromDiscord<mratsim> Nim*
11:15:25FromGitter<alehander92> autobot
11:15:31FromGitter<alehander92> yeah i've noticed its different
11:16:27FromDiscord<itmuckel> (And this discussion could be moved out of general, because all this Arc/Rc/parallelism discussion from a few minutes ago is now buried.^^)
11:16:50FromGitter<alehander92> i think threaded conversations in the same channel are even better
11:16:56FromDiscord<mratsim> yes but moving it out would prevent people from interacting
11:17:00FromGitter<alehander92> but this is almost impossible for gitter/irc/discord combo
11:17:02FromGitter<alehander92> i think
11:17:06FromDiscord<mratsim> yeah, but that would require slack
11:17:12FromDiscord<mratsim> maybe when IRCv3
11:17:13FromGitter<alehander92> yeah or zulip
11:17:14FromDiscord<mratsim> 😛
11:17:21FromGitter<alehander92> does discord have those
11:17:24FromDiscord<mratsim> no
11:17:45FromDiscord<itmuckel> Nah "Let's move to channel xy" and people interested in the conversation move to the same channel to read on. Works well in Lisp Discord.
11:17:57FromGitter<alehander92> but even when talking about compilers
11:18:01FromGitter<alehander92> sometimes you can have 2-3
11:18:05FromGitter<alehander92> different topics in the same time
11:18:11FromDiscord<itmuckel> Yeah, that's okay
11:18:15FromGitter<alehander92> that's why i think the thread thing is better
11:18:37FromGitter<alehander92> and with threads you can quickly see all the different topics in the same place even if from quite different fields
11:18:46FromGitter<alehander92> but yeah, they're not an option
11:18:50FromDiscord<mratsim> One thing is that, I've seen here and there that one of Nim quality is its IRC channel that really felt lively
11:19:11FromDiscord<mratsim> anyway, I suggest you start a forum thread
11:19:30FromDiscord<mratsim> Give a number to your proposition/issues
11:19:37FromDiscord<mratsim> like issue 1. multiple channels
11:19:47FromDiscord<mratsim> issue 2. The bot quality on Discord
11:20:03FromDiscord<mratsim> this way people can pick apart what they want to discuss on
11:20:04FromGitter<alehander92> yeah thats true other irc-s seem lower traffic to me
11:20:20FromGitter<alehander92> which on the other hand is not perfect as often stuff becomes lost
11:20:39FromDiscord<mratsim> ping @kodkuce as well as he was also in favor of having more channels
11:24:21FromDiscord<kodkuce> i personaly used irc before, i like it more just it sux it doset have code formating 😦
11:25:23FromDiscord<kodkuce> discord is good only cuz its mainstream a lot of people on it, and atm has better UI then matrix/riot
11:30:18FromDiscord<kodkuce> so running detached processes, arguments for it example like in terminal, ./mailchecker --mypass="kifla" --myserver="1.1.22.33" , does this get loged if running from "proc execProcess" am asking security wise
11:30:53FromDiscord<kodkuce> ofc i would not run lxterminal -e some command just insted just command
11:31:14FromDiscord<kodkuce> am asking cuz would sux if somone can read my pass
11:31:56FromDiscord<kodkuce> i know if running form terminal i would have it in history, but am asking if running with "execProcess"
11:32:01krux02Araq: why did you rename alignas?
11:33:31FromDiscord<kodkuce> and hmm is there startProcess detached or am i blind
11:35:05*tane quit (Quit: Leaving)
11:35:25Araqkrux02, because it should be 'align'
11:36:12Araqwe're not restricted to C++'s silly "must have ugly words so that it doesn't bite older vendor specific words"
11:38:13krux02but align was something else
11:39:07krux02when a type is imported, it might make sense to declare the size and the alignment, so that the sizealignment algorithm can do its work.
11:41:09Araqvariables, fields and types can have 'align', no need for 2 separate pragmas for that
11:43:26krux02it causes less trouble, if they are separate words.
11:44:31FromDiscord<mratsim> if it's imported it can be called aligned though
11:45:01Araqhow so? types are not variables
11:45:26krux02thanks to `typedesc` variables may be types
11:45:29Araqwe also use a single 'importc' for vars/types/fields
11:46:20Araqand then you expect anybody to understand align vs alignas when it comes typedesc? I don't understand it
11:49:37*ponyrider is now known as eponyrider
11:49:51*eponyrider is now known as ponyrider
11:56:53*clyybber joined #nim
11:57:45clyybberI would also vote for one align, alignas is ugly and inconsistent
11:58:13FromDiscord<mratsim> it's consistent with C++ and C though
11:58:44FromDiscord<mratsim> I prefer align as well but that's really bikeshedding, it's not something that I typ that often
11:59:27clyybberstill
11:59:41clyybbernow we have the ability to still change it
11:59:56FromDiscord<mratsim> you broke my code 😉
12:00:11FromDiscord<mratsim> (joking, I didn't use it yet)
12:03:55*Hideki_ joined #nim
12:22:26*disruptek quit (Ping timeout: 240 seconds)
12:23:01*disbot quit (Ping timeout: 268 seconds)
12:25:05FromDiscord<kodkuce> can cligen somhow magicly handle passwords?
12:25:52*disbot joined #nim
12:26:28solitudesfwhat does that mean
12:26:39*disruptek joined #nim
12:29:13FromDiscord<kodkuce> hmm, means am kinda lost how do i hendle passwords for cli app, if i make it as argument its insecure cuz sombody can read history log, and if i make it ask for pasword on run, then duno if i can start as detached
12:29:58solitudesfwhat
12:30:19solitudesfwhat shell history has to do with your application?
12:30:33Araqterminal.readPasswordFromStdin
12:31:02*u9898287 joined #nim
12:31:07livcdor you could use env variables
12:32:23*krux02 quit (Remote host closed the connection)
12:32:38*krux02 joined #nim
12:38:10*vivus joined #nim
12:39:01*vivus quit (Remote host closed the connection)
12:42:39FromGitter<alehander92> align
12:42:47FromGitter<alehander92> does it do something different to alignas
12:43:00FromGitter<alehander92> if it does, it should be at least with different argument
12:43:15FromDiscord<kodkuce> am trying to make a scalable app gameserver, so example i have authserver , reg/profile server, loobyserver, 200 instance of gameserver, so am thinking how to spread config for each, i first did just next to authserver make a conf.json and it reads it up, then thought maybe i should make loobyserver spawn detached processes for 200 gameservers and on spawn pass arguments for stuff gamserver needs like db url/pass(here i thought if i put
12:48:35federico3kodkuce: are you on #nim-offtopic ?
12:49:22FromDiscord<kodkuce> irc or discord, can be anyway why?
12:50:22federico3IRC - in order not to spam this channel discussing configuration management
12:50:25FromDiscord<kodkuce> or asking if i should i go there
12:50:58*Vladar joined #nim
12:51:04FromDiscord<kodkuce> sure sorry, anyway i finished my tribestorm xD
13:02:45*drewr quit (Ping timeout: 250 seconds)
13:04:36*skelett quit (Quit: WeeChat 2.5)
13:13:37*disbot quit (Ping timeout: 240 seconds)
13:13:49*disruptek quit (Ping timeout: 252 seconds)
13:17:49*disruptek joined #nim
13:18:51*disbot joined #nim
13:24:53*solitudesf quit (Ping timeout: 245 seconds)
13:27:46*vsantana quit (Remote host closed the connection)
13:29:02*vsantana joined #nim
13:31:35*nsf joined #nim
13:37:04*dddddd joined #nim
13:45:08*Kaivo joined #nim
13:50:38narimiran@mratsim: this seems like something you might want to watch: http://cds.cern.ch/record/2157242 (i just started watching, don't know how good it is)
13:53:57clyybbernarimiran: Is it the one where luajit is faster than C++?
13:54:09narimiranclyybber: exactly that one
13:57:27*ehmry quit (Ping timeout: 252 seconds)
14:03:50*solitudesf joined #nim
14:11:44*ehmry joined #nim
14:12:18FromDiscord<mratsim> I did look into LuaJIT code when I wrote my interpreter optimization resources: https://github.com/status-im/nimbus/wiki/Interpreter-optimization-resources
14:13:07FromDiscord<mratsim> But the LuaJIT backend is really too complex to use
14:13:50FromDiscord<mratsim> However this is nice: http://lua-users.org/lists/lua-l/2011-02/msg00742.html
14:16:10FromDiscord<mratsim> About what 3.5 years ago, i tried to use Lua for neural networks as well
14:16:11*zacharycarter[m] joined #nim
14:17:00FromDiscord<mratsim> When the state-of-the art Go playing bot was from Facebook (before Alpha Zero) and developed in Lua: https://github.com/facebookresearch/darkforestGo
14:17:24FromDiscord<mratsim> I failed at "luarocks" and never touched Lua again 😛
14:17:34clyybbertorch was really nice to work with back when I used lua a bit more
14:17:45FromGitter<alehander92> hm, luarocks did work for me
14:17:46FromGitter<alehander92> iirc
14:18:00clyybberI never felt the need for luarocks
14:18:12clyybberBut thats because torch had its own updating method
14:18:20FromGitter<alehander92> ah interesting
14:18:20FromDiscord<mratsim> It was required for image libraries and Cuda bindings
14:18:24FromGitter<alehander92> i think i used char-rnn
14:18:29FromGitter<alehander92> but i dont remember what did it use
14:18:38clyybberalso loeve2d is a beautiful framework
14:18:52clyybberI could run my "games" even on the 3ds
14:18:56FromGitter<alehander92> ah it shows you're a german
14:19:07FromGitter<alehander92> you actually know how to transcribe umlaut to english
14:19:29clyybberalehander92: heh. My keyboard is actually a german one, but I changed the layout
14:19:38clyybberbecause the german layout is batshit insane
14:19:39krux02as a German, I usually type them: löve2D, even though it creats funny sounds in my head.
14:20:06clyybberkrux02: So you use the german keyboard layout?
14:20:14krux02I use de neo for the same reason.
14:20:24krux02I don't use standard layout.
14:20:53FromGitter<alehander92> interesting, is it only the yz
14:20:54FromGitter<alehander92> thing
14:20:55krux02de neo is good for German,English and programming
14:21:15FromDiscord<mratsim> I didn't check the German Layout but I know that the Swiss one is good, you don't need contorsions to use numbers, and you have access to French accentuations
14:21:17krux02the yz thing doesn't matter, the placement of {} sucks.
14:21:45FromGitter<alehander92> wow i cant imagine not direct numbers
14:21:56FromGitter<alehander92> i see
14:22:10FromDiscord<mratsim> the French layout is so bad for programmation. I think Nim would appeal to French due to the dumb bracket placement
14:22:15FromGitter<alehander92> interesting, we are pretty much used to double layouts
14:22:19clyybberalehander92: The worst thing about the standard german layout is having to press right alt and numbers for brakcets
14:22:23FromGitter<alehander92> but they would be confusing for latin lang
14:22:31clyybbermratsim: Looks like de and fr have the same problem
14:22:31krux02^^
14:22:39FromDiscord<mratsim> https://en.wikipedia.org/wiki/AZERTY#/media/File:KB_France.svg
14:22:53clyybberok wtf is that
14:23:16FromDiscord<mratsim> I don't know why square is such a priority for example
14:23:43krux02there was a reason for the keyboard to have two ctrl, two alt, two shift. The inventor of the German layout was like "ah two alt keys, then we can repurpose one of them for something else"
14:23:58clyybbermratsim: How do you do a circomflex? (sorry for the spelling, my french sux)
14:24:00FromGitter<alehander92> i always thought this is kinda the reason
14:24:16FromGitter<alehander92> i dont really use my right alt/ctrl shift usually
14:24:43FromDiscord<mratsim> it's a deadkey
14:24:48clyybberah
14:24:50FromDiscord<mratsim> press the hat and then a "e"
14:25:13FromDiscord<mratsim> I deactivated that, that's a pain for development
14:25:19clyybberyeah
14:25:30FromDiscord<mratsim> Caps lock should be compose instead
14:26:23FromGitter<alehander92> https://upload.wikimedia.org/wikipedia/commons/9/9e/Bulgarian_BDS_layout.svg
14:26:29FromGitter<alehander92> i am not sure if we even *have* {} []
14:26:33FromGitter<alehander92> by default
14:26:54narimiranAltGr+G, AltGr+shift+G
14:26:54krux02alehander92: the inventer of the German layout din't use the right alt/ctrl/shift either. Thats why he did't bother to kick out one of them.
14:27:15krux02but the recommended way to press modufiers is to always press them on the opposite side of the keyboard.
14:27:17narimiranor something like that, i'm not using croatian layout for a long time now
14:27:35FromDiscord<kodkuce> is ref object same as ref object of Root object ?
14:27:40krux02no
14:28:00FromGitter<alehander92> hm, that sounds strange to me leftctrl+e is just
14:28:04FromGitter<alehander92> easier than rightctrl+e
14:28:11FromDiscord<mratsim> TIL: https://gizmodo.com/france-is-getting-a-new-algorithmically-designed-keybo-1833806064
14:28:14FromGitter<alehander92> i guess its about efficient two hand typing
14:28:43FromDiscord<mratsim> @kodkuce ref object of RootObj are inheritable ref object are not
14:28:46leorizewe have yet another pragma called `{.since.}`?
14:29:05FromDiscord<mratsim> for backward compat
14:29:13clyybbermratsim: Cool, but brackets on the 6 looks a bit annoying, its a far key
14:29:25krux02anyway, neo layout is the best layout I found so far.
14:29:33leorizeany documentations for `{.since.}`?
14:29:52krux02It is so good, I could even convice several people to use it as well.
14:29:59krux02and they switched.
14:30:17FromGitter<alehander92> @mratsim interesting like it
14:30:23clyybberkrux02: Do you think its better than the us layout? I don't need umlauts anyways
14:30:29narimiranleorize: it is for new features so (for now) you can know when they were introduced
14:30:38narimiranlater on it might even make it to the docs too
14:30:50FromDiscord<kodkuce> ty
14:30:55FromGitter<alehander92> and it makes it compatible with 1.0 iirc
14:31:21leorizenarimiran: asking so I'd know if I have to add it to nim.nvim hardcoded highlighting list
14:31:53krux02I think I told it once. I had a party at my house once. PC for music but with neo keyboard layout. All of my guests were already using de neo, except one. He was the stragne guy not using neo and his face when he realized he was the only person who could not handle the keyboard on that computer was priceless
14:32:01FromDiscord<mratsim> I'm not too sure how it's used, but basically if you want to enable a code path for since specific nim version that's what you need to use
14:34:32PMunchIs there a way to load the winsock header in Nim?
14:36:11clyybberTIL ctrl-I and ctrl-M are tab and enter
14:36:22clyybberin a terminal
14:40:42FromGitter<alehander92> krux02 surreal
14:41:15FromGitter<alehander92> i still prefer plain old qwerty for english tho
14:41:46*floppydh quit (Quit: WeeChat 2.6)
14:44:53*GordonBGood quit (Ping timeout: 245 seconds)
14:48:35krux02clyybber: there is no universal better there is always a drawback. The biggest drawback is, it is non standard. In games you often have to remap keys, sometimes you can't do that when it is in the browser. And since you are not using äöü three keys have basically no purpose. But that can also be an advantage. When you know you will never use äöü you can map then in emacs to compile or to open a file in the pr
14:48:35krux02oject or semthing else that you regularly do.
14:48:48*Vladar quit (Quit: Leaving)
14:50:13FromGitter<alehander92> i am surprised people dont write games for emacs
14:50:22FromGitter<alehander92> they do, right i am just naive
14:51:10krux02emacs has a builtin tetris
14:51:16krux02and there are other games for emacs.
14:51:26*k0mpjut0r joined #nim
14:51:26*MrAxilus joined #nim
14:51:26*nergal[m] joined #nim
14:51:26*M948e5[m] joined #nim
14:51:27*BitPuffin joined #nim
14:51:27*lqdev[m] joined #nim
14:51:27*isaac[m]1 joined #nim
14:51:27*GitterIntegratio joined #nim
14:51:28*Demos[m] joined #nim
14:51:28*LEdoian[m] joined #nim
14:51:28*leorize[m] joined #nim
14:51:32*nc-x[m] joined #nim
14:51:32*skrylar[m] joined #nim
14:51:32*spymasterd[m] joined #nim
14:51:32*xomachine[m] joined #nim
14:51:32*d-nice2[m] joined #nim
14:51:32*Manny8888 joined #nim
14:51:33*TheManiac[m] joined #nim
14:51:33*joachimschmidt55 joined #nim
14:51:33*narimiran[m] joined #nim
14:51:33*Miguelngel[m] joined #nim
14:51:33*Asbrn[m] joined #nim
14:51:33*zielmicha[m]1 joined #nim
14:51:33*pigmej joined #nim
14:51:33*meff[m] joined #nim
14:51:33*Connor[m] joined #nim
14:51:33*planetis[m] joined #nim
14:51:34krux02But really you don't want to write games that run in emacs lisp.
14:51:34*salotz[m] joined #nim
14:51:34*lasso[m] joined #nim
14:51:34*macsek1911[m] joined #nim
14:51:34*shashlick[m] joined #nim
14:51:34*yglukhov[m] joined #nim
14:51:34*Balu[m] joined #nim
14:51:36FromGitter<mratsim> Something like this? https://github.com/jmoon018/PacVim
14:52:44FromGitter<mratsim> otherwise for learning new keyboard layout there is Typing of the dead (https://en.wikipedia.org/wiki/The_Typing_of_the_Dead)
14:52:57krux02there is something easier
14:53:01krux02zty.pe
14:53:05krux02^^ that is an url
14:54:45FromGitter<alehander92> cool idea
14:54:53FromGitter<alehander92> otherwise ie xpected stuff like chess etc in emacs
14:54:59FromGitter<alehander92> not really FIFA
14:55:08FromGitter<alehander92> (but i can imagine that )
14:55:44FromGitter<alehander92> now i am surprised there is no terminal football multiplayer
14:56:12krux02I would be like to develop browser games in the early 2000s. But with the disadvantage that it is not in the internet and people can only play it when they use emacs.
14:56:29krux02don't do it.
14:56:35FromGitter<alehander92> of course, i agree
14:56:39FromGitter<alehander92> i dont even use emacs anyway
14:57:10FromGitter<alehander92> thats why now we put our editors into our browsers where its easier to make games
14:57:16FromGitter<alehander92> :)
14:57:42krux02emacs can show images, so there are sprites. But animating them and positioning them is hard. And then it sucks in performace. It really isn't a good idea to do games here.
14:58:01krux02yea, I don't understand this browser hype.
14:58:08krux02I don't play browser games.
14:58:16FromGitter<alehander92> well, you're talking about serious games, i can imagine stuff like letters moving dots as "football"
14:58:28krux02it should be easy to distribute games, yes.
14:58:45FromGitter<alehander92> well its a big plus especially for casual gaming
14:58:53FromGitter<alehander92> and multiplaying seems easier as well
14:59:05krux02But I think we should develop some kind of virtual console that isolates processes properly where games can be playet.
14:59:06FromGitter<alehander92> otherwise it seems to me each platform has its own system/technology for that
14:59:11FromGitter<alehander92> which is usually probably paid
14:59:29FromGitter<alehander92> i think google were doing something like that
14:59:36clyybberTIL That Ctrl + Leftbracket is escape?
14:59:46krux02no multiplayer in browser games isn't easier. You have to do the exact same networkin stuff for local games.
14:59:48FromGitter<alehander92> making a platform which can easily multiplayer-ize games on various platforms
14:59:59krux02unless you make a table based games.
15:00:00FromGitter<alehander92> google stadia
15:00:08clyybberkrux02: It's easier to get players :p
15:00:16FromGitter<alehander92> i know but it seems easier to me as a user
15:00:26FromGitter<alehander92> but it depends on the type of game i guess
15:00:38krux02yea the browser might be good to gather and coordinate players for a game.
15:00:49krux02But the game dosn't need to run in the browser.
15:01:17FromGitter<alehander92> maybe my point is, if it runs well enough in the browser, thats great, if not, maybe think of a desktop variant
15:01:54FromGitter<alehander92> and with wasm etc i guess the difference will become smaller
15:02:40krux02For example, on saturday I played a 16 hour board game for 16 people. One session the hole day. For this the internet is great, because you can find people who actually do that. But the game itself doesn't need a browser it is a board game with a room full of people playing it.
15:03:10krux02if wasm would be so great, I think we would have seen already more games using it.
15:03:55krux02wasm is too isolated right now to be usable.
15:04:02krux02and the tooling is too complicated.
15:05:19FromGitter<alehander92> yeah, but i think this would be solved with time
15:05:36FromGitter<alehander92> i dont insist the the biggest AA games
15:05:38FromGitter<alehander92> would use it
15:05:58FromGitter<alehander92> what board game supports 16 people btw
15:06:06krux02I think we should have our own wasm backend for nim.
15:06:17krux02but not a full backend.
15:06:36FromGitter<alehander92> i agree, i hoped llvm can help with that
15:06:37krux02more like, I have this function, I want it to run in wasm, not in js, compile it to wasm and then call it from js
15:07:01krux02I have done something like that already, but with a glsl backend.
15:07:26Araqnlvm does produce wasm
15:07:30FromGitter<alehander92> well, you can just have two nim programs, one which exposes a wasm api
15:07:38FromGitter<alehander92> and the other which consumes with from the js backend
15:07:53FromGitter<alehander92> with a nice sugar-ized lib for interaction if needed
15:08:39FromGitter<alehander92> yeah, just i am not sure how mature is nlvm wasm, does it e.g. support much of the stdlib / any kind of gc?
15:08:47krux02yea the interaction from js to wasm is probably what causes most trouble if it would be written manually. I know this, because that is the major pain point in GLSL.
15:10:23krux02Araq: nlvm does not solve the hybrid js and wasm compilation target.
15:10:27krux02as far as I know.
15:10:41FromGitter<alehander92> iirc the status people need a lot of this wasm / js stuff
15:10:58FromGitter<alehander92> and i think they were trying to do something like that but i might be wrong
15:11:22Araqcompile parts of your program via 'nim js' the others with nlvm, I do the same for the client/server split
15:11:41Araq'nim js' for Karax, 'nim c' for the server. it works
15:12:11Araqyeah it could be a single compiler invokation, whatever.
15:12:23FromGitter<alehander92> yeah, i can imagine splitting them in modules and building with a tool/specific client framework might be easier
15:12:49Araqmy GCC understands __attribute__((aligned(x))) and not _Alignas, thanks for nothing ANSI "standard"
15:13:31Araqwhy not encode existing practice? because fuck you, we're ANSI C, we don't understand standards or good taste.
15:19:37FromDiscord<kodkuce> hmm i forgot i want to use array cuz i know that i will have fixed number of elements all time but is array like seqs on heep or it goes to stack, i think someone told me something like that long ago
15:23:43clyybberAraq: Yay, standards: https://stackoverflow.com/questions/46518575/applying-alignas-to-an-entire-struct-in-c
15:24:00clyybberThe second answer goes a bit into detail
15:24:16*Hideki_ quit (Remote host closed the connection)
15:25:00*Hideki_ joined #nim
15:25:03krux02clyybber: the alignas directive in C is for variables and struct/union members only.
15:25:36krux02when you want to align an entire struct, put the alignof experssion before the very first field declaration.
15:29:26*Hideki_ quit (Ping timeout: 265 seconds)
15:31:42clyybberkrux02: Did your PR also add align support for the whole struct?
15:32:05krux02id does align the whole struct, yes.
15:32:12krux02but that is implicit
15:32:34krux02the alignment of the struct is the maximum of the alignment values from all fields.
15:33:00krux02interestingly, you can also use align in a packed struct.
15:33:14krux02and align just a few fields.
15:33:19clyybberThats cool
15:33:37clyybberBtw, is there some alignment difference between tuples and objects?
15:33:48krux02no
15:33:55krux02tuples are simpler though
15:34:02krux02there is no custom field alignment in tuples
15:34:11clyybberThere could be :)
15:34:17krux02no
15:34:18krux02there can't
15:34:30clyybberWhy? They are C structs
15:34:41krux02not for nim
15:34:59krux02in nim tuples are a collection of members, nothing else.
15:35:28krux02it will make type equality for tuples much harder with no added benefit.
15:35:37clyybberYeah, I wasn't arguing for doing it
15:35:46clyybberJust that its *theoretically* possible
15:35:52clyybberIts probably a bad idea
15:36:20krux02ye
15:36:23krux02s
15:38:42krux02it is probably bad to mix packed and alignof as well.
15:38:47*PMunch quit (Quit: Leaving)
15:39:35krux02for binary interface types you should align float64 and int64 fields to 8 bytes so that it is consistent on all backends.
15:57:50FromDiscord<kodkuce> so is array on stack or heep?
15:58:57krux02kodkuce: array is on the stack
15:59:01krux02it is a value type
15:59:16FromDiscord<kodkuce> ok then i should use heep
15:59:23FromDiscord<kodkuce> *seq
15:59:26krux02heep?
15:59:38krux02a seq is on the heap,
16:00:12krux02it is comparible to std::vector
16:01:17clyybberkodkuce: Keep in mind that seq and string still have value semantics
16:01:28*ITChap joined #nim
16:01:28FromDiscord<kodkuce> yep i have no reason storing a array/seq of 500player connections on stack
16:02:18FromDiscord<kodkuce> clyybber: i literally duno what you wanted to say with that 🙂
16:02:40clyybberThey are copied when you assign them
16:03:20FromDiscord<kodkuce> oh you mean they are not refs
16:03:25clyybberyeah
16:03:49*Hideki_ joined #nim
16:04:04clyybberyou can make them ref though if you want that.
16:04:13FromDiscord<kodkuce> no really
16:04:41clyybber:p
16:04:50FromDiscord<kodkuce> 🙂 i go work work work
16:06:06clyybberkodkuce: What are you doing?
16:06:13clyybber/creating/making
16:06:36FromDiscord<kodkuce> am making a gameserver for casual games
16:06:56FromDiscord<kodkuce> atm am making a poker game instance
16:07:10clyybbernice
16:07:21FromDiscord<kodkuce> duno will see 🙂
16:07:24FromDiscord<kodkuce> you ?
16:07:25clyybber(don't forget to provide telnet access)
16:07:54clyybberclyybber: A daw for the terminal
16:07:56FromDiscord<kodkuce> telnet wtf would need telent for or is it some joke i dont know about
16:08:04clyybberyeah, I was kidding
16:08:09clyybberwould still be cool though
16:08:15FromDiscord<kodkuce> for client i plan to use godot
16:08:36clyybberah. Theny why don't you use it for the server too?
16:09:06clyybberNvrmind, there are probably a lot of reasons not to
16:09:18FromDiscord<kodkuce> hmm duno kinda think its too OP for card games and stuff
16:09:42clyybberThe remote procedure call way of networking in godot is very nice
16:09:59clyybberBut I don't get why godot had to make its own lang
16:11:19FromDiscord<kodkuce> i didnet try networking in godot only websockets, ye its horor jumping from gdscript to nim xD , did you try GDnativ with Nim?
16:12:03clyybberI tried, but that was when the godot bindings for nim weren't up to date with the (then) newly released 3.0 or 3.1
16:15:21FromDiscord<kodkuce> and now are?
16:25:32clyybberworking on a terminal DAW
16:25:53clyybberor rather, a library I want to use for it and for a rogulie
16:26:00clyybbers/lie/like
16:30:02*Hideki_ quit (Ping timeout: 240 seconds)
16:31:42FromDiscord<kodkuce> DAW?
16:31:53clyybberDigital Audio Workstation
16:32:49federico3...terminal?
16:32:59clyybberyeah
16:35:48madpropshow can i specify in the nimble file to always check the github source for changes?
16:35:50FromDiscord<kodkuce> what lib you using for making layout/menus in terminal
16:35:59madpropsi put the direct link, but then it won't update it on install
16:36:13solitudesfyou cant
16:36:41FromDiscord<kodkuce> nimble install package will owerite to latest, tought duno why would you want even to do that
16:37:10madpropsfor instance i link to a library i made. then i push to the library repo. nimble install won't detect it as a new version
16:37:11clyybberkodkuce: I'm currently making my own
16:37:14FromDiscord<kodkuce> you can make a bash or whatwer cript to do nimble list packages , then nimble install eachpackage and run it on chron or whatwer
16:37:31madpropswhat im doing is just installing the github link directly each time
16:38:14madpropsfor instance i have this: requires "https://github.com/madprops/nap"
16:38:23madpropsbut `nimble install` won't check for updates
16:38:44FromDiscord<kodkuce> hmm, so you have your lib on github and you want
16:39:23solitudesfif its your lib, you should `nimble develop` it
16:39:43FromDiscord<kodkuce> oh you mean if you update your lib on github and do nimble install https://github.com/madprops/nap it wont notice that repo one is newer and wont install
16:39:51madpropsexactly
16:40:13FromDiscord<kodkuce> then probbaly listend to solitudesf cuz i duno 🙂
16:40:36madpropsmaybe im missing @master or something
16:40:43*ITChap quit (Ping timeout: 250 seconds)
16:41:16solitudesfnimble has no mechanism to update the dependency if its already satisfied, you should use nimble develop
16:42:20FromDiscord<kodkuce> you can alwies nimble unistall then install but that kinda sux
16:43:23madpropswhere does nimble develop put the files?
16:43:45madpropsok in the root dir
16:44:34madpropsso how do i make users of my program automate `nimble develop` should i include the `requires` in the nimble file at all?
16:48:04*NimBot joined #nim
16:50:56solitudesfnimble develop is for developers, not the users
16:51:24madpropsright, it will be in the repo anyway
16:51:27solitudesfif you expect users to install your program you should properly tag the releases
16:51:46solitudesfof it and all the dependencies
16:52:06madpropsi can release programs (not libraries) ?
16:52:32*solitudesf quit (Quit: Leaving)
16:52:57madpropshmm apparently i can't run nimble develop again
16:53:01madpropsbecause the dir already exists
16:53:10madpropsthought it would check for updates
17:12:49FromDiscord<kodkuce> if i have 2 seqs of ints whats easywes what to get diference, should i use filter or there better way
17:14:11*ITChap joined #nim
17:14:45FromDiscord<kodkuce> or to sets and then -
17:18:54narimiranIntSet
17:30:08FromDiscord<kodkuce> i allreayd did with filterIt tough will check that IntSet too
17:55:52FromDiscord<kodkuce> is there some short magic for doing like 0..22.toSeq() or something to get a seq with 0,1,2,3..22
17:57:10narimirantoSeq(0..22)
17:58:04FromDiscord<kodkuce> ty
18:11:21*Vladar joined #nim
18:12:48donpdonpwhat am i doing wrong with sort("a","b") -> but expected one of: sort(OrderedTable...sort(CountTable..
18:12:59FromGitter<zacharycarter> is there any way to assign a slice of a sequence to an array?
18:13:39FromGitter<zacharycarter> like if I have a sequence of 5 elements, assign those elements to elements with indices 0-5 of the array
18:13:46*Hideki_ joined #nim
18:14:44narimiran@zacharycarter come on, you know this one, you're not even trying
18:14:45narimiranhttps://play.nim-lang.org/#ix=21QQ
18:15:05donpdonpah its sorted([])
18:15:21FromGitter<zacharycarter> oh I forgot I could use the range operator on the array too - thanks narimiran
18:17:57*Hideki_ quit (Ping timeout: 240 seconds)
18:30:47madpropsnimble directory install check fails with: Error: Unsatisfied dependency: nim (>= 1.0.2)
18:38:34*jjido joined #nim
18:53:10FromDiscord<kodkuce> what version of nim you have installed?
18:57:28madprops1.0.2 - im talking about the directory page
18:57:33madpropsprobably has some outdated compiler
18:59:36narimiranfederico3: ^
19:00:22narimiranmadprops: for some quick fix, you can make your package >= 1.0.0
19:09:32*Vladar quit (Quit: Leaving)
19:09:55*MightyJoe joined #nim
19:10:59*nsf quit (Quit: WeeChat 2.6)
19:11:14*cyraxjoe quit (Ping timeout: 240 seconds)
19:14:11*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
19:15:09federico3madprops: is that a real requirement? :) 1.0.2 instead of .0 ?
19:15:45*MightyJoe is now known as cyraxjoe
19:16:07*u9898287 quit (Quit: u9898287)
19:16:15federico3I'll do an official backport and update it anyways
19:16:21*u9898287 joined #nim
19:24:32*njoseph quit (Ping timeout: 252 seconds)
19:25:19FromDiscord<Anuke> Anyone here familiar with nimterop? I'm attempting to create a statically linked wrapper for a C library, but it's not linking properly and giving me "undefined reference to XXXX" errors. Code: https://hastebin.com/inixoleser.cpp
19:25:38madpropsfederico3: that was just put there by default by nimble. i guess i don't really need it
19:25:38FromDiscord<Anuke> The specific library is the Discord RPC
19:27:38*lritter joined #nim
19:29:17*ITChap quit (Ping timeout: 276 seconds)
19:29:17*uu91 quit (Ping timeout: 276 seconds)
19:29:19AraqAnuke: wait until shashlick is around
19:29:25*uu91 joined #nim
19:29:44FromDiscord<Anuke> Are there any specific times when he is around?
19:31:06Araqmaybe in half an hour
19:31:39FromDiscord<Anuke> Alright, thanks
19:34:56*ITChap joined #nim
19:35:19*ITChap is now known as Guest71347
19:39:44disruptekshashlick is away, fwiw.
19:45:16*njoseph joined #nim
19:52:28*thomasross_ joined #nim
19:52:28*thomasross is now known as Guest78629
19:52:28*Guest78629 quit (Killed (card.freenode.net (Nickname regained by services)))
19:52:28*thomasross_ is now known as thomasross
20:02:00federico3madprops: not good, it should default to 1.0.0
20:02:32disruptekfile an issue.
20:02:39federico3yup
20:02:47madpropsbtw, I'm not sure if im passing stuff in a correct manner. So far I haven't bothered with references at all, i just pass stuff around freely thinking the compiler will handle that internally. Should I be more careful about that?
20:08:11*GordonBGood joined #nim
20:12:08krux02madprops: you can live a happy life without using `ref` at all.
20:12:18krux02but you should be more careful.
20:12:33*GordonBGood quit (Ping timeout: 252 seconds)
20:12:34krux02You should know what the compiler is able to do and what it isn't'
20:20:18*jwm224 quit (Ping timeout: 245 seconds)
20:20:23madpropshmm what am i doing wrong here? https://play.nim-lang.org/#ix=21Rz
20:20:31*nsf joined #nim
20:20:47madprops"Error: expression has no address; maybe use 'unsafeAddr'"
20:22:16*jwm224 joined #nim
20:24:28FromDiscord<IanIAnIAN> is that the opt is not initialised error?
20:31:24madpropsmaybe im supposed to iterate differently?
20:34:32madpropsthe object exists because it's matching key == opt.name
20:34:57madpropsit exists in the seq at least. im not using new to create it though .. just MyOjbect(name:..) etc
20:42:11*narimiran quit (Quit: Leaving)
20:42:40*lritter quit (Quit: Leaving)
20:43:09madpropsfound the answer reading some old irc logs
20:43:16madpropsi needed an intermediary variable
20:48:25madpropsdumb question but, what can how i access what a ptr points to?
20:48:29madpropshow*
20:49:58stefantalpalaruhttps://nim-lang.org/docs/manual.html#types-reference-and-pointer-types
20:50:10stefantalpalarusomePointer[]
20:54:46madpropsim doing something terribly wrong here https://play.nim-lang.org/#ix=21RD
20:55:03*Hideki_ joined #nim
20:58:02madpropsif i try to use myptr[].value it goes out of memory
20:59:29*Hideki_ quit (Ping timeout: 252 seconds)
21:03:30clyybberwell
21:03:38clyybberthen your pointer isn't pointing to something
21:03:49clyybberor do you mean literally OOM?
21:05:18clyybbermadprops: I think the issue is that you are returning a pointer to a variable that is local to argref
21:05:44clyybberAnd after argref has finished, it will disappear
21:05:56*lritter joined #nim
21:06:04clyybberBut I can't test your snippet since its missing the types
21:07:20FromDiscord<kodkuce> "template/generic instantiation of `async` from here" << why does this spawn in my vscode whenwer i use async, can i suppress it?
21:10:07madpropsclyybber: this is what im doing https://play.nim-lang.org/#ix=21RG except i return "o" to another file
21:11:44madpropsbut yeah i guess it's returning the address of a temporary var
21:11:51madpropsnot sure how to do it properly though
21:17:33madpropsim wondering if there's a way to iterate through references
21:19:08krux02madprops, when you access a member variable, you can write `myptr.value` instead of `myptr[].value`.
21:19:54madpropscool
21:20:07madpropsthis works btw https://play.nim-lang.org/#ix=21RK
21:20:11madpropswhat im wondering is why it has to be unsafe
21:20:29clyybberBecause the variable is not mutable
21:20:42clyybberAnd you could theoretically modify its value via an address
21:21:00clyybberYou can use .mitems as an iterator if you really want to get rid of the unsafe part
21:22:15krux02madprops, I would use `var NapArg` instead
21:22:36madpropshm ?
21:22:52madpropssame name as the class?
21:23:04krux02https://play.nim-lang.org/#ix=21RL
21:23:32krux02`var` means mutable reference.
21:23:44krux02that is a hidden pointer.
21:24:40madpropshmm just tried that. doesn't seem to be referenced when used. as in, the values didn't change
21:24:49madpropsit keeps showing the initial values
21:24:55madpropsim returning `var NapArg`
21:26:13madpropsactually with the previous reference method, i can also mutate it
21:43:49FromGitter<s0kil> Does Nim `compressdwarf` by default, like Go?
21:47:03FromDiscord<kodkuce> http://ix.io/21RT << template/generic instantiation of `async` from here, Warning: 'cbIter' is not GC-safe as it accesses 'govno' which is a global using GC'ed memory Can i ignore this or will this really make some issue for me
21:51:29*nsf quit (Quit: WeeChat 2.6)
21:55:50FromDiscord<kodkuce> do i have to {.threadvar.} it or can i ignore?
21:59:03Araqs0kil: no because Nim produces tiny binaries without compression hacks
22:00:45*sealmove joined #nim
22:02:18FromDiscord<treeform> Araq, can I talk to you about https://github.com/nim-lang/cairo ?
22:02:37Araqshoot
22:02:38FromDiscord<treeform> I made a huge PR request: https://github.com/nim-lang/cairo/pull/9
22:02:51FromDiscord<treeform> But I want to do more. Like change some of the API around.
22:02:56FromDiscord<treeform> How much will you allow me to do?
22:03:29FromDiscord<treeform> This PR changes nothing but just ads tests and samples to the read me.
22:03:37FromDiscord<treeform> But I want to change the API
22:04:14FromDiscord<treeform> like `surface.create()` create what? change that to `surface.createContext()`
22:04:57FromDiscord<treeform> and like `setSource*()` just dispatch on types not have `setSourceRGB` `setSourceRGBA` ... etc.
22:05:16madpropstheres' no ! negation operator at all?
22:05:26madpropsapart from not i mean
22:05:32lqdev[m]madprops: `not`
22:05:34lqdev[m]no, there isn't
22:05:39lqdev[m]you can define one
22:05:48Araqdon't break code, treeform, introduce new procs and .deprecate what you think should be deprecated
22:05:52lqdev[m]template `!`(x: bool): bool = not x
22:08:45FromDiscord<treeform> Araq, there is also a ton of like TMatrix and PMatrix (is this an old style?) ... could there just be one Matrix and ptr Matrix when you need it?
22:08:58Araqyup
22:09:10FromDiscord<treeform> Can I change it?
22:10:59lqdev[m]treeform, Araq: also, the procs should be in camelCase. it's not a breaking change, but it matters when using nimsuggest
22:11:34FromDiscord<treeform> lqdev, Araq, Yes that's another big thing I want to do. Can I camelCase everything?
22:11:43FromDiscord<treeform> Our case rules should handle that and not break code?
22:11:53disruptekwhy would that break nimsuggest?
22:11:53FromDiscord<treeform> Well nim's case rules 🙂
22:12:03Araqtrue
22:12:15Araqseems fine.
22:12:26FromDiscord<treeform> disruptek, it wants me to type clip_preserve, but I want to type clipPreserve...
22:12:35lqdev[m]disruptek: it doesn't break nimsuggest, it's that nimsuggest autocompletes using the original proc's casing, no conversion is done
22:12:46disruptekaha.
22:12:56lqdev[m]as treeform says
22:12:57disruptekyour change makes sense.
22:16:46FromDiscord<treeform> Araq, so you agree with the massive case change, and the lesser P&T change, and the random API fixes? I guess i'll get started on that after you approve my first PR.
22:17:17FromDiscord<treeform> As long as I do everything with{.depricated.} and not break old code?
22:19:22lqdev[m]I wonder why doing `--stackTrace:off` makes such a big performance difference and why `-d:release -d:danger` doesn't
22:19:29Araqor maybe make it version 2.0 and break stuff, my Nimble dependency will have >= 1.0 & < 2.0
22:19:41Araqright? muhahahaha
22:19:46FromDiscord<treeform> Araq, I could do that too. Up to you?
22:20:02Araqdunno, I don't believe in semver
22:20:09FromDiscord<treeform> I would vote for a breaking change. I don't know how many people use use the Cairo library.
22:20:15FromDiscord<treeform> It only has 6 stars.
22:20:39FromDiscord<treeform> I did not use it at first because I could not get it to compile. But that some how was fixed.
22:20:54FromDiscord<treeform> Then it has awkward not quite C not quite Nim API.
22:21:14disruptekthank you, semver is stupid.
22:21:15FromDiscord<treeform> It was hard to get samples from C ported.
22:21:26AraqI vote for backwards compat
22:21:42Araqunless it means > 100 deprecated symbols
22:21:57FromDiscord<treeform> let me see
22:22:13lqdev[m]Araq: can you explain why I observe that behavior?
22:22:39lqdev[m]nim.cfg disables stack traces when `release` or `danger` is defined.
22:23:01Araqlqdev[m]: hum
22:23:14FromDiscord<treeform> Looks like 24+19 depreciated symbols.
22:25:40FromDiscord<treeform> Some symbols like `PBool*` are not used for anything
22:27:12lqdev[m]oh wait. `-d:release` and `-d:danger` don't work inside config.nims, right?
22:27:20lqdev[m]because the default config is loaded first
22:27:30FromDiscord<Generic> how well is the newruntime tested?
22:28:20FromDiscord<treeform> @Generic looks like nim is not going to go with the --newruntime thingy. Some thing else is being worked on at the moment.
22:29:12FromDiscord<Generic> I know, though afaik there are overlaps
22:29:26FromDiscord<Generic> *overlappings
22:29:45FromDiscord<Generic> anyhow it's a bit of an adventure
22:31:29clyybber--newruntime is essentially --gc:destructors + owned refs
22:33:03Araqmost bugs that I fix affect both "runtimes" likewise
22:33:15Araqas it's the same implementation
22:39:45*exelotl joined #nim
22:44:02*jjido joined #nim
22:46:39madpropshaving this weird problem were references break if i set them in different orders, don't know why https://play.nim-lang.org/#ix=21Sd
22:46:47madpropsif i use it like that, only tree maintains a reference
22:46:54madpropsbut if i move boo at the bottom, it works for boo
22:58:03FromGitter<s0kil> I'm getting an error from a profiler when compiling in debug mode: `Ignoring DWARF format error when reading line table: DW_FORM_sec_offset not expected for attribute (DW_AT)0x2119`
23:01:01*u9898287 quit (Quit: u9898287)
23:08:42*vsantana quit (Remote host closed the connection)
23:08:44madpropsdoes adding objects to a seq mess with references?
23:09:50*vsantana joined #nim
23:09:58madpropsbecause that's the only thing i can think of about my problem
23:13:13lqdev[m]madprops: don't use `ptr` in normal code.
23:13:35lqdev[m]if you want to pass an object by reference, either rethink your code, or make the object a `ref object`
23:22:56madpropslqdev[m]: how would I return a reference to an obj, from a function, if I make the object ref ?
23:29:44donpdonprequired type for x: var seq[T]; but expression 'market.bqbook' is immutable, not 'var'
23:30:00*clyybber quit (Quit: WeeChat 2.6)
23:30:21donpdonpmy type has a property, bqbook*: seq[Offer], and the object gets passed to the function
23:30:34donpdonpi dont know how to satisty the var field
23:30:50donpdonpmarket.bqbook.add(x) being a seq, i thought add() would just work
23:31:59*drewr joined #nim
23:32:43madpropsis there such a thing as `ref object` or do i have to always base it on other object?
23:38:56lqdev[m]madprops: just declare it as `ref object`, and it will be passed by reference
23:39:12lqdev[m]you don't have to base it on another object
23:39:38krux02all objects are passed by reference
23:39:44lqdev[m]donpdonp: make sure the seq you're passing is from a `var` variable, and not a `let` variable
23:40:16krux02you do a reference with `var`.
23:42:02donpdonplqdev[m]: im passing an object, so i assume the object param must be type var ?
23:42:31krux02no
23:42:59krux02all object parameters are passed by reference to functions
23:43:14krux02doesn't matter if it is var not var or ref
23:43:40donpdonphow do i specify market.bqbook is var when all im passing is market?
23:43:51krux02proc foo(arg: var MyType) # you can modify it.
23:44:04krux02proc foo(arg: MyType) # you can't modify it from foo
23:44:16donpdonpok. the problem is the level higher up
23:44:34krux02proc foo(arg: ref MyType) # MyType must be heap allocated.
23:44:48donpdonpmap(mySeq, myfunc) => required type for op: proc (x: T): S{.closure.} expression is of type: proc (m: var Market){.closure, locks: <unknown>.}
23:45:35donpdonpim iterating through table.mpairs and the value is seq[Market], so im doing map(value, proc{...})
23:47:21*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
23:50:24madpropslqdev[m]: thanks, that seemed to work
23:56:22donpdonpi think my map proc was missing a return value
23:56:35donpdonpbut i dont need map anymore so i've moved on :)