<< 20-11-2019 >>

00:00:38clyybbergn8 all
00:00:43*clyybber quit (Quit: WeeChat 2.6)
00:01:01FromGitter<Willyboar> Goodnight
00:02:25*pyromancy joined #nim
00:04:17*JStoker quit (Remote host closed the connection)
00:10:38*pyromancy left #nim (#nim)
00:11:02*JStoker joined #nim
00:32:33FromGitter<alehander92> sorry for my full-of-myself talk earlier araq and others
00:32:43FromGitter<alehander92> itmuckel try macros indeed
00:32:48FromGitter<alehander92> see ya willy
00:33:00Araqdon't worry, same here
00:33:03FromGitter<alehander92> good night
00:33:11Araqsorry for my ramblings
00:33:13Araqbye
00:33:51FromGitter<Willyboar> good night @alehander92
00:34:16FromGitter<alehander92> all good, night : )
00:45:54*uu91 quit (Read error: Connection reset by peer)
00:46:12*uu91 joined #nim
00:49:19*ng0 quit (Quit: Alexa, when is the end of world?)
00:54:26*uu91 quit (Read error: Connection reset by peer)
00:56:33*uu91 joined #nim
00:59:02*MarquisdeFalbala quit (Remote host closed the connection)
01:04:11*Hideki_ joined #nim
01:08:50*Hideki_ quit (Ping timeout: 265 seconds)
01:10:42FromDiscord<Rika> Tfw everyone be goin to sleep
01:13:03FromDiscord<treeform> Not me
01:14:15FromGitter<s0kil> Too early
01:15:16*Hideki_ joined #nim
01:15:20FromDiscord<itmuckel> Anyone knows how to use glGetShaderInfoLog?
01:15:20FromDiscord<itmuckel> var buffer: cstring
01:15:20FromDiscord<itmuckel> glGetShaderInfoLog(shader, 512, nil, buffer)
01:15:20FromDiscord<itmuckel> echo buffer
01:15:20FromDiscord<itmuckel> Returns an empty string. How can I allocate 512 chars here? the function requires buffer to be a cstring. 🤔
01:15:39*Hideki_ quit (Remote host closed the connection)
01:17:16*uu91 quit (Read error: Connection reset by peer)
01:17:20FromDiscord<treeform> newString(512)
01:18:37FromDiscord<itmuckel> Oh, so cstring is only a type alias for string? I was looking for newCString 😅
01:19:39*uu91 joined #nim
01:21:11FromGitter<s0kil> What happened to Module queues in stdlib?
01:22:08FromGitter<s0kil> I see it was available in 0.19.0
01:22:14*kevin5 joined #nim
01:24:15*abm quit (Quit: Leaving)
01:26:53*kevin5 quit (Remote host closed the connection)
01:28:28*nif quit (Quit: ...)
01:28:38*nif_ joined #nim
01:38:16*uu91 quit (Read error: Connection reset by peer)
01:38:32*uu91 joined #nim
01:52:05FromDiscord<Rika> I think it was outright removed
02:21:57FromGitter<kayabaNerve> Why?
02:24:23Jjp137it was deprecated in favor of deques instead
02:29:38FromDiscord<treeform> @itmuckel this is what I use: https://gist.github.com/treeform/78a925e0379671ded66ef666706d6883
02:29:59FromDiscord<treeform> `alloc` stuff on the stack is better because less heap objects.
02:44:59*MarquisdeFalbala joined #nim
02:45:53*MarquisdeFalbala quit ()
02:49:23*endragor joined #nim
03:06:30madpropsare seq fields in an object not mutable?
03:07:51madpropshow can i make them mutable?
03:08:31madpropsusing ref is the only option?
03:16:33FromDiscord<Rika> what do you mean?
03:16:40FromDiscord<Rika> they are afaik?
03:18:48FromDiscord<Rika> madprops, https://play.nim-lang.org/#ix=22jh
03:19:08FromDiscord<Rika> i dont see the issue here, if you can, edit this example to work better with your situation
03:20:58madpropsis it possible to change a table's key?
03:21:27FromDiscord<Rika> what? change the key of a value?
03:21:56FromDiscord<Rika> why not just get the value of the key then set the value to the new key then clear the old key?
03:22:31FromDiscord<Rika> you may skip the clearing if it is impossible to use the old key in your situation but i still recommend i
03:22:34FromDiscord<Rika> it*
03:26:57leorize@treeform: it's a high chance of causing stack overflow bugs though
03:27:47leorizeand I'm pretty sure Nim's alloc() is not alloca() :P
03:28:43FromDiscord<Rika> leorize, i dont see where alloca is written
03:29:16leorizetreeform was saying that alloc on stack is better because less heap objects
03:29:59leorizeI just pointed out that it's not always the case and Nim's alloc is not alloca() (the C function that provides dynamic stack memory allocation)
03:30:13FromDiscord<Rika> i see
03:32:31leorizemadprops: here's how to change a table key:
03:32:42leorizetable[newKey] = move table[oldKey]
03:32:48leorizeit's that simple
03:32:52FromDiscord<treeform> leorize, you right!
03:33:15leorizeyou will want to delete the oldKey though :P
03:33:29FromDiscord<Rika> hmm interesting, how old is this move proc (or keyword, really cant tell on nim)
03:33:44leorizesystem.move
03:33:54leorizeit's introduced as part of destructors
03:34:13madpropsty
03:34:45FromDiscord<treeform> lets see how every one else does it? https://github.com/search?utf8=%E2%9C%93&q=glGetShaderInfoLog+language%3ANim&type=Code&ref=advsearch&l=Nim&l=
03:34:46*rockcavera quit (Remote host closed the connection)
03:34:52FromDiscord<Rika> looked at the source, move already marks the old key's object as wasMoved
03:34:57FromDiscord<Rika> which zeroes the object
03:35:01FromDiscord<Rika> wait
03:35:05FromDiscord<Rika> lmao
03:35:09FromDiscord<Rika> the wasMoved proc is empty
03:35:19FromDiscord<Rika> wait not its a magic
03:35:25FromDiscord<treeform> hmm this guys seems to do it correctly: https://github.com/Taiiwo/LAO/blob/d4e0c36433d625d0a39c0b685c54e2a6ca6a6378/src/common/shader.nim#L4
03:35:45FromDiscord<Rika> ~~anime pfp >_>~~
03:35:49leorizemadprops: here's a better way: https://nim-lang.org/docs/tables.html#take%2CTableRef%5BA%2CB%5D%2CA%2CB
03:36:03leorizetable.take('oldKey', table[newKey])
03:36:15FromDiscord<Rika> i should read the docs more HAHAHAHa
03:36:18leorizeit also removes your oldKey so you don't have to do it yourself
03:37:00leorizetreeform: yep, that's how you'd do it
04:26:51*uu91 quit (Read error: Connection reset by peer)
04:27:06*uu91 joined #nim
04:31:22*uu91 quit (Read error: Connection reset by peer)
04:31:34*uu91 joined #nim
04:38:09*chemist69 quit (Ping timeout: 252 seconds)
04:40:08*chemist69 joined #nim
04:48:08*nsf joined #nim
04:58:13FromDiscord<demotomohiro> Is there a way to use `macros.getTypeInst` in `macro foo(x: untyped): untyped` not `macro foo(x: typed): untyped`?
05:13:21leorizeany examples of what you're trying to do?
05:16:43FromDiscord<demotomohiro> I'm trying to write a macro that create `type Foo = object ...` from `proc initFoo() =`, so that I can get object type definition by only writing constructor.
05:17:52*uu91 quit (Read error: Connection reset by peer)
05:18:07*uu91 joined #nim
05:18:27FromDiscord<demotomohiro> When I write `proc initFoo(x: int) = fields:a = x`, my macro create `type Foo = object a:int`.
05:19:27FromDiscord<demotomohiro> So I need to get type of `a` and also transform AST of definition of `proc initFoo`.
05:22:13FromDiscord<demotomohiro> When macro take proc definiton as `typed`, it seems there is no way to change AST of it.
05:23:39FromDiscord<demotomohiro> When a macro take proc definiton as `untyped`, I cannot use macro.getTypeInst to get a type of variables.
05:34:24*theelous3_ joined #nim
05:36:58*theelous3 quit (Ping timeout: 245 seconds)
05:41:18FromDiscord<demotomohiro> Here is my macro code.
05:41:19FromDiscord<demotomohiro> https://gist.github.com/demotomohiro/8c7c11516df46f009339704bfb713cf6
05:43:24FromDiscord<demotomohiro> It is too complicated and I want to implement it simpler.
05:45:06madpropsis there a way to get arguments unescaped. like \d instead of having to use \\d
06:06:19*dddddd quit (Remote host closed the connection)
06:07:39leorizemadprops: you mean raw strings?
06:08:41leorizedemotomohiro: you don't have to use a random string as ident
06:08:55leorizegensym() will generate a symbol that's certainly unique
06:11:37leorizeif you can let me know what code would you want to be generated from the the input, that'd be greate
06:11:41leorizegreat*
06:17:52FromDiscord<yewpad> This might sound weird but are their any options that are faster than file streams in Nim?
06:18:48FromDiscord<demotomohiro> leorize, objectDef macro need to find the unique symbol.
06:18:48FromDiscord<demotomohiro> When field macro generate a unique symbol with gensym, I think passing that symbol name to objectDef macro can be complicated.
06:18:48FromDiscord<demotomohiro> That why I just use const string to create a unique symbol name.
06:25:58FromDiscord<demotomohiro> Here is the code I want to generate
06:25:59FromDiscord<demotomohiro> https://gist.github.com/demotomohiro/8c7c11516df46f009339704bfb713cf6#gistcomment-3088024
06:36:01*Kevin5 joined #nim
06:37:42*narimiran joined #nim
06:39:40lqdev[m]yewpad: you can importc the functions available in <stdio.h> if you want to
06:40:13*Kevin5 quit (Client Quit)
06:43:57*MightyJoe joined #nim
06:46:53*cyraxjoe quit (Ping timeout: 276 seconds)
06:46:57sealmovehow to enforce full name for enum literals?
06:47:42Araqyou don't, it's a bad idea
06:48:04sealmovewhy? :S
06:48:19Araqevery language that enforces it grows features for "oh, in this case, we can infer it..."
06:48:43Araqsee Swift's .enumValue syntax or the C++ proposal to make it the right thing in 'switch' statements
06:49:27Araqwhat you need to understand is that readability is context specific, if x in {EnumType.valA, valB, valC} is more readable IMO than
06:49:44Araqif x in {EnumType.valA, EnumType.valB, EnumType.valC}
06:49:58sealmoveyes I do agree readability is context specific
06:50:13sealmoveit's one thing I like about Nim
06:50:17Araqby enforcing it you ignore the context.
06:50:17skrylar[m]are you sure you aren't just looking for {.pure.}
06:50:41Araqskrylar[m], {.pure.} doesn't enforce it anymore :P
06:50:47skrylar[m]:-|
06:50:49sealmoveoh?
06:51:38sealmovecan an type and a enum value with the same name co-exist?
06:51:54Araqyes, with .pure
06:52:14Araqskrylar[m], the idea was to unify .pure and non-pure enums but it didn't make it into 1.0
06:52:19sealmoveah, so the {.pure.} tells Nim compiler to not error in this case
06:53:50sealmovewhat about enum value + variable with same names?
06:54:03sealmove(this is more relevant)
06:54:24sealmoveI guess the variable shadows the enum?
06:56:35sealmoveok it works https://play.nim-lang.org/#ix=22jJ
06:56:42Araqsure it does
07:06:58*solitudesf joined #nim
07:08:28sealmoveAraq check my new project: https://github.com/sealmove/nimitai
07:10:48Araqwow looks nice
07:12:33skrylar[m]i always kinda wondered why people didn't just throw PEGs at those
07:12:57skrylar[m]even stuff like what was it.. r-something. made scanners
07:13:27skrylar[m]rage;
07:13:45skrylar[m]ragel made it weird to phrase raw bytes in the grammar even though there's basically no difference
07:14:41skrylar[m]kaitai looks neat regardless, though writing yaml parsers is yick
07:15:26sealmoveyeah, it's a struggle as zevv pointed out; but luckily .ksy is an "easy" subset of yaml
07:20:45FromDiscord<yewpad> '.ksy' can be easily confused with 'kys' 😛
07:20:57FromDiscord<yewpad> because that's what I read in the first place xD
07:22:04FromDiscord<yewpad> 'kys' as an abbrev for 'kill yourself'
07:22:39FromDiscord<yewpad> is an*
07:24:58skrylar[m]some days i regret not making that weird crypto dns proxy
07:25:44skrylar[m]nxt is no longer FOSS and between that and namecoin it looked like a decent backend for DNS a pile of years ago when they started the whole "lets censor the entire internet" stuff
07:28:00*GordonBGood joined #nim
07:29:02*CcxWrk joined #nim
07:29:54AraqGordonBGood, if you want to help me, reduce your program to something else that still crashes
07:30:04Araqit's a mindfuck for me
07:33:17skrylar[m]https://github.com/renatahodovan/picire this is good for that
07:34:20GordonBGoodAraq, Okay, I'll reduce it to just concentrate on the closures, which I think is the main issue why it doesn't work
07:34:46Araqcertainly
07:34:59Araqbtw async on OSX works with --gc:arc fwiw
07:35:07Araqso your test is even harder than async, congrats
07:35:22Araqquite an achievement ;-)
07:35:32GordonBGoodIsn't that what we want, a stress test?
07:35:56Araqsure but now it's too hard to figure out where it goes wrong
07:36:07GordonBGoodAnd I've even kept cyclic data out of it :0
07:36:41*jjido joined #nim
07:36:47GordonBGoodOkay, I might end up with splitting what it does into separate tests before we are ready for the whole shebang
07:36:51skrylar[m]if you can model the crash as a shell script you can throw it at a delta debugger and it'll deal with the boring parts of shunting random parts of the file to minimize it :>
07:37:17Zevvbut sealmove, how are you handling the indenting then?
07:37:43Araqskrylar[m], can't be bothered to instead the Python script and try it. I suspect it doesn't work well since it's line based
07:38:09skrylar[m]well no, it's supposed to be line+chunk based but /shrug
07:38:47FromDiscord<sealmove> The indentation is not arbitary in .ksy, you can only have so many levels.
07:38:53skrylar[m]i would assume with a peg system its probably what python does; check for new lines and then the whitespace after a newline is checked against the current indentation level and that determines if it captures nothing, a dedent or an indent
07:39:07skrylar[m]thats what i would do with janet or red's pegs anyway
07:39:46FromDiscord<sealmove> Yup, except it's even easier for me because I don't need to keep track of indentation level
07:39:58skrylar[m][heresy intensifies]
07:41:12Zevvskrylar[m]: thats how I do it, the indent check is not part of the grammar, it is just handled by the nim code blocks that run at parse time.
07:42:38FromDiscord<sealmove> Btw I am new to pegs.. In code blocks you can only generate a stack of nodes, them what to do? Transform the stack to a tree?
07:45:19Zevvwell, it's not specific to pegs, but thats what I do. I keep the stack as scratch space to store stuff during parsing the lower parts, and the above match then pops a few and puts it in its child nodes. Thats works like a charm recursively, and I have been able to use that for all AST trees I tried up to now.
07:45:57Zevvthe stack usually goes no deeper then a handful, its only because stuff is not always parsed in the right order and you need a place to keep things at hand until you are ready to pick them up again.
07:46:15*uu91 quit (Read error: Connection reset by peer)
07:46:33*uu91 joined #nim
07:47:36Zevvoften I end up with a few small conveinience templates for common operations like "pop element and place in the parent of stack element N". it feels wonderfully forthy
07:47:56Zevvdup() rot() swap(), i feel like 14 again
07:47:58FromDiscord<sealmove> I see, this helps a lot, thanks!
07:48:36FromDiscord<sealmove> Do you keep a state for knowing how many nodes to pull from stack?
07:48:49FromDiscord<sealmove> pop*
07:49:26FromGitter<Vindaar> @demotomohiro: I replied to your gist
08:00:00*gmpreussner quit (Quit: kthxbye)
08:04:46*gmpreussner joined #nim
08:08:38*ITChap joined #nim
08:17:10FromGitter<s0kil> @treeform Any ideas? https://github.com/treeform/ws/issues/11
08:17:55*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
08:39:14Zevvsealmove: it depends; sometimes I'm at the parent level, popping X things of the stack and putting them in my child list, sometimes I am at the child node where the child adds itself to the parent - however it fits in where and how the parsing goes. It's always pretty ad hoc, I should probably perform some introspection one day to see if there is any logic to this and make a little howto writeup
08:39:31*NimBot joined #nim
08:44:47*Vladar joined #nim
09:16:02*theelous3_ quit (Ping timeout: 265 seconds)
10:03:06*Hideki_ joined #nim
10:05:44*solitudesf quit (Ping timeout: 246 seconds)
10:11:44FromDiscord<kodkuce> type mismatch: got <proc (): bool{.locks: 0.}> but expected 'bool' , this some async magic troling me ? my proc is proc check_circle_finished():bool= but am calling it inside an async one
10:13:55*cyraxjoe joined #nim
10:14:14*MightyJoe quit (Ping timeout: 276 seconds)
10:20:30*sagax joined #nim
10:24:45*tklohna joined #nim
10:26:30Araqcall it with ()
10:32:50FromDiscord<kodkuce> oh 🙂
10:52:41leorizeZevv: can npeg has a parsing limit?
10:52:58leorizeie. emails can only be 254 chars in length
10:53:14leorizeor am I better of doing the `.len` check manually?
10:55:34Zevvleorize: easiest to check yourself
10:56:11Zevvalthough that might be too late for you, maybe
11:11:58FromGitter<alehander92> Zevv
11:12:10FromGitter<alehander92> are you familiar with `perf`
11:13:36FromDiscord<onelivesleft> anyone have an idea what's going on here? : https://www.reddit.com/r/nim/comments/dz0lc5/macro_output_seems_to_match_desired_output_but/
11:14:58FromDiscord<mratsim> @onelivesleft in one case you have Options and in the other OptionsX
11:15:21FromDiscord<mratsim> is that expected?
11:15:35FromDiscord<onelivesleft> yeah, OptionsX is just the example of what I want. I can't call it exactly the same or they'll collide
11:15:49FromDiscord<mratsim> I would need the macro to debug
11:16:46FromDiscord<mratsim> seems quite hack to have a not top-level type section, I'm surprised it works
11:17:19FromDiscord<onelivesleft> https://pastebin.com/2VGA3Ntk
11:22:23Zevvalehander92: sure, why?
11:25:26*rockcavera joined #nim
11:25:41FromDiscord<onelivesleft> n/m, I'm an idiot: the first block doesn't work because it should be colons, not equals, in the constructor
11:25:43FromDiscord<onelivesleft> gah
11:26:07FromDiscord<mratsim> ah
11:26:19FromDiscord<mratsim> you forgot to put the typename thing so I couldn't debug
11:26:40FromDiscord<mratsim> anyway glad it worked
11:26:46FromDiscord<onelivesleft> 👍
11:27:01FromDiscord<onelivesleft> ty for the intended assist
11:27:06FromGitter<alehander92> Zevv i am just trying to understand it a bit
11:27:36narimiran nim + perf tutorial when?
11:27:44FromGitter<alehander92> the way it uses perf counters: is there something in the kernel which enables only perf / the `perf_event_open` family to read them
11:28:45FromGitter<alehander92> or is it just easier to use, permitting one to implement in userland some different abstraction on top of them
11:29:19*nif_ quit (Quit: ...)
11:29:29*nif joined #nim
11:30:27FromDiscord<mratsim> look into perf_event_paranoid and ptrace_scope
11:30:51FromDiscord<mratsim> you need to sysctl them before use
11:31:00*ng0 joined #nim
11:31:00FromDiscord<mratsim> or run as admin
11:31:17FromDiscord<mratsim> or run with setuid guid iirc
11:35:02FromGitter<alehander92> mratsim you're right
11:35:25FromGitter<alehander92> the approach i am interested in does indeed require perf_event_paranoid 1
11:35:37FromGitter<alehander92> i just know that e.g. rdtsc
11:35:50FromGitter<alehander92> can be accessed typically "directly" in gcc programs
11:36:37ZevvThe default restrictions also differ per linux flavour. I have become lazy, and instead of tweaking or properly configuring I tend to run my tests as root. I think the counters require ring0 access anyway, so there is no way you could access those without help from the kernel
11:37:14*fanta1 joined #nim
11:39:34FromGitter<alehander92> and wondered if there is a reason this isnt true for other counters like rdbpc
11:39:50FromGitter<alehander92> i see
11:43:13Zevvsecurity wise TSC is quite different, I don't see that leaking info about what is running on the CPU. Perf counters are finegrained enough, I can imagine there are tons of security implications with PT registers
11:43:33*PMunch joined #nim
11:43:44Araqyou can use multi threading to get a very precise timer
11:44:11Araqand it's not hard either, see the paper about Specre that I linked here a couple of days ago
11:44:34Araqsecurity is simply a joke, you don't have it. and you won't get it.
11:44:44FromGitter<alehander92> i agree, and i am not interested in security
11:45:19Zevvno, but (alleged) security is probably the only reason for restricting access
11:45:30FromGitter<alehander92> i am trying to understand better some aspects of `rr` and similar approaches
11:46:04FromGitter<alehander92> so it's not really about timing
11:46:23FromGitter<alehander92> yeah, i agree, i have no problem with the fact it requires some flags to be set
11:46:33FromGitter<alehander92> it doesnt really require root actually
11:46:39FromGitter<alehander92> (after the flag is changed)
11:50:07PMunchHmm, toUgly from the json module managed to reach the recursion depth..
11:53:42PMunchNow I just need to figure out if it is the garbage collector that did something weird, or if it is an actual bug in the data..
11:56:36PMunchHmm, it also randomly segfaults. So I guess this is a different issue..
11:58:20AraqPMunch, try --gc:arc on devel
11:58:35Araqit's now production ready (nah, I'm kidding...)
11:58:51Araqbut it's worth a try
12:05:44PMunchOooh
12:05:46PMunchI'll try
12:06:33FromDiscord<itmuckel> Any of you know if there's a way to inline this?
12:06:34FromDiscord<itmuckel> var offset = 2 * sizeof(GL_FLOAT)
12:06:34FromDiscord<itmuckel> glVertexAttribPointer(colAttrib, 3, cGL_FLOAT, GL_FALSE,
12:06:34FromDiscord<itmuckel> 5 * sizeof(GL_FLOAT), addr(offset))
12:06:34FromDiscord<itmuckel> In C I can cast it to a void pointer. Is there something like that in nim?
12:07:11Araqit's cast[pointer](x) in Nim
12:07:31Araqbut you seem to use the wrong libraries, try fancygl or any other higher level OpenGL wrapper
12:08:11FromDiscord<itmuckel> thx, that worked!
12:08:40FromDiscord<itmuckel> I bookmarked fancygl for later
12:12:07FromDiscord<itmuckel> Wait, fancygl has no dependency on opengl. Is https://github.com/nim-lang/opengl outdated?
12:19:14PMunchAraq, I get undeclared identifier Channel when I do --gc:arc
12:20:10PMunchAnd for the part that doesn't use channels it compiles fine but I immediately get "[FATAL] unpaired dealloc" when I start running it
12:20:46PMunchShould I do "setupForeignThreadGC" with --gc:arc?
12:21:38PMunchDidn't work without either
12:28:26Araqwell... report it so that I can reproduce :P
12:31:37PMunchReport which thing? That Channels don't exists, or the fatal error?
12:35:21lqdev[m]PMunch: I assume you didn't forget about --threads:on?
12:36:11*nsf quit (Quit: WeeChat 2.6)
12:37:21*solitudesf joined #nim
12:37:40PMunchHaha, no it's in my nim.cfg
12:38:07PMunchAnd all the code that needs threads is behind a when compileOption("threads") switch
12:38:39Araqthe fatal error, threads are not ported and I'd like to write a new API for that
12:42:35PMunchHmm, well boiling this mess down to a minimal example might take a while..
12:55:40PMunchHmm, just using the regular garbage collector on 1.0.2 I also get a segfault: http://ix.io/22le
12:56:16PMunchThis is with calling setupForeignThreadGC by the way
13:04:43PMunchHmm, seems to work fine with --gc:markandsweep
13:06:26*sammich quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
13:09:28*sammich joined #nim
13:10:25*sammich quit (Read error: Connection reset by peer)
13:12:42*sammich joined #nim
13:12:53*sammich quit (Read error: Connection reset by peer)
13:14:10*sammich joined #nim
13:20:17*tklohna quit (Ping timeout: 252 seconds)
13:26:20*endragor quit (Remote host closed the connection)
13:33:26*tklohna joined #nim
13:46:52*oculux quit (Quit: blah)
13:48:06*oculux joined #nim
13:49:36*GordonBGood quit (Ping timeout: 265 seconds)
13:51:17*tklohna quit (Ping timeout: 240 seconds)
13:51:44*tklohna joined #nim
13:57:16*Hideki_ quit (Remote host closed the connection)
13:57:27*nsf joined #nim
13:58:07*Hideki_ joined #nim
14:01:43*PMunch quit (Quit: Leaving)
14:02:23*Hideki_ quit (Ping timeout: 245 seconds)
14:03:44*PMunch joined #nim
14:12:06*sleepyqt joined #nim
14:28:19*dddddd joined #nim
14:29:04*Kameleon joined #nim
14:29:36*Kameleon quit (Client Quit)
14:41:27*Hideki_ joined #nim
15:03:38*tklohna quit (Ping timeout: 240 seconds)
15:04:08*Hideki_ quit (Ping timeout: 276 seconds)
15:14:56*narimiran_ joined #nim
15:15:17*narimiran quit (Ping timeout: 240 seconds)
15:16:43*tklohna joined #nim
15:29:55FromGitter<zacharycarter> tile blending
15:30:01FromGitter<zacharycarter> (https://files.gitter.im/nim-lang/Nim/03gg/image.png)
15:31:20PMunchCool, any way to make it look less square-ish though? Right now you can tell along the border that it is really made up of squares
15:33:40FromGitter<zacharycarter> maybe, but I'm kind of going for that old school RTS feel and not ultra realistic
15:34:02PMunchFair enough :) Definitely looks like an old school RTS :)
15:34:19FromGitter<zacharycarter> :D
15:36:26AraqDark Reign 3 here we come
15:37:09*Hideki_ joined #nim
15:38:56*Cthalupa quit (Ping timeout: 246 seconds)
15:39:12*skrylar[m] quit (Ping timeout: 250 seconds)
15:39:24*leorize quit (Ping timeout: 260 seconds)
15:39:52*ng0 quit (Ping timeout: 260 seconds)
15:40:30*salotz[m] quit (Ping timeout: 250 seconds)
15:40:56*pigmej quit (Ping timeout: 250 seconds)
15:41:14*Hideki_ quit (Ping timeout: 240 seconds)
15:42:16FromGitter<zacharycarter> :P
15:42:34*Cthalupa joined #nim
15:42:37FromGitter<zacharycarter> need to fix a few more things with map rendering and then I'll start on rendering units and can start playing around more with netcode
15:44:01*Hideki_ joined #nim
15:44:09*leorize joined #nim
15:47:17*tklohna quit (Ping timeout: 240 seconds)
15:47:44*tklohna joined #nim
15:49:14*ng0 joined #nim
15:52:15*theelous3 joined #nim
15:53:52*abm joined #nim
15:54:23*sleepyqt quit (Read error: Connection reset by peer)
15:54:37*tklohna quit (Ping timeout: 240 seconds)
16:00:05*Hideki_ quit (Remote host closed the connection)
16:04:28*Hideki_ joined #nim
16:08:20*narimiran_ is now known as narimiran
16:08:36*Hideki_ quit (Ping timeout: 240 seconds)
16:08:39*tklohna joined #nim
16:18:40*nsf quit (Quit: WeeChat 2.6)
16:28:51*ITChap quit (Quit: ITChap)
16:40:00FromGitter<zacharycarter> PMunch: maybe this looks a little better?
16:40:08FromGitter<zacharycarter> (https://files.gitter.im/nim-lang/Nim/OQCV/image.png)
16:40:32Araqwohoo! I did it.
16:40:41Araqwinning gcbench with --gc:arc
16:40:57Araqmuahaha for the fist time ever or something like that
16:41:08FromGitter<zacharycarter> nice!!!
16:41:22Araq0.4s
16:41:33Araqwith one 'sink' annotation --> 0.3s
16:41:35Araq:D
16:42:07FromDiscord<mratsim> what's gcbench?
16:42:15FromDiscord<mratsim> on windows, linux, mac?
16:43:27PMunchzacharycarter, oh I wasn't thinking of the sharp lines along the terrain edges
16:43:33PMunchI was talking about how it blends
16:43:43PMunchBut it looks better :)
16:44:31Araqand don't even start about the "GC latency" benchmark, the numbers are in the noise
16:45:47FromGitter<zacharycarter> ah I see
16:45:52FromGitter<zacharycarter> and thanks :)
16:47:55Araqmratsim: I'm on Windows, but I'm sure the results are portable
16:47:57*narimiran quit (Ping timeout: 240 seconds)
16:55:59FromGitter<cloudcalvin> Hey people! I am trying to compile a cpp header to nim using nimterop but get an error about identifiers starting with leading underscores. I am wondering what the reason is for not allowing leading/trailing and multiple underscores?
16:57:26FromGitter<matrixbot> `BarrOff` Hello, according to github issue #3116 list comprehension has been deprecated in favor of for loop macros. Where can I find those and favourably some examples?
16:58:05FromDiscord<treeform> Araq, I made gcbench win with --gc:none 🙂
16:58:24Yardanicolol
16:58:33FromDiscord<treeform> Also I noticed gcbench perf goes way down when you just add threads but don't use them.
17:01:43FromDiscord<mratsim> @BarrOff afaik the only example is here: https://github.com/nim-lang/Nim/commit/de02f5fa0a667dc252fec58aef2a9d177c3b2de5#diff-156c0ca1cd27375be87e1b8617e94586R63
17:02:17*tklohna quit (Ping timeout: 240 seconds)
17:04:30Araqcloudcalvin: mostly to encourage good style, underscores are separators and separators separate
17:04:55Araqnim assumes that sometimes you're in the pyhsical world and want to pronounce the used names
17:05:23AraqBarrOff: actually I'm about to add 'collect' to sugar.nim for Nim version 1.1
17:10:31*Hideki_ joined #nim
17:12:49FromGitter<cloudcalvin> @Araq That makes sense in general, but I think maybe its not such a good idea for cpp->nim translation or more specifically for automatically generating bindings. The use of underscores in the library I am trying to translate are not under my control. I have thought of using some `find&replace` tool to rename all the identifiers that start with `_` but there are things in there such as `std::_Rb_tree_node_base`
17:12:49FromGitter... that would erroneously get renamed
17:14:55*PMunch quit (Quit: Leaving)
17:15:35shashlickcloudcalvin please see cPlugin
17:16:09FromGitter<cloudcalvin> Thanks
17:16:11*Trustable joined #nim
17:18:32*nif quit (Quit: ...)
17:18:43*nif joined #nim
17:22:16*Hideki_ quit (Ping timeout: 265 seconds)
17:31:27*abm quit (Ping timeout: 265 seconds)
17:59:14*fanta1 quit (Quit: fanta1)
18:05:38*NimBot joined #nim
18:26:57*abm joined #nim
18:33:18*GordonBGood joined #nim
18:40:35*GordonBGood quit (Ping timeout: 276 seconds)
18:46:01Araqping shashlick
18:52:21*nsf joined #nim
18:53:06*donpdonp left #nim ("WeeChat 2.6")
18:55:34shashlickhey Araq
18:59:50*uu91 quit (Ping timeout: 246 seconds)
19:01:45*uu91 joined #nim
19:15:30*bacterio quit (Read error: Connection reset by peer)
19:27:14FromDiscord<yewpad> What's '--gc:arc'?
19:31:05AraqNim's most likely future.
19:32:17*nsf quit (Quit: WeeChat 2.6)
19:32:35*tklohna joined #nim
19:37:35*zzbrd joined #nim
19:44:57FromDiscord<mratsim> After gc:v2, gc:destructors, newruntime and araqsgc 😉
19:45:06FromDiscord<mratsim> oh I forgot gc:regions
19:45:18Yardanicowhat does ARC stand for btw?
19:45:29FromDiscord<kodkuce> araq reference counting
19:45:32FromDiscord<mratsim> Araq Remote Control
19:45:54FromDiscord<kodkuce> araq rain cry
19:45:57zzbrdis there a public discord server?
19:46:10FromDiscord<mratsim> yes the link is on the website
19:46:52zzbrdnice
19:47:56FromDiscord<kodkuce> not really irc better just discord subliminal messaging gets you hooked
19:51:54*zzbrd quit (Remote host closed the connection)
20:15:26*manjaroi3__ joined #nim
20:21:42*manjaroi3__ is now known as ZZZtyZ
20:25:14*uu91 quit (Ping timeout: 240 seconds)
20:25:25*uu91 joined #nim
20:27:12FromDiscord<itmuckel> @Yardanico I think in rust-lang arc was an asynchronous reference counting pointer type.
20:28:02FromDiscord<itmuckel> Used in multithreaded programs
20:28:29zedeusatomic
20:28:50FromDiscord<itmuckel> Oh yeah, right 👍
20:34:41*tklohna quit (Ping timeout: 246 seconds)
20:40:53FromDiscord<trey.merkley> I want to make a system where users create strings and then assign tags to those strings for referencing later. what would be the best data structure for it?
20:42:12FromDiscord<mratsim> I'm not too sure I understand what you want, best would be for us to see the ideal pseudocode for using that. A wild guess would be to use hash tables?
20:47:28*uu91 quit (Read error: Connection reset by peer)
20:47:46*uu91 joined #nim
20:48:42FromDiscord<trey.merkley> I guess for pseudocode:
20:48:42FromDiscord<trey.merkley> ```
20:48:42FromDiscord<trey.merkley> # create array in one area of the file
20:48:42FromDiscord<trey.merkley> user_input_array_somehow_named_after_the_user's_input = new array_or_similar_struct(user_input_to_make_initial_string)
20:48:42FromDiscord<trey.merkley>
20:48:43FromDiscord<trey.merkley> # add to the array
20:48:45FromDiscord<trey.merkley> user_input_array_somehow_named_after_the_user's_input.add_to_array_or_something(user_created_tag)
20:48:46FromDiscord<trey.merkley> ```
20:48:50FromDiscord<trey.merkley> The thing is, I don't know if that's the best way to go about this. I want to be able to search for the items based on those tags, and I don't know if it's effective to search through each array or whatever for each tag
20:51:53FromDiscord<trey.merkley> I think the best way to describe it is something similar to the flair system used in Reddit, but users create new ones, or the way itch.io worked before it used standardized tags
20:57:03*a_b_m joined #nim
20:58:17*Trustable quit (Remote host closed the connection)
21:00:40*a_b_m quit (Client Quit)
21:00:44*abm quit (Ping timeout: 265 seconds)
21:01:54*clyybber joined #nim
21:03:18*Simerax joined #nim
21:07:11FromDiscord<trey.merkley> or modern (I think) Steam
21:09:15FromDiscord<krab4t> nigui blinking on window resize, and scrollable layouts are buggy
21:09:43FromDiscord<krab4t> any good GUI library? 🙂 windows native 🙂
21:10:57FromDiscord<krab4t> wNim looks better, but layout syntax a bit retarded
21:13:07solitudesfsubmit a bugreport to nigui if its not working properly
21:15:10*Jesin quit (Quit: Leaving)
21:19:09*Hideki_ joined #nim
21:22:59FromDiscord<trey.merkley> have you tried nimx?
21:23:16*Hideki_ quit (Ping timeout: 240 seconds)
21:31:31*ltriant joined #nim
21:44:06FromDiscord<IanIAnIAN> I found another book that mentions Nim - Building Telegram Bots: Develop Bots in 12 Programming Languages using the Telegram Bot API
21:46:54*krux02 joined #nim
21:48:37FromGitter<topcheese> Just what we need ... more bots.
21:54:40FromDiscord<krab4t> no to both answers 🙂
22:01:25FromGitter<topcheese> @trey.merkley, I've tried nimx and I can only get the basic example working on a Mac. The more complex examples compile, but nothing shows up when I run them. I'm still trying to learn the basics of Nim.
22:06:45*tiorock joined #nim
22:06:45*rockcavera quit (Killed (orwell.freenode.net (Nickname regained by services)))
22:06:45*tiorock is now known as rockcavera
22:06:45*rockcavera quit (Changing host)
22:06:45*rockcavera joined #nim
22:07:04*skelett quit (Read error: Connection reset by peer)
22:07:14*oculux quit (Ping timeout: 240 seconds)
22:07:19*uu91 quit (Read error: Connection reset by peer)
22:07:22*skelett joined #nim
22:07:35*uu91 joined #nim
22:07:56FromDiscord<trey.merkley> file an issue?
22:08:37*oculux joined #nim
22:10:14FromGitter<deech> Is there some guarantee templates/macros in the `pragma` position run in order, eg. in `proc p () {.a,b,c.}`is `p` munged with macro `a`, then `b` and so on?
22:20:28*Jesin joined #nim
22:24:17FromGitter<deech> Also it's apparently to silently shadow existing pragma's, eg. `template compileTime(u:untyped):untyped = u` will shadow the hard coded `compileTime` pragma with no warning.
22:27:54FromGitter<topcheese> @trey.merkley, I was going to look more into the problem before I do. I'm looking into seeing if I can port a more modern gui backend like this. https://diligentgraphics.com/diligent-engine/
22:31:53FromDiscord<trey.merkley> hey if you do it @ me again, that would be really cool
22:32:08FromDiscord<trey.merkley> it'll be nice if someone can port Qt5 to Nim
22:34:10FromGitter<topcheese> @trey.merkley, yes, then they can do something like the drag and drop editor in the Ring language.
22:35:19FromGitter<topcheese> And better than the one in Ultimate++/U++
22:37:49FromGitter<deech> How do I use a template in pragma position when it's exported by another module? eg, ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5dd5c03d167c4f62b78bf04a]
22:38:07FromGitter<kayabaNerve> Use an asterisk to mark it public?
22:38:14FromGitter<deech> Yeah that's a typo I did that.
22:51:08FromDiscord<krab4t> i'm taking my words back, wnim has usefull "autolayout editor" in examples 🙂
22:59:22*Vladar quit (Quit: Leaving)
23:05:11*solitudesf quit (Ping timeout: 246 seconds)
23:32:26*sagax quit (Ping timeout: 240 seconds)
23:36:03*Hideki_ joined #nim
23:49:37*uu91 quit (Ping timeout: 240 seconds)
23:49:48*uu91 joined #nim
23:51:15*Hideki_ quit (Remote host closed the connection)
23:53:32*Hideki_ joined #nim
23:54:32*uu91 quit (Ping timeout: 276 seconds)
23:54:51*uu91 joined #nim
23:55:06FromDiscord<mratsim> @trey.merkley there is a nim-qml package
23:55:29FromDiscord<mratsim> QT5 has years of work behind. Doesn't make sense to abandon it
23:56:10FromDiscord<itmuckel> word
23:58:26*Hideki_ quit (Ping timeout: 276 seconds)