00:18:57 | * | handlex joined #nim |
00:26:53 | * | rauss joined #nim |
00:27:33 | * | handlex quit (Quit: handlex) |
00:39:29 | * | chemist69 quit (Ping timeout: 240 seconds) |
00:42:16 | * | chemist69 joined #nim |
00:44:13 | * | PMunch quit (Quit: leaving) |
00:55:08 | krux02 | meh: http://ix.io/ozv |
01:01:58 | krux02 | ok don't worry, I got it working |
01:09:29 | * | byte512 quit (Ping timeout: 259 seconds) |
01:15:55 | * | krux02 quit (Quit: Leaving) |
01:17:50 | zachcarter | :D |
01:46:08 | * | zetashift joined #nim |
01:48:57 | * | zetashift quit (Client Quit) |
01:50:07 | libman | I started working on http://www.libman.org/nim/download/index.html but it's still crap. Haven't had the time to make it good yet. |
01:56:48 | SusWombat | When i need the same custom type in different modules, should i import it somehow? or declare it in each of the files? |
02:13:59 | * | mwbrown joined #nim |
02:28:02 | zachcarter | SusWombat: declare it in a common module and then import that module into whatever other modules need it |
02:28:14 | SusWombat | zachcarter, okay ty |
02:28:18 | zachcarter | np |
02:28:40 | zachcarter | SusWombat: you can use * to export symbols |
02:28:56 | zachcarter | in other words, make that symbol visible to other modules |
02:29:43 | SusWombat | yeah |
02:47:04 | * | jabb quit (Ping timeout: 260 seconds) |
02:55:35 | * | chemist69 quit (Ping timeout: 264 seconds) |
03:09:16 | * | chemist69 joined #nim |
03:13:23 | * | jabb joined #nim |
03:16:08 | * | vlad1777d quit (Remote host closed the connection) |
03:35:53 | * | BitPuffin|osx quit (Ping timeout: 246 seconds) |
03:45:41 | * | Serenitor quit (Read error: Connection reset by peer) |
03:45:47 | * | Serenit0r joined #nim |
03:52:23 | * | def-pri-pub joined #nim |
03:52:23 | * | def-pri-pub quit (Changing host) |
03:52:23 | * | def-pri-pub joined #nim |
04:07:42 | * | def-pri-pub quit (Quit: Lost terminal) |
04:48:49 | * | mwbrown quit (Ping timeout: 260 seconds) |
04:50:59 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
04:58:58 | * | djellemah quit (Ping timeout: 240 seconds) |
05:18:34 | * | djellemah joined #nim |
05:19:34 | * | zachcarter quit (Quit: zachcarter) |
05:45:16 | * | rauss quit (Quit: WeeChat 1.7) |
05:52:16 | * | yglukhov joined #nim |
06:03:36 | * | yglukhov quit (Ping timeout: 240 seconds) |
06:18:17 | * | Kingsquee quit (Ping timeout: 246 seconds) |
06:18:56 | * | kokozedman joined #nim |
06:19:29 | kokozedman | hey guys, trying to debug on macOS El Capitan, using VSCode + Native Debugger |
06:19:45 | * | rauce quit (Ping timeout: 268 seconds) |
06:19:47 | kokozedman | debuggin works with --debugger:native, but the variable names are so mangled, it has nothing to do with the original |
06:19:52 | kokozedman | how can I solve this |
06:20:13 | kokozedman | or, is there something other **better** approach to debugging these days? |
06:20:16 | * | Kingsquee joined #nim |
06:22:40 | * | rauce joined #nim |
06:39:34 | * | nsf joined #nim |
06:41:43 | Araq | kokozedman: it's always variablename_HASH |
06:41:57 | Araq | so much for "nothing to do with the original" |
06:42:27 | Araq | secondly, most local vars are not mangled at all |
06:48:36 | * | ftsf quit (Quit: :q!) |
06:56:07 | kokozedman | Araq: I believe what you say, but not sure why I'm getting these... let me show this: http://pastebin.com/9Pfzm567 .. I'm using 0.16.0 on macOS, installed from brew |
06:56:23 | * | bjz joined #nim |
06:56:28 | Araq | use nim devel |
06:56:52 | kokozedman | ah, ok. Thanks |
06:56:54 | Araq | oh and write a plugin that reads in the produced .ndi files (in nimcache) |
06:57:14 | Araq | the name mapping are stored in .ndi files, debuggers can make use of it (but don't) |
06:58:54 | kokozedman | I've been busy with some other things in the past year, so, there are a lot of things that I missed. It's now the first time I hear about this .ndi file |
06:59:01 | * | chemist69 quit (Ping timeout: 260 seconds) |
06:59:24 | kokozedman | but, it's a great progress from ENDB |
07:00:57 | * | libman quit (Quit: Connection closed for inactivity) |
07:10:04 | * | Vladar joined #nim |
07:15:20 | * | rokups joined #nim |
07:19:43 | * | Nobabs27 quit (Quit: Leaving) |
07:23:06 | * | kunev_ quit (Ping timeout: 240 seconds) |
07:24:53 | * | kunev joined #nim |
07:25:40 | * | chemist69 joined #nim |
07:29:51 | * | zachcarter joined #nim |
07:32:44 | * | couven92 joined #nim |
07:55:19 | * | byte512 joined #nim |
07:59:11 | * | rauce quit (Ping timeout: 264 seconds) |
08:05:12 | * | rauce joined #nim |
08:09:11 | * | gokr joined #nim |
08:10:25 | * | jonathon joined #nim |
08:12:13 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
08:14:53 | Calinou | https://github.com/nim-lang/Nim states there's ARMv6 support, how good is support for more modern ARM (namely ARMv7 and ARMv8 which is 64-bit)? |
08:16:00 | * | bjz joined #nim |
08:17:04 | Araq | Calinou: everything works? not sure. |
08:17:22 | Araq | there is little CPU specific stuff in Nim |
08:18:14 | * | Andris_zbx joined #nim |
08:22:19 | * | brson quit (Quit: leaving) |
08:25:10 | * | zachcarter quit (Read error: Connection reset by peer) |
08:25:28 | * | rauce quit (Ping timeout: 240 seconds) |
08:25:31 | * | zachcarter joined #nim |
08:29:42 | * | zachcarter quit (Client Quit) |
08:42:48 | * | rauce joined #nim |
08:55:38 | FromGitter | <vegansk> @Araq, hi! PR https://github.com/nim-lang/Nim/pull/5490 is ready |
08:56:30 | FromGitter | <vegansk> Thanks :-) |
08:57:53 | * | brson joined #nim |
08:59:42 | * | brson quit (Client Quit) |
09:08:49 | * | kokozedman quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
09:25:31 | * | onionhammer quit (Ping timeout: 240 seconds) |
09:25:50 | * | onionhammer joined #nim |
09:36:31 | jonathon | any ideas why `nimble install aporia` results in a 0-byte aporia executable after it has been copied to the destination dir? it has built correctly and is present in the temporary dir before that... |
09:37:14 | jonathon | disk space is fine, all other files copy correctly, it's just the aporia executable |
09:43:28 | * | Lord_Nightmare quit (Ping timeout: 240 seconds) |
09:45:57 | * | Lord_Nightmare joined #nim |
09:53:24 | * | kokozedman joined #nim |
09:57:08 | Araq | jonathon: no idea, worked for me the last time I installed it |
09:58:42 | jonathon | yeah, it worked under Arch but not under Ubuntu... it's probably just a weirdness on this PC |
10:11:51 | * | Arrrr joined #nim |
10:11:51 | * | Arrrr quit (Changing host) |
10:11:51 | * | Arrrr joined #nim |
10:19:13 | * | Arrrr quit (Ping timeout: 260 seconds) |
10:28:13 | * | Arrrr joined #nim |
10:33:14 | dom96 | jonathon: bug in Nimble 0.8.2 |
10:33:21 | dom96 | Nimble 0.8.4 doesn't have this problem |
10:35:07 | jonathon | ah ha |
10:35:23 | jonathon | guess which version i have :) (it's 0.8.2) |
10:40:58 | Arrrr | Mmm, i had that version too. |
10:41:22 | Arrrr | Btw, why is getContent(string) deprecated? |
10:41:33 | Arrrr | Even nimble uses it |
10:42:03 | dom96 | because you should create a newHttpClient and call its getContent proc |
10:43:02 | Arrrr | But why? Couldn't it be an optional arg and check for nil? |
10:43:46 | Arrrr | Not that it really changes much, i'm simply curious |
10:44:19 | Araq | proc getContent(s: string): string = newHttpClient().getContent(s) |
10:44:23 | dom96 | because you need an object to implement keep-alive |
10:44:30 | Araq | ^ no need to deprecate it, IMO |
10:44:36 | Araq | just change it's implementation |
10:44:55 | Araq | instead of telling people to write 2 lines of code where 1 was enough |
10:45:30 | Araq | dom96: what if I don't care about keep-alive :-) |
10:45:54 | Araq | *its, damn |
10:46:11 | Araq | making the same mistakes as a native speaker, sucks |
10:46:12 | dom96 | Come on. 2 lines is hardly a lot. |
10:46:28 | jonathon | `nimble install nimble` -> $HOME/.nimble/pkgs/compiler-#head/compiler/commands.nim(60, 16) Error: cannot open '../doc/basicopt.txt' ... ? |
10:46:56 | dom96 | Araq: If you want to decrease the number of lines to do something then make parsecfg nicer. |
10:47:34 | Araq | false dichotomy. |
10:48:36 | dom96 | Nope. |
10:49:02 | Araq | parsecfg is very nice, it's just that you don't understand its design. :P |
10:49:34 | Arrrr | I have seen getContent(str) implemented in other languages (python maybe?). What's the issue with keep-alive? |
10:49:51 | dom96 | Araq: I could say the same thing about httpclient |
10:50:17 | Araq | you could, but you would be wrong. |
10:51:14 | Araq | but back to the original point: https://nim-lang.org/docs/apis.html |
10:51:22 | Araq | " Ease of use is measured by the number of calls to achieve a concrete high level action." |
10:51:44 | Araq | this is a clear indication we should keep getContent() |
10:52:50 | jonathon | oh, the debian package doesn't install the nim source 'doc' directory anywhere... |
10:53:38 | dom96 | Arrrr: I don't think it's implemented that way in Python. |
10:53:55 | dom96 | Araq: Having a procedure that takes hundreds of parameters is bad design. |
10:54:06 | Araq | no it's not. |
10:54:19 | Araq | moving the parameters into an object is just that. a move. |
10:54:31 | Araq | it doesn't change the quality of the design. |
10:55:05 | Araq | Nim supports named arguments for this design. |
10:55:50 | Araq | in any case, getContent already exists |
10:56:16 | dom96 | Yes, but soon it won't. |
10:56:27 | Araq | I only argue to keep it, not that it was the "best" design. |
10:56:36 | dom96 | It's already deprecated. |
10:56:42 | Araq | de-deprecate it. |
10:56:43 | dom96 | Its fate has been sealed. |
10:56:55 | Arrrr | http://rosettacode.org/wiki/HTTP#Python |
10:57:05 | Arrrr | It looks a bit close. |
10:57:12 | Araq | so, everybody needs to pointless update his code and these 2 lines pop up everywhere. |
10:57:18 | Arrrr | Go returns an optional |
10:57:32 | Araq | that's like embraced code duplication |
10:57:56 | dom96 | The new design encourages efficient usage. |
10:58:10 | Araq | the old design was about convenience. |
10:58:26 | Arrrr | I don't think requiring httpclient object for complex task is bad, but i would trust default args for 99% of cases |
11:00:38 | Araq | how does it encourage efficient usage? I bet the nimble patch will just replace 1 line by 2 lines everywhere. |
11:01:13 | Araq | it's hard to keep the client object around, and when you use a global for it, you lose .gcsafety |
11:01:52 | dom96 | Fine. But this is where you're wrong, you will need a global. |
11:02:14 | dom96 | If you create a new http client for every request then that's obviously not efficient, is it? |
11:02:47 | dom96 | and then what should we support by default? the synchronous or asynchronous one? |
11:02:55 | dom96 | or should we have getContent and getContentAsync |
11:03:08 | Araq | yeah, but this thing returns the contents as a potientially long string. it's clearly inefficient, but convienent |
11:03:36 | Araq | you're right the version that takes a client object is much more useful. |
11:04:01 | Araq | but for the common throw away case, it's not as convenient as the old one. |
11:04:02 | dom96 | Fine. |
11:04:21 | dom96 | But by this logic a hell of a lot more things in the standard library should be made more convenient |
11:04:32 | dom96 | parsecfg and parseopt especially |
11:06:49 | enthus1ast | why not redefine getContent to use the new style internally and also define an getContent for the object? |
11:07:01 | Araq | enthus1ast: that's what I argued for. |
11:07:40 | Araq | parsecfg and parseopt are fine, what's lacking is a stdlib macro to write string cases without the duplication |
11:07:53 | Araq | "foobar": x.foobar = true |
11:08:12 | Araq | "xyz": x.xyz = false |
11:08:38 | Arrrr | It could accept a case object |
11:08:45 | dom96 | what's missing is the ability to write: parseCfg()["key"] |
11:08:55 | Arrrr | I use enums for parsing cfgs and args |
11:09:03 | * | bjz_ joined #nim |
11:09:14 | Araq | no, that's worse design. no protection against typos in the "key" part |
11:09:17 | dom96 | I hate having to define my own config objects every time I parse a config |
11:09:30 | Araq | no type safety, no thanks. |
11:09:53 | Araq | also parseCfg has something that gives you an OrderedTable back |
11:10:04 | Araq | was a recent addition though. |
11:10:18 | Araq | (and I think it's bad design.) |
11:10:33 | * | bjz quit (Ping timeout: 260 seconds) |
11:10:39 | enthus1ast | oh by the way, does OrderedTable lack a way to retreive multiple keys? : ) |
11:10:44 | Arrrr | It is the only way to get section-agnostic keys. |
11:10:46 | dom96 | So... json isn't type safe either. |
11:10:51 | Araq | yes. |
11:11:01 | kokozedman | :) |
11:11:26 | dom96 | I prefer convenience in this case. |
11:11:32 | dom96 | Just like I prefer convenience with json. |
11:11:50 | dom96 | There is a reason I dislike Go and Haskell's approach to reading JSON |
11:12:28 | dom96 | It's the same reason I feel like I am wasting my time writing the same damn parsing case statement for parseopt and parsecfg every time I have to do it |
11:12:54 | * | vlad1777d joined #nim |
11:13:07 | kokozedman | I think efficiency is key, but convenience is always a good value. If we can have convenience while having efficiency, that would ideal. They are not mutually exclusive. |
11:13:30 | Araq | enthus1ast: values() iterator? |
11:13:33 | kokozedman | But in this day an age, efficiency is more important. Scaling is always a concern. |
11:13:41 | Araq | er, keys() iterator, I mean |
11:13:41 | kokozedman | Mostly |
11:14:23 | Araq | kokozedman: lol what? I think the fact that computers stopped getting faster doesn't mean they are suddenly too slow for parsing config files :-) |
11:15:25 | kokozedman | Araq: I'm not sure about the depth of the discussion, but I seem to understand something about inefficient HTTP client |
11:15:33 | Araq | dom96: fair enough to request this feature in parsecfg and parseopt, I will accept PRs |
11:15:45 | federico3 | in the case of config files speed is not important, type safety is. |
11:16:05 | Araq | but I personally will always use the style that doesn't use dictionaries everywhere. |
11:16:08 | dom96 | Araq: good |
11:16:10 | kokozedman | convinience will draw people to use the API (whether it is efficient or not) |
11:16:37 | kokozedman | you expose an inefficient API, people will use it, and a lot of time without knowing that it's not efficient |
11:16:48 | federico3 | OTOH, when parsing JSON, having "unstructured" access is very useful, both when exploring some new contents or to be able to ignore extra fields |
11:16:53 | kokozedman | in those cases, warnings or deprecations are in order |
11:16:59 | Araq | that said, JSON is messy and comes from external sources, so it can be hard to enforce type safety. config files and command line args are more under your control. |
11:17:46 | federico3 | but we can have a typed JSON parser/converter when better efficiency is needed, why not? |
11:18:04 | Araq | I think there is a way to transform the json into a typed object |
11:18:17 | Araq | but I am not familiar with json.nim |
11:18:24 | Araq | *not that |
11:18:59 | dom96 | I'd be happy with a macro that takes a type and parses the config automatically |
11:19:11 | federico3 | I think you can, with to[] , but it's probably not efficient |
11:19:25 | dom96 | Which would give you type safety and more convenience |
11:19:37 | federico3 | +1 dom96 |
11:19:49 | dom96 | The `to` proc is for marshalling and unmarshalling |
11:20:27 | dom96 | I don't think we can assume that it will always use the JSON format |
11:20:49 | dom96 | (I bet many people are using it like that though) |
11:20:56 | federico3 | yes |
11:21:19 | federico3 | perhaps the json module should have [un]marshalling procs that will always use JSON |
11:21:32 | dom96 | yes |
11:21:35 | Araq | yeah json.nim should have a 'to' |
11:23:00 | Calinou | first PR on Nim :) |
11:23:04 | Calinou | (it's just a typo fix) |
11:28:36 | * | PMunch joined #nim |
11:33:02 | * | yglukhov joined #nim |
11:36:49 | kokozedman | dom96, Araq: in Golang, people are encouraged to re-use the HTTP client (for efficiency), and when you http.Get(...) it also re-uses a default http client. I don't think getContent() does this, and the many use of it will create a very inefficient program; talk about people from Go moving to Nim, which can be quite a number as people using Go are p |
11:36:50 | kokozedman | roperly looking for more interesting language alternatives. If you ask me, it's good that getContent() gets deprecated. getContent() doesn't adhere to the "efficient" value that is marketed about Nim. |
11:37:26 | kokozedman | probably* |
11:37:59 | dom96 | kokozedman: Yes, that was why getContent was deprecated. But Araq wants it to be reimplemented in the same way you described Go's implementation. |
11:38:16 | Araq | again, it returns a 'string', not a stream, so it never was about efficiency, IMO. ymmv. |
11:39:15 | euantor | Regarding Json serialization/deserialization, I really like Rust's Serde approach: https://github.com/serde-rs/serde |
11:39:34 | Araq | the efficient way is async+streams and if you like to encourage that, don't offer a getContent that returns a string. |
11:40:02 | euantor | I can imagine a similar thing for Nim that allows you to just add a pragma to an object and have it generate code at compile time to create functions to serialize/deserialize |
11:40:41 | Araq | but this only means people will write their own wrapper that collects everything into a string in the application code because it's more convenient. |
11:40:57 | kokozedman | why don't we just put a better recommendations like that on documentation? I mean, clearly, people who are going to use getContent() have no clue what's behind, but we do |
11:41:19 | kokozedman | these puts a tremendous value to the language to people who are really looking for "efficiency" |
11:42:13 | Araq | better docs are always worthwhile, but "we made this hard to encourage efficiency" doesn't work IMO. |
11:42:39 | Araq | it's really the same in osproc |
11:42:48 | Araq | we have procs that return the output as a string. |
11:43:20 | PMunch | I mean, if I want to write a simple script to crawl a site for an update for example then performance doesn't really matter and getContent would be plenty good for those purposes |
11:43:38 | Araq | and as a library user I often know better. like "yeah, I know, but I'm calling GCC which is known to produce a small amount of output" |
11:43:48 | PMunch | So getContent certainly has a spot as a convenience function |
11:44:05 | * | vlad1777d quit (Remote host closed the connection) |
11:44:30 | Araq | likewise I can imagine "yeah I know, but this URL produces small websites" |
11:44:33 | kokozedman | PMunch: curl is very script-friendly ;-) |
11:45:02 | PMunch | kokozedman, that's besides the point though |
11:45:18 | Araq | maybe every string should be an async stream though. |
11:45:50 | Araq | but this is more a design for a higher level language, in systems programming the split "small data" vs "big data" is everywhere. |
11:45:58 | PMunch | Curl is great, but the topic isn't "how would I do X" but rather "how would I do X in Nim" |
11:46:19 | kokozedman | so, an indication to the more efficient approach should be mentioned in those cases ... so it stays convinient to those who need it, and provides needful insight for those getting the wrong idea to use it everywhere |
11:47:29 | PMunch | Yeah, the docs could be written ta state "getContent is a simple template/wrapper around the aforementioned async stream methods of retrieving data" |
11:47:33 | PMunch | Or something similar |
11:48:16 | kokozedman | PMunch: well, I certainly won't consider writing a Nim program as writing a small script. If I use Nim, I know I'm going to be doing something bigger than just a mere script will do. But that's just me. |
11:48:34 | PMunch | Maybe drop a line like "if any kind of performance or robustness is expected getContent should be avoided" |
11:48:44 | kokozedman | and same goes for other folks I think |
11:48:58 | kokozedman | PMunch: yes, that's a good line |
11:49:07 | PMunch | Well, I've started writing short Nim programs instead of Python scripts |
11:49:07 | * | elrood joined #nim |
11:50:00 | PMunch | Most things can be done just as easily in Nim as in Python and with Nim you get a performance benefit as well |
11:50:08 | kokozedman | Good for you. Well, for my use case, I use Nim mainly to write programs that will run for months inside OpenWRT routers |
11:50:40 | kokozedman | and this is a nice proof of the diverse use-cases of Nim |
11:50:50 | PMunch | I guess this is just a testament to how versatile Nim really is :) |
11:50:52 | PMunch | Yeah |
11:50:54 | kokozedman | you use it for mostly scripting, I use it for long running program |
11:51:00 | PMunch | Well, I use it for both |
11:51:03 | kokozedman | Indeed |
11:51:07 | PMunch | Or pretty much anything |
11:51:26 | PMunch | What kind of OpenWRT scripts are you writing by the way? |
11:51:57 | kokozedman | what I'm interested next, is the Javascript backend, like producing a server to client web application stack, where everything is written in Nim |
11:54:10 | PMunch | That would be quite interesting |
11:55:43 | PMunch | The problem I can see you facing there is the problem that most people wanting to write web-code is already familiar with JavaScript and having all the JavaScript snippets out there is great for code-reuse. |
11:58:45 | Araq | you can use .emit for your copy&paste pleasures :P |
11:59:00 | Araq | in fact, my dochack uses it too |
11:59:19 | PMunch | Ooh, that's a good point :) |
12:02:11 | * | bjz joined #nim |
12:02:45 | * | Snircle joined #nim |
12:03:59 | * | bjz_ quit (Ping timeout: 264 seconds) |
12:04:16 | dom96 | Another thing we might want to beware regarding getContent: reimplementing getContent using HttpClient may have some subtle unpredictable results for people that are using it. |
12:04:29 | dom96 | It's unlikely but you never know. |
12:04:35 | * | yglukhov quit (Ping timeout: 264 seconds) |
12:04:58 | dom96 | So we must ensure that this is documented well. |
12:15:24 | Araq | sublte unpredictable results? :-) |
12:15:26 | Araq | like? |
12:18:40 | * | vlad1777d joined #nim |
12:21:33 | * | arnetheduck joined #nim |
12:22:39 | * | Kingsquee quit (Quit: https://i.imgur.com/qicT3GK.gif) |
12:22:45 | dom96 | no idea |
12:23:07 | * | zachcarter joined #nim |
12:45:45 | * | vlad1777d quit (Quit: Leaving) |
13:09:59 | * | Arrrr quit (Ping timeout: 264 seconds) |
13:12:01 | * | zachcarter quit (Quit: zachcarter) |
13:17:31 | * | gokr quit (Ping timeout: 240 seconds) |
13:24:20 | * | andris_ joined #nim |
13:26:06 | * | Andris_zbx quit (Ping timeout: 240 seconds) |
13:26:39 | * | Arrrr joined #nim |
13:26:39 | * | Arrrr quit (Changing host) |
13:26:39 | * | Arrrr joined #nim |
13:30:06 | PMunch | I'm trying to create a nimble package |
13:31:00 | PMunch | It's a super simple, one file program that has a simple example file along with it. What would be the preferred folder structure for that? I can't get Nimble to shut up about misnamed files etc. |
13:31:25 | * | Arrrr quit (Ping timeout: 268 seconds) |
13:31:55 | dom96 | SkipDir = @["examples"] |
13:32:58 | PMunch | That's the preferred way? |
13:33:24 | dom96 | Yes, at least until Nimble gets support for example files. |
13:34:41 | PMunch | Hmm, that throws an error |
13:34:57 | PMunch | http://ix.io/oIk |
13:35:22 | dom96 | SkipDirs? |
13:36:04 | PMunch | Same error |
13:36:19 | PMunch | Ah, "skipDirs" |
13:48:12 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
13:50:33 | * | bjz joined #nim |
13:53:02 | * | zachcarter joined #nim |
14:09:12 | * | BitPuffin|osx joined #nim |
14:19:32 | * | mwbrown joined #nim |
14:20:56 | * | couven92 quit (Quit: Client disconnecting) |
14:29:02 | * | Arrrr joined #nim |
14:29:02 | * | Arrrr quit (Changing host) |
14:29:02 | * | Arrrr joined #nim |
14:29:19 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
14:30:55 | PMunch | Just pushed a little shebang script to the Nimble package repos: https://github.com/PMunch/nimcr/blob/master/docs/nimcr.md |
14:30:56 | * | ofelas_ quit (Read error: Connection reset by peer) |
14:32:40 | * | ofelas_ joined #nim |
14:36:48 | FromGitter | <Jeff-Ciesielski> I literally just pushed this up like a week ago: https://github.com/Jeff-Ciesielski/nimr |
14:37:26 | FromGitter | <Jeff-Ciesielski> Handles caching of build results / FFI / etc. We're all solving the same problem. The community should standardize on a solution |
14:39:26 | * | gokr joined #nim |
14:40:27 | * | chemist69 quit (Ping timeout: 256 seconds) |
14:40:29 | Araq | ha. PMunch I like it. |
14:41:34 | Araq | not sure it's a valid solution for Windows though, you don't want to attach "nimcr" to the .nim file extension so that the file is executed with this. Though that's what Python for Windows does, I think. |
14:42:36 | PMunch | Jeff-Ciesielski: mine has the benefit of outputting the compiler error when it fails. And I prefer keeping the executable in the same folder but hidden so it doesn't need to be recompiled once every reboot for systems that has non-persistent tmp directories (but keeping the nimcache folder in tmp if you are writing the script and trying to run it multiple times). |
14:42:50 | PMunch | Araq, yeah I was wondering about that |
14:42:55 | FromGitter | <Jeff-Ciesielski> Mine also outputs the compiler errors :) |
14:43:14 | Araq | I also prefer 'sh file.sh' over 'chmod +x file.sh && ./file.sh' in general, but I guess that's just me |
14:43:33 | PMunch | Jeff-Ciesielski, yours only outputs the error code, not the actual error message. |
14:43:48 | PMunch | Araq, well I think it depends on who you ask |
14:43:56 | Araq | oh and I also despise hidden files :P |
14:44:07 | PMunch | The benefit of a shebang is that the file itself ships with the information on how to run it |
14:44:16 | Araq | these are usually the first file I need to touch and tweak :P |
14:44:40 | PMunch | Well, the hidden file in this case is just the compilation output |
14:44:51 | PMunch | So nothing to really tweak in there :) |
14:44:52 | Araq | (*cough* .nimble directory *cough*) |
14:45:16 | Araq | PMunch: "force rebuild" is "rm .hidden_binary" :P |
14:45:27 | PMunch | Yeah I guess |
14:45:34 | FromGitter | <Jeff-Ciesielski> @PMunch....I'm not sure what you're referring to, running with mine most definitely shows the compiler error message. ```jeff.ciesielski:scratch> ./finally.nim ⏎ finally.nim(6, 5) Error: no return type declared ⏎ ``` |
14:45:36 | * | chemist69 joined #nim |
14:45:53 | FromGitter | <Jeff-Ciesielski> Either way, inconsequential. There are now literally 5 of these floating around |
14:45:53 | PMunch | Or just change the file-time by writing something to it |
14:46:56 | PMunch | Wait, it does? I'm looking at the source and I can't see any line that would show it (as long as --verbosity:0 does what I think it does) |
14:47:09 | PMunch | But yeah, I agree, doesn't matter :P |
14:47:23 | FromGitter | <Jeff-Ciesielski> IIRC Verbosity:0 squelches hints and whatnot |
14:47:37 | FromGitter | <Jeff-Ciesielski> Errors still propegate |
14:47:45 | PMunch | Hmm, that's the thing though. Mine gives you the entire output iff it fails |
14:47:55 | PMunch | Sometimes the hints are actually useful |
14:48:57 | Araq | I don't mind adding a tool to 'koch tools', but dom96 may disagree |
14:49:34 | PMunch | He doesn't like shebangs? |
14:50:02 | Araq | he might think it shouldn't be part of the "core" |
14:50:09 | FromGitter | <Jeff-Ciesielski> Why not just a `nim -s` option? |
14:50:15 | FromGitter | <Jeff-Ciesielski> That sets sensible defaults |
14:50:20 | FromGitter | <Jeff-Ciesielski> for running as a script? |
14:50:42 | Araq | ok, fine with me. PRs accepted. |
14:53:22 | Araq | but IMO it should produce project/project.exe, remove the nimcache dir and not mess with hidden files or /tmp |
14:53:50 | FromGitter | <Jeff-Ciesielski> Seems reasonable. |
14:54:57 | FromGitter | <Jeff-Ciesielski> Though removing nimcache kills a lot of the speed benefit no? |
14:55:02 | PMunch | Yeah |
14:55:10 | PMunch | I tested with a simple echo "Hello world" |
14:55:22 | PMunch | First compilation .5s |
14:55:25 | Araq | hu? the binary is kept. |
14:55:29 | PMunch | Second compilation .1s |
14:55:33 | Araq | why would it matter |
14:55:51 | FromGitter | <Jeff-Ciesielski> I guess I'm not familiar with how the compiler tracks the dependency tree internally |
14:56:03 | FromGitter | <Jeff-Ciesielski> Does it check timestamps of binary vs source files? |
14:56:05 | PMunch | It wouldn't really, but it's nice to have the cache if you need it |
14:56:41 | PMunch | That's why I put it in /tmp so it would clean itself out but still be available if you say is tuning a value and running the script over and over |
14:58:41 | PMunch | And the rationale with the hidden file was that since most scripts create a single binary anyways it would be just as well to hide it (I keep a "scripts" folder on my machine with scripts for all sorts of things, it would quickly get cluttered if every script also created a folder with a single exe in it). |
15:01:15 | Araq | jeff-ciesielski: no it doesn't, it recompiles the world. the symbolfiles feature uses file hashes rather than timestamps |
15:02:47 | PMunch | For example on my Surface Pro I run Linux. To allow it to have auto-brightness I have a script that reads the light sensor and controls the brightness by that. When I wrote the script I was constantly tweaking the curve of brightness and those parameters. Now it's just in a folder with my other scripts and I don't touch it. This is a Python script, but if I were to rewrite it in Nim I would want to keep nimcache while working on it (since it involves a lot of |
15:02:47 | PMunch | tweaking a number and rerunning) but don't care for anything but the script when I'm "done" writing it. |
15:03:27 | Araq | PMunch: it could use a shared nimcache/ in your /tmp then |
15:03:28 | PMunch | That's why I put nimcache in /tmp and hid the binary output |
15:04:00 | Araq | by sharing it we try to ensure it doesn't take up too much space eventually |
15:04:06 | PMunch | Araq, oh yeah definitely. But I wasn't sure how well it handled sharing nimcache |
15:04:08 | Araq | for systems that don't clean /tmp |
15:04:48 | PMunch | I've had weird issues before that got fixed by purging nimcache. So I wanted to keep them separate in case that would be an issue |
15:05:16 | Araq | I only know of the C++ <-> C nimcache issue |
15:05:30 | PMunch | Ah, that might've been the one :P |
15:05:42 | PMunch | I was working with WxWidgets which is C++ |
15:05:44 | Araq | which exists because we don't detect the .o file's origin |
15:06:08 | Araq | but yeah, it's a good point. -.- |
15:06:19 | Araq | sharing could cause issues. |
15:06:51 | PMunch | It could check for a nimcache-<anything but my own hash> and delete them? |
15:07:14 | Araq | dunno. sounds like we're then doing the OS's job |
15:07:25 | PMunch | Yeah, that's a fair point.. |
15:07:41 | kokozedman | does nimsuggest support --path:... parameter? |
15:07:52 | PMunch | I just dump everything I don't particularly care about to /tmp and hope for the best :P |
15:08:24 | kokozedman | I have wrapped it in a bash script and add my path, but inside VSCode, the code using codes in the path are still marked as errornous |
15:09:17 | PMunch | For simple scripts though nimcache isn't likely to grow much larger than a couple hundred kb so I don't think running out of space would be that big of an issue |
15:10:39 | * | kokozedman quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
15:15:20 | Araq | kokozedman: VS Code doesn't use nimsuggest for checking, but 'nim check' |
15:15:48 | * | vlad1777d joined #nim |
15:16:31 | * | mwbrown quit (Ping timeout: 240 seconds) |
15:22:57 | * | yglukhov joined #nim |
15:27:13 | * | rauss joined #nim |
15:37:39 | jonathon | does nimscript (or nim) have a finally() method or 'trap' similar to bash to make sure a command gets run before the program exits? |
15:38:15 | PMunch | defer? |
15:39:16 | Araq | addQuitProc |
15:40:35 | * | gokr quit (Read error: Connection reset by peer) |
15:40:39 | * | BitPuffin|osx quit (Remote host closed the connection) |
15:41:26 | * | BitPuffin|osx joined #nim |
15:44:46 | jonathon | ah, defer led me to try/finally (same thing, different syntax) which works fine for what i'm after |
15:46:42 | * | brson joined #nim |
15:48:49 | * | jonathon quit (Quit: Doing something else... or rebooting) |
15:57:49 | enthus1ast | Araq, dom96 please merge 5494 there is another one waiting on my finger tips. |
15:58:57 | subsetpark | Anybody have any experience with mainaining Arch packages? nim-git in AUR pulls from head, but it would be nice to have something pegged to the most recent release and nim is out of date and unmaintained |
15:59:30 | PMunch | subsetpark, the nim package pulls from a given tag doesn't it? |
16:00:16 | PMunch | This one: https://git.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/nim |
16:00:37 | Araq | enthus1ast: btw equality for Ordered Tables is hard. it should optionally ignore the order I think |
16:01:11 | Araq | but oh well, this can be left for later. not sure if we need it |
16:01:13 | * | fvs joined #nim |
16:01:13 | subsetpark | PMunch: no idea (I have just become an Arch user as of this week), but that link does seem to indicate that |
16:01:20 | PMunch | Officially it's stuck on 0.15.0, which is a shame. But you should be able to install it, and during installation edit PKGBUILD to change the pkgver :) |
16:01:42 | PMunch | Oh right subsetpark, I'm using Manjaro which is based on Arch |
16:01:57 | PMunch | So I'm installing from the same repositories |
16:02:19 | subsetpark | Surely we should be able to update the package then |
16:02:49 | PMunch | Yeah, but it's maintained by a guy which appear to not care.. |
16:02:57 | PMunch | I tried sending him an e-mail but no reply |
16:03:28 | * | couven92 joined #nim |
16:03:39 | euantor | Can you not fork the package in that case? |
16:04:08 | PMunch | TBH I'm not 100% sure how all that works |
16:04:27 | PMunch | But I think you could potentially mark the package as orphaned, then request to adopt it or something.. |
16:04:34 | PMunch | Not entirely sure |
16:04:48 | subsetpark | dom96: you are listed as a contributor - do you happen to have any insight on how to adopt/update the orphaned nim package on Arch? |
16:16:58 | * | krux02 joined #nim |
16:24:16 | * | Trustable joined #nim |
16:42:42 | PMunch | subsetpark, I've requested the package to be adopted or dropped to AUR where someone else can adopt it |
16:42:46 | PMunch | So now we wait :P |
16:43:28 | subsetpark | Nice job! |
16:47:21 | * | GK___1wm____SU joined #nim |
16:52:46 | * | handlex joined #nim |
16:57:17 | * | GK___1wm____SU quit (Quit: jIRCii - http://www.oldschoolirc.com) |
17:01:10 | * | handlex quit (Quit: handlex) |
17:05:07 | * | gokr joined #nim |
17:11:18 | * | yglukhov quit (Remote host closed the connection) |
17:16:02 | * | deavmi__ joined #nim |
17:16:46 | * | andris_ quit (Remote host closed the connection) |
17:20:54 | * | deavmi__ quit (Quit: deavmi__) |
17:31:43 | PMunch | subsetpark, the package has now got a new maintainer, a Levente Polyak. Hopefully it will be updated to 0.16.2 soon :) |
17:45:29 | * | jabb left #nim (#nim) |
17:47:33 | * | krux02 quit (Remote host closed the connection) |
17:48:22 | subsetpark | Fast work! |
17:49:10 | PMunch | Indeed |
17:50:29 | * | brson quit (Ping timeout: 260 seconds) |
17:56:31 | Araq | PMunch: if only 0.16.2 would exist -.- |
17:56:57 | PMunch | Oh right, 0.16.1 |
17:57:05 | PMunch | :S Not sure where I got .2 from |
18:01:55 | * | brson joined #nim |
18:05:47 | * | gokr quit (Ping timeout: 264 seconds) |
18:18:17 | * | Trustable quit (Remote host closed the connection) |
18:18:31 | * | vendethiel joined #nim |
18:21:17 | * | rauss quit (Quit: WeeChat 1.7) |
18:29:56 | * | Ven joined #nim |
18:31:26 | * | vlad1777d quit (Quit: Leaving) |
18:41:09 | * | Ven quit (Ping timeout: 240 seconds) |
18:49:47 | * | Ven joined #nim |
18:52:35 | * | Ven quit (Read error: Connection reset by peer) |
18:54:42 | * | gokr joined #nim |
18:55:39 | subsetpark | If ExcB is object of ExcA, then if I have try... except ExcB... except ExcA, the except ExcA will never catch if ExcB catches, right? |
18:56:01 | * | deavmi__ joined #nim |
18:58:54 | PMunch | Hmm, I believe so |
19:07:36 | * | onionhammer quit (Read error: Connection reset by peer) |
19:08:31 | * | krux02 joined #nim |
19:09:56 | * | Ven joined #nim |
19:18:35 | SusWombat | If i import the same module multiple times it sitll ends up only once in the binary right? |
19:20:28 | krux02 | Well I am on an arch based distro, too |
19:21:05 | krux02 | just saw the conversation is almost three hours ago, so never mind |
19:21:48 | krux02 | SusWombat: yes |
19:22:01 | * | shashlick quit (Ping timeout: 240 seconds) |
19:22:01 | SusWombat | ok thanks |
19:22:27 | krux02 | I recommend you though to not make cyclic dependencies |
19:23:36 | * | shashlick joined #nim |
19:24:16 | FromGitter | <Varriount> cyclic dependencies are evil. |
19:24:29 | FromGitter | <Varriount> Or well, usually evil. Sometimes they can't be avoided. |
19:25:09 | * | Ven quit (Ping timeout: 240 seconds) |
19:29:30 | * | Ven joined #nim |
19:29:46 | SusWombat | cyclic dependencies? |
19:34:07 | SusWombat | anyone here using vscode? |
19:34:33 | SusWombat | can i get the autocomplete for modules aswell? like when i import a module |
19:35:34 | SusWombat | it works for the one in installed via nimble. But not for my own |
19:38:41 | ehmry[m] | if I have a function that I know will always fail at runtime, can I print a warning at compile time if this function is in use? |
19:38:59 | ehmry[m] | this is a platform specific thing |
19:40:46 | Araq | SusWombat: likely some --path issue? |
19:41:02 | * | nsf quit (Quit: WeeChat 1.7) |
19:41:02 | Araq | ehmry[m]: .error but then you get a compile-time error. |
19:41:11 | * | Ven quit (Ping timeout: 264 seconds) |
19:41:14 | Araq | or you misuse .deprecated |
19:41:32 | SusWombat | Araq, Il look into it thanks! :) |
19:41:51 | * | jonathon joined #nim |
19:41:51 | ehmry[m] | Araq: .deprecated wouldn't be that dishonest |
19:42:18 | ehmry[m] | but I'll try error first |
19:42:28 | Araq | ehmry[m]: .error is honest but you claimed it should produce a runtime error |
19:43:04 | Araq | btw platform specific code can also just be in a 'when defined(os_here)' |
19:43:13 | jonathon | can i get `nim e` to run a nim script that doesn't end in ".nims"? i get "invalid indentation" if e.g. i have a plain filename |
19:43:29 | ehmry[m] | Araq: yes, thats what I' |
19:43:55 | ehmry[m] | m using but I expect the proc to be called occasionally and the exception handled |
19:44:21 | Araq | strange setup. |
19:44:46 | Araq | "this occasionally fails at runtime so I warn you at compile-time about it"? |
19:45:13 | ehmry[m] | its a long story |
19:47:11 | * | Matthias247 joined #nim |
19:48:25 | ehmry[m] | anyway, would it conceivable to accept a PR that add an option to the compiler that would generate a Make recipe rather than invoke the external compiler? |
19:48:53 | ehmry[m] | I'm in a sticky situation and that might be my fix |
19:49:00 | Araq | jonathon: I dunno. |
19:49:44 | * | Ven joined #nim |
19:50:06 | zachcarter | I’m trying to translate some C code to Nim, can anyone tell me if this looks right ? |
19:50:13 | zachcarter | https://gist.github.com/zacharycarter/f7cd4abb6ee2fdda0b69162afb3e25fa#file-test-c-L46 vs https://gist.github.com/zacharycarter/f7cd4abb6ee2fdda0b69162afb3e25fa#file-conversion-nim-L38 |
19:50:49 | zachcarter | I’m not sure if https://gist.github.com/zacharycarter/f7cd4abb6ee2fdda0b69162afb3e25fa#file-conversion-nim-L40 is correct |
19:51:00 | krux02 | ehmry[m], you can tag the function as compileTime |
19:51:08 | krux02 | then it isn't even there at runtime |
19:51:13 | Araq | ehmry[m]: nope, just use --compileOnly and read nimcache/$project.json |
19:51:40 | Araq | and write something that translates the .json into makefile syntax or whatever |
19:53:36 | krux02 | zachcarter, that is a lot of code |
19:54:09 | zachcarter | it is, most of it’s just definitions though |
19:54:13 | zachcarter | I’m mostly just concerned about the functions |
19:54:20 | zachcarter | I included the structs for reference |
19:54:38 | ehmry[m] | Araq: yea, thats probably going to work, thanks |
19:54:42 | zachcarter | err the function - there’s only one in each snippet |
19:54:57 | Araq | zachcarter: use 'var MaxRectsRect' |
19:55:04 | Araq | skip the 'seq' |
19:55:09 | krux02 | looks ok to me |
19:55:19 | zachcarter | thank you Araq, |
19:55:23 | * | Ven quit (Ping timeout: 258 seconds) |
19:55:26 | Araq | in this case it's really a pointer to a pointer, not a pointer to an array |
19:55:35 | krux02 | well your seq is wrong |
19:55:37 | zachcarter | yeah that’s what was confusing the crap out of me |
19:56:25 | zachcarter | thank you both :) |
19:56:27 | Araq | it remains a mystery how one can design a programming with a flaw like that and yet win a Turing award for it. |
19:57:23 | krux02 | well the c programming language is actually quite nice and not overburdened with features, but it can't be fixed, because then it isn't C anymore |
19:58:45 | Araq | no, it's a defective broken version of Algol. the only innovations in it are design mistakes. |
20:00:16 | krux02 | I had a professor, who said that algol 68 is the nicest language |
20:00:44 | krux02 | better said he was my boss at the c++ classes |
20:01:21 | krux02 | is algol 68 really so good? |
20:01:27 | krux02 | I once tried it, but I failed |
20:03:22 | Araq | it was a superb language for the time, yes. |
20:09:10 | * | fvs left #nim ("leaving") |
20:09:49 | * | Ven joined #nim |
20:10:02 | zachcarter | never knew about algol 68 thank you guys for the history lesson :P |
20:15:47 | krux02 | I wonder if there is a simple way to enable the keyboard layout https://upload.wikimedia.org/wikipedia/commons/thumb/9/9f/APL-keybd2.svg/600px-APL-keybd2.svg.png |
20:15:53 | * | rauss joined #nim |
20:17:28 | * | brson quit (Ping timeout: 240 seconds) |
20:20:45 | krux02 | if that keyboard layout would have been standard today, symbols like && and || would never have been introduced as substitutions for ¬ ∨ ∧ |
20:21:24 | * | jabb joined #nim |
20:23:51 | Araq | v is a pretty ugly operator though, looks like the letter v |
20:24:14 | * | brson joined #nim |
20:24:50 | Araq | and recent studies showed that the brain is more in "language mode" than in "math mode" when programming, so natural language words like 'or' and 'and' seem to be less error prone |
20:24:54 | PMunch | krux02, probably a xmodmap file on Linux :) |
20:25:09 | PMunch | Araq, that's interesting |
20:25:38 | * | Ven quit (Ping timeout: 246 seconds) |
20:26:43 | Araq | krux02: I once thought of replacing 'if' with '?' and 'loop' with '@' |
20:26:58 | Araq | to have a language without english keywords |
20:26:59 | PMunch | krux02, apparently it's already shipped with many Linux distros. Just do setxkbmap apl :) |
20:27:28 | * | Arrrr quit (Read error: Connection reset by peer) |
20:27:45 | Araq | but it got ugly very fast :P what's the symbol for "function"/"proc"? |
20:28:09 | krux02 | ~_∊∊ ⎕↓⌊⎕ ~⌊∆ ⍳'_⌊⎕ ∆⍺⍴⍴_∆∆ |
20:28:16 | krux02 | ⌈ ⌊| ∘∇~ ⍵_'⍕ ↓⌊∪∪⍕∊⍕ ~'⌈⎕⌈∘⍳ ⌈∘ ⌊∪∊ |
20:28:22 | krux02 | ⌊∘⍎ ↓∇~ ⍎∇ ⌈ ∆~⌈⎕⍴↓ ⊤⌊⍴↑∆ |
20:28:25 | Araq | процедуре |
20:28:47 | PMunch | æøå :) |
20:28:54 | * | deavmi__ quit (Quit: deavmi__) |
20:29:10 | cheatfate | Araq, you can make language with greek symbols :) it will looks ancient :) |
20:29:15 | * | Ven joined #nim |
20:30:04 | PMunch | I actually thought about creating a mock up of source highlighting where not only colours but also typefaces were at play |
20:30:09 | Araq | Я пью пиво |
20:30:16 | PMunch | So say all your variables were a different font from your functions |
20:30:23 | PMunch | Just to see what it would look like |
20:31:02 | Vladar | https://en.wikipedia.org/wiki/Rapira |
20:31:12 | Araq | PMunch: nimsuggest lets you do this, in fact |
20:31:19 | krux02 | finally, when in apl mode, everything is those apl things |
20:31:20 | Araq | via the 'outline' command |
20:31:47 | krux02 | I copypasted my command thanks to the middle mouse button |
20:32:13 | * | rokups quit (Quit: Connection closed for inactivity) |
20:32:29 | cheatfate | Araq, russians already made ugly language with russian keywords and make it part of accountants software widely distributed (1C) |
20:32:34 | PMunch | Huh, interesting |
20:33:02 | cheatfate | its some sort of `basic` with russian keywords |
20:34:01 | krux02 | I like the way how scratch solves the language barrier: https://en.wikipedia.org/wiki/Scratch_%28programming_language%29 |
20:34:30 | jabb | C is life |
20:34:33 | krux02 | it uses nodes, not text to represent a program. Then it's just applying standard localization for the nodes and it's done |
20:38:26 | krux02 | how does this outline command do? |
20:39:59 | * | Ven quit (Ping timeout: 246 seconds) |
20:43:59 | Araq | krux02: it tells the editor "this is a var, this is a let, this is a proc" etc |
20:45:21 | krux02 | I rememebr that KDevelop has a very interesting feature, where every identifier is highlighted in a different color |
20:45:45 | krux02 | while I think that is a bit too much, I think it can be an advantage to know where identifiers come from |
20:45:52 | krux02 | for example one color per module |
20:46:14 | krux02 | or a different color when something is a direct member access or a proc that just looks like a member |
20:48:30 | krux02 | Araq: I have a horrible hack to get offsetof work at compile time: https://github.com/nim-lang/Nim/issues/5493 |
20:49:23 | * | Ven joined #nim |
20:50:29 | * | Nobabs27 joined #nim |
20:50:51 | Araq | krux02: congrats, you used the cache parameter of staticExec :-) |
20:51:35 | krux02 | yes I am happy that I found it |
20:52:32 | krux02 | because only because of it, I think doing this is actually practical |
20:56:39 | * | Ven quit (Ping timeout: 268 seconds) |
21:00:34 | krux02 | Araq: where does the name gorge from staticExec come from? |
21:01:18 | Araq | it was inspired by "slurp" |
21:01:53 | Araq | and "slurp" comes from "hmm, I'm out of synonyms for 'read'" |
21:02:19 | * | Ven joined #nim |
21:07:06 | krux02 | well I think staticExec is a bit more clear on what it does |
21:09:04 | * | zachcarter quit (Quit: zachcarter) |
21:09:26 | krux02 | I just looked up what that word means, I don't think it really fits the purpose |
21:12:15 | Araq | it doesn't, it's a bad pun |
21:12:46 | Araq | in fact, both slurp and gorge should be deprecated :P |
21:13:51 | FromGitter | <JorySchossau> :thumbsup: those names are definitely weird coming in to Nim for the first time. |
21:15:05 | krux02 | http://ix.io/oNy |
21:15:38 | krux02 | sorry unrealated, but that doesn't compile, but it's not really stopping me from anything because the working alternative is there, too |
21:15:49 | krux02 | but yea I actually do like slurp |
21:16:06 | krux02 | I actually imagine the compiler slurping in some text |
21:16:35 | krux02 | and then it's gone form the hard disk :P |
21:17:22 | krux02 | mut maybe it should be called staticRead instead |
21:18:35 | krux02 | wait that is how it is called :P |
21:36:14 | * | jonathon quit (Quit: Quit) |
21:38:29 | * | chemist69 quit (Ping timeout: 240 seconds) |
21:49:38 | * | bjz joined #nim |
21:54:44 | * | Nobabs27 quit (Quit: Leaving) |
21:59:02 | * | nsf joined #nim |
22:01:59 | jabb | nsf, you like nim and go? |
22:02:30 | * | Nobabs27 joined #nim |
22:05:49 | * | chemist69 joined #nim |
22:19:34 | odc | as a perl fan, I protest against the deprecation of slurp! ^^ |
22:20:27 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
22:21:34 | * | elrood quit (Quit: Leaving) |
22:26:26 | FromGitter | <JorySchossau> My wrapper runs great stand-alone, but I'm confused how to make it a module. Something to do with importcpp and codegen namespaces is messing me up. Sage comments would be greatly appreciated. Minimal example here: [https://forum.nim-lang.org/t/2833] |
22:27:37 | * | zachcarter joined #nim |
22:28:09 | * | byte512 quit (Ping timeout: 240 seconds) |
22:52:51 | * | Vladar quit (Remote host closed the connection) |
22:59:57 | krux02 | how do I use getAst? |
23:00:39 | Araq | JorySchossau: compile with 'nim cpp' |
23:00:48 | * | Jesin quit (Quit: Leaving) |
23:00:58 | Araq | krux02: getAst someTemplate(arg1, arg2) |
23:01:20 | krux02 | Araq: hmm, that is what I am doing and then I get "wrong number of arguments" |
23:04:54 | Araq | so pass the proper number of args to your template |
23:06:14 | krux02 | well I am not sure about the problem at the moment |
23:06:24 | krux02 | I just made an example to show what I mean, and there it works |
23:06:38 | krux02 | http://ix.io/oNM |
23:09:16 | nsf | jabb: I like Go |
23:09:22 | krux02 | Araq: well now I got the problem http://ix.io/oNN |
23:09:30 | nsf | jabb: and follow nim |
23:09:37 | nsf | don't use nim though |
23:09:57 | krux02 | I like nim, and follow Go |
23:10:04 | krux02 | but there is not much to follow though |
23:10:09 | krux02 | the language doesn't change |
23:12:31 | zachcarter | nsf: where is that convo coming from? |
23:12:41 | Araq | krux02: getAst doesn't do overload disambiguation |
23:12:49 | nsf | zachcarter: what are you talking about? |
23:12:57 | zachcarter | nsf: jabb: I like Go |
23:12:59 | zachcarter | who is jabb? |
23:13:08 | nsf | 03:00:41 jabb | nsf, you like nim and go? |
23:13:11 | krux02 | Araq: well that is what I need at the moment |
23:13:23 | zachcarter | oh I must have missed that, my bad |
23:13:38 | nsf | 03:26:20 --> | zachcarter ([email protected]) has joined #nim |
23:13:47 | nsf | indeed, but anyways, it's very late here as you can see |
23:13:50 | nsf | good night :) |
23:13:54 | zachcarter | gnight nsf! |
23:13:56 | * | nsf quit (Quit: WeeChat 1.7) |
23:14:11 | zachcarter | jabb: do you have questions about Nim vs Go? |
23:14:55 | jabb | nope! |
23:14:57 | krux02 | Araq: I have properties attached to types, by defining those templates as you can see in the example |
23:14:59 | zachcarter | ah okay |
23:15:22 | krux02 | now I am iterating the members of an object, and I need access to exactly that property |
23:15:36 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
23:16:17 | krux02 | it's nice that the ast has symbols for the type for all the members |
23:16:23 | krux02 | it's a weird iterator, but it works |
23:17:46 | * | butchster quit (Read error: Connection reset by peer) |
23:17:54 | krux02 | well I guess I have an idea |
23:17:56 | * | butchster joined #nim |
23:18:08 | krux02 | for once I thought getAst might be useful :P |
23:18:28 | Araq | I think you confuse getImpl and getAst |
23:18:44 | Araq | members do not have templates. |
23:22:16 | * | Matthias247 quit (Read error: Connection reset by peer) |
23:24:36 | * | yeeve quit (Ping timeout: 240 seconds) |
23:24:48 | krux02 | well members are symbols |
23:26:07 | krux02 | it's a bit complicated |
23:26:26 | krux02 | when you look at ComposedType |
23:26:38 | krux02 | I would like to pass ComposedType to the macro |
23:26:46 | krux02 | so that I can call getImpl on that |
23:26:48 | * | yeeve joined #nim |
23:26:54 | krux02 | then I can iterate the members |
23:27:07 | krux02 | and I also hay symbols for the type of the members |
23:27:11 | krux02 | so far so good |
23:27:46 | krux02 | I also have the requiredment that all types of the members of the Composed type have a template on them implemented, that returns a string |
23:28:44 | krux02 | now I want to collect those strings from all members |
23:28:55 | * | Pisuke joined #nim |
23:31:37 | * | MyMind quit (Ping timeout: 260 seconds) |
23:31:59 | * | gokr quit (Ping timeout: 256 seconds) |
23:36:31 | krux02 | http://ix.io/oNR |
23:37:57 | krux02 | Araq: I need it, so that I can create blocks for transform feedback https://www.khronos.org/opengl/wiki/Transform_Feedback |
23:38:56 | Araq | getImpl? |
23:39:15 | * | couven92 quit (Quit: Client Disconnecting) |
23:40:36 | Araq | the nimsuggest tests killed me, good night |
23:42:42 | krux02 | getImpl is not what i need :/ |