00:04:14 | * | ftsf_ left #nim ("Leaving") |
00:11:21 | carterza | Varriount|Mobile howdy |
00:11:51 | carterza | made 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:09 | carterza | I’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:23 | Varriount|Mobile | carterza: 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:54 | carterza | Varriount|Mobile: I had to run out for a bit |
03:13:05 | carterza | all 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:20 | Varriount|Mobile | carterza: What's your next goal? |
03:39:30 | carterza | layout engine |
03:40:11 | carterza | I need to be able to child widgets to other widgets and have them assume various layouts |
03:40:38 | carterza | I’m not really excited about all this GUI work - so I’m trying to get it done up front |
03:44:14 | Varriount|Mobile | How do you plan to deal with sound? |
03:45:37 | carterza | either OpenAL or whatever SDL2 has cooking for audio |
03:46:20 | carterza | I also saw - http://sol.gfxile.net/soloud/ |
03:46:30 | Varriount|Mobile | I've had my eye on this: https://github.com/libaudioverse/libaudioverse |
03:47:00 | Varriount|Mobile | But it might be overkill, and the developer is currently in school, so probably no updates for a whole |
03:47:17 | Varriount|Mobile | I think it works for the most part though. |
03:47:31 | carterza | definitely looks interesting |
03:48:09 | carterza | I have never tested soloud |
03:48:17 | carterza | so I have no idea how it performs |
03:48:26 | carterza | seems to be pretty feature rich though |
03:51:32 | * | gangstacat joined #nim |
04:52:28 | ftsf_ | Varriount|Mobile, looks cool |
04:52:33 | ftsf_ | i'm doing a modular audio thing in Nim atm |
04:52:49 | * | Kingsquee joined #nim |
04:52:59 | ftsf_ | https://www.youtube.com/watch?v=sDop4JELAhc |
04:53:10 | ftsf_ | doing a bit of a refactor atm, then i'll put it on github |
05:01:09 | * | shashlick joined #nim |
05:02:59 | shashlick | hello everyone, need some help with the parsecfg module |
05:05:37 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
05:08:24 | shashlick | I'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:25 | shashlick | len() also returns 1, so my config file isn't getting loaded correctly |
05:15:24 | ftsf_ | shashlick, hmm i'm not sure you can enumerate the sections |
05:18:45 | ftsf_ | seems like the dict.keys should return them though... |
05:18:53 | shashlick | it's just an orderedTable data structure, so you can get it with keys() |
05:18:59 | shashlick | but for some reason, it's only loading the first section |
05:19:31 | shashlick | i'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:41 | shashlick | mingw is in my path |
05:24:18 | ftsf_ | works for me when i use the keys iterator, shows all sections |
05:26:05 | ftsf_ | https://gist.github.com/ftsf/26b7637309532af679b4938b5cc3cb9f |
05:35:16 | shashlick | thanks ftsf_, I'll try with 0.16 and see if it helps |
05:42:03 | shashlick | wow, 0.16 is really hard to get installed |
05:42:16 | shashlick | have mingw-x64 installed in standard location but finish doesn't work with it |
05:45:03 | carterza | err how do I allocate a string of a specific size? I forget the syntax... |
05:47:54 | shashlick | finally got to 0.16 but same result |
05:51:34 | ftsf_ | shashlick, my test was with 0.15.1 btw |
05:51:53 | ftsf_ | carterza, newStringOfCap |
05:51:58 | carterza | thank you |
05:52:05 | shashlick | parsecfg doesn't like my ini file, values aren't quoted so |
05:55:41 | shashlick | even with quotes, it's not impressed :( |
05:56:45 | ftsf_ | start with a simple config |
05:56:47 | ftsf_ | see if that works |
05:57:02 | * | couven92 quit (Quit: Client disconnecting) |
06:03:10 | shashlick | ya a simple file works |
06:03:21 | shashlick | am actually porting a Python app to Nim, so my ini file is inherited |
06:05:13 | ftsf_ | comments maybe? |
06:06:53 | ftsf_ | lists? |
06:07:15 | ftsf_ | i think i recall having issues with foo=bar,baz or something |
06:07:49 | ftsf_ | line endings? |
06:07:52 | shashlick | I have URLs and all special characters in the values |
06:09:47 | * | LeNsTR is now known as lenstr |
06:18:47 | Varriount|Mobile | ftsf_: I would love a game that taught me all the terms (cutoff, sync, etc) |
06:20:07 | ftsf_ | 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:23 | ftsf_ | but too many projects right now =( |
06:21:37 | Varriount|Mobile | shashlick: You're using https://nim-lang.org/docs/parsecfg.html |
06:21:39 | Varriount|Mobile | ? |
06:22:24 | Varriount|Mobile | ftsf_: The closest I get to making music is singing. |
06:22:53 | Varriount|Mobile | Which is rather transient without a good microphone. |
06:26:29 | ftsf_ | currently working on trying to get my Nim game on to 3DS |
06:26:35 | ftsf_ | but it's tricky to debug |
06:26:57 | ftsf_ | but got something running now |
06:27:08 | ftsf_ | difficult with the GC though, not sure what's happening |
06:31:40 | Varriount|Mobile | ftsf_: I'm assuming you've turned off the mark and sweep collector? |
06:32:42 | ftsf_ | currently set to refc GC |
06:33:19 | Varriount|Mobile | Yeah, but the mark and sweep collector runs alongside that, to pick up cycles |
06:33:48 | Varriount|Mobile | If I recall correctly, it scans the entire stack |
06:34:49 | Varriount|Mobile | You might also look to see what hardware bugs are known on the DS, the gameboy had plenty |
06:35:04 | ftsf_ | hmm can you disable the mark and sweep? |
06:35:18 | ftsf_ | i thought setting it to refc would just use refcounting and not mark and sweet |
06:35:28 | Varriount|Mobile | Yes, |
06:36:02 | ftsf_ | oh i see, GC_disableMarkAndSweep |
06:36:32 | * | nsf joined #nim |
06:36:55 | ftsf_ | oh i am using GC_step, didn't realise i have to GC_disable too |
06:37:35 | Varriount|Mobile | https://nim-lang.org/docs/gc.html |
06:37:47 | ftsf_ | i seemed to be losing data when i was using foo = foo.filterIt(...) but foo.keepIf(...) is fine |
06:37:48 | Varriount|Mobile | ^ cornucopia of wisdom |
06:37:54 | ftsf_ | yeah will read over that |
06:38:03 | shashlick | Varriount|Mobile: ya I was using parsecfg |
06:38:32 | shashlick | wrote 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:13 | Varriount|Mobile | shashlick: Hm, the documentation mentions sections... |
06:40:09 | shashlick | no i think parsecfg doesn't like my ini file |
06:42:45 | shashlick | I 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:06 | Varriount|Mobile | shashlick: Using regex for these kinds of things always leads to pain when handing corner cases |
06:48:20 | Varriount|Mobile | Also, 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:46 | shashlick | agreed |
06:50:22 | shashlick | I can share the ini file if there is interest in fixing parsecfg |
06:50:55 | ftsf_ | shashlick, should raise it as an issue, ideally if you can find the bit that breaks it =) |
06:51:41 | Varriount|Mobile | shashlick: I'd like a look at the file |
07:01:40 | Varriount|Mobile | shashlick: What happens when you quote all values containing ":"? |
07:02:28 | shashlick | I quoted everything after = for every line, it still wasn't happy |
07:03:15 | Varriount|Mobile | Silent error, no exception? |
07:03:37 | shashlick | nothing the compile/run complained about |
07:03:43 | * | bjz joined #nim |
07:03:57 | * | couven92 joined #nim |
07:04:26 | Varriount|Mobile | What happens when you remove sections whose headers contain non-alphanumeric characters? |
07:06:38 | Varriount|Mobile | Along with quoting all values. |
07:07:11 | Varriount|Mobile | `download = href="(.*?mercurial-.*?-x64.msi)" ` looks pretty suspicious |
07:07:52 | shashlick | probably why the quotes didn't really help in a global search/replace |
07:09:21 | shashlick | anyway, 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:29 | shashlick | thanks 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:19 | Varriount|Mobile | Araq, dom96: https://news.ycombinator.com/item?id=13576976 |
09:36:46 | Varriount|Mobile | Something about that title really bugs me. |
09:39:14 | flyx | maybe that it contradicts Turing? |
09:42:25 | Araq | Varriount|Mobile: why? It's perfectly accurate. |
09:43:36 | Araq | I don't see any contraction with Turing completeness here, and whenever Turing completeness comes up, it misses the point. |
09:43:44 | Araq | ;-) |
09:43:59 | flyx | well I didn't even read the linked article so I don't know what's it about |
09:44:08 | flyx | let's see |
09:45:38 | Araq | TC is about algorithms, it's not about type systems and their safety guarantees. |
09:46:28 | Araq | and 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:41 | Araq | try to give Python static typing to see what I mean. |
09:47:36 | flyx | well 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:53 | Araq | ok, agreed, that is a very good point. |
09:49:03 | dom96 | You certainly can, the question is always "how easy is it to do?" |
09:49:07 | flyx | while 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:50 | Araq | no, in C++ it's hard because the method implementations can be hidden |
09:53:10 | Araq | the required information is not part of the method headers |
09:53:16 | Araq | in Rust it is. |
09:53:24 | * | peted_ quit (Client Quit) |
09:53:46 | * | peted quit (Quit: WeeChat 1.4) |
09:53:50 | flyx | well 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:54 | flyx | Ada 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:52 | cheatfate | is this can't be done via `nim macro`? |
10:02:47 | Araq | cheatfate: 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:23 | flyx | I think it would also be slower due to the analysis running in the VM. |
10:03:48 | flyx | global analyses algorithms tend to take minutes or hours even on modern systems |
10:03:58 | * | Parashurama joined #nim |
10:05:28 | flyx | so, the actual good thing about Rust is that it enables *efficient* escape analysis in the compiler |
10:05:58 | Araq | no, it enables *global* escape analysis in the compiler. |
10:06:18 | Araq | or rather incremental, global escape analysis |
10:06:34 | Araq | or "modular" escape analysis |
10:06:47 | flyx | since all information is in the signature, it is not global. that's an important point |
10:07:07 | Araq | yes, the result is a global program property though. |
10:07:09 | flyx | for example, you do not need pointer analysis as prerequisite because you do not need to know where function pointers point to |
10:07:35 | flyx | but yes, result is global |
10:07:38 | Araq | yeah, "modular" is the proper word for this. |
10:09:09 | Parashurama | Hey! |
10:09:33 | Araq | btw before we had .gcsafe we had a global abstract interpretation pass to determine the same thing. was unworkable. |
10:10:04 | Parashurama | so Araq: I think I remeber you saying you were against return value overloading. did that include "var return value"? |
10:10:34 | Araq | Parashurama: yes, we don't need it, proc p(x: var T): var U vs proc p(x: T): U |
10:10:58 | Araq | the 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:17 | Parashurama | In this case it works quite well, but I was thinking more along optimisation purpose. |
10:14:51 | Parashurama | return a shallowCopy with retval T and a copy with retval var T |
10:14:59 | * | shashlick quit (Quit: Connection closed for inactivity) |
10:15:35 | Parashurama | It is not really essential, is really to avoid copying strings all the time. |
10:15:50 | Araq | make the string shallow()? |
10:16:24 | Araq | I'm thinking about changing the defaults for strings btw, so that non-const strings are shallow by default |
10:16:37 | Parashurama | I already do that, but nothing the user from shooting himself in the foot, except maybe documentation. |
10:16:51 | Parashurama | *nothing stops the user |
10:17:16 | Araq | it's a tough design problem. |
10:17:24 | * | devted joined #nim |
10:17:43 | Araq | if we rename shallow() to freeze() and check at runtime setLen etc. is not allowed for frozen strings |
10:18:12 | Araq | things are better than they are today. except for the fact freeze() is seriously under-used |
10:18:55 | Parashurama | Yep. 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:14 | Parashurama | Although branch prediction and likely, unlikely can help us. |
10:19:21 | Parashurama | *with that. |
10:20:02 | Araq | i never had problems with branch predictors, it's always in the noise |
10:20:55 | Parashurama | well 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:25 | Varriount|Mobile | Araq: What do you mean by changing default string behavior? |
11:04:05 | Varriount|Mobile | Like, immutable strings? |
11:04:38 | Varriount|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:35 | Araq | I mean that 'var x = y' only copies the pointers and 'var x = y.copy' would produce a string copy |
11:10:38 | Varriount|Mobile | Hm. But that would break existing code. |
11:10:53 | Varriount|Mobile | Wouldn't it? |
11:11:17 | Araq | sure |
11:12:35 | Varriount|Mobile | I'd rather just have an immutable string type |
11:17:03 | Araq | what would that solve? |
11:17:09 | * | peted joined #nim |
11:17:24 | Araq | we don't need a proliferation of string types. |
11:17:42 | Araq | with every new type you make interoperability worse. |
11:19:28 | * | yglukhov joined #nim |
11:25:40 | * | yay joined #nim |
11:30:01 | Varriount|Mobile | Araq: But mixed (And implicit) semantics lead to weird bugs |
11:34:51 | Varriount|Mobile | It's the whole reason people want static typing |
11:36:03 | Varriount|Mobile | Anyway, I think the most likely solution to the problem is writing optimization code. |
11:36:31 | Varriount|Mobile | I mean, adding optimization passes to the compiler for strings and sequences |
11:37:39 | Araq | not all bugs are equal and until we try it it's just a hypothesis. |
11:37:56 | Varriount|Mobile | But right now it's not a priority. |
11:38:30 | Araq | an optimization pass would be another solution, yes. |
11:38:49 | Araq | and 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:46 | filcuc | Araq: c2nim converts also .c files ? |
13:35:11 | filcuc | Araq: i mean does it handle only .h files or can convert only c implementations? |
13:35:18 | filcuc | *also* |
13:36:19 | * | Sentreen joined #nim |
13:47:11 | Araq | filcuc: can also convert .c files |
13:47:25 | filcuc | Araq: thanks |
13:48:02 | * | synshroud quit (Quit: ZNC 1.6.4 - http://znc.in) |
13:57:24 | * | synshroud joined #nim |
14:21:32 | Varriount|Mobile | Jipok[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:30 | subsetpark | Can 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:34 | Araq | docgen.html is totally wrong about this |
14:58:07 | * | carterza quit (Quit: carterza) |
14:59:39 | subsetpark | Cool :) 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:40 | Araq | no, you should call 'nim doc2' |
15:04:07 | * | _yee joined #nim |
15:04:55 | subsetpark | I 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:16 | ehmry | can 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:48 | Varriount|Mobile | ehmry: is it a nimble library you control? |
15:17:04 | ehmry | yes |
15:17:09 | * | Jipok[m] joined #nim |
15:17:30 | * | Andris_zbx quit (Remote host closed the connection) |
15:17:40 | Varriount|Mobile | I 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:17 | Varriount|Mobile | So using nim.cfg should work. Nimble still has to call the compiler |
15:18:20 | ehmry | but they will aggregate? |
15:18:27 | ehmry | meh, I can test this |
15:19:21 | Jipok[m] | testmsg1 |
15:24:11 | Araq | subsetpark: doc2 is used for every module in the stdlib that's on our website |
15:24:47 | Xe | it'd be nice if there was `nim doc2` run on every package in nimble like godoc.org |
15:24:55 | subsetpark | Weird, it completelly blows up for me. |
15:25:28 | Jipok[m] | Araq: I wanted to try their hand at creating 2d games. |
15:25:51 | Jipok[m] | What about Urho3d? |
15:25:51 | Jipok[m] | Your wrapper is relevant? Urho3d I liked myself, but maybe I should choose another graphical framework? |
15:26:15 | subsetpark | But I guess it still produces the html file... So maybe I should just ignore the errors... |
15:27:05 | subsetpark | Nope, scratch that. I get a SIGSEGV. |
15:27:10 | Araq | Xe: be my guest. |
15:27:36 | * | yglukhov joined #nim |
15:28:31 | Araq | subsetpark: report it |
15:29:42 | demi- | xe surely that could be added to part of the `nimble publish` pipeline |
15:30:40 | Xe | demi-: if you use 2fa like I do, you almost never use `nimble publish` |
15:31:10 | demi- | on github you mean? I use 2fa and was able to do nimble publish recently |
15:31:35 | stisa[m] | Xe: I kind of remember https://nimble.directory doing it |
15:32:05 | demi- | 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:24 | Xe | ah, they finally got that bug fixed? |
15:33:08 | demi- | 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:08 | euantor | Yeah, 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:15 | carterza | http://imgur.com/a/AKG80 closable widgets now :D |
16:01:33 | demi- | neat! |
16:03:27 | * | gokr quit (Ping timeout: 252 seconds) |
16:03:49 | federico3 | Xe: nimble.directory is running nim doc for that reason |
16:19:16 | carterza | demi- 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:25 | ehmry | dom69: \o/ thanks, thats my first package |
17:13:19 | dom96 | That's an unfortunate typo of my nick |
17:13:25 | carterza | lol |
17:15:51 | carterza | I 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:23 | ehmry | heh, matrix doesn't autocomplete after you've started writing a line |
17:21:13 | demi- | 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:15 | demi- | remote.origin.url` not working for me. |
17:21:47 | demi- | which definitely seems like a bug in git, not one in nimble |
17:30:24 | * | yglukhov joined #nim |
17:30:35 | dom96 | demi-: fun. Didn't realise it was broken for you though. |
17:31:32 | demi- | 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:20 | dom96 | I see |
17:36:05 | * | elrood joined #nim |
17:40:22 | * | krux02 joined #nim |
17:40:57 | * | planhths joined #nim |
17:41:37 | krux02 | is there a way to convert the bits of a float into an int without using a cast? |
17:41:53 | Araq | use an ordinary type conversion |
17:42:01 | Araq | oh wait, I misread |
17:42:06 | Araq | no, cast is it. |
17:42:51 | Araq | the 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:44 | krux02 | Araq: and what does the nimvm do? |
17:53:20 | krux02 | https://github.com/nim-lang/Nim/blob/master/lib/pure/hashes.nim#L207 |
17:53:43 | krux02 | that line does not work on the vm |
17:55:22 | Araq | patch the vm so that particular cast is supported :P |
17:56:37 | krux02 | yea, 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:46 | krux02 | is there an easy way to map a function to a nimVM builtin? |
18:14:31 | * | Varriount|Mobile joined #nim |
18:15:09 | Araq | yes, look at compiler/scriptconfig.nim |
18:17:00 | * | brson joined #nim |
18:17:14 | elrood | Araq, hi there. are you aware that the docs contain a number of broken links? |
18:17:26 | Araq | no. |
18:17:46 | elrood | https://gist.github.com/anonymous/70f34d7df115f5a759b3accf1b9eda41 |
18:18:07 | krux02 | http://ix.io/1SF9 |
18:18:15 | krux02 | that would be an example of what I mean |
18:19:33 | Araq | krux02: compiler/scriptconfig.nim would be an example of how it's done |
18:19:37 | krux02 | just saw you already answered |
18:19:49 | * | sz0 quit (Quit: Connection closed for inactivity) |
18:20:04 | Araq | elrood: where do these links come from? |
18:21:18 | krux02 | byt regarding the line here: https://github.com/nim-lang/Nim/blob/master/lib/pure/hashes.nim#L206 |
18:22:51 | krux02 | you do know that this operation basically gives all numbers below 2^-52 the same hash? |
18:23:49 | * | hcorion joined #nim |
18:25:07 | elrood | Araq, 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:29 | hcorion | Hi all, does Nim have an equivalent of namespaces like in C# or modules like in rust? |
18:26:44 | dom96 | hcorion: it has modules like in Python |
18:27:55 | Araq | elrood: well most links work, so what is the cause for these? |
18:28:22 | krux02 | http://ix.io/1SFc |
18:28:25 | Araq | krux02: does that matter much? |
18:29:04 | Araq | I 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:28 | krux02 | well, you shouldn't do that |
18:30:38 | krux02 | the smallest exponent is -1022 |
18:30:55 | krux02 | and that is very far away still from -52 |
18:30:58 | Varriount|Mobile | hcorion: Why do you ask? |
18:31:12 | * | yglukhov quit (Ping timeout: 260 seconds) |
18:32:25 | krux02 | I 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:59 | hcorion | @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:00 | BlaXpirit | Gitter's API is finally up, and so is the bridge bot. |
18:34:03 | Varriount|Mobile | hcorion: 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:32 | elrood | Araq, 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:35 | FromGitter | <Varriount> Blazspirit: Yay! |
18:34:51 | * | confundus joined #nim |
18:35:04 | dom96 | elrood: I think he's trying to encourage you to investigate the problem :) |
18:35:41 | FromGitter | <Varriount> hcorion: I'm still here |
18:35:58 | krux02 | Araq: why do you add 1 in the first place? |
18:36:09 | * | Varriount|Mobile joined #nim |
18:36:56 | Araq | krux02: so that -0.0 and +0.0 hash to the same value |
18:37:29 | hcorion | @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:48 | Araq | and again, it's what Lua used. it was good enough for Lua's builtin hash table structure. |
18:37:57 | elrood | dom96, hasn't escaped me, just doing my best not to fall for it and feel encouraged ;) |
18:38:02 | Araq | hashes are allowed to collide. |
18:38:22 | Araq | and e-52 is pretty uncommon |
18:38:34 | Araq | but be my guest and use something better. |
18:38:54 | * | shashlick joined #nim |
18:39:48 | Varriount|Mobile | hcorion: To be fair, the Nim philosophy eschews strict segregation |
18:40:03 | krux02 | hashing double precision numbers in general is uncommon, but I need to do it |
18:40:26 | Araq | every number in Lua is a double... |
18:40:43 | krux02 | and I am sorry, but that line just yells at me |
18:41:04 | krux02 | not anymore afaik |
18:41:13 | Varriount|Mobile | Araq: Are you sure that the hash method is what lua *currently* uses? |
18:41:17 | Araq | yeah, but whatever. |
18:41:36 | Araq | Varriount|Mobile: I doubt it, but I cannot copy code from the future. |
18:43:17 | Araq | so 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:34 | krux02 | I am sorry I was wrong, too |
18:45:58 | krux02 | it is not 2^-52, it is 2^-17 |
18:47:45 | Varriount|Mobile | Araq: 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:27 | krux02 | how do you get a negative zero? |
18:58:43 | krux02 | I wasn't able to produce one |
19:02:18 | elrood | typically by rounding a negative value |
19:15:21 | Araq | simple: -1 / inf |
19:20:23 | krux02 | Araq: 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:40 | dom96 | elrood: those links are working fine on nim-lang.org |
19:52:47 | flyx | I am using TravisCI based on this config https://github.com/nim-lang/Nim/wiki/TravisCI |
19:52:55 | flyx | it does not seem to update to latest Nim master |
19:53:49 | flyx | I 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:52 | flyx | any advice? |
19:56:10 | dom96 | It's caching it I guess |
19:56:17 | dom96 | I don't know how to invalidate the cache |
19:56:49 | flyx | I have deleted some cache |
19:56:53 | flyx | but it didn't help |
19:57:08 | carterza | is it possible to forward declare a type? |
19:57:23 | carterza | or an object rather |
19:57:43 | demi- | flyx: on circleci i would force pull the repo to do the same thing because caching, that should work ok? |
19:57:52 | flyx | carterza: you usually don't need to because the order of type declarations within a type section does not matter |
19:58:01 | demi- | carterza: i think you want to declare them within the same type block |
19:58:20 | carterza | hrm I’m trying to fix a circular dependency issue |
19:58:28 | carterza | I guess I could move it all into the same source file.... |
19:59:16 | demi- | 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:26 | carterza | not a bad idea |
19:59:43 | flyx | demi-: 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:47 | demi- | 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:14 | demi- | and just pin the nim repo as a submodule at a specific release or something |
20:04:10 | flyx | well the point is, I want to avoid compiling Nim every time I make a commit |
20:04:47 | flyx | and yeah, I could somehow cache the state of the submodule and rebuild if it changes with some fancy shell script |
20:05:00 | flyx | but I would need a submodule to Nim in my repository |
20:05:16 | flyx | this does not sound like a nice solution |
20:07:06 | demi- | 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:09 | flyx | ah wait. it actually does renew Nim |
20:08:10 | flyx | the error I get is not the error I thought I get |
20:08:20 | elrood | dom96, 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:29 | flyx | only thing to figure out now is why this is failing on Travis |
20:09:05 | flyx | I 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:09 | flyx | oh, cool. apparently, `which nim` returns the empty string |
20:16:40 | flyx | even though invoking `nim stuff` works |
20:18:49 | demi- | |
20:19:17 | * | smt quit (Ping timeout: 255 seconds) |
20:20:59 | * | nsf joined #nim |
20:21:41 | * | yay joined #nim |
20:23:35 | demi- | are there any docs on how to integrate `nimsuggest` into an editor? |
20:23:51 | * | Trustable quit (Remote host closed the connection) |
20:31:12 | demi- | 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:47 | flyx | still not sure what the error was, but something about PATH not being used with staticExec |
20:47:15 | flyx | maybe a regression with the gorgeEx thing @Araq |
20:47:30 | * | confundus quit (Quit: confundus) |
20:47:40 | Araq | or maybe not. |
20:47:42 | flyx | but I am too tired to investigate |
20:47:56 | Araq | my travis works |
20:48:24 | flyx | yeah staticExec is used inside my tests and that seems to behave differently since 0.16.0 |
20:49:10 | flyx | but as I said, too tired to investigate now |
20:49:14 | flyx | perhaps tomorrow |
20:54:01 | * | Arrrr quit (Read error: Connection reset by peer) |
21:01:39 | federico3 | flyx: 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:57 | yay | `countup` fails to count to high(int) "for efficiency reasons". What are those? |
21:57:21 | * | nsf quit (Quit: WeeChat 1.7) |
21:58:29 | yay | This 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:22 | Araq | think about how the loop needs to be structured for this to work |
22:14:03 | Araq | and I don't think it works in Java either, try it |
22:14:41 | Araq | Java's int wraps around and so 'x <= INT_MAX' is always true |
22:15:06 | * | planhths quit (Quit: Konversation terminated!) |
22:16:08 | yay | yeah, I just did a while loop and got the same error basically |
22:16:38 | yay | well, it's true, I haven't tried in Java, I assumed, because in Kotlin it works just fine, where I did try |
22:18:05 | yay | for (i in Long.MAX_VALUE-2..Long.MAX_VALUE) { println(i) } |
22:18:10 | yay | just like that |
22:18:18 | yay | prints 3 values |
22:22:33 | yay | can't it do "<" instead of "<=" and yield one more time after the while loop? |
22:23:20 | * | elrood quit (Quit: Leaving) |
22:28:47 | yay | @Araq It can. https://gist.github.com/yay/bdf8acb9a5d678ca4083a5773779c72e |
22:29:48 | Araq | sure it can, but |
22:30:00 | Araq | a) this misses the check if any iteration at all needs to be performed |
22:30:17 | Araq | b) uses 'yield' twice, watch your codesize explode with this construct |
22:30:50 | Araq | c) there are more elegant solutions (check i == max: break at the loop body end), but they produce worse machine code too |
22:33:36 | yay | such 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 |