<< 01-06-2017 >>

00:05:34*yingjun_ joined #nim
00:10:01*yingjun_ quit (Ping timeout: 245 seconds)
00:14:07libmandom96: is this OK - https://www.reddit.com/r/nim/comments/6ej3yw/nim_superstar_dominik_picheta_dom96_speaking_at/ :P
00:14:51dom96Superstar is a bit much lol
00:15:01dom96"core dev" would be better
00:15:25libmanReddit no let edit title
00:16:04dom96Resubmit it, I removed it for you :P
00:16:16dom96also, oooh, they have the timetable up now
00:17:06dom96yay, I'm in the morning, means I can avoid stress when watching the other presentation :)
00:17:12libmanDone.
00:17:56dom964 different rooms though, that's quite a split.
00:18:49dom96libman: gonna fly to Northern Ireland to join the fun? :D
00:18:54*sz0 quit (Quit: Connection closed for inactivity)
00:19:33libmanCrazy tax resisters don't fly.
00:25:50dom96I wonder if I could somehow organise a Nim conference at my University.
00:26:30AraqI noticed we have superstar now. maybe he could do that.
00:26:42ftsf\o/ superstar!
00:29:11shmupman the weirdest stuff happens to me sometimes. i'm 100% sure i am merely spawning a new window with nico, nothing more. i have 3 stubbed out procs for nico.run. i remove the existing exe to be safe. i compile and run, and its the damn helloworld paint demo. its like .. it's.. building from a cached .nim file or something
00:29:11dom96lol
00:29:55shmupi had this happening to me before too. in another scenario but similar outcome.
00:29:56ftsfshmup, hmm how are you building it?
00:30:17shmupnim -r --cc:vcc c wpm.nim
00:30:30shmupvcc is a thing I have defined in my nim.cfg
00:30:36shmupit's just set to use cl.exe is all
00:31:28ftsfhmm odd. wpm.nim doesn't import/include the example does it?
00:32:07*noethics quit (Remote host closed the connection)
00:32:26*noethics joined #nim
00:32:52*def-pri-pub joined #nim
00:33:57shmupftsf: https://gist.githubusercontent.com/shmup/9388475528be15f1a26be0883c49d1f1/raw/e60930ccbc3dc1f4839b35372cf395e2f020a029/gistfile1.txt
00:34:05shmupthis isn't actually a useful log lol but
00:34:33shmupthat atrocious looking build command is just what's needed to use cl.exe, gotta run some environment stuff with vcvarsall.bat heh
00:34:45ftsflooks fine
00:34:47shmupanyways, the result is a wpm.exe and it is just your paint demo and yeah
00:34:49shmup¯\_(ツ)_/¯
00:34:58ftsfdelete all the paintout stuff and nimcache and see what happens?
00:36:52shmupah, got it. so here's a fun thing. i can't actually build this with x64. except it appeared to.. it made an exe, but it was using a previous wpm_wpm.obj
00:37:17shmupbecause after removing nimcache it yelled about not finding it. had to add --cpu:i386 and now all is well. weird.
00:37:37ftsfahh
00:37:39ftsfawesome
00:37:41shmup(i can build x64 if i'm not using cmd.exe and cl.exe heh)
00:37:44shmupwhatever, thanks man.
00:41:21libman"Nim Superstar" ranks below "Founder, King Of Kings, BDFL" of course. Then the rank titles below that are "Brigadier Committer", "Major Nimrod", "Captain Nimble", "Lieutenant Guru", "Sergeant Nim", "Petty Nimian", "Private Repository", "Lurker First Class", and "Forum Troll".
00:42:53FromGitter<Varriount> libman: And which one are you?
00:43:19libmanI'm Forum Troll, Third Class, Dishonorably Discharged.
00:43:27FromGitter<Varriount> :3
00:55:07FromGitter<Varriount> I think I'm more of a guru
00:57:23libmanNah. But if I ever get my concentration back and work hard, I hope to advance as high as Corporal Nimious, someday...
01:03:55*yingjun_ joined #nim
01:11:14*chemist69 quit (Ping timeout: 255 seconds)
01:24:42*chemist69 joined #nim
01:49:24*benny_ quit (Ping timeout: 260 seconds)
01:50:27*benny_ joined #nim
02:05:58*faix joined #nim
02:24:42subsetparkGetting this issue while trying to build my project under a newly installed 0.17 -
02:24:44subsetparklib/nim/pure/os.nim(802, 33) Error: cannot evaluate at compile time: environment
02:24:51subsetparkHave we covered this one before?
02:25:15subsetparksorry - build with `nimble build`
02:30:41subsetparkAh, it's this one https://github.com/nim-lang/Nim/issues/5867
02:31:57ftsf\o/ just recorded a 1:30 video of making a game in nim with nico... now it'll probably take all day to upload
02:32:27*sz0 joined #nim
02:52:09*faix quit (Ping timeout: 268 seconds)
02:58:00shmupftsf: raddddd
03:10:25*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
03:19:33*libman quit (Quit: Connection closed for inactivity)
03:24:59*ftsf quit (Quit: Leaving)
03:30:52*pilne quit (Quit: Quitting!)
03:31:12*ftsf joined #nim
03:38:35*daaf quit (Ping timeout: 260 seconds)
03:45:06ftsfshmup, got something in mind to make?
03:56:31*yingjun_ quit (Remote host closed the connection)
03:56:41*yingjun_ joined #nim
03:57:39*yingjun_ quit (Remote host closed the connection)
04:00:44*yingjun_ joined #nim
04:01:09*king1978 joined #nim
04:04:19*def-pri-pub quit (Quit: leaving)
04:16:35*yingjun_ quit (Remote host closed the connection)
04:16:59*yingjun_ joined #nim
04:17:43*yingjun_ quit (Remote host closed the connection)
04:18:02*king1978 left #nim (#nim)
04:27:15*vlad1777d joined #nim
04:32:23*Parashurama joined #nim
04:42:57*benny_ quit (Remote host closed the connection)
05:08:14FromGitter<zacharycarter> almost done with the first pass of the deferred renderer for frag
05:11:47ftsfawesome
05:12:44*yingjun_ joined #nim
05:25:02*rauss quit (Quit: WeeChat 1.8)
05:35:03*Vladar joined #nim
05:42:01*Parashurama quit (Quit: ChatZilla 0.9.93 [Firefox 53.0.2/20170509210144])
06:01:07*gokr joined #nim
06:11:13*nsf joined #nim
06:28:52*Matthias247 joined #nim
06:31:03*benny_ joined #nim
06:35:06*Arrrr joined #nim
06:44:23*Matthias247 quit (Read error: Connection reset by peer)
07:14:18*rokups joined #nim
07:24:23*yglukhov joined #nim
07:28:25*yglukhov quit (Ping timeout: 246 seconds)
07:28:28*yglukhov_ joined #nim
07:50:47*Andris_zbx joined #nim
08:25:18*yingjun_ quit (Remote host closed the connection)
08:25:31*yingjun joined #nim
08:26:12*yglukhov_ quit (Remote host closed the connection)
08:26:26*yingjun quit (Remote host closed the connection)
08:32:01*yingjun joined #nim
08:40:01*yingjun quit (Ping timeout: 245 seconds)
08:40:40*yingjun joined #nim
08:43:14*yglukhov joined #nim
08:43:22FromGitter<coffeepots> hey everyone :)
08:43:50FromGitter<coffeepots> zachary well done on frag, it's really coming along! Deferred rendering is so useful!
08:46:38FromGitter<coffeepots> So, I noticed that del from a table is incredibly slow, like, hoo wow that is really, really slow. Is this normal? https://gist.github.com/coffeepots/bc4463afc420f51b975a0efad5bb313a
08:47:44def-coffepots: compile with -d:release
08:48:38FromGitter<coffeepots> it does make a huge difference, now add is -2.08e-20 (jesus!) but add is 0.048
08:49:00FromGitter<coffeepots> that is hugely faster but wow orders of magnitude slower for del
08:49:31FromGitter<coffeepots> just wondering if this is normal for hash tables
08:49:44FromGitter<coffeepots> sorry i meant to say del is 0.048
08:50:08def-Implementation here: https://github.com/nim-lang/Nim/blob/devel/lib/pure/collections/tableimpl.nim#L123-L149
08:51:10FromGitter<coffeepots> i did take a look at it but wasn't sure what was going on, two while true's and conditional breaking
08:51:27*yingjun quit (Ping timeout: 240 seconds)
08:51:29FromGitter<coffeepots> it looks fast but i guess it needs to loop a lot
08:51:59*yingjun joined #nim
09:20:55FromGitter<coffeepots> tbh, i expected add to be slower than delete 'cos allocating memory. So, I tried the same test in Delphi and got add: 0.001, del: 0.0007
09:21:05FromGitter<coffeepots> so at least for delphi, delete is faster than add
09:21:21FromGitter<coffeepots> curious as to why the nim del implementation is at such odds to the add performance
09:23:11FromGitter<coffeepots> i mean, in nim release, for 100,000 keys which is not a huge amount really, add 0.003 delete 4.7s wat
09:23:43*murych joined #nim
09:24:05FromGitter<Varriount> We need to copy Python's dictionary implementation
09:24:08FromGitter<coffeepots> that's 1,566 times as slow!
09:26:32FromGitter<coffeepots> i only noticed because i'm making an ecs and trying different implementations, used tables for one and it worked fantastically, that is, until i built a few test systems, then the whole thing ground to a halt, profiled it, oh deary me what on earth...
09:26:48FromGitter<coffeepots> purely because of the deletes
09:28:18FromGitter<coffeepots> if i constantly added entities, up to 10,000 would run fine (this is with graphics and background shaders), when i deleted them the whole thing locked up every few seconds. I thought it was the GC at first. Nope. Deletes
09:29:15FromGitter<coffeepots> I wish I understood hash table implementations enough to work out what the issue is, 'cos it doesn't seem normal
09:29:16FromGitter<Varriount> @coffeepots Any idea why del is so slow?
09:30:23FromGitter<coffeepots> no idea unfortunately, my guess would be it's looping too much because it's not doing any deallocation
09:35:42*krux02 joined #nim
09:39:51def-coffeepots: I'd suggest reading the Knuth algorithm as the next step
09:41:46Araqcoffeepots: OrderedTable or Table?
09:42:05def-Araq: his example used just Table
09:42:37Araqhmm never heard this one but we don't shrink tables
09:43:25Araqwe use "tombstones" in the implementation, pretty standard stuff
09:50:01*murych quit (Ping timeout: 245 seconds)
09:57:52*roxma joined #nim
09:59:31*benny_ quit (Remote host closed the connection)
09:59:46*benny_ joined #nim
10:06:56FromGitter<coffeepots> def: Was looking for the algorithm actually, to have a look and see ref implementation
10:07:17FromGitter<coffeepots> araq: yeah just table[a, b], tried tableref too but same perf
10:07:53FromGitter<coffeepots> as you say, should be fast as no dealloc and all operations in deimpl should be quick, but unfortunately it turns out its incredibly slow :/
10:09:00FromGitter<coffeepots> if you try out the code i listed above you can see how slow it is, almost 5 seconds on my machine to delete 100,000 keys! o_O
10:12:26FromGitter<coffeepots> i wonder if the escape clauses in delimpl are slightly off or something and it's looping way too much, trying to find knuth v3 Algo6.4R to look at
10:12:29AraqI think the many tombstones make searches O(n) instead of O(1)
10:12:49FromGitter<coffeepots> oh
10:12:54Araqand that's obviously a problem ;-)
10:13:10FromGitter<coffeepots> having said that add is sufficiently fast
10:13:27Araqadd can fill in tombstones
10:13:35Araqdel needs to keep searching
10:13:38Araqnot sure
10:24:43FromGitter<GULPF> if orderedtable is reimplemented with the algorithm from pypy, can't that implementation replace nims unordered table as well? looking at https://morepypy.blogspot.se/2015/01/faster-more-memory-efficient-and-more.html, it sounds like deletion should always be O(1) for that implementation
10:29:08AraqGULPF: maybe
10:31:02ArrrrCoffepots it might be because of the consecutive keys? if you add random keys, it goes faster than that https://glot.io/snippets/eqecq7sdt6
10:32:42FromGitter<coffeepots> huh... that is surprising!
10:34:21FromGitter<coffeepots> even will a 10M keys your code gives me add: 1.8, del 1.6 which makes way more sense
10:35:07FromGitter<coffeepots> interesting that delphi's implementation handles consecutives better, i should try their impl with random ids
10:36:02ArrrrI don't know on the other hand how many collisions (if any) produces that random.
10:36:30Arrrrint size seems to be 64b
10:39:54*yingjun quit (Remote host closed the connection)
10:40:04*yingjun joined #nim
10:41:01*yingjun quit (Remote host closed the connection)
10:43:28*yingjun joined #nim
10:45:45FromGitter<coffeepots> translated the code to delphi, ran for 50k keys and got add: 0.01, del: 0.004
10:45:52FromGitter<coffeepots> with randomised keys
10:46:00FromGitter<coffeepots> curious what their implementation is now
10:46:36FromGitter<coffeepots> (that's debug, release is add: 0.0067, del: 0.003)
10:46:41Araq consecutive keys should be fine for 'add' dunno about 'del'
10:47:13FromGitter<coffeepots> yes, add is fine for performance, it's just consecutive keys cause delete to be 1,500 times as slow as add
10:48:01FromGitter<coffeepots> in nim
10:48:16ArrrrIf you are going to use incremental indexes, what's the problem with seq?
10:49:13FromGitter<coffeepots> @Arrrr because I need to randomly access entity ids to read and delete them
10:49:46ArrrrCan't you reuse ids?
10:51:12ArrrrAlso https://bitsquid.blogspot.com.es/2014/08/building-data-oriented-entity-system.html
10:52:06FromGitter<coffeepots> i am experimenting with a slotmap (http://seanmiddleditch.com/data-structures-for-game-developers-the-slot-map/) which does reuse keys with versioning, but the problem with that is the key is then only unique to that map, you can't have a global entity id for lookup into different maps without a lot of complexity
10:53:12yglukhovAraq, dom96: https://github.com/nim-lang/sdl2/pull/93 ready to go
10:54:23Araqgreat, thanks!
10:57:57*yingjun quit (Ping timeout: 240 seconds)
10:58:26*yingjun joined #nim
10:58:58FromGitter<coffeepots> @Arrrr the article you linked looks pretty the same as the slot map idea, in terms of having an id split into generation an index into an array
11:00:28FromGitter<coffeepots> it is fast - my implementation actually is not much faster than hash table though, surprisingly, for add. Of course, delete it vastly outperforms hash table!
11:01:00*yingjun quit (Remote host closed the connection)
11:01:13*yingjun joined #nim
11:01:44ArrrrWhy do you need accessing entities ouside the main list?
11:02:41*yingjun quit (Remote host closed the connection)
11:02:42*Snircle joined #nim
11:08:25FromGitter<coffeepots> systems have a list of entities to loop through which would be fine as a seq were it not for needing to delete them - did consider ordered seq and binary search but hash should still be faster than that, plus ofc deletion from seq means shifting memory, and there needs to be a way of retrieving the component data via entity too
11:08:43FromGitter<coffeepots> actually sorry del from seq doesn't shift memory
11:08:57FromGitter<coffeepots> swaps with the last entry iirc
11:09:17FromGitter<coffeepots> but then its not ordered, so insert needs to shift mem
11:09:37FromGitter<coffeepots> so table seems like logical choice for system.entitylist
11:10:35FromGitter<coffeepots> i am using arranging components by type, where each component type has a lookup of entity id to retrieve component data
11:11:07ArrrrWhy do you need the order?
11:12:15FromGitter<coffeepots> i dont need order with table, but if i want to find an entity to remove it from a system list then i need to find it's index to remove
11:12:31FromGitter<coffeepots> the problem is with short lived entities like bullets
11:12:54FromGitter<coffeepots> ideally i want an ecs that doesnt need a separate system to do short lived entities
11:14:30FromGitter<coffeepots> also, i could have a list of entity id -> list of components but then i have to loop through all the entity's components to find the type i want, for every single query of hasComponent or getComponent
11:15:02Arrrryou could store the index inside the entity/component
11:15:26FromGitter<coffeepots> i do, but how do you find it without a hash table?
11:15:36ArrrrWith the index
11:16:53FromGitter<coffeepots> so how do you manage that when component data is in separate arrays, and systems also have lists of entities? You need a lookup table of entity->component index and entity -> system index, which is what i'm trying atm
11:17:47FromGitter<coffeepots> if table.del was as fast as add, i could keep with the much simpler design (literally 100 lines of code) and get the performance too
11:18:14*couven92 quit (Read error: Connection reset by peer)
11:18:16*yingjun joined #nim
11:19:28FromGitter<coffeepots> ofc my ecs design might be total crud but most of the ones i've been looking at use hash tables to get components via entity ids, and those that don't, afaict, use sets to filter a giant list of entities against systems, which seems even worse (tho cant be that bad, think this is how ashley works)
11:21:56Araqcoffeepots: versionized incremental IDs are state of the art and everything else is inferior ;-)
11:22:13Araqand they imply you can use 'seq's not tables
11:27:03FromGitter<coffeepots> state of the art lol well, perhaps. Certainly they are fast, and my intention was to be as cache friendly as possible. With the slot map it's seq of array chunks and has a seq with the next free id on
11:30:35FromGitter<coffeepots> i think i have figured out a way to do this minimally with "slotmaps" inside the entity
11:32:16FromGitter<coffeepots> entity contains: an id that is versioned idx into array for quick access, and also another array for each component type, that way i have two index lookups, one for entity id and one for component *type* into an array. It means entities are 'fatter' but hey ho, as long as its fast
11:40:48*yingjun_ joined #nim
11:40:51*yingjun quit (Ping timeout: 245 seconds)
12:11:23*PMunch joined #nim
12:40:39*yingjun_ quit (Remote host closed the connection)
12:42:18*pilne joined #nim
13:01:53FromGitter<cooldome> Hi Araq, Iwanted to debug typerel function to figure out, why
13:03:06FromGitter<cooldome> why type StringArray[N] = array[N, string]
13:03:59FromGitter<cooldome> StringArray is array returns false, but it is simply too much goes through typerel function
13:04:30FromGitter<cooldome> Not clear how to filter on types, on Nodes it is easy
13:06:18*benny_ quit (Remote host closed the connection)
13:06:26FromGitter<cooldome> Apologies for bad typing, I am forced to use the phone
13:07:39FromGitter<krux02> @cooldome it's easier if you put your observations in a file that can be executed
13:07:51FromGitter<krux02> then we all can verify your results
13:09:04FromGitter<krux02> @cooldome neither StringArray nor array is a complete type
13:11:43FromGitter<cooldome> Sorry, because I work in env where github and gitter are prohibited, I can't do that. I am chatting from the phone. Types are not complete it is true, do you expect typerel to work only when one type is complete?
13:12:20*benny_ joined #nim
13:13:16FromGitter<krux02> cooldome: you are obviously already breaking the rules
13:13:23FromGitter<krux02> you are on gitter
13:13:49FromGitter<krux02> honestly I don't know typerel and how it works
13:14:14FromGitter<krux02> it's hard to reason about something that is not complete
13:15:33*krux02 quit (Remote host closed the connection)
13:20:07FromGitter<cooldome> Hmmm, I am tried couple more incomplete examples, looks like the problem is not array specific as I originally thought
13:25:11FromGitter<krux02> @cooldome whatever your question are, share your examples, otherwise it's hard to reason about them. When your work environment does not allow you to use tools to get your job done, quit your job, will only make you happier. Or you send your examples when you are home
13:41:23*yingjun joined #nim
13:45:53*yingjun quit (Ping timeout: 240 seconds)
14:02:43*xet7 quit (Remote host closed the connection)
14:09:21*xet7 joined #nim
14:15:13*gokr quit (Ping timeout: 255 seconds)
14:18:58*rauss joined #nim
14:28:08*gokr joined #nim
14:30:56*benny_ quit (Remote host closed the connection)
14:36:17FromGitter<krux02> It it normal that the nimsuggest creates a log file of several gigabytes?
14:37:02*krux02 joined #nim
14:46:59Araqno.
14:53:30FromGitter<andreaferretti> @Araq is my PR for c2nim ok?
14:53:34FromGitter<andreaferretti> I think I fixed everything
14:53:40FromGitter<andreaferretti> but travis cannot complete in time
14:53:49FromGitter<andreaferretti> because installing Nim takes time
14:57:13FromGitter<ephja> great PR
15:02:37*demi- quit (Quit: Server shutdown in 3... 2... 1...)
15:05:43*demi- joined #nim
15:18:05FromGitter<gogolxdong> ···type Matrix[M,N: static[int]] = array[M, array[N, float]] ⏎ ⏎ let x = [[1.0, 1.0, 1.0, 1.0], ⏎ ⏎ ```code paste, see link``` ... [https://gitter.im/nim-lang/Nim?at=5930302d5e34568d5eb22941]
15:18:37FromGitter<gogolxdong> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5930304df3001cd3427e5102]
15:18:59FromGitter<gogolxdong> why can't a * b
15:19:11*smt_ quit (Ping timeout: 245 seconds)
15:23:15*arnetheduck quit (Ping timeout: 268 seconds)
15:25:01FromGitter<gogolxdong> Is there any black magic in there? :)
15:26:14FromGitter<krux02> because a and b are of type int and `*` expects arrays of type float
15:27:39FromGitter<gogolxdong> yeah, I'm blind,thanks
15:36:12shmupnot really ftsf. i kinda wanna make a cute sprite set of playing cards and do some nico card games. haggis would be one. i also kinda wanna make the tile game hive. i have an idea for a shmup sorta. a real simple one. i like those, like `Warning Forever`.
15:36:52ftsfcool =)
15:36:59ftsfi just did a youtube tutorial on making a shmup with nico
15:37:22ftsfhttps://www.youtube.com/watch?v=EwM1Z3WdqjM
15:39:06*Trustable joined #nim
15:39:06shmuphah, how utterly appropriate then. excited to watch.
15:39:20ftsfnot sure how a good it is, but let me know what you think
15:39:22shmupthe video is still unavailable however
15:39:28ftsftrying to get the hang of streaming
15:39:28shmupi was looking on your page earlier to see if it was up :P
15:39:31ftsfoh really
15:39:41shmuphttps://www.youtube.com/user/ftsf/videos
15:39:43shmupdo you see it on your list?
15:39:59ftsfi do
15:40:12ftsfmaybe only i can see it
15:40:18ftsfaha, draft
15:40:19ftsffixed =)
15:41:26*shmup starts his lunch at works and Clicks Play
15:41:55shmuphuh wasnt familiar with cga jam. nice.
15:43:25shmupi'm gonna shift the speed up and make it a 45 minute video and i'll let ya know how well it works :P
15:43:32ftsfcheers
15:45:32shmupmy initial reaction is you just need to pick up your voice better, I think. work on clarity of speech maybe
15:46:02ftsfyeah, i get that a lot, not very good at the public speaking thing.
15:46:07ftsfneed to practice
15:46:24shmup:) this seems like a pr nice way to practice
15:49:54*pilne quit (Read error: Connection reset by peer)
15:50:25FromGitter<ephja> do we have a thousand linear algebra implementations yet? :-)
15:50:40*pilne joined #nim
15:53:41*chemist69 quit (Ping timeout: 255 seconds)
15:53:54shmupas yes the famous missing fonts.png problem lol
15:54:03shmupis that a pico convention, ftsf? that it just looks for that file name
15:54:04shmupimplicitely
15:54:23*Neomex joined #nim
15:54:32ftsfno, ideally i would encode the system font into the binary
15:54:44ftsfbut i haven't figured out a nice way to do that yet
15:59:21shmupdo you know about vim's ci, di, etc syntax?
15:59:23shmuplike ci(
15:59:29shmup@ ftsf
16:00:07*chemist69 joined #nim
16:02:47ftsfshmup, i don't
16:04:07shmupuseful for changing text inside of "" or () or <> or anything. ci( will clear it and put you in insert mode. :)
16:04:22shmupdi( will not put you in insert mode. ok that's my vim lesson
16:04:33ftsfoh i see
16:04:34ftsfcool
16:04:46ftsfhandy
16:05:04ftsfbedtime for me! ttyl o/
16:10:43*joshbapt1 quit (Quit: WeeChat 1.6)
16:10:54*joshbaptiste joined #nim
16:15:56*Andris_zbx quit (Remote host closed the connection)
16:16:47*benny_ joined #nim
16:17:46shmupttyl ftsf
16:32:49*yglukhov quit (Remote host closed the connection)
16:33:10*nsf quit (Quit: WeeChat 1.7.1)
16:39:00*rokups quit (Quit: Connection closed for inactivity)
16:40:35*krux02 quit (Remote host closed the connection)
16:43:26*yglukhov joined #nim
16:47:27*yglukhov quit (Ping timeout: 240 seconds)
16:53:38*faix joined #nim
17:05:41*smt joined #nim
17:06:09*smt_ joined #nim
17:10:45*smt quit (Ping timeout: 272 seconds)
17:13:18*faix quit (Ping timeout: 260 seconds)
17:15:10*libman joined #nim
17:17:26*benny__ joined #nim
17:17:26*benny_ quit (Read error: Connection reset by peer)
17:42:42*ofelas quit (Quit: shutdown -h now)
17:44:22*yglukhov joined #nim
18:00:13*yingjun joined #nim
18:02:11FromGitter<ephja> um. does nimble install every file in the directory?
18:05:40*yingjun quit (Ping timeout: 260 seconds)
18:07:48FromGitter<Varriount> @ephja What do you mean?
18:08:07*freevryheid joined #nim
18:08:16*freevryheid is now known as fvs
18:10:43FromGitter<ephja> nevermind
18:17:43*Matthias247 joined #nim
18:28:25*benny__ quit (Remote host closed the connection)
18:29:29*benny_ joined #nim
18:39:39yglukhovAraq: hi, does this crash log tell you anything? Can't reproduce it with a small sample. https://gist.github.com/yglukhov/de431ac6a1e1f4f309740b8b7abbe849
18:40:35*benny_ quit (Remote host closed the connection)
18:44:07PMunchAny word on this: https://github.com/dom96/jester/issues/114 +
18:46:27dom96Didn't get a chance to look at it yet I'm afraid
18:50:46PMunchHmm, what does resp actually do under the hood?
18:53:27*yglukhov quit (Remote host closed the connection)
18:53:33bozaloshtshhttps://github.com/dom96/jester/blob/master/jester.nim#L336
18:53:47bozaloshtshit doesn't return
18:54:57PMunchbozaloshtsh, last line # The ``route`` macro will add a 'return' after the invokation of this template.
18:55:07dom96https://github.com/dom96/jester/blob/master/jester.nim#L613
18:55:31PMunchBy the way dom96 invocation is spelled with a C
18:56:49dom96and yet it's 'invoke', silly English. But yes, I know.
18:57:12FromGitter<ephja> embrace lojban
18:57:28PMunchI'm guessing the route macro looks at the AST before the template is expanded?
18:57:41PMunchephja, I actually looked at Lojban some years back
18:57:47PMunchTaught myself the basics
18:57:50PMunchInteresting language
18:57:54dom96yep, that's precisely what happens
18:58:02dom96There is no easy solution to your issue I'm afraid
18:58:15dom96Jester's macro cannot see into the template
18:58:47PMunchBut why is transformRouteBody the procedure adding the return?
19:04:04PMunchIf that was moved to the resp template it would work right?
19:08:46*Neomex quit (Ping timeout: 245 seconds)
19:10:10*yglukhov joined #nim
19:10:48*Neomex joined #nim
19:13:52dom96feel free to try it, but I'm certain I had a reason for doing it this way. I can't remember what that reason is though :)
19:14:17*yglukhov quit (Remote host closed the connection)
19:16:36*faix joined #nim
19:16:43PMunchI'm guessing it was to avoid code repetition
19:16:55PMunchreturn true for all redirect, halt, and resp templates?
19:21:17*Neomex_ joined #nim
19:22:31*Neomex quit (Ping timeout: 268 seconds)
19:24:52PMunchI'm guessing there's no way in Nim to check if it is a template symbol and then expand it manually in a macro?
19:27:29FromGitter<Varriount> PMunch: You might be able to use something with type and/or gensym
19:27:50FromGitter<Varriount> Or just use `try` and getAst
19:31:58PMunchgetAst throws something?
19:32:18PMunchdom96, could this work?
19:35:04PMunchOh and by the way: https://github.com/nim-lang/Nim/pull/5778
19:36:34*yglukhov joined #nim
19:37:08*faix quit (Ping timeout: 260 seconds)
19:43:23*benny_ joined #nim
19:48:12*mcc quit (Quit: Connection closed for inactivity)
19:51:10*Arrrr quit (Read error: Connection reset by peer)
19:55:55*yglukhov quit (Remote host closed the connection)
20:01:23libmanLojban: a more boring version of Esperanto that doesn't help you get laid.
20:01:33*Trustable quit (Remote host closed the connection)
20:07:36PMunchWell, Lojban might be more boring but it has a lot of things going for it
20:11:08*yglukhov joined #nim
20:13:34*smt__ joined #nim
20:15:21libmanPMunch: trying to design a logical language on the basis of verbal communication is a mistake. Interactive visual communication lets you add a lot more grammatical concepts.
20:16:09dom96I just found out the reason and it's not to do with repetition.
20:16:20dom96The body of a route gets put into an async proc
20:16:33*nsf joined #nim
20:16:33libman"Nim support added to Genode OS Framework (a toolkit for building highly secure special-purpose operating systems)" - https://genode.org/news/genode-os-framework-release-17.05 - Is this r/Nim news-worthy?
20:16:35*smt_ quit (Ping timeout: 240 seconds)
20:16:40*fvs left #nim ("leaving")
20:16:47dom96So if the 'return' is inside the template then the 'async' macro cannot transform this 'return' so we're back to the same issue :)
20:16:56dom96libman: of course
20:17:02PMunchlibman, sure, why not?
20:17:31FromGitter<zacharycarter> deferred renderer coming along http://imgur.com/a/tHfV4
20:18:09*faix joined #nim
20:19:04PMunchdom96, so templates are broken in async macros as well?
20:19:15dom96yep
20:19:19dom96you can't have 'await' in a template
20:20:17PMunchHmm, that's not good
20:20:33dom96This is more of a general Nim issue
20:20:38PMunchYeah
20:20:51PMunchShouldn't templates be expanded before macros are parsed?
20:21:35*Neomex_ quit (Quit: Leaving)
20:22:58*Neomex joined #nim
20:23:14*Vladar quit (Quit: Leaving)
20:24:07dom96I doubt it's that simple
20:25:35PMunchHmm, maybe not
20:26:11PMunchI can definitely see cases both for and against..
20:26:42PMunchBut mostly for tbh
20:35:22*faix quit (Ping timeout: 240 seconds)
20:44:16FromGitter<philip-wernersbach> What is the preferred way of using Nim's locks with its compile time deadlock prevention features?
20:44:40FromGitter<philip-wernersbach> From the docs, it looks like the Nim's locks are just runtime, and then the compile time features have to be added one top of that
20:48:21Araqyglukhov: nope, that's a new one
20:48:54Araqphilip: the locks at runtime are posix/winAPI locks, the deadlock safety is all done at compiletime
20:51:57yglukhovAraq: ok, filed the issue, please tell me if you need any more info.
20:52:33*PMunch quit (Quit: leaving)
20:56:34*Sentreen quit (Ping timeout: 246 seconds)
20:59:41FromGitter<philip-wernersbach> @Araq Yes, but how do I bridge the two, so to speak
20:59:57FromGitter<philip-wernersbach> Use the runtime locks with the compiletime deadlock safety
21:01:33Araqthe manual tells you this iirc, what's unclear about it?
21:01:36*rauss quit (Quit: WeeChat 1.8)
21:03:38dom96Araq: What should we do about the problem that async macro cannot "look into" template invocations?
21:03:41*yingjun joined #nim
21:04:23Araq'await' can be lowered to the 'yield' independently of .aysnc
21:04:51Araqit's a template iirc and then .async doesn't need to look into the template invocations
21:05:02Araq*it can be a template iirc
21:05:56Araqin general you cannot expand templates before macros because macros can become before the type checking phase and templates are expanded after overloading resolution etc etc
21:06:20Araqit's all intertwined
21:06:28Araqthere are no simple solutions here.
21:07:09FromGitter<philip-wernersbach> @Araq Actually, I think you answered my question. So what you're saying is that the locks module does not implicitly use any of the compiletime deadlock features, so we have to add those on top of it?
21:08:08*yingjun quit (Ping timeout: 260 seconds)
21:08:16FromGitter<philip-wernersbach> ex. Lock the Lock object and then use the locks pragma, vs having the lock module use the pragma for us
21:09:15Araqhttps://nim-lang.org/docs/manual.html#guards-and-locks-lock-levels what it doesn't mention is, yeah you wrap the runtime lock in a dummy generic type with a static[int] parameter
21:10:13*Sentreen joined #nim
21:10:42euantorLooks like D does end up faster than Nim for parsing CSVs: https://github.com/euantorano/faster-command-line-tools-in-nim/issues/1#issuecomment-305621336
21:11:26euantorNot by much though. I don't think I can optimise the Nim code much, but I haven't tried it parsing manually without using `parsecsv`
21:13:18dom96euantor: You can always optimise further, same goes for the D version. I would just call it a tie at this point.
21:13:34euantorYeah, that's my plan
21:13:42FromGitter<philip-wernersbach> @Araq Awesome, thanks for the clarification, makes sense
21:13:45euantorI've not got time to devote to beating this contrived benchmark
21:14:03euantorAnd we can always truthfully say that the Nim code is far more readable and easy to reason about
21:14:25euantorI'll be updating my blog post on Saturday, and will update the one on the website at the same time
21:14:52Araqalso you use Nim's stdlib that can deal with escaped values ...
21:15:02Araqsplit for CSV is like using regexes for HTML really
21:15:40Araq";";33;";;";44
21:15:57Araqis a valid CSV though it doesn't really have a stanard
21:16:07Araq*standard
21:16:43Araqphilip-wernersbach, it pains me to see 0.17 cannot compile your project. any ideas how to prevent such a pita in the future?
21:17:18euantorYeah, the original benchmark actually notes that inside its GitHub repository
21:17:33euantorI'll also note that in the blog post
21:20:46Araqalso try --gc:markAndSweep
21:20:56Araqcan be faster and use more memory ;-)
21:21:54FromGitter<zacharycarter> http://imgur.com/a/tHfV4 not sure why everything is green but I think other than that the deferred renderer is working
21:22:00FromGitter<zacharycarter> wrong ss
21:22:31FromGitter<zacharycarter> (https://files.gitter.im/nim-lang/Nim/2dkc/Screen-Shot-2017-06-01-at-5.16.43-PM.png)
21:26:43libmanI'll never understand why CSV became more popular than TSV (tab separated values). The latter avoids most escaping issues.
21:27:21euantorTSV is what I'm benchmarking, but using the parsecsv module
21:28:19Araqlibman: because tabs and spaces look the same and people already mess up CSVs *everywhere*
21:28:35Araqin fact, I never got a correct CSV on the first attempt
21:29:11Araqusers can be really dumb.
21:31:17euantorMark & sweep is actually slower in this case - 1.3s for standard, 1.54s for mark & sweep. Same amount of memory (1.9Mb)
21:32:14FromGitter<ephja> is an object type with a tuple field always binary compatible with another object type that has separate fields for those in the tuple?
21:33:52*benny_ quit (Remote host closed the connection)
21:34:05FromGitter<ephja> tuple[w, h, r, g, b, refreshRate: int32] -> tuple[tuple[w, h: int32], tuple[r, g, b: int32], refreshRate: int32]
21:35:04Araqephja. no, it is not but for your example the alignments match
21:41:12FromGitter<zacharycarter> WEWT
21:41:27FromGitter<zacharycarter> (https://files.gitter.im/nim-lang/Nim/pNZI/Screen-Shot-2017-06-01-at-5.41.01-PM.png)
21:41:52FromGitter<zacharycarter> 128 lights
21:47:25FromGitter<Varriount> @zacharycarter 128 lights, 7 cameras, all action
21:47:50FromGitter<zacharycarter> :P
21:48:11FromGitter<zacharycarter> I'm just happy to have finally properly implemented deferred shading
21:48:13FromGitter<zacharycarter> what a bitch
21:48:44Araqzacharycarter: what do you use for rendering?
21:49:04Araqnew engine on top of OpenGL?
21:49:21FromGitter<zacharycarter> https://github.com/bkaradzic/bgfx
21:51:24FromGitter<zacharycarter> Araq: hopefully when GL is replaced by Vulkan / Metal I won't have to do anything crazy
21:51:44FromGitter<zacharycarter> just compile shaders for whatever render backend
21:52:33*Neomex quit (Quit: Leaving)
21:55:59Araqah ok
22:00:28*PMunch joined #nim
22:03:57FromGitter<ephja> Araq: but not if the second tuple field had been the first field?
22:04:38Araqhmm? they all use int32
22:04:42*lenstr joined #nim
22:08:26*yglukhov quit (Remote host closed the connection)
22:11:58FromGitter<ephja> you're right. I haven't dealt with these issues in a while
22:17:43libmanAesthetic question regarding the Nim style guide: is it a good idea to use camelCase names for exe names, like `nimup` vs `nimUp` (if one was to make an equivalent to `rustup` / binary alternative to choosenim) ?
22:18:08*chemist69 quit (Ping timeout: 240 seconds)
22:18:31*chemist69 joined #nim
22:23:41Araqexe names should always be alllowercase on Unix
22:24:03PMunchAnd no symbols
22:24:16Araqand no vowels
22:24:20PMunchLess of a rule and more of a bad-style kind of thing
22:24:21PMunch:P
22:24:40PMunchI meant hello_world would be a bad name
22:25:44Araqyeah, also watch out for vowels. all the good commands are without them; gcc llvm cp rm lk
22:25:46*libman aborts his camelcase exe name rebellion.
22:26:04Araqgrep # bad
22:26:07Araqfind # bad
22:26:09Araqnim # bad
22:26:11PMunchEy, grep is nice
22:26:20PMunchWell, the other two as well :P
22:26:31PMunchAnd then you've got man
22:26:48PMunchOr sudo :)
22:26:49Araqmake # bad, should have been mk
22:27:00AraqI think LSD fixes that though
22:27:08Araqand uses 'mk'
22:27:16libmanIf writing a shell script, can I use nimStyle instead of YE_OLDE_ENVIRONMENTAL_VARIABLES_ALWAYS_VERY_LOUD
22:27:42AraqI don't write shell scripts, I write Nim programs
22:28:18PMunchI'd stick with YE_OLDE_STYLE
22:28:21libmanYou could still need a shell script to install a Nim program in one curl|sh.
22:28:31Araqof course I'm kidding, the vowel thing is mostly for historic reasons. Unix predates the invention of vowels.
22:28:43FromGitter<zacharycarter> lol
22:29:01FromGitter<zacharycarter> name three things you hate more than unix Araq
22:29:36Araqoooh that's a tough one.
22:29:39FromGitter<zacharycarter> :P
22:30:11AraqEclipse and Java come to mind.
22:30:20FromGitter<zacharycarter> yessss
22:30:26PMunchI was actually positively surprised to see how well everything works with UNIX considering your cold feelings for us :)
22:30:45FromGitter<zacharycarter> Java and Eclipse are both pretty terrible
22:30:50PMunchAnd I realise I'm in the wrong chat, Eclipse and Java are my friends
22:31:04PMunchThey have their benefits
22:31:06libmanI've been phasing out my scriptie degeneracy. No more Python, no JS, etc. Korn shell is the only thing I'm still allowed to use. One more step to plain sh.
22:31:08FromGitter<ephja> there are a couple of warts though, but some aspects are neat
22:31:14PMunchBut I'm growing apart from Java
22:31:25FromGitter<zacharycarter> Java is horrible, if you're stuck on the JVM at least move to Kotlin
22:31:27FromGitter<ephja> (unix)
22:31:28PMunchKorn shell?
22:31:56PMunchzacharycarter, yeah it's a bit of a pain sometimes..
22:31:58FromGitter<ephja> yeah. ksh
22:31:59libmanmksh is the one true shell.
22:32:15PMunchSome really odd design choices in Java...
22:32:28FromGitter<ephja> libman: is it strongly typed? :-)
22:32:48FromGitter<ephja> I meant statically typed
22:32:52libmanYes, everything is a very strong string.
22:33:00FromGitter<ephja> wow
22:33:24FromGitter<ephja> radical
22:34:48Araqstringly typed code is only bad when it's PHP, when it's Unix it's holy
22:34:53*benny_ joined #nim
22:35:33PMunchhttps://github.com/nim-lang/Nim/pull/5885 did you see that Araq?
22:35:41libmanThe next step is to write a Nim static code generator that creates a macro for every exe in your $PATH, so you can execute them without any boilerplate, like in shell... O.O
22:36:12Araqbecause then you can pipeline programs that do not work together that then work even worse
22:36:31libmanTcl also did stringly code pretty well.
22:36:38Araq^ yup.
22:37:17*yglukhov joined #nim
22:37:20FromGitter<zacharycarter> I'm not sure how much of an issue this is vs just not doing things correctly on my part but : https://github.com/nim-lang/Nim/issues/5878 has been around for a week or so now and hasn't been triaged
22:38:02FromGitter<zacharycarter> it's the most minimal example I could come up with to reproduce the *issue*
22:38:05FromGitter<ephja> just produce some kind of result, regardless of whether or not the strings are formatted correctly :-)
22:39:13*benny_ quit (Ping timeout: 255 seconds)
22:40:11AraqPMunch: how about this? I move the db_ modules to a new nim-lang/db_support Nimble package and you create a PR patching all modules at the same time to ensure consistency?
22:40:19*vlad1777d quit (Remote host closed the connection)
22:40:36Araqand then db_* modules in the stdlib get .deprecated
22:40:58Araqand we add big fat notes to not ever use them for new code
22:41:34*yglukhov quit (Ping timeout: 246 seconds)
22:41:40*Nobabs27 joined #nim
22:42:07FromGitter<philip-wernersbach> @Araq In regards to preventing such a pita as not being able to compile my project, I'm actually going to propose a new initiative on the Nim forum. That we select real world projects from the community, and set something up that recompiles those for every commit in the Nim repository
22:42:16Araqin fact, some common database meta-scheme has been designed and implemented for db_mysql
22:42:28Araqphilip: I have heard that before :-)
22:42:37FromGitter<philip-wernersbach> Did it go anywhere?
22:42:39FromGitter<ephja> so.. did you relax on the beach, reading fowl's beautiful code on your vacation?
22:43:00AraqI know others are keen on doing that too, but nobody makes the first move
22:43:31FromGitter<philip-wernersbach> I think the biggest issue is that Nim has unit tests, but no real world test suite. So there are real world cases that the unit tests don't cover, and we only discover them through breaking them
22:43:37FromGitter<philip-wernersbach> Well I'll do it
22:43:46FromGitter<philip-wernersbach> The community will just have to decide what's included
22:43:57Araqsetup some CI server and tell others to submit things=
22:43:59Araq?
22:44:13FromGitter<philip-wernersbach> Exactly
22:44:26Araqok, cool
22:44:38FromGitter<philip-wernersbach> I'll post about it tomorrow when I get time
22:45:18*smt_ joined #nim
22:45:40FromGitter<philip-wernersbach> Another idea I had is just deciding that to be more careful about changing things in the core compiler. But that's probably not realistic
22:47:06AraqI have a "real world test suite" but I missed your project and it's mostly for our closed source projects, so I cannot open source it
22:48:48Araq"more careful", well yeah, we are careful but unit tests always lack some crucial feature interaction and last time I checked most quality compilers are tested against real world projects
22:48:55*smt__ quit (Ping timeout: 260 seconds)
22:49:10AraqI know Scala's is.
22:51:23gokrAraq: Do you really need to "submit things" - why not just compile your way through nimble packages? :)
22:52:03*nsf quit (Quit: WeeChat 1.7.1)
22:52:06FromGitter<zacharycarter> there's no standardization for nimble packages
22:52:19FromGitter<zacharycarter> besides saying hey this is a package and it should be added to nimble
22:52:24Araqnimble is full of semi-dead, really dead, Linux specific packages
22:52:28FromGitter<philip-wernersbach> @Araq Ah I see. Is there anything from that, that you can open source? I could use it as a jumping off point
22:53:17FromGitter<philip-wernersbach> And for instance on being more careful. The sighashes thing. That's a good to have, but not required. So under the being more careful rule, it wouldn't have gone into release for a couple releases
22:54:04AraqI personally wouldn't have done it at all but I was payed ... -.-
22:54:09PMunchAraq, that would work. But I don't have time to do it now
22:54:15FromGitter<zacharycarter> I don't think changes should stagnate based on their usefulness
22:54:19PMunchWorking on my masters until the summer.
22:55:03FromGitter<zacharycarter> I think the be more careful rule = set up what you consider careful and run tests against it
22:55:11FromGitter<zacharycarter> like you've both described
22:55:23FromGitter<philip-wernersbach> Well, changes equal regression. You can't regress what you don't change. But I agree there's a balancing act
22:55:32FromGitter<zacharycarter> truth
22:55:42FromGitter<zacharycarter> this is why things have
22:55:47FromGitter<zacharycarter> supported release
22:55:51FromGitter<zacharycarter> experimental release
22:56:00AraqPMunch: I replied.
22:56:34FromGitter<zacharycarter> I think nightly nim releases would go a long way
22:56:55Araqhow so? git pull && koch boot -d:release
22:57:02Araqthere is your nightly Nim.
22:57:24FromGitter<zacharycarter> point taken
22:58:01Araqbtw there is a standard but it's well hidden. it's always 'nimble tests'
22:58:27FromGitter<zacharycarter> ah good to know
22:59:06FromGitter<philip-wernersbach> I would prefer to see all of the non-essential core compiler changes go into a "next" branch, and sit there for a couple releases. That way high impact changes could get more testing
22:59:19FromGitter<philip-wernersbach> What does nimble tests do?
22:59:35Araqit runs your nimscript 'tests' task
23:00:12FromGitter<philip-wernersbach> Also, these are just my thoughts, I don't spend time developing the Nim compiler, so I can go kick rocks ha
23:00:14FromGitter<zacharycarter> oh you were being sarcastic haha
23:00:34Araqno I was serious
23:01:02Araqthe command line standard is 'nimble tests' to run the tests
23:01:07FromGitter<zacharycarter> well what I meant was there's no way of vetting nimble packages right? like submit a PR and if it builds it builds and then a few weeks later when someone stops updating it
23:01:43FromGitter<zacharycarter> this is all to @gokr 's point earlier about letting nimble itself be the test
23:03:36gokrWhat does it really matter about quality of the packages themselves? Just build and see if they build. Record which ones built. Set alarm if someone suddenly does NOT build.
23:04:24gokrAFAICT the interesting bit is the change from "builds fine with nim 0.8" -> "breaks with nim 0.9".
23:04:33gokrOr vice versa :)
23:04:47Araqgokr: the problem is the "just build" part.
23:05:11gokrQuality of code doesn't matter - in fact - bad quality code is probably very interesting too - since it can catch corner cases.
23:11:05Araqephja: actually I came up with a new way to build sandcastles
23:11:11Araq:-)
23:11:30dom96it's actually "nimble test"
23:11:33dom96not the plural :P
23:12:07Araqdom96: not what our docs say
23:12:14FromGitter<ephja> Araq: I see *lol*
23:12:28Araqhttps://nim-lang.org/docs/nims.html
23:12:35Araqtests Runs the tests belonging to the project.
23:13:33*Matthias247 quit (Read error: Connection reset by peer)
23:14:03dom96That should just be removed, it's not convention to specify tasks like this in .nims files
23:18:33Araqmeh
23:19:03Araqok
23:19:29FromGitter<philip-wernersbach> Bye everyone, quitting time for me
23:19:41FromGitter<zacharycarter> o/
23:34:47*PMunch quit (Quit: leaving)
23:38:01*daaf joined #nim
23:45:26*benny_ joined #nim
23:51:08*benny_ quit (Ping timeout: 260 seconds)