<< 01-12-2018 >>

00:00:03*ghost64 quit (Quit: See you!)
00:01:00*ghost64 joined #nim
00:39:47*Snircle_ quit (Quit: Textual IRC Client: www.textualapp.com)
00:58:28PMunchHmm, can Nim build a table on compile-time to use at run-time?
01:14:34*sknebel quit (Ping timeout: 268 seconds)
01:15:53FromGitter<zacharycarter> PMunch: ```let table {.compileTime.} = ⏎ {"test1": "test2", ⏎ "test3": "test4" ⏎ }.toTable ⏎ ... [https://gitter.im/nim-lang/Nim?at=5c01e0c9a6c29a1037c45973]
01:16:36PMunchYeah I know I can do that, but I wanted to read a file on compile-time to generate that
01:16:48PMunchI guess I could do it with a macro that creates the code to create that table..
01:17:11FromGitter<zacharycarter> sure
01:17:12*sknebel joined #nim
01:18:23PMunchOh well, it was just something I thought I'd try to use the same kind of atlases that SDLGamelib uses (created by TexturePacker) with gamelight
01:19:09PMunchSDLGamelib just reads the atlas file in at run-time, but gamelight being run in the browser won't be able to easily to that (unless of course I just load the atlas as text..)
01:19:22PMunchOh well, good night
01:19:23*PMunch quit (Remote host closed the connection)
01:20:32FromGitter<zacharycarter> night!
01:38:03*zachk quit (Quit: Leaving)
01:56:16dom96So, who's doing Ludum Dare? :)
02:16:24*abm quit (Quit: Leaving)
02:24:26*ng0_ joined #nim
02:27:19*ng0 quit (Ping timeout: 256 seconds)
02:46:38FromGitter<rayman22201> I won't be able to :-( .... Are you streaming @dom96 ?
02:48:17dom96Not sure I will do. I'll either have to deal with my MacBook's fan roaring or having to use my PC :/
02:50:16FromGitter<rayman22201> You could just blast your music really loud :-P
03:07:42*banc quit (Quit: ZNC - http://znc.in)
03:12:21*rockcavera quit (Remote host closed the connection)
03:14:29*smitop_ quit (Quit: Connection closed for inactivity)
03:23:30*banc joined #nim
03:38:42*dddddd quit (Remote host closed the connection)
04:37:24*ftsf joined #nim
04:38:20ftsfahoy! "Error: internal error: genAssignment: tyNil" any idea what causes this error?
04:38:33leorizeit's an internal error, it's a bug
04:38:48leorizeplease file an issue with code snippet on github
04:39:45ftsfI would like to, but I'm not sure how to track down where it comes from
04:41:37leorizeyou could start stripping unnecessary code from the problematic code
04:41:53ftsfyeah, trying that atm
04:42:09ftsfbut if i knew what the error meant I might be able to narrow it down more easily
04:42:54ftsfaha, found it
04:43:12ftsfsomething to do with assigning a `const` value to something
04:43:25ftsfchanging it from const to let seemed to make the error go away
04:51:16*narimiran joined #nim
04:56:23narimiranok, who's awake and waiting for AoC to start? :)
04:56:44FromGitter<Vindaar> me :) but still very tired... :D
04:57:11narimiranexcuses, excuses.... :)
04:58:07FromGitter<Vindaar> :)
05:03:05*kapil____ quit (Quit: Connection closed for inactivity)
05:12:56*stefanos82 joined #nim
05:14:18*endragor joined #nim
05:17:26narimirancongrats :) see you at the same place tomorrow morning :)
05:17:36FromGitter<Vindaar> Hehe you too! :)
05:18:04FromGitter<Vindaar> I misread part 2 several times. Didn't click that the whole list went through several times
05:24:29narimiransame here. basically, i didn't read the task properly, just wanted to solve it ASAP
05:24:39FromGitter<Vindaar> yep :D
05:29:22narimiranand now i find out that parseint can deal with "+123", no need to complicate :D
05:29:49FromGitter<Vindaar> Heh, that I knew
05:30:25narimiranbtw, now i see that you posted on reddit: you cannot use backticks, you need to indent your code with four spaces
05:31:02FromGitter<Vindaar> Well, that's what I thought. But for some reason it ate my 4 spaces
05:31:13FromGitter<Vindaar> Switched to markdown editing and got it working
05:35:01FromGitter<Vindaar> Anyhow, my plan to stay awake... nah :)
05:37:30narimirangood night :)
05:39:01*endragor quit (Remote host closed the connection)
05:48:27*shashlick quit (Ping timeout: 240 seconds)
05:51:49*rockcavera joined #nim
06:04:51*blarghz[m] left #nim ("User left")
06:06:10*M379229[m] joined #nim
06:07:31M379229[m]My one day of fame has arrived!
06:07:46M379229[m]Sort the nim leaderboard by global score :D
06:08:01M379229[m](For AoC)
06:31:16narimiranM379229[m]: congrats!!
06:40:29M379229[m]Thanks.
06:40:50M379229[m]I'll bask in my pretend glory. Because it'll probably be the last day that I'm on top :)
06:41:52M379229[m]It was good fun though. Thanks for organising the leaderboard and for the blog post.
06:47:46narimirannp :)
06:48:28narimirandon't play yourself down. for example, if i want to be on the top, i first need to learn to read ;)
06:49:27xacei feel like there's a sex reference somewhere in there
06:49:33narimiran:D
06:50:23*kapil____ joined #nim
06:53:20M379229[m]You're from Croatia, right?
06:53:25narimiranright
06:53:44M379229[m]I think it's a lot harder to speed-code this if English isn't your first language.
06:53:51M379229[m]Maybe the puzzle text tomorrow will be in Croatian :)
06:55:53narimirannah, english was not the problem. it was more like: "ok ok, let's do this fast. search for keywords.... ok, "twice" is there, i know this, let's do it, shit it doesn't work, let's try this, nope, ok, split every change and go one by one (make +3 = +1+1+1), nope, ok maybe i should read the task"
07:00:19narimiranzielmicha__: i see you've also made it on global leaderboard, but you're not in our nim group. are you using some other language to solve AoC?
07:07:27*nsf joined #nim
07:21:45*leorize quit (Ping timeout: 252 seconds)
07:23:04*leorize joined #nim
07:27:07*Trustable joined #nim
07:41:25*Vladar joined #nim
08:23:44*anamok joined #nim
08:23:47anamokhi
08:23:53narimiranhi
08:25:20anamokI solved AoC 2018 / Day 1 / Part 2 in Nim and Python. Nim runs for 0.53 sec, Python version runs for 0.05 sec. What am I doing wrong? The code is here: https://github.com/jabbalaci/AdventOfCode2018/tree/master/day01
08:25:49anamokIt's part2.nim and part2.py . The code is the same.
08:26:14anamokI have the impression that sets is slow in Python.
08:26:29anamokSorry, slow in Nim. Sets is slow in Nim.
08:28:16narimiranmy Nim solution on my computer runs in 0.8 seconds
08:28:29anamokThat's a lot.
08:28:59narimiranwhich would make it one of the slowest solutions last year
08:29:21anamokSolve it in Python. It'll be blazingly fast.
08:29:52FromGitter<Varriount> anamok: Are you compiling with -d:release ?
08:29:55narimirani didn't even notice it before you said. now i need to investigate what is going on
08:30:01anamokYes, release version.
08:30:18anamokIn debug mode it was 17 secs.
08:30:24narimiran@Varriount yep, my time is with -d:release
08:37:20narimirananamok: system.set would probably be much faster, but there are some values in (my) input which are bigger than int16.high
08:37:59anamokA HashSet shouldn't be this slow.
08:40:12narimiranagreed
08:40:50M379229[m]I agree too.
08:41:08M379229[m]My nim solution runs in 0.15 s
08:41:29M379229[m]But I used sets.containsOrIncl
08:41:33narimirananamok: i found out the solution
08:41:36M379229[m]Maybe that's faster?
08:41:58narimirananamok: use something like this: `initSet[int](1048576)` -- boom, from 800 to 12 ms
08:42:07M379229[m]Ah, good point.
08:42:16M379229[m]:)
08:42:20narimiran(it must be a power of 2)
08:42:35anamokIs that the initial set size?
08:42:42narimiranit is
08:43:34anamokSo we had a small set that was re-copied and re-hashed several times as it grew? Was it the problem?
08:46:50anamoknarimiran, Good catch! My runtime is 0.00 sec :)
08:47:05narimirani need a new computer :)
08:47:30anamokMine is a 5-6 years old desktop.
08:49:12narimiranhere i7-970, released in 2010. i'm waiting for amd zen2
08:51:27anamokI played a bit with the set size, but it also depends on your input numbers. With 65536 it's slow. With 131072 (2 ^ 17) it's fast. In the last iteration my set size 129881, which is less than the initial capacity.
08:51:32M379229[m]For me it turns out that an initial size of 2**17 is big enough, if you want to overfit your solution...
08:51:37M379229[m]Hah.
08:51:44anamokM379229[m], right :)
08:53:15anamokNevertheless, it's a strange thing. It's easy to overlook and it has huge impact on the performance.
08:53:32narimiranfor me 2^16 seems to be enough, but as M379229[m] says, that's in overfitting area :)
08:59:08*M379229[m] sent a long message: < https://matrix.org/_matrix/media/v1/download/matrix.org/XxLRmgTlvFRIgTxanXcdbGmT >
08:59:14M379229[m]err
08:59:15FromGitter<alehander42> ok I solved it in 2 lines
08:59:19FromGitter<alehander42> is this good or what
08:59:33FromGitter<alehander42> i just woke up
09:00:24*M379229[m] sent a long message: < https://matrix.org/_matrix/media/v1/download/matrix.org/HeIbZLFKSGnnFtRMJpPnYbZl >
09:00:50narimiran@alehander i've also solved the first part in 2 lines. now you need to solve part 2 ;)
09:00:52M379229[m]So that shows you where it has to grow, I guess.
09:00:57narimiran@alehander42
09:00:59narimiran^
09:01:44narimiranand those two lines could be one line :)
09:02:37anamokI went for readability, so mine is 3 lines :)
09:04:04FromGitter<alehander42> yeah @narimiran right, ok so mine is 144
09:04:07FromGitter<alehander42> characters on 1 line
09:04:23FromGitter<alehander42> oh second part
09:05:50narimiran76 characters oneliner (18 of those are filename of my input), without stripping any whitespace (4 more chars)
09:06:23narimiran(ok, my imports are on the separate line)
09:06:29FromGitter<alehander42> why wouldn't you call it 'a'
09:06:36FromGitter<alehander42> mate codegolf it to 57 :D
09:07:00FromGitter<alehander42> oh i remember js1k
09:07:07FromGitter<alehander42> horrible but great days
09:07:10narimirani come from python world, and zen of python says "readability counts" ;)
09:07:35FromGitter<alehander42> well, a readable solution is probably not a 2liner too
09:07:40FromGitter<alehander42> but it might actually be
09:08:00FromGitter<alehander42> i mean i imagine in python you just eval joined lines
09:08:07FromGitter<alehander42> but we dont have eval .. or dont we
09:08:14narimirani'll push it to github later, so you decide if it is readable and clear :)
09:08:35narimirani didn't use eval, just some functional stuff :) (nuff said, spoilers)
09:10:29FromGitter<alehander42> me too, just written in a longer way i guess
09:15:01FromGitter<alehander42> ok, solved the second one
09:15:05FromGitter<alehander42> very slowly tho
09:15:20narimiranoptimization time ahead :)
09:17:38FromGitter<alehander42> oh i have to John Nash this thing
09:17:43FromGitter<alehander42> patterns
09:23:10FromGitter<alehander42> wow
09:23:14FromGitter<alehander42> from 20s to 0.2
09:23:23FromGitter<alehander42> ok that's enough for me
09:23:32FromGitter<alehander42> and to think i wanted to find a numeric pattern there
09:23:35narimiranand now from 0.2 to 0.02!
09:23:44FromGitter<alehander42> it's avtually 0.02
09:23:47FromGitter<alehander42> i misread it
09:24:02narimiranok, then you're free to go :D
09:24:06FromGitter<alehander42> nice
09:24:15FromGitter<alehander42> wow *spoiler* is slooow
09:24:28FromGitter<alehander42> *spoiler feature*
09:26:02*xet7 joined #nim
09:29:22narimirani'm not sure what you're referring to
09:40:39FromGitter<alehander42> adding to a set
09:40:45FromGitter<alehander42> compared to other thing
09:50:05*Vladar quit (Remote host closed the connection)
10:23:02anamoknarimiran, Are you here?
10:23:08narimirananamok: i am
10:23:36anamoknarimiran, I made a test here: http://ix.io/1uZi/nim . However, our previous problem with the set size is not present here.
10:24:23anamoknarimiran, I don't understand why the AoC exercise was that slow.
10:25:02FromGitter<alehander42> the problem is that when you use sets without limit
10:25:05FromGitter<alehander42> you allocate too much
10:25:10FromGitter<alehander42> at least thats what I think
10:25:21FromGitter<alehander42> but actually there is an even simpler solution
10:25:25FromGitter<alehander42> than sets
10:25:35narimirananamok: well, you've got *some* improvement :P
10:26:12narimiran@alehander42: you're saving your first pass, and then just offset it?
10:26:37FromGitter<alehander42> hm, this might be smart not sure
10:26:49FromGitter<alehander42> i replaced my set with an array
10:26:49anamokThis morning we used sets size 65356 (2 ^ 16) and 2 ^ 17. With 2 ^ 16 it was very slow, with 2 ^ 17 very fast. However, with 2 ^ 16 it only had to re-allocate and re-hash just once.
10:27:10FromGitter<alehander42> basically an array does the same job with 0 allocations and hashes
10:27:27FromGitter<alehander42> but maybe a bit more memory (?) sometimes
10:27:28narimirananamok: but you're not exiting early in this example, could that be the difference?
10:28:07narimiran@alehander42 how big is your array? how did you find its size? do you use negative indices too?
10:29:10FromGitter<alehander42> big enough to not lead to bounds error
10:29:29FromGitter<alehander42> nope: I make MAX twice bigge
10:29:33FromGitter<alehander42> and offset with MAX div 2
10:30:26FromGitter<alehander42> sets is more general tho, arrays wouldn't work for a different kind of value
10:30:38FromGitter<alehander42> https://gist.github.com/alehander42/d3ad382d24dc09d8121c257692f78717
10:30:43*nsf quit (Quit: WeeChat 2.3)
10:30:58anamoknarimiran, an early exit means less work, in both cases
10:31:02FromGitter<alehander42> A can be less for their output maybe? not sure
10:31:50narimirani've tried my solution, with a change set --> array and it is indeed twice as fast
10:32:45anamokalehander: parseInt can eat "+5" and "-5" without any problem
10:32:53narimiran@alehander42: pro tip (i figured it out later): `parseInt` works just fine with signs
10:34:15FromGitter<alehander42> ah haha great
10:34:42anamokBut with an array you need to have an a priori knowledge about the max. number of elements.
10:35:08narimirananamok: just like you need to know that initial size of your set should be 2^17 ;)
10:35:13FromGitter<alehander42> yep
10:35:23FromGitter<alehander42> and usually you know your elements would be e.g. int32
10:35:37FromGitter<alehander42> well practically the sum can still be large
10:35:41FromGitter<alehander42> but if you have the input too
10:35:55FromGitter<alehander42> it isn't really a practical problem in a competition
10:36:02FromGitter<alehander42> now, for real world its different ofc
10:36:22anamoknarimiran, But as the other example at http://ix.io/1uZi/nim shows, it's not always the case.
10:36:48FromGitter<alehander42> well, with arrays it doesnt matter: it should just be big enough
10:37:45FromGitter<alehander42> and I mean, who doesn't want a 4GB array for edge cases
10:40:34narimiran:D
10:47:59narimiran[SPOILERS] here is my solution (with @alehander42's modification): https://github.com/narimiran/AdventOfCode2018/blob/master/nim/day01.nim
10:52:31FromGitter<alehander42> oh i wasnt sure if negative indices work, nice
10:53:02anamokcycle is a good idea
10:53:23*ng0_ is now known as ng0
10:54:05narimirananamok: yep. but i figured out i don't like how i implemented it (in itertools) as a closure iterator, so i need to have an extra line (`let infiniteList = input.cycle()`) to make it work
10:55:25anamoknarimiran, Can you make it better in itertools?
10:56:36narimirananamok: i'm thinking about changing it, yes
10:57:08anamoknarimiran, What's wrong with `for n in input.cycle()` ?
10:57:31narimirancurrently it doesn't work ;)
10:57:35anamokoh
11:03:03narimirananamok: but i might change all the infinite iterators (this weekend if i find the time) to allow the syntax you asked for
11:03:34anamokanamok, AoC helps you write better libraries :)
11:04:24anamoknarimiran, I wanted to address you in my previous comment. Yes, that would be great.
11:26:06anamoknarimiran, a simple iterator would be enough, no?
11:26:53narimirananamok: i'm working on it, give me half an hour (code is complete, i need to rewrite the documentation)
11:38:48*onionhammer quit (Ping timeout: 245 seconds)
11:39:59*onionhammer joined #nim
12:00:43*JStoker quit (Ping timeout: 250 seconds)
12:18:26*JStoker joined #nim
12:21:38Araqso ... {.push raises: [].} now works
12:31:12*JStoker quit (Read error: Connection reset by peer)
12:32:12*bcdfgh joined #nim
12:32:17*JStoker joined #nim
12:33:47*bcdfgh quit (Client Quit)
12:35:43narimirananamok: i've just pushed the new version of itertools, and it is immediately available in nimble if you're interested
12:35:55FromGitter<zacharycarter> morning all
12:36:04anamoknarimiran, sure, I'll check it out right now
12:40:53*mjanssen left #nim (#nim)
12:45:30anamoknarimiran, Thanks, cycle works well.
12:46:26*asterite_ joined #nim
12:47:09FromGitter<zacharycarter> I'm wondering what would be better for a level editor - GTK or some immediate mode solution
12:47:18FromGitter<zacharycarter> like Dear IMGui
12:47:22FromGitter<zacharycarter> or Nuklear
12:48:42Araqgiven a choice, I would always pick immediate mode
12:50:09FromGitter<zacharycarter> I've never built a very complex GUI with an immediate mode solution
12:50:21FromGitter<asterite> Hi! I'm doing adventofcode in Nim. I wrote this solution for the second part of the first day: https://gist.github.com/asterite/673d833c4b1a64b529c921ae584edff5#file-two-nim . But it's super slow, it's taking like 3 seconds even if I compile it with `--opt:size`. It takes like 30~60ms in Go and Crystal. Am I doing something wrong?
12:50:34FromGitter<zacharycarter> heck - last time I worked on a Desktop GUI app - immediate mode GUIs weren't really the thing they are today, they were probably just in casey muttatori's brian
12:50:48FromGitter<zacharycarter> or however his name is spelled
12:50:53narimiran@asterite: do not use sequences. (if you want further hints, let me know)
12:51:21narimiranoh sorry, you use sets already
12:51:26FromGitter<zacharycarter> but yeah - I suppose I'll run into the whole gui state vs app state thing if I go with a retained mode solution
12:51:29Araqand pack your stuff in a main proc
12:51:48narimiranuse `seen = initSet[int](<large number, power of two>)`
12:51:51Araqand --opt:size != -d:release, you need to use -d:release
12:51:51FromGitter<alehander42> @asterite provide an initial size for the set or use an array
12:52:00FromGitter<alehander42> it's 20 ms for me
12:52:25narimiranAraq: the problem is in the initial set size, several of us discovered that this morning
12:52:25FromGitter<asterite> it's 20ms for you without modifications?
12:52:53FromGitter<alehander42> @asterite, no, with an initial size
12:52:57FromGitter<alehander42> with an array its even less
12:53:06FromGitter<zacharycarter> Does anyone know the state of Nim's GTK stuff? (I'm not ignoring you Araq - this is a sidebar)
12:53:07FromGitter<asterite> okay...
12:53:10FromGitter<alehander42> (but its a bit different than other solutions i guess?)
12:53:15FromGitter<zacharycarter> like - can we basically compete with Vala now in that arena?
12:53:29FromGitter<asterite> My advice: set should work faster than array for "set" functionality, and it should work fast even if it starts empty
12:53:41Araqwe have maintained Gtk3 wrappers fwiw
12:54:16FromGitter<zacharycarter> yes but I remember like stefan salewski or someone
12:54:22Araqyup
12:54:23FromGitter<zacharycarter> one of our members was big into working on GTK stuff
12:54:32FromGitter<zacharycarter> I see there is - https://nimble.directory/pkg/gintro
12:55:05FromGitter<asterite> what's a good initial size?
12:55:10FromGitter<zacharycarter> and some other gtk-related packages. Vala is used alot with GTK - I'm looking at a game engine written in C++ right now that has its editor written in Vala (prompting the initial question)
12:55:17FromGitter<asterite> Also, if I pass a size that's not power of two I get an error
12:55:32FromGitter<asterite> My advice is to narrow to the nearest power of two
12:55:48FromGitter<zacharycarter> but if Nim has GObject introspection and other similar capabilities to Vala
12:56:07FromGitter<zacharycarter> we should definitely find a way to make that better known - maybe we need a blog post about it
12:57:12FromGitter<zacharycarter> Once I get a basic editor going - just a window being drawn or whatever - I'm going to start a blog series about the new engine / editor I'm working on
12:57:45FromGitter<alehander42> @asterite if we do that, it should be with a suggestSize constructor or something like that, getting a different size than suggested is suprising (i dont like that in some unix's api-s)
12:57:55*vlad1777d joined #nim
12:58:18Araqasterite: there is nothing wrong with teaching users instead of out-smarting them
13:00:09Araqzacharycarter: but your game would be "immediate mode", why would your editor be different. it's harder to reuse the code when you use two different paradigms
13:00:32FromGitter<alehander42> @asterite otherwise I agree that an empty set shouldn't lead to so much slower performance in this usecase, this should be investigated
13:00:37FromGitter<zacharycarter> well - you might draw certain portions of your editor with an immediate mode library
13:00:42FromGitter<zacharycarter> and other portions with a retained mode solution
13:01:08FromGitter<zacharycarter> but either way - I'm going to start with immediate mode, because I know I'll need an immediate mode GUI library regardless of whether I ever need a retained mode one
13:01:43FromGitter<zacharycarter> is anyone named lmariscal in here?
13:01:53FromGitter<zacharycarter> I don't know how to see all IRC folks from gitter
13:02:09*Trustable quit (Remote host closed the connection)
13:02:42Araqbtw the split into game and editor can also already be a mistake
13:03:04Araqimagine you can edit the level as you play it.
13:03:32FromGitter<zacharycarter> well - I'm waiting on code reloading to feature that
13:03:44FromGitter<zacharycarter> but I am working on an architecture that will enable that sort of thing
13:04:15FromGitter<zacharycarter> so for instance - I'm going to have a "compile" server that runs in the background of the editor that displays its output inside of a console within the editor
13:04:24*asterite_ quit (Quit: Page closed)
13:04:44FromGitter<zacharycarter> it's basically just a CLI that allows you to compile your game resources - but since it runs in the background of the editor, I should be able to use file watchers to detect when a resource in use is changed, and recompile it
13:04:55FromGitter<zacharycarter> then have hooks to reload whatever type of asset was modified at runtime
13:05:12FromGitter<zacharycarter> I may end up having to feature an in game edit mode, along with a traditional editor
13:05:55FromGitter<zacharycarter> it will actually also allow you to start a game session from the CLI - so this is really the editor's interface to the engine
13:06:24FromGitter<zacharycarter> and I also plan on allowing the user to write their gameplay code - totally separate from the engine code, and it will be compiled and loaded when the game starts
13:06:32Araqsure hot code reloading is nice but data is data and can be modified on-the-fly
13:06:43FromGitter<zacharycarter> well part of my data will be code
13:06:46FromGitter<zacharycarter> is the thing
13:07:03FromGitter<zacharycarter> but yes - I know what you mean - and I fully eventually plan on supporting that
13:07:28FromGitter<zacharycarter> this is probably 10x the effort of my previous stabs at little hobby game engines - and it's delving into unfamiliar territory for me
13:08:07FromGitter<zacharycarter> but I'm hopeful that I've read enough source from other engines at this point / know enough about Nim, not to shoot myself in the foot, architecturally speaking, from day one
13:08:37FromGitter<zacharycarter> so this is really cool - https://github.com/lmariscal/nimgl_gen - we now have imgui bindings to the c99 api
13:08:45FromGitter<zacharycarter> but I feel like this poor guy has built his own version of nimgen
13:09:18FromGitter<zacharycarter> and he's also built this whole thing - https://github.com/lmariscal/nimgl - which looks neat
13:09:53FromGitter<zacharycarter> but I feel like we already have 10 o these
13:14:11*Trustable joined #nim
13:15:57*JStoker quit (Ping timeout: 252 seconds)
13:16:02*Snircle joined #nim
13:19:22*kapil____ quit (Quit: Connection closed for inactivity)
13:26:15dom96You guys sure asterite's slowness isn't just to do with using --opt:size instead of -d:release?
13:26:35narimirandom96: yes we are
13:27:04narimiransee irclogs from this morning for the exact numbers
13:27:51narimiranin release mode, choosing the right init size changes runtime from 800ms to 12ms on my end
13:28:31*abm joined #nim
13:28:34dom96interesting
13:28:55*nsf joined #nim
13:29:35dom96Gonna need to catch up with AoC. Sucks that Ludum Dare starts at the same time
13:31:09M379229[m]dom96: yeah, see the logs from 5 hours ago (probably AoC spoilers). On a slow machine mine went from 150 ms -> 10 ms.
13:31:23narimirandom96: speaking of LD, can you answer this? https://twitter.com/tetraduzione/status/1068772757524099072
13:31:25M379229[m]It seems understandable that there's some perf penalty with rehashing a set.
13:31:42M379229[m]But I have no idea what kind of slowdown is reasonable or expected.
13:32:30anamokdom96: I made a test, see here: http://ix.io/1uZY/nim . It does a lot of re-hashing and still, it's fast. But if I do the same in the morning AoC exercise (part 2), the difference is huge. Something is strange with sets.
13:32:44M379229[m]Presumably we don't want to initialize with some huge capacity by default.
13:33:21M379229[m]Like, if you just called `initSet[int]()`
13:33:25dom96narimiran: sure
13:34:57anamokWhat is Ludum Dare, by the way?
13:36:23dom96https://ldjam.com/events/ludum-dare/rules
13:38:04*dddddd joined #nim
13:41:16*Trustable quit (Remote host closed the connection)
13:46:22AraqM379229[m]: narimiran will investigate :P
13:46:48narimiranyup, i plan to
13:46:56Araqbut better than HashSet[int] is IntSet
13:47:12Araq(if not let me know, the compiler is full IntSets...)
13:47:13dom96csfml_system_gen.nim(92, 1) Error: 'destroy' or 'deepCopy' expected for 'override' :/
13:47:14narimiranAraq: that is limited to int16.high, right?
13:47:33Araqno.
13:47:48Araqan IntSet is not a set[int] :P
13:48:05narimiranbtw, AoC creator is known for creating "special" inputs, e.g. using some large prime numbers and stuff like that
13:48:10dom96Looks like I should have prepared this yesterday
13:48:44narimiranAraq: oh yeah, the difference is striking, how the hell did i confuse the two :P
13:50:19narimirani need to catch some air, see you guys later
13:50:57FromGitter<alehander42> @Araq if IntSet works for all HashSet[int] cases, can't HashSet[int]] use it internally
13:51:56*narimiran quit (Remote host closed the connection)
13:51:57Araqthen every HashSet's proc would have a specialization for 'T is int' and a different performance profile
13:52:13AraqC++ did that for vector<bool> and it suffered
13:55:11Araqalehander42: I'm waiting for your not-nil prototype
13:56:54FromGitter<arnetheduck> hey @Araq btw, want a patch that would change the `$n` in the compiler to `\n`? would make it more compatible with the stdlib `%`
13:57:22Araqcan't, ask zahary for details
13:58:16FromGitter<alehander42> @arnetheduck `$n` is useful for cgen and debugging: sometimes you need to *not* generate newlines because of line directives
13:58:22*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
13:58:23FromGitter<alehander42> (at least from what I know)
13:59:25FromGitter<alehander42> Araq, I can show you the current code, but I planned on continuing on Monday
13:59:48FromGitter<arnetheduck> @alehander42 oh is it? doesn't look like it's doing anything spectacular: https://github.com/nim-lang/Nim/blob/devel/compiler/ropes.nim#L253
13:59:51FromGitter<alehander42> but if the approach is bad, it's better to change it sooner, you're right
14:01:07*Trustable joined #nim
14:01:18FromGitter<arnetheduck> @zah ping? why `$n`and not `\n` in compiler format string?
14:01:35Araqthere is also $N vs $n
14:01:49Araqiirc $N means \n and $n means "optional newline"
14:02:18FromGitter<arnetheduck> yeah, smells historical - doesn't look like there's a lot of optionality in there
14:03:37FromGitter<alehander42> @arnetheduck please, stop making quick judgements
14:03:49FromGitter<alehander42> I have no idea why this is not honored in ropes.nim anymore
14:03:55FromGitter<alehander42> but it doesn't sound right to me
14:04:14AraqI think I broke it :P
14:04:26Araqproc ropecg still has the logic
14:04:42FromGitter<alehander42> yes, this is pretty bad
14:05:01FromGitter<alehander42> because now you can next several times through the same line
14:05:22Araqah I remember
14:05:27M379229[m]Nice. Just benchmarked `initSet[int]()` (150 ms) vs `initSet[int](2^17)` (10 ms) vs `initIntSet()` (5 ms). Thanks for the tip.
14:06:09FromGitter<arnetheduck> looks like https://github.com/nim-lang/Nim/commit/a4e2b0c1538134ebf105b669da13db13b5356998 removed it
14:06:27AraqI reviewed the code, tried to disable $n for %, got crashes, reviewed it even more and decided to live with it
14:07:29Araqyou need to use ropecg() instead of % if your format string has $n and the context is "imperative code relevant for the debugger"
14:08:41FromGitter<alehander42> basically we should try to use very rarely `$N` except if obviously always being a newline
14:08:52FromGitter<alehander42> i remember in the past there were many wrong usages of it
14:09:05FromGitter<alehander42> and even with the right logic in ropes, there were debugging issues
14:09:13dom96This is so strange
14:09:23dom96nim c "/Users/dom/projects/ld43/src/ld43.nim" works but nim c ld43.nim fails with an error
14:09:34dom96And I can never remember where the new nimcache location is :(
14:09:45Araquse --listcmd to see where it is
14:10:28AraqI use it all the time too since the new location is in some bullshit dotted directory
14:11:28dom96this is some really strange caching bug
14:11:35dom96It's building something completely different
14:13:17Araquse -f to force a full rebuild
14:13:22FromGitter<arnetheduck> oh, and it looks like `ropes.%` is using `\n` while `ropecg` uses `\L` - won't that lead to mixed win/unix line endings somewhere?
14:13:23dom96ohhhh
14:13:28dom96I see what happened omg
14:13:45dom96nimble init needs to be smarter
14:13:52Araqarnetheduck: They now mean the same, remember? you wanted it so much... ;-)
14:14:20FromGitter<arnetheduck> I thought `\L` ended up being the "smart" newline, no?
14:15:11dom96So what does this error mean? "'destroy' or 'deepCopy' expected for 'override'"
14:15:17Araqnah, that's \p
14:15:54FromGitter<arnetheduck> oh shit, pigs are flying and notepad got unix newline support: https://blogs.msdn.microsoft.com/commandline/2018/05/08/extended-eol-in-notepad/
14:16:30Araqlol that's a blog post.
14:17:13Araqthat's something they need to sneak into notepad because it is so embarrassing
14:17:15FromGitter<arnetheduck> haha: "Today, we’re excited to announce that we have fixed this issue!" after what, 30 years?
14:17:22Araqyup
14:17:51Araqbut to be fair, they fixed it, 'cat' still outputs ^M
14:19:04Araqdom96: line?
14:19:42dom96proc destroy*(clock: Clock) {.destroy, cdecl, importc: "sfClock_destroy".}
14:20:12anamokIf I want to store int-s in a set, is IntSet always a better choice?
14:20:13Araqremove the .destroy annotation
14:21:12FromGitter<alehander42> hmm i have to try the destructors finally
14:21:47Araqanamok: in theory a HashSet can win for sparse integer values
14:24:30dom96Araq: Okay, but is there any way to make the destructor work?
14:24:44FromGitter<arnetheduck> anyway, I'm eternally grateful that the nim `\n` outputs a `\n` :)
14:24:50anamokThanks. For the AoC exercise IntSet is the winner (which is a dense set IMO).
14:24:51dom96This wrapper includes destructors and I'd rather keep them
14:26:41Araqthere is a way but it's some work and the feature is heavily in development
14:28:50Araqproc `=destroy`*(clock: var Clock) assuming that Clock is an object (not a ref)
14:29:05Araqand you better also figure out how to overload `=` for it
14:30:25*stefanos82 quit (Remote host closed the connection)
14:40:44*kapil____ joined #nim
14:43:16*smitop_ joined #nim
14:54:40dom96Araq: meh, okay
14:54:51*Trustable quit (Remote host closed the connection)
15:06:15ftsfo/ dom96 how goes the LD?
15:07:12dom96Slow. Helping my SO finish off a YT video :)
15:08:29ftsfahh
15:08:37ftsfgood luck!
15:14:17anamokHow to measure the execution time of a function? I want to get the wall-clock time. I found cpuTime(), but it measures the CPU time, not the wall-clock time (as I understood).
15:18:30FromGitter<GULPF> If you're doing benchmarking, you can use https://github.com/LemonBoy/criterion.nim
15:22:08*nsf quit (Quit: WeeChat 2.3)
15:22:57dom96ftsf: You participating with Nim too? :)
15:23:12ftsfyep =)
15:23:29ftsfof course! nice to use nim again, much more pleasant than using Unity in my day job
15:26:44dom96:D
15:26:48dom96Good luck to you too :)
15:26:56dom96I really should have prepared better
15:27:02dom96Still fighting DLL errors :(
15:30:02FromGitter<zacharycarter> https://github.com/zacharycarter/nimgui
15:30:37FromGitter<zacharycarter> I took the nimgui generated project that was - https://github.com/lmariscal/nimgl_gen - and moved it into a separate repo and cleaned up a few things
15:30:53FromGitter<zacharycarter> going to ask the author if he wants me to transfer it to him - but I think the bindings are worth being in their own repo
15:32:51Calinouhere I'm uploading my game for the Game Off jam :P
15:34:30FromGitter<zacharycarter> yay :D
15:37:15anamokGULPF: Thanks. I found epochTime(), which seems to be good for measuring the wall-clock time
15:43:32*abm quit (Quit: Leaving)
15:43:46anamokI want to add some text to the source that I don't want to compile in the binary. Is `discard """ text here """` the way to do it?
15:46:19FromDiscord_<lastpass> How optimized will Nim get until Nim has all Anaconda's default package functions in place with speeds that exceeds Java and C#?
15:48:08leorizeanamok: you mean comments?
15:49:02anamokleorize: yes, but I don't want to start every line with a `#`
15:49:20leorizeuse comment block: `#[ ]#`
16:01:08*king3vbo joined #nim
16:23:19*narimiran joined #nim
16:35:16anamokbye
16:35:22*anamok quit (Remote host closed the connection)
16:35:27*nsf joined #nim
16:38:41*Vladar joined #nim
16:52:12*elnee joined #nim
16:53:38*elnee left #nim (#nim)
16:57:27*stefanos82 joined #nim
17:11:18FromGitter<zacharycarter> If I plan on having a long running async process - is there something other than the stdlib async implementation i should use?
17:12:13narimiran@zacharycarter: maybe this? https://github.com/status-im/nim-asyncdispatch2
17:12:49FromGitter<arnetheduck> Araq, https://github.com/nim-lang/Nim/pull/9836 does some of the proc name - nodekind mapping we talked about, nice if it can get a quick merge - if yes, vmgen could get the same treatment (regularity helps with nlvm dev)
17:13:15FromGitter<zacharycarter> thank you narimiran!
17:16:08*Trustable joined #nim
17:23:02*smitop_ quit (Quit: Connection closed for inactivity)
17:33:25*PMunch joined #nim
17:41:28*fredrik92 joined #nim
17:41:54*couven92 quit (Disconnected by services)
17:42:02*fredrik92 is now known as couven92
17:42:22*fredrik92 joined #nim
17:43:39*king3vbo left #nim ("Leaving")
17:44:06*craigger quit (Quit: bye)
17:48:27*craigger joined #nim
17:52:18*couven92 quit (Quit: Client Disconnecting)
17:52:49*couven92 joined #nim
17:54:05*Trustable quit (Remote host closed the connection)
17:56:04PMunchHmm, is there a way to get the version number from the nimble file?
17:56:13PMunchI want to include it in --version
17:58:11PMunchOr to let both grab it from a git tag or something like that
17:59:04FromGitter<kdheepak> @PMunch I have done this but I'll warn you that mine is a horrible dirty hack
17:59:23PMunchkdheepak, how did you do it?
17:59:54FromGitter<kdheepak> https://github.com/NREL/glm/blob/a5790f0/glm.nimble#L7-L16
18:00:14FromGitter<kdheepak> If you have a better suggestion on how to do this I'd like to hear from you.
18:01:10PMunchWhat's the deal with the "atal" block?
18:01:38PMunchOh, you grab 1..5, so it's to catch fatal :P
18:01:47FromGitter<kdheepak> If in the repo, get it using staticExec git describe, else try to get it from the folder name (assume it is in the ~/.nimble folder), if that fails just assume it is 0.1.0
18:02:05FromGitter<kdheepak> Haha yes (I'm so embarrassed about that!)
18:02:26PMunchHaha, if it works it works :)
18:03:25FromGitter<kdheepak> Is anyone able to submit a solution to AdventOfCode.com/2017?
18:03:48FromGitter<kdheepak> This is my first year trying it and I thought I'd try previous year ones as well
18:03:55dom96PMunch: See how Nimble does it for its own .nimble file
18:04:10dom96kdheepak: I guess you might not be able to submit for previous years?
18:04:46FromGitter<kdheepak> But I'm getting a weird error. ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5c02cd3d1c439034af018d15]
18:04:50cavariuxHi zacharycarter are you here?
18:04:56FromGitter<kdheepak> ah that's unfortunate.
18:05:32FromGitter<kdheepak> Yes, I was going to mention as well, dom96 suggested looking into nimble's .nimble file when I asked this question last time.
18:05:47cavariuxI think he is using gitter so @zacharycarter would notify him
18:20:29narimirandom96: you can submit for all the years (cc @kdheepak), last year i was solving 2015 tasks
18:21:07FromGitter<kdheepak> @narimiran I think it might be a bug with the website
18:21:33narimiran@kdheepak: the error you got means that your solution is not correct, incidentally your solution matches the correct solution for some other input file, and you have already submitted 5 wrong answers
18:22:23narimiran@kdheepak: i've solved all years of AoC (and many others). if there were a bug, somebody would already report it and it would have been fixed
18:22:28FromGitter<kdheepak> @narimiran, I think my solution is correct. I've asserted solutions from the "tests" on the page and they all pass.
18:22:34narimiranwhich year/day are you trying to solve?
18:22:42FromGitter<kdheepak> Hmm.
18:22:44FromGitter<kdheepak> 2017 day 1
18:23:00narimirani also *thought* many of my solutions were correct ;)
18:23:25narimiranpart 1 or 2?
18:23:33FromGitter<kdheepak> part 1
18:23:46narimiranok, let me see if i can remember some "traps"
18:23:53FromGitter<kdheepak> haha
18:24:11narimirancan you share your code, so i can try it with my input?
18:24:59FromGitter<kdheepak> @narimiran I just pushed my 2017 here: https://github.com/kdheepak/adventofcode/blob/master/2017/nim/day01.nim
18:25:11FromGitter<kdheepak> Thanks for trying this out!
18:26:12*craigger quit (Quit: bye)
18:26:38narimiranpro: it gives a correct solution for my input. con: i need to find out what goes wrong and where :)
18:27:21FromGitter<kdheepak> Wait, it's giving you the correct solution for your input? So it should give me the correct solution for me input as well? Right?
18:27:39FromGitter<kdheepak> Can you run your solution on my input and see if you get the same result? 1216?
18:28:40*craigger joined #nim
18:29:05narimiraneven *your* solution doesn't give you that result! lol :D
18:31:52PMunchdom96, do you mean this? https://github.com/nim-lang/nimble/blob/master/src/nimble.nim#L302-L317
18:32:16*shashlick joined #nim
18:33:00FromGitter<kdheepak> wait wat.
18:33:02FromGitter<kdheepak> haha.
18:33:06FromGitter<kdheepak> Let me run it again.
18:34:01*shashlick quit (Remote host closed the connection)
18:34:29FromGitter<kdheepak> I get `1216` ⏎ ⏎ ```$ ./nim/build/main ⏎ Solution1: 1216``` [https://gitter.im/nim-lang/Nim?at=5c02d434a6c29a1037c9ec1f]
18:35:11FromGitter<kdheepak> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5c02d45f9aec405095afa071]
18:35:18narimirani copy-pasted your program from your git repo and i get a different number :)
18:35:35narimirancheck that you don't have an extra space at the end of your input file, or something like that
18:35:37FromGitter<kdheepak> If your input is different you'll get a different number, right?
18:35:45FromGitter<kdheepak> Ohhhhhhh.
18:36:34FromGitter<kdheepak> Hmm. It doesn't.
18:36:41FromGitter<kdheepak> Are you trying 2017 or 2018?
18:37:02narimiranwith that extra space i get 1216, without it is a different number ;) (trying to hint as little as possible)
18:37:16FromGitter<kdheepak> I get the same result I was getting before after running `strip`.
18:37:24FromGitter<kdheepak> Okay, thanks for the hint. I'll debug again!
18:39:13FromGitter<kdheepak> Hmm. Oh man this is interesting. I don't see any extra spaces anywhere. But clearly I'm missing something.
18:41:00narimirantry to copy-paste the input string directly in your nim file
18:42:29*vlad1777d quit (Remote host closed the connection)
18:43:24*vlad1777d joined #nim
18:43:34*junland quit (Quit: Disconnected.)
18:43:40FromGitter<kdheepak> okay that's a different result.
18:44:05FromGitter<kdheepak> Wow I genuinely don't know what's going on here?
18:44:11FromGitter<kdheepak> End of file character?
18:44:40narimiranso, it is not an "AoC bug"? ;) :P
18:45:17*junland joined #nim
18:45:18FromGitter<kdheepak> Haha yes it's not a AoC bug!
18:46:09FromGitter<kdheepak> @narimiran, I am confused. I used `for i, c in data.strip()` and that gave me 1216.
18:46:40FromGitter<kdheepak> But when I used const data = readFile("./day01.txt").strip() I get 1223.
18:46:54*vlad1777d quit (Remote host closed the connection)
18:46:59*PMunch quit (Remote host closed the connection)
18:47:51*vlad1777d joined #nim
18:49:07FromGitter<kdheepak> Using `strip` inside the function does something different..
18:49:33narimirangithub shows that your file has 2 lines — you have `\n` at the end of the file/line
18:49:39*craigger quit (Quit: bye)
18:49:58narimiranit did work correctly for my input, which is only 1 line
18:50:40*craigger joined #nim
18:50:53narimiranand, as you noticed, `strip` when you iterate doesn't strip that newline char
18:51:55FromGitter<kdheepak> readfile seems to return TaintedString, and I think strip on TaintedString must be doing something different.
18:52:22narimiranthat cannot be the explanation because `readFile("./day01.txt").strip()` works fine
18:53:08narimiranbut enough chit-chat, time for you to solve part 2! ;)
18:54:10FromGitter<kdheepak> haha. I think I don't understand why you said "that cannot be the explanation", but I'll go on to part 2. Maybe that may help understand more.
19:01:14Notkeahi, what's happening internally when extending a seq through the add procedure? how is it resizing the underlying array? is it allocating just the right amount of memory or is it doubling its capacity each time to avoid reallocs?
19:04:19FromGitter<kdheepak> This is very unintuitive behaviour for me. ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5c02db3299ad1556dbeef5b1]
19:04:49FromGitter<zacharycarter> cavariux: I am now
19:04:56FromGitter<kdheepak> If I uncomment the lines in the function, I get the following ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5c02db58e8274925258251aa]
19:05:26FromGitter<kdheepak> Why does the type of the global scope change depending on whether I'm echo-ing inside a function or not?
19:05:32*rockcavera quit (Remote host closed the connection)
19:06:12FromGitter<kdheepak> @dom96 or @narimiran any thoughts here?
19:07:02narimirani'm to tired to think straight, sorry (been awake since 5:30 a.m. (now is 8 p.m. here)
19:08:19cavariux@zacharycarter, great, just wanted to let you know that this is my irc username since I forgot to set a notification for lmariscal
19:09:28FromGitter<zacharycarter> ah cool :D - thanks for letting me know!
19:11:16*JStoker joined #nim
19:25:02dom96kdheepak: pro tip: try repr() on the data to see what the problem might be
19:28:31*nsf quit (Quit: WeeChat 2.3)
19:32:48*Jesin joined #nim
19:34:28FromGitter<kdheepak> @dom96, the type of the variable in the global scope changes? Why does that happen?
19:40:23FromGitter<dom96> Can you link me the code?
19:46:15FromGitter<yyyc514> what's the right compiler option to see the code the macros are generating? i can't ever remmeber it
19:47:06*kungtotte quit (Remote host closed the connection)
19:49:58FromGitter<kdheepak> @dom96 ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5c02e5e6c4af6856da6fc15e]
19:51:32FromGitter<kdheepak> If I run the above, I get the following ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5c02e644bc1a693e3a3e75ba]
19:52:31FromGitter<kdheepak> If you want to use the exact text file I'm using, it is here: https://github.com/kdheepak/adventofcode/blob/45cd1e88379e6d576d0bd94e5420178decd04fdf/2017/inputs/day01.txt
19:53:45*kapil____ quit (Excess Flood)
19:54:44*kapil____ joined #nim
19:59:33*kapil____ quit (Excess Flood)
20:00:36*kapil____ joined #nim
20:01:24*kapil____ quit (Client Quit)
20:02:26*kapil____ joined #nim
20:02:55*smitop_ joined #nim
20:05:32FromGitter<yyyc514> ``` result.status = "ok"``` what is the compiler trying to tell me?```
20:05:41FromGitter<yyyc514> it works just fine without expandMacros
20:06:11*smitop_ quit (Client Quit)
20:06:32*smitop_ joined #nim
20:07:55*smitop_ quit (Client Quit)
20:08:19*smitop joined #nim
20:08:46dom96smitop: you need to be identified with nickserv
20:11:39smitopAm I identified now?
20:14:10*vlad1777d quit (Remote host closed the connection)
20:15:00*vlad1777d joined #nim
20:29:05FromGitter<alehander42> probably, as i see your comment
20:35:01*miran joined #nim
20:37:07*narimiran quit (Ping timeout: 240 seconds)
20:52:39*so quit (Ping timeout: 246 seconds)
21:01:37FromGitter<raydf> Is there any boilerplate for web applications with nim? ⏎ example karax, ormin, websockets, postgres, etc... ⏎ something that could establish some kind of pattern, like others with mvc
21:03:36*zachk joined #nim
21:05:26*Vladar quit (Remote host closed the connection)
21:05:31*zachk quit (Changing host)
21:05:31*zachk joined #nim
21:17:13oprypinhi, is it possible to have aliases inside enums? trying to replicate this https://github.com/SFML/CSFML/blob/61f17e3c1d109b65ef7e3e3ea1d06961da130afc/include/SFML/Graphics/PrimitiveType.h#L52
21:20:31*miran quit (Remote host closed the connection)
21:20:47*so joined #nim
21:25:45FromGitter<StefanSalewski> oprypin, something like const sfLinesStrip = sfLineStrip
21:26:13FromGitter<StefanSalewski> should work, I have used that in gtk3 wrappers.
21:27:07oprypinStefanSalewski, doesn't seem to work well in a pure enum
21:27:33oprypininside the enum it's `identifier expected, but found 'keyword const'` and outside it's not the same thinf
21:29:07FromGitter<StefanSalewski> Yes, I used it after the enum definition. It is an alias, put without the qualifier for pure enums. But the qualifier is not needed at all for enums.
21:29:46oprypin> pure enum
21:30:37FromGitter<StefanSalewski> We generally use qualifier for enum only when it is necessary. With current Nim release we can use pure enums with and with out qualifier.
21:31:26FromGitter<StefanSalewski> But I agree, it is not perfect.
21:37:10oprypinoh damn... it actually doesnt even let me be explicit
21:37:28oprypin`Points = 0, Lines = 1, LineStrip = 2, Triangles = 3, TriangleStrip = 4, TriangleFan = 5, Quads = 6, LinesStrip = 2, TrianglesStrip = 4, TrianglesFan = 5`
21:40:34FromGitter<StefanSalewski> I did it this way: https://github.com/StefanSalewski/oldgtk3/blob/master/oldgtk3/gdk.nim#L2868
21:41:42FromGitter<StefanSalewski> But Araq recomments using distinct ints for C enums :-)
21:45:50FromGitter<StefanSalewski> But then we have no real qualifier as in pure enums, but something like etDoubleButtonPress. To get a qualifier, we may put the flags in its own module called EventType
21:45:55FromGitter<StefanSalewski> Bye.
21:46:51*Trustable joined #nim
21:49:08*ftsf quit (Ping timeout: 250 seconds)
21:58:57*stefanos82 quit (Remote host closed the connection)
22:09:22*kapil____ quit (Quit: Connection closed for inactivity)
22:21:17*kapil____ joined #nim
22:31:39oprypinis `import math` supposed to work on latest version or not?
22:32:08dom96of course
22:32:31oprypini'm just getting `cannot open file: math` O_o
22:32:42oprypinwith https://www.archlinux.org/packages/community-testing/x86_64/nim/
22:34:14oprypinseems like i'm getting that for any module
22:34:38dom96Looks like the package is terribly broken D:
22:34:51dom96narimira: lots of new people joining on the forum for AoC :D
22:35:03dom96I made you a mod so you can approve them
22:35:33oprypindom96, are you just saying that or have you confirmed it?
22:35:44dom96oprypin: Just saying that
22:35:50dom96No idea if it's actually the case
22:35:53oprypinthe package has math.nim in the same location as the previous package
22:36:08oprypin /usr/lib/nim/pure/math.nim
22:36:18dom96check the nim config file
22:36:25dom96or better yet, strace it
22:36:28oprypinahhhh
22:36:39oprypinwarning: /etc/nim.cfg installed as /etc/nim.cfg.pacnew
22:36:39oprypinwarning: /etc/nimdoc.cfg installed as /etc/nimdoc.cfg.pacnew
22:36:59dom96that should be in /etc/nim/* now
22:38:15oprypinok that works
22:38:25oprypinyou guys should raise an alarm to arch linux maintainers
22:39:26oprypinalso that they should add a test that builds any program ...
22:44:14oprypinwhy am i getting this error `Error: 'destroy' or 'deepCopy' expected for 'override'` - wasn't your change supposed to fix 0.19 compat?
22:44:51oprypinfor this line https://github.com/oprypin/nim-csfml/blob/c41b8f7baf3a1eeb3fbe66aa093e1bcc89ddddf9/src/csfml/private/system_gen.nim#L92
22:46:53oprypinoh... https://bugs.archlinux.org/task/60490
22:47:11oprypinbut the error still stands
22:50:07*Trustable quit (Remote host closed the connection)
22:56:45*Jesin quit (Quit: Leaving)
23:03:41*Jesin joined #nim
23:06:35*NimBot joined #nim
23:22:27dom96oprypin: yeah, destructors are being reworked
23:22:36dom96I'm just compiling with destructors disabled
23:24:50smitopIf httpclient gets a response with multiple identical header names (For example, if multiple cookies are set, multiple `Set-Cookie` headers will be used), how can I access all those headers?
23:28:02dom96headers["Set-Cookie", 0] etc
23:37:36smitopIs there any way to loop over each of the `Set-Cookie`s?
23:39:05dom96headers.seq[string] or (seq[string])(headers) or something like that