<< 06-02-2017 >>

00:04:14*ftsf_ left #nim ("Leaving")
00:11:21carterzaVarriount|Mobile howdy
00:11:51carterzamade some more progress today - http://imgur.com/a/1ehWi
00:12:23*gangstacat quit (Ping timeout: 255 seconds)
00:12:36*themagician quit ()
00:37:15*ftsf_ joined #nim
00:38:09carterzaI’m going to move the engine into its own repository
00:39:52*yglukhov joined #nim
00:44:18*yglukhov quit (Ping timeout: 260 seconds)
01:26:12*couven92 joined #nim
01:31:25*PMunch quit (Quit: leaving)
01:32:52*PMunch joined #nim
01:36:23Varriount|Mobilecarterza: How complex is the implementation?
01:57:49*PMunch quit (Ping timeout: 245 seconds)
02:07:04*chemist69 quit (Disconnected by services)
02:07:09*chemist69_ joined #nim
02:12:08*PMunch joined #nim
02:16:29*ludocode joined #nim
02:19:23*ludocode_ quit (Ping timeout: 260 seconds)
02:46:38*yay quit (Quit: yay)
03:12:54carterzaVarriount|Mobile: I had to run out for a bit
03:13:05carterzaall the code is - https://github.com/zacharycarter/dEngine
03:18:11*devted quit (Quit: Sleeping.)
03:19:01*devted joined #nim
03:23:10*devted quit (Client Quit)
03:32:10*PMunch quit (Quit: leaving)
03:39:20Varriount|Mobilecarterza: What's your next goal?
03:39:30carterzalayout engine
03:40:11carterzaI need to be able to child widgets to other widgets and have them assume various layouts
03:40:38carterzaI’m not really excited about all this GUI work - so I’m trying to get it done up front
03:44:14Varriount|MobileHow do you plan to deal with sound?
03:45:37carterzaeither OpenAL or whatever SDL2 has cooking for audio
03:46:20carterzaI also saw - http://sol.gfxile.net/soloud/
03:46:30Varriount|MobileI've had my eye on this: https://github.com/libaudioverse/libaudioverse
03:47:00Varriount|MobileBut it might be overkill, and the developer is currently in school, so probably no updates for a whole
03:47:17Varriount|MobileI think it works for the most part though.
03:47:31carterzadefinitely looks interesting
03:48:09carterzaI have never tested soloud
03:48:17carterzaso I have no idea how it performs
03:48:26carterzaseems to be pretty feature rich though
03:51:32*gangstacat joined #nim
04:52:28ftsf_Varriount|Mobile, looks cool
04:52:33ftsf_i'm doing a modular audio thing in Nim atm
04:52:49*Kingsquee joined #nim
04:52:59ftsf_https://www.youtube.com/watch?v=sDop4JELAhc
04:53:10ftsf_doing a bit of a refactor atm, then i'll put it on github
05:01:09*shashlick joined #nim
05:02:59shashlickhello everyone, need some help with the parsecfg module
05:05:37*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
05:08:24shashlickI'm loading an INI file using loadConfig(), how do you get all the sections in the INI? I tried loading the tables module and use keys() but get only the first section in a loop
05:12:25shashlicklen() also returns 1, so my config file isn't getting loaded correctly
05:15:24ftsf_shashlick, hmm i'm not sure you can enumerate the sections
05:18:45ftsf_seems like the dict.keys should return them though...
05:18:53shashlickit's just an orderedTable data structure, so you can get it with keys()
05:18:59shashlickbut for some reason, it's only loading the first section
05:19:31shashlicki'm trying to upgrade to 0.16 (was on 0.15.2) but finish is complaining - Error: unhandled exception: The system cannot find the file specified.
05:19:41shashlickmingw is in my path
05:24:18ftsf_works for me when i use the keys iterator, shows all sections
05:26:05ftsf_https://gist.github.com/ftsf/26b7637309532af679b4938b5cc3cb9f
05:35:16shashlickthanks ftsf_, I'll try with 0.16 and see if it helps
05:42:03shashlickwow, 0.16 is really hard to get installed
05:42:16shashlickhave mingw-x64 installed in standard location but finish doesn't work with it
05:45:03carterzaerr how do I allocate a string of a specific size? I forget the syntax...
05:47:54shashlickfinally got to 0.16 but same result
05:51:34ftsf_shashlick, my test was with 0.15.1 btw
05:51:53ftsf_carterza, newStringOfCap
05:51:58carterzathank you
05:52:05shashlickparsecfg doesn't like my ini file, values aren't quoted so
05:55:41shashlickeven with quotes, it's not impressed :(
05:56:45ftsf_start with a simple config
05:56:47ftsf_see if that works
05:57:02*couven92 quit (Quit: Client disconnecting)
06:03:10shashlickya a simple file works
06:03:21shashlickam actually porting a Python app to Nim, so my ini file is inherited
06:05:13ftsf_comments maybe?
06:06:53ftsf_lists?
06:07:15ftsf_i think i recall having issues with foo=bar,baz or something
06:07:49ftsf_line endings?
06:07:52shashlickI have URLs and all special characters in the values
06:09:47*LeNsTR is now known as lenstr
06:18:47Varriount|Mobileftsf_: I would love a game that taught me all the terms (cutoff, sync, etc)
06:20:07ftsf_Varriount|Mobile, i was thinking of making a game linked to that same synth in the background, where moving stuff in the game changes the settings
06:20:23ftsf_but too many projects right now =(
06:21:37Varriount|Mobileshashlick: You're using https://nim-lang.org/docs/parsecfg.html
06:21:39Varriount|Mobile?
06:22:24Varriount|Mobileftsf_: The closest I get to making music is singing.
06:22:53Varriount|MobileWhich is rather transient without a good microphone.
06:26:29ftsf_currently working on trying to get my Nim game on to 3DS
06:26:35ftsf_but it's tricky to debug
06:26:57ftsf_but got something running now
06:27:08ftsf_difficult with the GC though, not sure what's happening
06:31:40Varriount|Mobileftsf_: I'm assuming you've turned off the mark and sweep collector?
06:32:42ftsf_currently set to refc GC
06:33:19Varriount|MobileYeah, but the mark and sweep collector runs alongside that, to pick up cycles
06:33:48Varriount|MobileIf I recall correctly, it scans the entire stack
06:34:49Varriount|MobileYou might also look to see what hardware bugs are known on the DS, the gameboy had plenty
06:35:04ftsf_hmm can you disable the mark and sweep?
06:35:18ftsf_i thought setting it to refc would just use refcounting and not mark and sweet
06:35:28Varriount|MobileYes,
06:36:02ftsf_oh i see, GC_disableMarkAndSweep
06:36:32*nsf joined #nim
06:36:55ftsf_oh i am using GC_step, didn't realise i have to GC_disable too
06:37:35Varriount|Mobilehttps://nim-lang.org/docs/gc.html
06:37:47ftsf_i seemed to be losing data when i was using foo = foo.filterIt(...) but foo.keepIf(...) is fine
06:37:48Varriount|Mobile^ cornucopia of wisdom
06:37:54ftsf_yeah will read over that
06:38:03shashlickVarriount|Mobile: ya I was using parsecfg
06:38:32shashlickwrote 20 lines of code to read it myself, should do for now
06:38:37*couven92 joined #nim
06:39:13*couven92 left #nim (#nim)
06:39:13Varriount|Mobileshashlick: Hm, the documentation mentions sections...
06:40:09shashlickno i think parsecfg doesn't like my ini file
06:42:45shashlickI don't see why parsecfg is so verbose, i could read the ini file in 16 lines of code, admittedly using nre but still
06:46:06Varriount|Mobileshashlick: Using regex for these kinds of things always leads to pain when handing corner cases
06:48:20Varriount|MobileAlso, if you think about it, an entire regex engine is probably more complex than the parsecfg code. Using nre also places a dependency
06:49:46shashlickagreed
06:50:22shashlickI can share the ini file if there is interest in fixing parsecfg
06:50:55ftsf_shashlick, should raise it as an issue, ideally if you can find the bit that breaks it =)
06:51:41Varriount|Mobileshashlick: I'd like a look at the file
07:01:40Varriount|Mobileshashlick: What happens when you quote all values containing ":"?
07:02:28shashlickI quoted everything after = for every line, it still wasn't happy
07:03:15Varriount|MobileSilent error, no exception?
07:03:37shashlicknothing the compile/run complained about
07:03:43*bjz joined #nim
07:03:57*couven92 joined #nim
07:04:26Varriount|MobileWhat happens when you remove sections whose headers contain non-alphanumeric characters?
07:06:38Varriount|MobileAlong with quoting all values.
07:07:11Varriount|Mobile`download = href="(.*?mercurial-.*?-x64.msi)" ` looks pretty suspicious
07:07:52shashlickprobably why the quotes didn't really help in a global search/replace
07:09:21shashlickanyway, will have to try tomorrow, i've already ported 100 odd lines of python of a 500 line script to Nim on my first day tinkering, loving Nim so far :)
07:09:29shashlickthanks for all the help everyone
07:11:09*ftsf_ quit (Remote host closed the connection)
07:32:59*ibk joined #nim
07:33:15*chemist69_ quit (Ping timeout: 256 seconds)
07:36:39*chemist69 joined #nim
07:40:05*yglukhov joined #nim
07:45:00*filcuc joined #nim
07:51:28*yglukhov quit (Remote host closed the connection)
07:52:01*yglukhov joined #nim
07:56:09*yglukhov quit (Ping timeout: 252 seconds)
07:56:14*rokups joined #nim
08:12:58*Andris_zbx joined #nim
08:30:46*yglukhov joined #nim
08:34:56*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
08:50:17*xet7 joined #nim
08:55:05*Vladar joined #nim
09:02:48*bjz joined #nim
09:16:17*irrequietus joined #nim
09:17:10*yglukhov quit (Remote host closed the connection)
09:17:11*Arrrr joined #nim
09:17:43*yglukhov joined #nim
09:22:09*yglukhov quit (Ping timeout: 248 seconds)
09:29:28*_yee joined #nim
09:33:05*_yeeve quit (Ping timeout: 255 seconds)
09:36:19Varriount|MobileAraq, dom96: https://news.ycombinator.com/item?id=13576976
09:36:46Varriount|MobileSomething about that title really bugs me.
09:39:14flyxmaybe that it contradicts Turing?
09:42:25AraqVarriount|Mobile: why? It's perfectly accurate.
09:43:36AraqI don't see any contraction with Turing completeness here, and whenever Turing completeness comes up, it misses the point.
09:43:44Araq;-)
09:43:59flyxwell I didn't even read the linked article so I don't know what's it about
09:44:08flyxlet's see
09:45:38AraqTC is about algorithms, it's not about type systems and their safety guarantees.
09:46:28Araqand you cannot "just implement" a type system in a programming language that then affects the programming language the type system was written in...
09:46:41Araqtry to give Python static typing to see what I mean.
09:47:36flyxwell the „can't“ really should just be a „don't“. I have seen pretty good escape analyses algorithms for various languages, the point just is that in Rust, it's part of the language definition
09:48:53Araqok, agreed, that is a very good point.
09:49:03dom96You certainly can, the question is always "how easy is it to do?"
09:49:07flyxwhile C++ is obviously the one language where it is really hard because of things like struct fields having reference types
09:49:53*PMunch joined #nim
09:50:55*bjz_ joined #nim
09:52:04*bjz quit (Ping timeout: 258 seconds)
09:52:40*peted_ joined #nim
09:52:50Araqno, in C++ it's hard because the method implementations can be hidden
09:53:10Araqthe required information is not part of the method headers
09:53:16Araqin Rust it is.
09:53:24*peted_ quit (Client Quit)
09:53:46*peted quit (Quit: WeeChat 1.4)
09:53:50flyxwell yes, it is a global analysis for almost all programming languages
09:54:01*Arrrr quit (Read error: Connection reset by peer)
09:54:09*peted joined #nim
09:54:54flyxAda has this distiction between `access` and `access all`, but it just tells you that it *can* point to the stack
09:56:00*yglukhov joined #nim
10:00:05*Arrrr joined #nim
10:00:05*Arrrr quit (Changing host)
10:00:05*Arrrr joined #nim
10:01:52cheatfateis this can't be done via `nim macro`?
10:02:47Araqcheatfate: I don't know but even if you manage to implement this escape analysis in a macro, you cannot apply the macro on a global scale to Nim code
10:03:23flyxI think it would also be slower due to the analysis running in the VM.
10:03:48flyxglobal analyses algorithms tend to take minutes or hours even on modern systems
10:03:58*Parashurama joined #nim
10:05:28flyxso, the actual good thing about Rust is that it enables *efficient* escape analysis in the compiler
10:05:58Araqno, it enables *global* escape analysis in the compiler.
10:06:18Araqor rather incremental, global escape analysis
10:06:34Araqor "modular" escape analysis
10:06:47flyxsince all information is in the signature, it is not global. that's an important point
10:07:07Araqyes, the result is a global program property though.
10:07:09flyxfor example, you do not need pointer analysis as prerequisite because you do not need to know where function pointers point to
10:07:35flyxbut yes, result is global
10:07:38Araqyeah, "modular" is the proper word for this.
10:09:09ParashuramaHey!
10:09:33Araqbtw before we had .gcsafe we had a global abstract interpretation pass to determine the same thing. was unworkable.
10:10:04Parashuramaso Araq: I think I remeber you saying you were against return value overloading. did that include "var return value"?
10:10:34AraqParashurama: yes, we don't need it, proc p(x: var T): var U vs proc p(x: T): U
10:10:58Araqthe resolution is based on the lvalue-ness of the 'x' then, works perfectly fine
10:11:18*yglukhov quit (Remote host closed the connection)
10:11:53*yglukhov joined #nim
10:14:17ParashuramaIn this case it works quite well, but I was thinking more along optimisation purpose.
10:14:51Parashuramareturn a shallowCopy with retval T and a copy with retval var T
10:14:59*shashlick quit (Quit: Connection closed for inactivity)
10:15:35ParashuramaIt is not really essential, is really to avoid copying strings all the time.
10:15:50Araqmake the string shallow()?
10:16:24AraqI'm thinking about changing the defaults for strings btw, so that non-const strings are shallow by default
10:16:37ParashuramaI already do that, but nothing the user from shooting himself in the foot, except maybe documentation.
10:16:51Parashurama*nothing stops the user
10:17:16Araqit's a tough design problem.
10:17:24*devted joined #nim
10:17:43Araqif we rename shallow() to freeze() and check at runtime setLen etc. is not allowed for frozen strings
10:18:12Araqthings are better than they are today. except for the fact freeze() is seriously under-used
10:18:55ParashuramaYep. setLen or add or any modify string procs. but we should be aware of perf problems with method.
10:19:13*yglukhov quit (Ping timeout: 248 seconds)
10:19:14ParashuramaAlthough branch prediction and likely, unlikely can help us.
10:19:21Parashurama*with that.
10:20:02Araqi never had problems with branch predictors, it's always in the noise
10:20:55Parashuramawell in very specific usecase then, and anyway you can allocate storage with SeqOfCap,StringOfCap and use indexes.
10:28:33*bjz joined #nim
10:30:25*bjz_ quit (Ping timeout: 248 seconds)
10:36:35*byte512 quit (Ping timeout: 240 seconds)
10:40:51*sz0 joined #nim
10:42:16*Matthias247 joined #nim
10:44:17*carterza quit (Quit: carterza)
11:01:25Varriount|MobileAraq: What do you mean by changing default string behavior?
11:04:05Varriount|MobileLike, immutable strings?
11:04:38Varriount|Mobile(Or copy on modification, rather than on assignment)
11:07:17*peted quit (Quit: WeeChat 1.4)
11:08:46*couven92 quit (Quit: Client disconnecting)
11:09:35AraqI mean that 'var x = y' only copies the pointers and 'var x = y.copy' would produce a string copy
11:10:38Varriount|MobileHm. But that would break existing code.
11:10:53Varriount|MobileWouldn't it?
11:11:17Araqsure
11:12:35Varriount|MobileI'd rather just have an immutable string type
11:17:03Araqwhat would that solve?
11:17:09*peted joined #nim
11:17:24Araqwe don't need a proliferation of string types.
11:17:42Araqwith every new type you make interoperability worse.
11:19:28*yglukhov joined #nim
11:25:40*yay joined #nim
11:30:01Varriount|MobileAraq: But mixed (And implicit) semantics lead to weird bugs
11:34:51Varriount|MobileIt's the whole reason people want static typing
11:36:03Varriount|MobileAnyway, I think the most likely solution to the problem is writing optimization code.
11:36:31Varriount|MobileI mean, adding optimization passes to the compiler for strings and sequences
11:37:39Araqnot all bugs are equal and until we try it it's just a hypothesis.
11:37:56Varriount|MobileBut right now it's not a priority.
11:38:30Araqan optimization pass would be another solution, yes.
11:38:49Araqand maybe a better one, but this needs experiments, not talking.
11:40:44*chemist69 quit (Ping timeout: 245 seconds)
11:47:39*chemist69 joined #nim
12:00:54*couven92 joined #nim
12:02:55*yglukhov quit (Remote host closed the connection)
12:02:57*Snircle joined #nim
12:03:31*yglukhov joined #nim
12:07:44*yglukhov quit (Ping timeout: 255 seconds)
12:12:03*Arrrr quit (Quit: Leaving.)
12:12:46*yglukhov joined #nim
12:12:51*mal`` quit (Quit: Leaving)
12:23:46*mal`` joined #nim
12:24:28*Kingsquee quit (Quit: https://i.imgur.com/qicT3GK.gif)
12:29:38*Parashurama left #nim (#nim)
12:38:30*arnetheduck joined #nim
12:50:53*vlad1777d joined #nim
12:54:51*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
12:56:40*Sentreen quit (Quit: WeeChat 1.4)
12:56:46*yglukhov_ joined #nim
12:57:17*yglukhov_ quit (Remote host closed the connection)
12:57:52*yglukhov_ joined #nim
12:59:56*yglukhov quit (Ping timeout: 255 seconds)
13:00:21*carterza joined #nim
13:01:51*yglukhov_ quit (Ping timeout: 240 seconds)
13:04:00*Sentreen joined #nim
13:13:46*yglukhov joined #nim
13:21:19*Jipok[m] sent a long message: Jipok[m]_2017-02-06_13:21:18.txt - https://matrix.org/_matrix/media/v1/download/matrix.org/TiQfWZKsnPIqQckeRkaqGSmq
13:30:02*Sentreen quit (Quit: WeeChat 1.4)
13:33:22*Sentreen joined #nim
13:33:22*Sentreen quit (Client Quit)
13:34:46filcucAraq: c2nim converts also .c files ?
13:35:11filcucAraq: i mean does it handle only .h files or can convert only c implementations?
13:35:18filcuc*also*
13:36:19*Sentreen joined #nim
13:47:11Araqfilcuc: can also convert .c files
13:47:25filcucAraq: thanks
13:48:02*synshroud quit (Quit: ZNC 1.6.4 - http://znc.in)
13:57:24*synshroud joined #nim
14:21:32Varriount|MobileJipok[m]: You might look into increasing the line length your client considers a "long line". Most IRC servers have a much larger limit
14:28:25*devted quit (Quit: Sleeping.)
14:28:39*planhths joined #nim
14:37:43*Matthias247 quit (Read error: Connection reset by peer)
14:39:07*Matthias247 joined #nim
14:44:30subsetparkCan someone correct a misunderstanding about `nim doc`? docgen.html says I can pass in multiple nim files, but calling `nim doc *.nim` produces an error: arguments can only be given if the '--run' option is selected
14:57:34Araqdocgen.html is totally wrong about this
14:58:07*carterza quit (Quit: carterza)
14:59:39subsetparkCool :) So should I just be calling `nim doc` for each source file?
15:00:05*yay quit (Ping timeout: 240 seconds)
15:00:06*_yee quit (Ping timeout: 240 seconds)
15:01:47*Jipok[m] left #nim ("User left")
15:03:40Araqno, you should call 'nim doc2'
15:04:07*_yee joined #nim
15:04:55subsetparkI thought nim doc2 was buggy? Every time I call that I get tons of errors out of future.nim
15:06:33*devted joined #nim
15:07:16ehmrycan I require that a nimble library be built with -d:ssl with a .nim.cfg file, or is that just for binaries?
15:13:09*yglukhov quit (Remote host closed the connection)
15:13:44*yglukhov joined #nim
15:16:35*gokr joined #nim
15:16:48Varriount|Mobileehmry: is it a nimble library you control?
15:17:04ehmryyes
15:17:09*Jipok[m] joined #nim
15:17:30*Andris_zbx quit (Remote host closed the connection)
15:17:40Varriount|MobileI mean, defines are global to an entire compilation unit
15:17:53*Andris_zbx joined #nim
15:18:15*yglukhov quit (Ping timeout: 276 seconds)
15:18:17Varriount|MobileSo using nim.cfg should work. Nimble still has to call the compiler
15:18:20ehmrybut they will aggregate?
15:18:27ehmrymeh, I can test this
15:19:21Jipok[m]testmsg1
15:24:11Araqsubsetpark: doc2 is used for every module in the stdlib that's on our website
15:24:47Xeit'd be nice if there was `nim doc2` run on every package in nimble like godoc.org
15:24:55subsetparkWeird, it completelly blows up for me.
15:25:28Jipok[m]Araq:  I wanted to try their hand at creating 2d games.
15:25:51Jipok[m]What about Urho3d?
15:25:51Jipok[m]Your wrapper is relevant? Urho3d I liked myself, but maybe I should choose another graphical framework? 
15:26:15subsetparkBut I guess it still produces the html file... So maybe I should just ignore the errors...
15:27:05subsetparkNope, scratch that. I get a SIGSEGV.
15:27:10AraqXe: be my guest.
15:27:36*yglukhov joined #nim
15:28:31Araqsubsetpark: report it
15:29:42demi-xe surely that could be added to part of the `nimble publish` pipeline
15:30:40Xedemi-: if you use 2fa like I do, you almost never use `nimble publish`
15:31:10demi-on github you mean? I use 2fa and was able to do nimble publish recently
15:31:35stisa[m]Xe: I kind of remember https://nimble.directory doing it
15:32:05demi-which reminds me, I want to put up a fix to not ask for a new auth token every time that gets run
15:32:24Xeah, they finally got that bug fixed?
15:33:08demi-guess so, I was able to use a personal access token to upload a new package i created just over a week ago.
15:37:08euantorYeah, nimble.directory creates docs too
15:38:23*yglukhov quit (Remote host closed the connection)
15:38:49*planhths quit (Ping timeout: 240 seconds)
15:38:57*yglukhov joined #nim
15:39:33*carterza joined #nim
15:43:25*yglukhov quit (Ping timeout: 256 seconds)
15:50:37*stisa[m] is now known as stisa
15:52:14*PMunch quit (Quit: leaving)
15:52:17*nsf quit (Quit: WeeChat 1.7)
15:59:15carterzahttp://imgur.com/a/AKG80 closable widgets now :D
16:01:33demi-neat!
16:03:27*gokr quit (Ping timeout: 252 seconds)
16:03:49federico3Xe: nimble.directory is running nim doc for that reason
16:19:16carterzademi- thanks
16:23:16*Jesin quit (Quit: Leaving)
16:25:17*Jesin joined #nim
16:46:27*gangstacat_ joined #nim
16:47:13*gangstacat quit (Ping timeout: 258 seconds)
16:47:25*gangstacat_ is now known as gangstacat
16:48:12*Andris_zbx quit (Remote host closed the connection)
16:50:22*ibk quit (Quit: Connection closed for inactivity)
16:52:32*pregressive joined #nim
16:56:39*gangstacat quit (Quit: Ĝis)
17:00:59*gangstacat joined #nim
17:08:30*Trustable joined #nim
17:11:25ehmrydom69: \o/ thanks, thats my first package
17:13:19dom96That's an unfortunate typo of my nick
17:13:25carterzalol
17:15:51carterzaI think I should start a blog about the engine I’m working on
17:19:18*filcuc quit (Quit: KVIrc 4.9.2 Aria http://www.kvirc.net/)
17:20:23ehmryheh, matrix doesn't autocomplete after you've started writing a line
17:21:13demi-oh dom96 i think i know what's up with my configuration that was causing the `nimble publish` code to fail -- so git uses a default config file `~/.gitconfig`, but i override that use the environment variable `GIT_CONFIG` to set my own config path for it, i think since that gets loaded due to the environment variable being present, it won't load the `.git/config` in the repo, hence `git config --get
17:21:13*couven92 quit (Quit: Client disconnecting)
17:21:15demi-remote.origin.url` not working for me.
17:21:47demi-which definitely seems like a bug in git, not one in nimble
17:30:24*yglukhov joined #nim
17:30:35dom96demi-: fun. Didn't realise it was broken for you though.
17:31:32demi-that is why i did the PRs against nimble the other week, it would crash when trying to run `nimble publish` because it wasn't returning a url.
17:32:20dom96I see
17:36:05*elrood joined #nim
17:40:22*krux02 joined #nim
17:40:57*planhths joined #nim
17:41:37krux02is there a way to convert the bits of a float into an int without using a cast?
17:41:53Araquse an ordinary type conversion
17:42:01Araqoh wait, I misread
17:42:06Araqno, cast is it.
17:42:51Araqthe codegen is aware that's not allowed by C and so emits a union declaration to perform the cast.
17:42:59*arnetheduck quit (Ping timeout: 264 seconds)
17:44:19*yglukhov quit (Remote host closed the connection)
17:44:52*yglukhov joined #nim
17:45:01*nsf joined #nim
17:49:47*yglukhov quit (Ping timeout: 260 seconds)
17:52:44krux02Araq: and what does the nimvm do?
17:53:20krux02https://github.com/nim-lang/Nim/blob/master/lib/pure/hashes.nim#L207
17:53:43krux02that line does not work on the vm
17:55:22Araqpatch the vm so that particular cast is supported :P
17:56:37krux02yea, I am not sure if I like that idea
18:07:31*Varriount|Mobile quit (Read error: Connection reset by peer)
18:13:28*yglukhov joined #nim
18:13:46krux02is there an easy way to map a function to a nimVM builtin?
18:14:31*Varriount|Mobile joined #nim
18:15:09Araqyes, look at compiler/scriptconfig.nim
18:17:00*brson joined #nim
18:17:14elroodAraq, hi there. are you aware that the docs contain a number of broken links?
18:17:26Araqno.
18:17:46elroodhttps://gist.github.com/anonymous/70f34d7df115f5a759b3accf1b9eda41
18:18:07krux02http://ix.io/1SF9
18:18:15krux02that would be an example of what I mean
18:19:33Araqkrux02: compiler/scriptconfig.nim would be an example of how it's done
18:19:37krux02just saw you already answered
18:19:49*sz0 quit (Quit: Connection closed for inactivity)
18:20:04Araqelrood: where do these links come from?
18:21:18krux02byt regarding the line here: https://github.com/nim-lang/Nim/blob/master/lib/pure/hashes.nim#L206
18:22:51krux02you do know that this operation basically gives all numbers below 2^-52 the same hash?
18:23:49*hcorion joined #nim
18:25:07elroodAraq, how do you mean? they're from the html documentation output generated by nim's koch tool
18:25:49*yglukhov quit (Remote host closed the connection)
18:26:24*yglukhov joined #nim
18:26:29hcorionHi all, does Nim have an equivalent of namespaces like in C# or modules like in rust?
18:26:44dom96hcorion: it has modules like in Python
18:27:55Araqelrood: well most links work, so what is the cause for these?
18:28:22krux02http://ix.io/1SFc
18:28:25Araqkrux02: does that matter much?
18:29:04AraqI copied the code from Lua, back in the days
18:29:19*FromGitter quit (Remote host closed the connection)
18:29:28*FromGitter joined #nim
18:29:28krux02well, you shouldn't do that
18:30:38krux02the smallest exponent is -1022
18:30:55krux02and that is very far away still from -52
18:30:58Varriount|Mobilehcorion: Why do you ask?
18:31:12*yglukhov quit (Ping timeout: 260 seconds)
18:32:25krux02I mean you can safely do it in environment where you are sure that you will not get important number under 2^-52, but in a standard library for a programming language I would say it is a no go
18:32:59hcorion@Varriount I was looking at some rust code and wanting to see how easy it would be to port to nim and I wasn't sure if nim had similar features
18:33:29*Arrrr joined #nim
18:33:29*Arrrr quit (Changing host)
18:33:29*Arrrr joined #nim
18:34:00BlaXpiritGitter's API is finally up, and so is the bridge bot.
18:34:03Varriount|Mobilehcorion: Surely namespaces are only a small part of such a translation process.
18:34:12*Varriount|Mobile quit (Quit: AndroIRC - Android IRC Client ( http://www.androirc.com ))
18:34:32elroodAraq, hm, not quite sure why you are asking me, they're probably there because the docs haven't been maintained quite as well as they should have been? just stumbled across those while updating the epubs and docsets, and thought i'd let you know
18:34:35FromGitter<Varriount> Blazspirit: Yay!
18:34:51*confundus joined #nim
18:35:04dom96elrood: I think he's trying to encourage you to investigate the problem :)
18:35:41FromGitter<Varriount> hcorion: I'm still here
18:35:58krux02Araq: why do you add 1 in the first place?
18:36:09*Varriount|Mobile joined #nim
18:36:56Araqkrux02: so that -0.0 and +0.0 hash to the same value
18:37:29hcorion@Varriount I noticed :P. Yes, but having similar features make for an easier port. Whether or not I'd actually port the code is one thing. I was just wondering if nim had some special features for that type of thing
18:37:48Araqand again, it's what Lua used. it was good enough for Lua's builtin hash table structure.
18:37:57elrooddom96, hasn't escaped me, just doing my best not to fall for it and feel encouraged ;)
18:38:02Araqhashes are allowed to collide.
18:38:22Araqand e-52 is pretty uncommon
18:38:34Araqbut be my guest and use something better.
18:38:54*shashlick joined #nim
18:39:48Varriount|Mobilehcorion: To be fair, the Nim philosophy eschews strict segregation
18:40:03krux02hashing double precision numbers in general is uncommon, but I need to do it
18:40:26Araqevery number in Lua is a double...
18:40:43krux02and I am sorry, but that line just yells at me
18:41:04krux02not anymore afaik
18:41:13Varriount|MobileAraq: Are you sure that the hash method is what lua *currently* uses?
18:41:17Araqyeah, but whatever.
18:41:36AraqVarriount|Mobile: I doubt it, but I cannot copy code from the future.
18:43:17Araqso create a PR instead of telling me of how incompetent I have been for copying from a language where both doubles and hashing of doubles are of paramount importance...
18:45:34krux02I am sorry I was wrong, too
18:45:58krux02it is not 2^-52, it is 2^-17
18:47:45Varriount|MobileAraq: It's just, you made it sound like you wouldn't accept an improvement
18:53:45*nsf quit (Quit: WeeChat 1.7)
18:56:11*xet7 quit (Ping timeout: 264 seconds)
18:58:27krux02how do you get a negative zero?
18:58:43krux02I wasn't able to produce one
19:02:18elroodtypically by rounding a negative value
19:15:21Araqsimple: -1 / inf
19:20:23krux02Araq: http://ix.io/1SFt
19:28:46*yglukhov joined #nim
19:36:55*xet7 joined #nim
19:44:07*sz0 joined #nim
19:47:32*bjz joined #nim
19:47:40dom96elrood: those links are working fine on nim-lang.org
19:52:47flyxI am using TravisCI based on this config https://github.com/nim-lang/Nim/wiki/TravisCI
19:52:55flyxit does not seem to update to latest Nim master
19:53:49flyxI do not really grasp what's going on, since travis says it is an isolated environment and no information is carried over between builds, but somehow, the existing Nim version *is* carried over and thus not anew'd
19:53:52flyxany advice?
19:56:10dom96It's caching it I guess
19:56:17dom96I don't know how to invalidate the cache
19:56:49flyxI have deleted some cache
19:56:53flyxbut it didn't help
19:57:08carterzais it possible to forward declare a type?
19:57:23carterzaor an object rather
19:57:43demi-flyx: on circleci i would force pull the repo to do the same thing because caching, that should work ok?
19:57:52flyxcarterza: you usually don't need to because the order of type declarations within a type section does not matter
19:58:01demi-carterza: i think you want to declare them within the same type block
19:58:20carterzahrm I’m trying to fix a circular dependency issue
19:58:28carterzaI guess I could move it all into the same source file....
19:59:16demi-for declaring types i made a separate .nim file and declared all my types there so it wouldn't be a problem (similar to practices with headers in C)
19:59:26carterzanot a bad idea
19:59:43flyxdemi-: well I am searching for a TravisCI option to do something like that, but no luck. it should have a debug prompt or something
20:00:47demi-yeah, idk about travis -- it is possible if you made the nim repo a submodule or something that the caching might not take affect, as it is part of the repo that it would normally have to update?
20:01:14demi-and just pin the nim repo as a submodule at a specific release or something
20:04:10flyxwell the point is, I want to avoid compiling Nim every time I make a commit
20:04:47flyxand yeah, I could somehow cache the state of the submodule and rebuild if it changes with some fancy shell script
20:05:00flyxbut I would need a submodule to Nim in my repository
20:05:16flyxthis does not sound like a nice solution
20:07:06demi-does travis not allow you to install things via apt-get? you should be able to just use the regular package manager on the system to install a pinned version and be done with it
20:07:08*pregressive quit (Read error: Connection reset by peer)
20:07:38*pregressive joined #nim
20:08:09flyxah wait. it actually does renew Nim
20:08:10flyxthe error I get is not the error I thought I get
20:08:20elrooddom96, leftovers from previous generations? do the referenced documents get built for you on a clean run of koch web? or are there other steps or scripts that should be invoked but aren't automatically and that one might be missing?
20:08:29flyxonly thing to figure out now is why this is failing on Travis
20:09:05flyxI hate how instead of reproducing the results of a local test run, Travis manages to have a different environment where things fail that work here
20:13:45*kulelu88 joined #nim
20:16:09flyxoh, cool. apparently, `which nim` returns the empty string
20:16:40flyxeven though invoking `nim stuff` works
20:18:49demi-
20:19:17*smt quit (Ping timeout: 255 seconds)
20:20:59*nsf joined #nim
20:21:41*yay joined #nim
20:23:35demi-are there any docs on how to integrate `nimsuggest` into an editor?
20:23:51*Trustable quit (Remote host closed the connection)
20:31:12demi-nevermind, i found the docks, that wasn't the most easy thing to find for some reason.
20:35:18*Varriount|Mobile quit (Ping timeout: 258 seconds)
20:44:26*flyx made his travis green again
20:46:47flyxstill not sure what the error was, but something about PATH not being used with staticExec
20:47:15flyxmaybe a regression with the gorgeEx thing @Araq
20:47:30*confundus quit (Quit: confundus)
20:47:40Araqor maybe not.
20:47:42flyxbut I am too tired to investigate
20:47:56Araqmy travis works
20:48:24flyxyeah staticExec is used inside my tests and that seems to behave differently since 0.16.0
20:49:10flyxbut as I said, too tired to investigate now
20:49:14flyxperhaps tomorrow
20:54:01*Arrrr quit (Read error: Connection reset by peer)
21:01:39federico3flyx: yes there is caching. look https://github.com/nim-lang/Nim/wiki/CircleCI as an alternative
21:06:59*carterza quit (Ping timeout: 245 seconds)
21:11:46*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
21:19:40*yglukhov quit (Remote host closed the connection)
21:20:15*yglukhov joined #nim
21:22:05*krux02 quit (Remote host closed the connection)
21:22:07*rokups quit (Quit: Connection closed for inactivity)
21:25:02*yglukhov quit (Ping timeout: 260 seconds)
21:33:14*Matthias247 quit (Read error: Connection reset by peer)
21:41:10*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
21:42:52*carterza joined #nim
21:44:43*yglukhov joined #nim
21:46:07*carterza quit (Client Quit)
21:49:49*sz0 quit (Quit: Connection closed for inactivity)
21:56:57yay`countup` fails to count to high(int) "for efficiency reasons". What are those?
21:57:21*nsf quit (Quit: WeeChat 1.7)
21:58:29yayThis works in Java/Kotlin, which are, granted, not as efficient, but still... I'm curious
22:04:07*xet7 quit (Quit: Leaving)
22:07:04*Jesin quit (Ping timeout: 240 seconds)
22:09:57*gokr joined #nim
22:12:22Araqthink about how the loop needs to be structured for this to work
22:14:03Araqand I don't think it works in Java either, try it
22:14:41AraqJava's int wraps around and so 'x <= INT_MAX' is always true
22:15:06*planhths quit (Quit: Konversation terminated!)
22:16:08yayyeah, I just did a while loop and got the same error basically
22:16:38yaywell, it's true, I haven't tried in Java, I assumed, because in Kotlin it works just fine, where I did try
22:18:05yayfor (i in Long.MAX_VALUE-2..Long.MAX_VALUE) { println(i) }
22:18:10yayjust like that
22:18:18yayprints 3 values
22:22:33yaycan't it do "<" instead of "<=" and yield one more time after the while loop?
22:23:20*elrood quit (Quit: Leaving)
22:28:47yay@Araq It can. https://gist.github.com/yay/bdf8acb9a5d678ca4083a5773779c72e
22:29:48Araqsure it can, but
22:30:00Araqa) this misses the check if any iteration at all needs to be performed
22:30:17Araqb) uses 'yield' twice, watch your codesize explode with this construct
22:30:50Araqc) there are more elegant solutions (check i == max: break at the loop body end), but they produce worse machine code too
22:33:36yaysuch a simple thing so complicated :)
22:34:47*Vladar quit (Quit: Leaving)
22:38:53*pregressive quit (Remote host closed the connection)
22:39:27*pregressive joined #nim
22:44:06*pregressive quit (Ping timeout: 258 seconds)
22:46:09*gokr quit (Ping timeout: 256 seconds)
23:03:16*gokr joined #nim
23:07:42*gokr quit (Ping timeout: 260 seconds)
23:11:24*def-pri-pub joined #nim
23:15:13*gokr joined #nim
23:19:51*devted quit (Quit: Sleeping.)
23:28:03*yglukhov quit (Remote host closed the connection)
23:28:38*yglukhov joined #nim
23:30:57*gokr quit (Ping timeout: 276 seconds)
23:32:34*qwertfisch_ joined #nim
23:32:35*r4vi_ joined #nim
23:32:45*ftsf_ joined #nim
23:32:48*synshroud_ joined #nim
23:33:14*yglukhov quit (Ping timeout: 255 seconds)
23:33:14*gmpreussner_ joined #nim
23:34:26*FromGitter quit (*.net *.split)
23:34:26*synshroud quit (*.net *.split)
23:34:26*ofelas quit (*.net *.split)
23:34:26*gmpreussner quit (*.net *.split)
23:34:27*tstm quit (*.net *.split)
23:34:27*Gonzih quit (*.net *.split)
23:34:27*bodie_ quit (*.net *.split)
23:34:27*qwertfisch quit (*.net *.split)
23:34:27*r4vi quit (*.net *.split)
23:34:27*qwertfisch_ is now known as qwertfisch
23:35:03*FromGitter joined #nim
23:35:22*bodie_ joined #nim
23:35:27*carterza joined #nim
23:38:34*r4vi_ is now known as r4vi
23:41:23*tstm joined #nim
23:41:42*Gonzih joined #nim
23:42:30*ofelas joined #nim
23:47:09*gokr joined #nim