00:00:29 | * | chemist69 quit (Ping timeout: 258 seconds) |
00:00:52 | Xe | yes but you should be able to support this usecase even if it is weird |
00:01:27 | ftsf_ | Xe, sure, but someone's gotta do the work to implement it |
00:02:40 | ldlework | ftsf_: I love nim. I'm lifelong appreciator of the project from a conceptual point of view. |
00:02:55 | ldlework | I'm merely demonstrating something. |
00:02:58 | * | chemist69 joined #nim |
00:03:10 | ldlework | I migh even be wrong, never tried to install mono in a docker container |
00:03:12 | Xe | if it means modifying the `Addr -> FileDescriptor` function then allow it, etc |
00:03:16 | ldlework | (that part was super easy for nim) |
00:03:39 | ftsf_ | ldlework, i love nim too, but gotta understand it's young and you'll get frustrated from time to time and probably have to implement features yourself and give back to the project =) |
00:04:48 | * | bjz joined #nim |
00:04:54 | * | def-pri-pub quit (Quit: leaving) |
00:06:21 | ldlework | ftsf_: I'm almost 30, been writing code since I was 8 or so. I'm not without context. |
00:06:36 | ldlework | I'm merely demonstrating. Its objective data points. It doesn't admonish anyone. It orients. |
00:07:03 | ftsf_ | ack |
00:07:32 | ldlework | ok c-sharp compiler working in docker |
00:07:36 | ldlework | now to find docker client |
00:07:38 | ldlework | well |
00:07:43 | ldlework | lets try it just using an http client |
00:09:43 | ldlework | shit I forgot how to write a C# console app |
00:09:56 | ldlework | good thing the msdn is amazing |
00:37:26 | ldlework | this would have went wayyyy faster |
00:37:36 | ldlework | if I didn't systematically typo mcs for msc |
00:44:48 | * | girvo_ joined #nim |
00:53:29 | * | girvo_ quit (Ping timeout: 260 seconds) |
01:17:28 | ldlework | Welllllll |
01:17:42 | ldlework | apparently the C# world has never heard of a fucking domain socket either |
01:17:52 | * | ldlework wonders if he's dreaming. |
01:29:57 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
01:41:53 | * | girvo quit (Ping timeout: 246 seconds) |
01:46:19 | demi- | ftsf_: tbh, nim has been a great deal less frustrating than many languages i've used; been greatly enjoying that about it :) |
01:46:59 | Xe | ldlework: this kind of frustration is why i've ended up doing things in go :/ |
01:49:42 | ldlework | Xe: yeah its kinda ridiculous |
01:50:01 | ldlework | Xe it seems C# has the same problem |
01:50:12 | ldlework | it has no way to use its httpclient with domain sockets |
01:50:40 | ldlework | I suppose its a bit more shameful for Nim since it actually is a linux systems programming language |
01:50:49 | ldlework | And Windows doesn't even have domain sockets afaik |
01:50:51 | ldlework | lol |
01:53:43 | * | yeeve quit (Ping timeout: 256 seconds) |
01:58:30 | * | girvo joined #nim |
02:02:26 | ldlework | Xe: I take this problem simply does not exist for Golang? |
02:02:56 | Xe | ldlework: there's several packages for doing it and if you need to you can override that part of the HTTP client with your own Dialer |
02:03:14 | ldlework | haha god damn it |
02:03:21 | * | girvo quit (Ping timeout: 256 seconds) |
02:03:26 | ldlework | Xe: you busy today? |
02:03:42 | ldlework | wanna sprint this thing in Golang? |
02:03:49 | ldlework | I'm supposed to be learning Golang for work anyway |
02:04:56 | * | yeeve joined #nim |
02:07:13 | * | chemist69 quit (Ping timeout: 260 seconds) |
02:13:40 | * | vlad1777d quit (Remote host closed the connection) |
02:19:23 | * | bjz joined #nim |
02:22:32 | * | girvo joined #nim |
02:26:26 | ldlework | You know what would be a neat tool |
02:26:41 | ldlework | take some JSON and generate the nim types for deep unmarshaling |
02:26:55 | * | girvo quit (Ping timeout: 240 seconds) |
02:27:24 | Xe | ldlework: marshal in stdlib? |
02:27:29 | ftsf_ | ldlework, at compile time? |
02:27:32 | * | girvo joined #nim |
02:28:10 | Xe | ldlework: if this works still it will get you most of the way there: https://github.com/Xe/dev |
02:31:43 | ldlework | ftsf_: yeah |
02:31:52 | ldlework | take some known json, generate a schemea for it |
02:31:57 | * | girvo quit (Ping timeout: 260 seconds) |
02:32:04 | ldlework | so you can unmarshal arbitrary json trees into real types in nim |
02:32:07 | Xe | ldlework: kinda like json-to-go? |
02:32:10 | ldlework | so you don't have to use the json objects |
02:32:12 | ldlework | is that a thing? |
02:32:16 | Xe | yeah |
02:32:28 | ldlework | Oh golang |
02:32:31 | ldlework | stahp |
02:32:37 | ldlework | Xe: I'm gonna have to ignore you soon |
02:32:38 | Xe | go is kinda horrible, but the tools people have made make it the least painful thing to use |
02:32:41 | ldlework | And I really really like you |
02:32:44 | ldlework | lol |
02:32:59 | Xe | ldlework: ? |
02:33:31 | ldlework | haha I'm just kidding because you keep pointing to golang solutions of my problems and its grating (not really I'm kidding!) |
02:34:10 | Xe | oh no |
02:34:24 | Xe | i was more referring to the tools as comparators so i can fit things into my head |
02:34:36 | Xe | i usually have similar tools in other languages assicated with the one in go |
02:35:00 | Xe | it's so i can look for "how do i take <input> and get <output> with <constraints>?" |
02:35:05 | ldlework | Xe: docker outputs all sorts of ridiciulous arbitrary json you know |
02:36:16 | Xe | ldlework: life throws all kind of ridiculous arbitrary shit at you and the only viable solution is to take things a dat at a time and bit by bit or you'll blow your head off because of stress |
02:37:59 | ldlework | Xe: no I just mean, it'd be cool to have a json-to-nim so we'd get nice type safe objects when we parse its json |
02:38:39 | Xe | yeah |
02:39:11 | ldlework | Xe: I bet there's some crazy Nim thing that would make it like 20 line long lol |
02:42:25 | ldlework | Xe: I mean, couldn't we just load a jsonfile during compilation and use a macro to generate a type? |
02:42:29 | ldlework | I've done crazier shit |
02:42:41 | Xe | well |
02:42:43 | Xe | that's an idea |
02:42:48 | ldlework | hehe |
02:43:04 | Xe | compile time expansion of swagger json into full fledged api clients |
02:43:12 | ldlework | hah |
02:43:25 | ldlework | I wonder if the docker api has a swagger definition |
02:43:29 | ldlework | that'd be nuts ! |
02:44:26 | ldlework | whaaa https://github.com/docker/docker/blob/master/api/swagger.yaml |
02:47:07 | ldlework | I can't do a swagger thingie right now |
02:47:11 | ldlework | but neat to know the option is there |
02:47:16 | ldlework | I bet nim magic might make it easy |
02:53:11 | * | chemist69 joined #nim |
03:00:51 | * | girvo joined #nim |
03:05:33 | * | girvo quit (Ping timeout: 260 seconds) |
03:06:33 | * | lenstr quit (Ping timeout: 260 seconds) |
03:10:40 | * | girvo joined #nim |
03:16:11 | * | Nobabs27 joined #nim |
03:26:38 | * | cheatfate quit (Read error: Connection reset by peer) |
03:26:43 | * | cheatfate_ joined #nim |
03:27:01 | * | cheatfate_ is now known as cheatfate |
03:34:26 | * | def-pri-pub joined #nim |
03:35:47 | * | kulelu88 quit (Quit: Leaving) |
03:43:58 | * | bozaloshtsh quit (Ping timeout: 240 seconds) |
03:44:27 | * | bozaloshtsh joined #nim |
04:15:33 | * | bozaloshtsh quit (Ping timeout: 260 seconds) |
04:30:24 | * | def-pri-pub quit (Quit: Lost terminal) |
04:31:13 | * | bozaloshtsh joined #nim |
04:37:29 | * | girvo quit (Ping timeout: 260 seconds) |
04:41:25 | * | bozaloshtsh quit (Ping timeout: 240 seconds) |
04:47:57 | ldlework | Does unmarshalling simply not work if there is extra data in the serialized data or something? |
04:48:59 | ldlework | Anyone? |
04:49:04 | * | Nobabs27 quit (Quit: Leaving) |
04:49:11 | ldlework | Its been a whole minute. |
04:49:19 | ldlework | HELLO!? |
04:49:22 | ldlework | ;) |
04:53:00 | ftsf_ | ldlework, correct |
04:53:12 | ftsf_ | it's annoying, i patched it so it ignored it =) |
04:56:56 | ldlework | ftsf_: can you share? |
04:56:58 | * | yeeve quit (Ping timeout: 240 seconds) |
04:57:06 | ftsf_ | not currently |
04:57:11 | ldlework | ...? |
04:57:16 | ftsf_ | i'm at work |
04:57:38 | ldlework | https://gist.github.com/ |
04:57:46 | ldlework | https://gist.github.com/dustinlacewell/ec6951a21b3cf08da74751d0d8f5ffa9 |
04:57:51 | ldlework | how do I get this out as an int |
04:57:56 | ldlework | wtf is BiggestInt |
04:58:10 | ldlework | Nim is freaking crazy town |
04:58:27 | ldlework | I seriously just wanna work with some json |
04:58:53 | * | girvo joined #nim |
04:58:59 | ftsf_ | getNum() doesn't work? |
04:59:29 | ldlework | It returns BiggestInteger |
04:59:33 | ldlework | whatever the hell that is |
04:59:41 | ftsf_ | a type of int |
04:59:46 | ldlework | I just want int |
04:59:51 | ldlework | cuz that's what my type is |
04:59:55 | ftsf_ | getNum().int |
05:00:11 | ldlework | got (BiggestInt) but expected 'int' |
05:00:20 | ldlework | the compiler can't figure that out? |
05:00:33 | ftsf_ | seems not |
05:00:41 | ftsf_ | you need to be explicit |
05:01:01 | ftsf_ | potential for data loss i guess? |
05:01:03 | ldlework | Nim is the only language I use where I have to care about int types |
05:01:21 | ftsf_ | try C =) |
05:01:40 | ftsf_ | C doesn't force you to think about it until stuff breaks |
05:01:51 | ftsf_ | nim forces you to think about it before it breaks |
05:02:06 | ldlework | I dunno why you think comparing Nim to one of the first languages that has no features is a good idea |
05:02:11 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
05:02:19 | zachcarter | because Nim compiles to it? |
05:02:42 | zachcarter | I don’t think having to think about int types at the time of writing code is a band thing |
05:02:45 | zachcarter | bad thing* |
05:03:16 | ldlework | Nim compiling to C isn't a justification for anything that Nim does. |
05:03:27 | zachcarter | what? |
05:03:34 | ftsf_ | nim and C are both statically typed languages that run on baremetal |
05:03:35 | ldlework | Its clear english. |
05:03:42 | zachcarter | it’s not logical English |
05:03:55 | ldlework | You can disagree; it is surely coherent language. |
05:04:10 | zachcarter | that’s what I”m doing then :P |
05:04:21 | * | tax quit (Quit: Leaving) |
05:04:28 | ldlework | Saying, "Nim must work this way because it compiles to C" |
05:04:45 | ldlework | is instantly refuted by showing "Nim can do this despite C not being able to do this." |
05:05:06 | ldlework | Having C as a transpiling intermediary has nothing to do with the behavior of Nim as designed. |
05:05:07 | zachcarter | You can build abstractions |
05:05:14 | ldlework | Ah glad you agree. |
05:05:21 | * | yeeve joined #nim |
05:05:34 | ldlework | Nim is that abstraction, and so I'm just pointing out the reason you gave for why nim works this way is bad. |
05:05:51 | zachcarter | I think you’re over-generalizing but okay |
05:06:03 | ldlework | Its actually the most specific point I can make |
05:06:34 | ldlework | Anyway! |
05:06:58 | zachcarter | yeah I have better things to fight than you at the moment :P |
05:07:06 | zachcarter | like opengl code |
05:07:16 | * | user0_ joined #nim |
05:07:42 | user0_ | I'm very fascinated with Nim. |
05:07:51 | user0_ | How close are we to v1.0? |
05:08:00 | zachcarter | there’s a roadmap on github user0_ |
05:08:15 | zachcarter | that’s the short answer, I don’t know what the long answer is |
05:08:55 | ldlework | ftsf_: heh I wish I had that patch :( |
05:09:30 | ftsf_ | ldlework, for clarity, i'm using the marshal module not the json module |
05:09:48 | ftsf_ | i vendored it and then modified it to ignore the errors |
05:18:18 | ldlework | ftsf_: yeah that's what I want |
05:18:21 | ldlework | partial unmarshaling |
05:28:22 | ldlework | I don't understand marshal.nim |
05:28:25 | * | ldlework sighs |
05:28:54 | ftsf_ | just use it and when you see exceptions raised, put them in a try =) |
05:29:35 | ldlework | I don't know what you ean just use it |
05:29:38 | ldlework | I've written a type |
05:29:44 | user0_ | zachcarter: I just read the roadmap. I'm still fascinated. I learned python as my first programming language. But after I started to learn other languages I realized python is pretty slow. *To me*, Nim is the perfect combination of comfort and speed. |
05:29:49 | ldlework | and I'm using to[TheType](the_data) |
05:29:51 | ldlework | no errors |
05:30:00 | ftsf_ | ldlework, if no errors then great |
05:30:05 | ldlework | and yet the return value's fields are all empty |
05:30:15 | zachcarter | user0_ it’s a great language in my opinion, I’m working on a 2d game framework at the moment using Nim |
05:30:27 | zachcarter | very few complaints about the language thus far for my use case |
05:30:34 | ldlework | ftsf_: https://gist.github.com/dustinlacewell/e4b18274d3aa2624a299a01b5c5cb673 |
05:30:39 | ftsf_ | ldlework, try load |
05:30:43 | ldlework | I did |
05:31:21 | ldlework | this language drives me crazy |
05:31:27 | user0_ | zachcarter: Nice. I want to start my personal project. It's a text editor written in D. Am I too crazy to implement a plugin system (or plugins) written in Nim as opposed to python? I know python has larger libraries but I want performance not latency. |
05:31:35 | ftsf_ | var foo: Foo; load("foo.json", foo) ? |
05:31:56 | ldlework | ftsf_: there is no file |
05:32:02 | ldlework | I'm querying a service |
05:32:08 | ldlework | you want me to write the json to a file first? |
05:32:27 | ftsf_ | the first argument is a stream |
05:32:39 | zachcarter | I don’t think so user0_ I believe demi- was talking earlier today about writing a plugin system |
05:32:44 | ldlework | is a string a stream? |
05:33:16 | ftsf_ | no, but i think there's a StringStream type |
05:33:26 | ftsf_ | https://nim-lang.org/docs/streams.html |
05:33:46 | ftsf_ | var ss = newStringStream(mystring) |
05:35:00 | ldlework | ftsf_: no error but still no data in the actual object |
05:35:11 | ldlework | and if I print the json, its full of data |
05:35:21 | ldlework | so I think marshal is silently failing |
05:35:27 | user0_ | zachcarter: Fantastic. I'll stick around. |
05:35:42 | ftsf_ | mysterious |
05:36:03 | ldlework | ftsf_: do you have docker? |
05:36:07 | ftsf_ | ldlework, nope |
05:36:43 | ftsf_ | user0_, you can compile libraries (.so/.dll) and load them |
05:37:38 | ftsf_ | user0_, https://nim-lang.org/docs/dynlib.html |
05:37:53 | ldlework | ftsf_: I could embed the json into theh file |
05:38:13 | ftsf_ | https://forum.nim-lang.org/t/1400 |
05:38:39 | ftsf_ | which file? |
05:38:55 | zachcarter | user0_ sweet :) |
05:39:07 | user0_ | Awesome, thanks ftsf_ |
05:39:25 | ldlework | https://gist.github.com/dustinlacewell/8ea556eebe6d3eb689cfa672521094d7 |
05:39:40 | ldlework | ftsf_: this hardcodes the json |
05:39:54 | ldlework | just run `./dmt ls` |
05:39:57 | ldlework | after compiling |
05:40:54 | ldlework | oops I left in an echo statement |
05:41:10 | * | bozaloshtsh joined #nim |
05:41:15 | ldlework | updated |
05:41:24 | ldlework | if you run ./dmt ls you wont get any output |
05:41:32 | ldlework | even though that causes it to unmarshal that json |
05:43:29 | ftsf_ | Error: unhandled exception: invalid field name: ID [ValueError] |
05:44:15 | ldlework | for what |
05:44:43 | ftsf_ | when running ./docker ls |
05:45:15 | ldlework | sure, but what's the error |
05:45:18 | ldlework | location |
05:45:21 | ldlework | the nature of it |
05:45:29 | * | bjz quit (Ping timeout: 240 seconds) |
05:45:43 | ftsf_ | DMed |
05:45:58 | * | bjz_ joined #nim |
05:46:50 | ldlework | ugh I badly wanna give up on this |
05:46:58 | ldlework | how hard could it be to read some json and deserialize it |
05:47:00 | ldlework | ffs |
05:47:43 | ftsf_ | you need to use object not tuple |
05:47:50 | ftsf_ | tuple loses the field names |
05:48:32 | ldlework | didn't fix it |
05:48:56 | ftsf_ | gives another similar error for ContainersStopped |
05:49:43 | ftsf_ | typo in your DockerInfo |
05:49:45 | ftsf_ | ConstinersStopped |
05:50:09 | ldlework | how come I don't get these errors? |
05:50:14 | ftsf_ | i don't know... |
05:50:20 | ftsf_ | what happens when you run it? |
05:50:31 | ldlework | I get no output |
05:50:54 | ftsf_ | i get it echoing the json input and then the error |
05:51:03 | ldlework | this version https://gist.github.com/dustinlacewell/7367904089b39215161237cd48ad019b |
05:51:09 | ldlework | use this |
05:51:14 | ldlework | it wont try to create a home directory its |
05:53:56 | ftsf_ | Error: unhandled exception: invalid field name: DriverStatus [ValueError] |
05:54:10 | ldlework | how are you getting these errors? |
05:54:16 | ldlework | I dont understand this whatsoever |
05:54:23 | ldlework | Hint: operation successful (44318 lines compiled; 1.050 sec total; 95.059MiB; Debug Build) [SuccessX] |
05:54:25 | ldlework | ~/s/n/dmt $ ./dmt ls |
05:54:27 | ldlework | nothing |
05:54:45 | ldlework | how are you compiling it and running it |
05:55:02 | ftsf_ | nim c -r docker ls |
05:55:27 | ldlework | me too |
05:55:30 | ldlework | what version of nim? |
05:55:39 | ftsf_ | 0.16.0 |
05:55:49 | ldlework | how can this be explained? |
05:56:22 | ftsf_ | what is dmt? |
05:57:20 | ldlework | its just the name of the app I'm writing |
05:57:36 | ldlework | you have the full source code |
05:57:48 | ftsf_ | ok |
06:00:36 | ldlework | dunno, I think I give up on Nim for another couple years |
06:01:06 | ftsf_ | also maybe try back later when the americans and europeans are online |
06:01:16 | ftsf_ | rather than the 2-3 active people here at this time |
06:01:52 | * | rosshadden quit (Quit: WeeChat 1.7) |
06:01:54 | ldlework | Dunno, Nim has a strange attitude that, if someone figured it out, and it worked once, then that's literally all we can ask for |
06:02:48 | * | user0_ quit (Quit: user0_) |
06:02:56 | * | user0_ joined #nim |
06:03:13 | ldlework | it doesn't even ship its own package manager |
06:04:10 | ldlework | I love to hate on golang, I just feel utter sorrow to hate on Nim |
06:05:15 | ldlework | Oh look, Nim does bundle Nimble now but you have to go to the Nimble repo to find that out |
06:05:31 | ldlework | its just like they have no awareness of user experience |
06:06:18 | tstm | ldlework: I'm pretty sure feedback on that is greatly appreciated. |
06:06:37 | ftsf_ | feedback and also work fixing it =) |
06:07:00 | tstm | May of the users of nim are quite savvy and thus don't necessarily notice the hurdles of starting with nim. |
06:08:21 | ldlework | I've been writing software for 15 years |
06:09:15 | ldlework | If they spent more than 0% effort/time, as in, it was literally part of the required process of managing the project, things would be a lot nicer. |
06:10:01 | ldlework | If I can't download your language, and download a json file from a URL and parse it into a type-safe structure in <20 minutes, your shit is fucked. |
06:10:30 | ldlework | There may be many reasons why one's shit is fucked, but none of thoses reasons magically un fuck the shit, so to speak. |
06:11:45 | tstm | For sure. |
06:11:52 | ftsf_ | there's a reason it's alpha |
06:13:05 | ftsf_ | there's a lot of room for improvement, but if you're keen then i'm sure your help would be appreciated. if not, come back in a while once it's stable |
06:13:54 | ftsf_ | i've been using it happily for my own projects for some time with the occasional hurdle, which i can usually work around or get help with here. |
06:14:36 | ldlework | I've written a lot of code in Nim myself |
06:14:57 | ldlework | But its always through blood, sweat, and literally blind-folded traversal of rooms I've never seen before. |
06:15:05 | ldlework | The compiler messages are utterly mysterious |
06:15:22 | ldlework | I know that when the westerners wake up tomorrow they will explain why things are the way they are |
06:15:40 | ldlework | Or even some small simple thing I missed, but I dunno how long it'll take before they realize that isn't the point |
06:17:31 | ldlework | I'll just use JsonNode to get on with life |
06:17:42 | ldlework | (literally interface{} all over again!) |
06:19:39 | tstm | ldlework: Is your input json serialized with marshal or just some json you've written? |
06:20:58 | ldlework | tstm: Its json from a server |
06:21:01 | ldlework | service |
06:21:15 | ldlework | I expect it would say "Woah, your nim type doesn't define X field." |
06:21:19 | tstm | (dislaimer: I know next to nothing about the subject) |
06:21:21 | ldlework | or something, its just does nothihng |
06:21:47 | ftsf_ | ldlework, which is what I got when I ran your code |
06:21:52 | ftsf_ | not sure why it's not doing it for you |
06:21:56 | tstm | Yeah. I'd expect marshal to be pretty dependant on its own structure, whatever it uses for serialization. |
06:21:59 | ldlework | ftsf_: yes I am boggled. |
06:24:31 | FromGitter | <Varriount> ldlework: Pull request? |
06:25:21 | ldlework | Varriount for what? |
06:29:35 | ldlework | ftsf_: on interesting thing is that if I put some echo's after that deserialization line they don't get output |
06:29:43 | ldlework | I wonder if the error is taking place and I'm just not seeing it |
06:29:59 | ftsf_ | running on linux? |
06:34:13 | ldlework | yeah |
06:39:49 | ldlework | yyyyyeap fuck this |
06:46:56 | * | nsf joined #nim |
07:15:10 | zachcarter | Cool truetype font loading via freetype and rendering is a thing now - http://imgur.com/a/6YZ28 |
07:24:38 | * | user0_ quit (Read error: Connection reset by peer) |
07:24:47 | * | user0_ joined #nim |
07:28:11 | * | ftsf_ quit (Quit: :q!) |
07:31:45 | * | Vladar joined #nim |
07:34:15 | * | couven92 joined #nim |
07:34:24 | Araq | ldlework: what's the problem? missing json.toNim ? |
07:34:51 | * | girvo quit (Ping timeout: 256 seconds) |
07:35:36 | tstm | Araq: I think the problem was that marshal didn't give any sensible error messages for whatever reason. |
07:35:45 | tstm | it did for the other guy |
07:36:20 | tstm | But, marshal was used because of lack of json.toNim |
07:38:25 | Araq | yeah, maybe I can implement that later |
07:40:54 | stisa | There's https://github.com/cjxgm/jsonob that should do json->nim |
07:44:01 | * | tankfeeder joined #nim |
07:47:10 | Araq | "Dunno, Nim has a strange attitude that, if someone figured it out, and it worked once, then that's literally all we can ask for". I have no idea what that's supposed to mean. |
07:51:17 | * | chemist69 quit (Ping timeout: 256 seconds) |
07:53:06 | * | gokr joined #nim |
07:56:28 | * | chemist69 joined #nim |
07:56:48 | ldlework | Araq: There's no knowledge transfer |
07:56:59 | ldlework | The docs just report what is |
07:57:25 | ldlework | I gave up, and having lots of success in Python |
07:58:15 | Araq | sure but that doesn't mean I don't want to improve the experience. |
07:59:39 | Araq | so there is no knowledge transfer and the docs just report what is. well what should they report instead? |
08:01:23 | ldlework | Araq: I'm just saying, has no one ever tried to download nim, download a some json from a web service and deserialize into types? |
08:01:55 | ldlework | Either I'm stupid, my machine is strangely configured, people have tried and failed and were unheard, or literally no one has tried this before. |
08:02:17 | ldlework | I dunno which it is, but everytime I try Nim its a test of my loyalty to the concept of the project. |
08:03:21 | Araq | I think it's "people noticed it's missing and wrote their own json->object proc" |
08:03:41 | ldlework | I just hope one day I will try Nim randomly, and miraculously get a bunch of work done. |
08:04:12 | Araq | well actually I *know* people created better de/serialization and do not share it ;-) |
08:09:20 | * | Arrrr joined #nim |
08:09:20 | * | Arrrr quit (Changing host) |
08:09:20 | * | Arrrr joined #nim |
08:09:55 | * | xet7 quit (Quit: Leaving) |
08:09:59 | Araq | so ... where should we document that Nim ships with nimble? tutorials? |
08:10:24 | Araq | search index? |
08:11:13 | * | xet7 joined #nim |
08:12:57 | Araq | hmm github lets me resolve merge conflicts on their site now. impressive job. |
08:22:35 | * | zachcarter quit (Quit: zachcarter) |
08:24:29 | * | bozaloshtsh quit (Ping timeout: 240 seconds) |
08:28:00 | * | Andris_zbx joined #nim |
08:33:48 | ftsf | Araq, did it work out for you? i tried that in the past and it didn't work... ended up having to resolve it locally anyway |
08:34:16 | Araq | seems so, yes, the CI is still running though. |
08:37:58 | cheatfate | Araq, looks like zahary wants to break my `asyncpg` again :) |
08:38:33 | cheatfate | so it looks like macros is the most unstable part of Nim |
08:38:40 | Araq | hey #nim, stop talking in riddles please. |
08:39:01 | Araq | cheatfate: why? do you check for nkBracket in your macros? |
08:39:08 | cheatfate | yep |
08:39:57 | Araq | I can patch the code for you. ``n.kind in {nkBracket, nkArgList}`` |
08:40:25 | Araq | <-- compatible with upcoming Nim version and older Nim versions |
08:40:37 | cheatfate | ok, then |
08:41:49 | * | rokups joined #nim |
08:43:03 | cheatfate | Araq, is it possible to have this workaround in macros docs? |
08:46:31 | Araq | you keep asking me for making the stdlib explain the basics of the programming language to you, but fine. |
08:47:49 | Araq | ^ this 'you' here refers to #nim |
08:48:01 | Araq | in general. |
08:48:29 | ftsf | more examples in stdlib docs would probably do wonders |
08:49:02 | ftsf | bonus points if they're also tests =) |
08:49:20 | FromGitter | <dom96> It really pains me to see ldlework trying to read JSON using the marshal module. |
08:49:28 | FromGitter | <dom96> That's not what the marshal module is for! |
08:49:35 | ftsf | dom96, sorry, that was my suggestion as it worked for me |
08:50:02 | FromGitter | <dom96> I see. |
08:50:15 | FromGitter | <dom96> We need a large warning in marshal against this I guess. |
08:50:55 | FromGitter | <dom96> And a way to actually read/write JSON this way |
08:51:00 | * | xet7 quit (Quit: Leaving) |
08:57:04 | Araq | yup. |
08:59:15 | FromGitter | <dom96> Examples would help indeed. The JSON examples are a mess IMO https://nim-lang.org/docs/json.html |
08:59:38 | FromGitter | <dom96> Compare to httpclient docs https://nim-lang.org/docs/httpclient.html |
09:00:20 | FromGitter | <dom96> It's not just about examples, it's also about how you present them. |
09:02:00 | FromGitter | <dom96> @ldlework this is not how you should be deserialising JSON in Nim. |
09:02:58 | FromGitter | <dom96> How would you do it in Python? |
09:03:21 | * | bjz_ quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
09:04:05 | FromGitter | <dom96> In fact, you shouldn't be deseralising at all. |
09:06:37 | * | Salewski joined #nim |
09:07:15 | Salewski | Araq, I am a bit confused about latest nimsuggest error text format... |
09:07:22 | Salewski | Strings I get from reading socket look like this when echoed: |
09:07:31 | Salewski | "\'s\' is declared but not used [XDeclaredButNotUsed]" |
09:07:35 | Salewski | literal(0))\x0Abut expected |
09:07:45 | Salewski | So I do now 3 replace operations before displaying erros in tooltip: |
09:07:53 | Salewski | if doc[0] == '"' : doc = doc[1 .. ^2] |
09:08:01 | Salewski | doc = doc.replace("\\'", "'") |
09:08:11 | Salewski | doc = doc.replace("\\x0A", "\n") |
09:08:16 | ldlework | dom96 what kind of advice is that |
09:08:17 | Salewski | But ok, when that is intended I am fine. |
09:08:45 | ldlework | I'm not "trying to read json using the marshal module" |
09:09:00 | ldlework | I'm trying to get type-safe json, for which has a rigid and stable schema. |
09:09:07 | ldlework | Your pitty is kind of patronizing. |
09:09:51 | ldlework | I wouldn't do this in Python because python has no type safety. If I really wanted it, I'd invent some sort of JSON schema non-sense. |
09:10:00 | Araq | Salewski: it's always in quotes, I think? |
09:10:23 | ldlework | But I figure, I can write some simply Nim types, and deserialize Docker's standard REST responses to actual types so I can use dot-notations and so on |
09:10:25 | Salewski | Yes, always i "" |
09:10:31 | ldlework | And to implement methods against them. |
09:10:38 | ldlework | dom96: still feel the same? |
09:10:43 | Araq | ldlework: "dom96, sorry, that was my suggestion as it worked for me" |
09:10:57 | Araq | I think he also referred to this statement |
09:11:28 | stisa | Idlework: https://gist.github.com/stisa/fa48fb24ba0929b42c7b39b2a0505029 do you mean something like this for json->object ? |
09:12:18 | ldlework | stisa: yeah, its called the Marshall Module. |
09:12:55 | ldlework | I assumed that since I did not totally define every single field, and every nested possible json object with a corresponding Nim type I would get errors |
09:13:09 | ldlework | But I just got silence and we couldn't figure out why I wasn't getting errors so I moved on |
09:13:12 | ldlework | I'll visit it again |
09:13:27 | ldlework | But "oh my god that's not what marshalling is for!" isn't the right thing. |
09:14:02 | * | bjz joined #nim |
09:14:26 | stisa | oh sorry, I must have missed part of the conversation |
09:14:38 | ldlework | If I figure it out, I'll make sure to come back and report what I come up with |
09:15:25 | * | user0_ quit (Quit: user0_) |
09:19:55 | FromGitter | <dom96> Sorry, I didn't mean to be patronizing. I just got a bit annoyed. |
09:20:54 | FromGitter | <dom96> The marshal module is essentially a pickle module. |
09:21:04 | FromGitter | <dom96> Perhaps we should rename it? |
09:21:37 | FromGitter | <dom96> That said, the name "marshal" doesn't imply that it handles JSON. |
09:23:33 | FromGitter | <dom96> But sure, we need something like that for JSON in the stdlib. |
09:25:55 | * | Salewski left #nim (#nim) |
09:32:51 | Arrrr | If the problem is that in the future it may change its internal representation, you might allow several backends. |
09:58:15 | * | bozaloshtsh joined #nim |
10:00:00 | * | vlad1777d joined #nim |
10:00:38 | * | chemist69 quit (Ping timeout: 246 seconds) |
10:03:56 | * | chemist69 joined #nim |
10:37:41 | * | arnetheduck joined #nim |
11:02:16 | * | Snircle joined #nim |
11:09:28 | * | couven92 quit (Quit: Client disconnecting) |
11:16:00 | * | couven92 joined #nim |
11:16:53 | * | fredrik92 joined #nim |
11:20:49 | * | couven92 quit (Ping timeout: 240 seconds) |
11:42:33 | * | fredrik92 is now known as couven92 |
11:44:16 | * | couven92 quit (Quit: Disconnecting) |
11:44:42 | * | couven92 joined #nim |
12:00:45 | * | zachcarter joined #nim |
12:04:58 | * | zachcarter quit (Ping timeout: 240 seconds) |
12:11:48 | * | couven92 quit (Quit: Disconnecting) |
12:19:17 | * | zachcarter joined #nim |
12:40:29 | * | Arrrr quit (Ping timeout: 260 seconds) |
12:44:10 | * | def-pri-pub joined #nim |
12:50:18 | def-pri-pub | Hey, morning guys. I got around to doing another Nim article. This one is a tutorial instead: https://16bpp.net/page/hot-loading-code-in-nim |
12:57:25 | * | elrood joined #nim |
12:57:57 | Araq | def-pri-pub: I like it but the compiler can easily make this easier |
12:58:07 | Araq | want to patch the compiler? |
12:58:34 | Araq | I can guide you but I don't want to do it myself |
13:00:38 | FromGitter | <Varriount> dom96: Did you just change the documentation on the marshal module? |
13:01:51 | FromGitter | <Varriount> Or has the warning "The serialization format could change in future!" always been there? |
13:05:53 | FromGitter | <Varriount> ldlework: If you don't mind using yaml (which is a superset of json) NimYaml does what you want. |
13:05:57 | FromGitter | <Varriount> https://nimyaml.org |
13:09:06 | def-pri-pub | Araq: I bet it could. I'm far too busy right now to hack up the compiler to do that |
13:10:12 | def-pri-pub | I'd rather make a system that operates a little better first, |
13:10:32 | def-pri-pub | Or some sort of "easy hot loading," package for nimble |
13:11:56 | flyx | ldlework, I can confirm the NimYAML will do exactly what you expect for JSON deserializing, including emitting an error for missing / superfluous fields |
13:13:00 | flyx | if it hadn't the YAML data stream as intermediate representation, it would be a general serialization library which happens to have a YAML backend ^^ |
13:16:29 | FromGitter | <Varriount> flyx: I've probably said this before, but NimYAML is an awesome module. |
13:19:06 | flyx | heh, thanks. |
13:22:37 | * | zachcarter quit (Quit: zachcarter) |
13:46:18 | def-pri-pub | Araq: actually, how could the compiler make this easier? I mentioned that I would like a system that could detect changes in the code, instead of file write times. Can you elaborate on this a little? |
13:46:51 | Araq | def-pri-pub: system.reloadDlL(name) |
13:47:02 | Araq | requires codegen support though. |
13:47:22 | Araq | but it should be a simple patch, we already use dlsym under the hood for .dynlib |
13:47:57 | Araq | the loading code needs to be moved into a generated C function that system.reloadDll calls again |
13:48:24 | def-pri-pub | Where is reloadDll located in the Nim source? A gitHub code search didn't reveal any results. |
13:50:51 | Araq | well it doesn't exist. |
13:50:56 | Araq | I'm asking you to implement it. |
13:51:00 | def-pri-pub | ah |
13:53:02 | def-pri-pub | Would this proc then also reset all of the function pointer symbols it grabbed from the first load? That's one of the issues that I see. |
13:53:27 | rokups | Araq: did you see https://github.com/nim-lang/Nim/issues/5507 ? |
13:54:49 | Araq | def-pri-pub: yes, it would. that's its whole point |
13:57:13 | def-pri-pub | Okay, I'll think about it, but don't except too much from me (busy workin'). Do you think this would be done in pure Nim or C? |
13:58:59 | Araq | don't be silly. we don't write C here. |
13:59:17 | Araq | it would be a compiler patch, the compiler is written in Nim. |
14:00:02 | * | IrcDroidClient joined #nim |
14:00:50 | * | IrcDroidClient quit (Remote host closed the connection) |
14:06:17 | def-pri-pub | Araq: can I do it in Haskell instead :) |
14:23:21 | Vladar | Any Linux users wanna test out my attempt at packing AppImage game? https://github.com/Vladar4/ng2planetoids/blob/master/ng2planetoids-i386.run |
14:23:44 | Vladar | waisted 3 days trying to figure it out |
14:24:44 | * | zachcarter joined #nim |
14:25:05 | * | elrood quit (Quit: Leaving) |
14:39:00 | def-pri-pub | Vladar: |
14:39:06 | def-pri-pub | I dl'd it |
14:39:13 | def-pri-pub | chmod u+x'd it |
14:39:18 | def-pri-pub | and tried to run it. |
14:39:20 | def-pri-pub | Got this: |
14:39:24 | def-pri-pub | bash: ./ng2planetoids-i386.run: No such file or directory |
14:39:53 | def-pri-pub | ¯\_(ツ)_/¯ |
14:41:53 | Vladar | that's… strange. what ls tells? |
14:42:29 | Vladar | even ls -la |
14:47:41 | Vladar | def-pri-pub: ? |
14:48:28 | def-pri-pub | It says that it's marked as executable |
14:49:02 | Vladar | could you give me the output of ls -la? |
14:49:59 | def-pri-pub | -rwxrw-r-- 1 ben ben 1541392 Mar 13 10:38 ng2planetoids-i386.run |
14:51:17 | Vladar | hm, let me check something… |
14:53:03 | Vladar | ok, I think I know why |
14:53:28 | flyx | well it is a 32bit executable, it naturally does not work in 64bit environments |
14:55:05 | Vladar | actually, it should |
14:55:23 | Vladar | here's the correct link https://github.com/Vladar4/ng2planetoids/blob/master/ng2planetoids-i386.run?raw=true |
14:56:04 | Vladar | def-pri-pub: what about now? |
14:57:31 | ftsf | dlopen(): error loading libfuse.so.2 |
14:57:36 | ftsf | AppImages require FUSE to run. |
14:57:49 | Vladar | yes, you should have fuse installed |
14:58:11 | * | nsf quit (Quit: WeeChat 1.7) |
14:58:27 | Vladar | 32bit one, probably |
14:58:31 | ftsf | i do, but no lib32-fuse available on arch it seems |
14:58:41 | Vladar | it is on aur |
14:59:12 | ftsf | "Linux apps that run anywhere" hehe |
14:59:23 | ftsf | sadly still not that easy |
14:59:33 | Vladar | better than nothing, I guess ) |
14:59:47 | federico3 | Vladar: have you looked into flatpak? |
14:59:49 | ftsf | Error: unhandled exception: No such file or directory [OSError] |
14:59:50 | ftsf | runs now |
14:59:55 | ftsf | but gives that, echos -1 |
15:00:24 | ftsf | best i've found is a shell script that sets the library path and executes the correct binary for the platform |
15:00:43 | ftsf | and just distribute a tar.gz |
15:00:48 | Vladar | ftsf: flatpak requires flatpak installed, IIRC |
15:00:52 | demi- | is there any IPC mechanism in nim's standard library yet? |
15:01:14 | demi- | or would i have to fall back on whatever is available on my specific platform |
15:01:54 | federico3 | Vladar: it does - however it looks like distributions are shipping it |
15:03:30 | Vladar | ftsf, what are you running, btw? arch? |
15:04:08 | ftsf | Vladar, yep |
15:04:28 | Vladar | it's strange, I'm running it too |
15:04:49 | Vladar | though no errors happening |
15:06:53 | Vladar | actually, I have looked into flatpak but didn't like it much |
15:07:23 | Vladar | AppImage seems like a more simple approach |
15:07:59 | ftsf | tar is nicer and simpler =) |
15:09:07 | Vladar | def-pri-pub: have you tried new link? |
15:11:49 | ftsf | o/ night! |
15:13:21 | * | tankfeeder quit (Quit: Leaving) |
15:16:46 | def-pri-pub | Vladar: can you resend it? |
15:16:55 | Vladar | https://github.com/Vladar4/ng2planetoids/blob/master/ng2planetoids-i386.run?raw=true |
15:17:50 | * | rosshadden joined #nim |
15:18:32 | def-pri-pub | Same thing happened |
15:18:58 | Vladar | weird… |
15:20:58 | Vladar | def-pri-pub: let's try this command then: |
15:20:59 | Vladar | wget -O ng2planetoids-i386.run https://github.com/Vladar4/ng2planetoids/blob/master/ng2planetoids-i386.run?raw=true && chmod +x ng2planetoids-i386.run && ./ng2planetoids-i386.run |
15:21:38 | Vladar | should download and run it |
15:22:25 | def-pri-pub | Yeah, that's not working either |
15:22:34 | Vladar | what distro are you running? |
15:24:21 | def-pri-pub | Ubuntu 16.04.1 |
15:25:25 | Vladar | 32 or 64? |
15:25:51 | Vladar | and it still says No such file or directory ? |
15:26:34 | def-pri-pub | Im' running 64 bit |
15:27:32 | * | sz0 joined #nim |
15:27:42 | Vladar | gonna try to run livecd myself to find out what the hell is going on |
15:31:00 | rosshadden | Vladar: I'll try running it on Arch. Do you have a 64bit file, or do you expect that to work anyway? |
15:31:39 | Vladar | rosshadden: it should work if you have lib32-fuse installed |
15:31:46 | rosshadden | Okay I'll install it. |
15:31:57 | * | rauss quit (Quit: WeeChat 1.7) |
15:32:02 | * | rosshadden is now known as rauss |
15:32:14 | Vladar | I'll try to build 64 bit version later, but I need to setup 64-bit Ubuntu somewhere |
15:32:20 | * | rosshadden joined #nim |
15:33:10 | Vladar | and I have exactly one 64-bit machine here — my working one >_< |
15:33:29 | rauss | Ehh I don't want to replace gcc with gcc-multilib |
15:33:40 | rauss | I'll wait for the 64 bit version later |
15:33:46 | Vladar | sure |
15:36:41 | Vladar | I'm wondering, could I just pack 32-bit app with a 64-bit AppImage? |
15:36:57 | Vladar | worth to try… |
15:39:28 | * | bozaloshtsh quit (Changing host) |
15:39:28 | * | bozaloshtsh joined #nim |
15:41:54 | * | niv quit (Remote host closed the connection) |
15:42:07 | Vladar | rauss: could you try this version? http://dropcanvas.com/68a4o |
15:42:50 | Vladar | packed it with 64bit appimage, so, theoretically, it should work with 64bit fuse |
15:47:31 | rauss | Sure |
15:48:25 | rauss | Vladar: I get the "No such file or directory" error, which is a good thing I think for you |
15:48:29 | rauss | more people to recreate it :) |
15:48:37 | rauss | Plus I'm on Arch, so it rules out Ubuntu as the issue. |
15:50:03 | Vladar | I'm starting to lose my mind. Post "ls -la" output, pls |
15:51:27 | Vladar | It might be related to 32/64bit, I think. Need to build a true 64-bit app to prove it, though |
15:52:38 | FromGitter | <rosshadden> @Vladar ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=58c6c0447ceae5376ab11c5c] |
15:53:07 | Vladar | thanks |
15:53:38 | Vladar | I'll try to set up 64bit ubuntu 12 platform and then contact you |
15:54:21 | rauss | Vladar: You said you use arch. Don't you use a 64bit arch? |
15:54:35 | rauss | Vladar: They officially deprecated 32bit arch a few weeks ago, even |
15:55:09 | rauss | Maybe it wasn't you that said you used arch. I skimmed the chat log but might have misread. |
15:55:34 | Vladar | sure, and I'm sure if I build it on arch it will run for you perfectly. The thing is, it should be build on oldest possible system to run everywhere |
15:56:35 | * | Snircle quit (Ping timeout: 246 seconds) |
15:57:44 | Vladar | however, there's no harm to try it out too, give me a couple of minutes… |
16:02:50 | * | Snircle joined #nim |
16:03:42 | Vladar | rauss: here's arch-built one http://dropcanvas.com/p1c8v |
16:07:34 | * | Nobabs27 joined #nim |
16:11:29 | * | chemist69 quit (Ping timeout: 240 seconds) |
16:11:52 | * | chemist69 joined #nim |
16:26:51 | * | Arrrr joined #nim |
16:26:57 | * | Nobabs27 quit (Quit: Leaving) |
16:33:13 | zachcarter | TrueType font rendering via FreeType :D |
16:33:15 | * | Trustable joined #nim |
16:33:17 | zachcarter | http://imgur.com/a/gnmYu |
16:43:57 | * | xet7 joined #nim |
16:46:24 | * | gokr quit (Ping timeout: 268 seconds) |
16:49:27 | * | Andris_zbx quit (Remote host closed the connection) |
16:56:51 | dom96 | Hello guys |
16:58:00 | dom96 | demi-: I don't think IPC is a must-have for a standard library. |
16:59:02 | dom96 | I created this a while back https://github.com/dom96/nim-jsonrpc |
16:59:43 | * | ofelas quit (Quit: Leaving) |
17:04:25 | * | gokr joined #nim |
17:04:26 | * | vlad1777d quit (Remote host closed the connection) |
17:05:05 | demi- | interesting, though doesn't provide the same sort of transport security that an authorized IPC/XPC process would. I might just wrap the XPC headers on OS X and stick them up as a package |
17:09:38 | * | zaquest quit (Quit: Leaving) |
17:19:16 | * | zaquest joined #nim |
17:27:14 | rauss | Vladar: I still get dir not found |
17:27:38 | rauss | the first thing that prints is `-1` btw. |
17:28:11 | rauss | I agree with dom96 that IPC doesn't really need to be in a std lib |
17:28:35 | * | devted joined #nim |
17:40:47 | def-pri-pub | dom96: while you're here, I've been meaning to ask you about how I can go about fixing up the .nimble file for my stb_image wrapper |
17:41:26 | def-pri-pub | When I do an install, I get that warning about namespaces telling me to put my files in a subdirectory that has the same package name |
17:42:08 | def-pri-pub | The only issue is that I have to separate files that are meant to be imported, each with different names |
17:42:20 | def-pri-pub | `stb_image.nim` and `stb_image_write.nim` |
17:42:54 | def-pri-pub | Is there a way I can stuff that _write.nim one in the subdir, but still have it where my users can type `import stb_image_write as stbiw`? |
17:54:15 | * | Ven joined #nim |
17:56:00 | * | gk-- joined #nim |
17:56:47 | * | gk-- quit (K-Lined) |
17:58:16 | * | gk-- joined #nim |
17:58:47 | * | gk-- quit (K-Lined) |
18:00:28 | * | Ven quit (Ping timeout: 240 seconds) |
18:01:00 | * | vlad1777d joined #nim |
18:01:46 | * | Jesin quit (Quit: Leaving) |
18:02:08 | stisa | def-pri-pub : make a folder named src and put .nim files there |
18:02:24 | * | Jesin joined #nim |
18:02:30 | stisa | Then in .nimble add srcDir = "src" |
18:03:19 | * | elrood joined #nim |
18:03:25 | * | niv joined #nim |
18:04:11 | * | gokr quit (Quit: Leaving.) |
18:04:14 | stisa | Oh no wait I misread,sorry, that would still give warnings. |
18:04:29 | * | zachcarter quit (Quit: zachcarter) |
18:10:16 | dom96 | def-pri-pub: make a directory called stb_image/ |
18:10:25 | dom96 | and create a 'write' module in there |
18:10:43 | dom96 | (better to rename it to 'writer' probably) |
18:11:25 | def-pri-pub | I'm trying to keep it as similar to that of the original stb libs, e.g. `stb_image_write.h`. Guess I'll have to break that... |
18:11:39 | dom96 | def-pri-pub: btw ideally Nimble's hints should explain this. Do you think there is a way to make them easier to understand? |
18:12:24 | dom96 | Afraid so. The only other way would be to create a 'stb_image_write', 'stb_image_read', etc. packages |
18:12:38 | def-pri-pub | Nah, I think the hints are good, I just was wondering if there was a way to get the `import`s to work the way that I want with the newer nimble |
18:12:56 | def-pri-pub | two separate packags? Absolutely disgusting. |
18:13:43 | * | Ven joined #nim |
18:15:23 | * | chemist69 quit (Ping timeout: 264 seconds) |
18:17:54 | FromGitter | <Varriount> Rauss: Wow, deprecation an entire architecture? The Arch team makes done pretty bold moves |
18:19:48 | * | chemist69 joined #nim |
18:20:16 | rauss | Varriount: The rest of the OS's could learn something from that |
18:20:16 | * | LeNsTR joined #nim |
18:21:19 | dom96 | While i'm sure it takes a load of work off their hands, I did enjoy running Arch on my old Pentium 3 IBM PC. |
18:22:11 | FromGitter | <Varriount> I'm still miffed that the Arch team stopped including an installer with their live CD iso |
18:24:04 | * | Vladar quit (Quit: Leaving) |
18:26:24 | ehmry[m] | is it possible to catch C++ exceptions from Nim? I've been putting exception handling in external code but then I have to deal with compiling an external object. |
18:27:49 | FromGitter | <Varriount> ehmry: I don't know, but if you can't do it in pure Nim, you can probably manage something with macros and the emit pragma |
18:28:21 | ehmry[m] | yea, I was consideing emit but it seemed distasteful |
18:30:30 | FromGitter | <Varriount> @Araq I'm curious - why is the `this` pragma module-wide? |
18:32:17 | * | Ven quit (Ping timeout: 260 seconds) |
18:33:26 | * | vlad1777d quit (Remote host closed the connection) |
18:33:49 | * | nsf joined #nim |
18:34:32 | * | Ven joined #nim |
18:36:28 | * | def-pri-pub quit (Quit: leaving) |
18:46:17 | * | Ven quit (Ping timeout: 260 seconds) |
18:50:22 | * | Trustable quit (Remote host closed the connection) |
18:53:29 | * | Ven joined #nim |
19:02:24 | * | Ven quit (Ping timeout: 240 seconds) |
19:07:31 | * | gokr joined #nim |
19:13:25 | * | Ven joined #nim |
19:14:31 | * | Ven quit (Read error: Connection reset by peer) |
19:17:35 | * | brson joined #nim |
19:22:52 | * | PMunch joined #nim |
19:25:06 | * | Matthias247 joined #nim |
19:33:24 | * | Ven joined #nim |
19:34:49 | Araq | varriount: what else should we attach it too? |
19:37:46 | Araq | dom96: can we please make nimble less rigid about the directory structure somehow? |
19:38:09 | Araq | not even the packages under nim-lang adhere to it |
19:38:23 | Araq | nor do I like excessive subdirectories, but you know that. |
19:38:40 | Araq | we can change how --nimblePath works if that's what it takes. |
19:39:16 | dom96 | Propose something |
19:39:48 | dom96 | It's a small price to pay for the feature that we get |
19:40:07 | Araq | compiler sees package/module.nim and considers package-$version/module.nim if that's in the nimble path |
19:41:04 | dom96 | Do you understand why Nimble needs to be so anal about the directory structure? |
19:46:22 | * | Ven quit (Ping timeout: 260 seconds) |
19:46:56 | PMunch | I'm curious dom96, why? |
19:47:03 | Araq | because we like to enforce package/module in the import statements? |
19:47:50 | * | user0_ joined #nim |
19:48:11 | dom96 | Because a package named 'http' shouldn't encroach on another package's namespace. |
19:48:48 | dom96 | A package named 'http' shouldn't be able to install a module that can be imported via `import ftp/client` |
19:49:08 | dom96 | Because this module belongs to an 'ftp' package. |
19:50:15 | dom96 | Does that make sense? |
19:51:04 | PMunch | Ah |
19:51:22 | * | kulelu88 joined #nim |
19:51:22 | PMunch | So http would need to have an import like "import http/ftp/client" |
19:51:33 | dom96 | yeah |
19:51:41 | PMunch | (Not that you should do that) |
19:51:47 | PMunch | That makes sense |
19:51:54 | dom96 | Indeed. You could have a package named 'network_utils' |
19:52:00 | dom96 | Where that would make sense |
19:52:06 | PMunch | Yeah |
19:52:41 | Araq | yeah, so what I said. |
19:52:56 | Araq | --nimblePath should work differently |
19:53:14 | * | Ven joined #nim |
19:54:55 | * | bjz quit (Ping timeout: 256 seconds) |
19:54:59 | dom96 | Araq: I don't really understand what you propose |
19:55:52 | demi- | work differently how? |
19:55:55 | * | bjz_ joined #nim |
19:56:34 | * | BitPuffin|osx joined #nim |
19:56:55 | Araq | nimblePath is too greedy. it adds .nimble/pkgs/p-1.0 to the search path |
19:57:14 | Araq | and then in p-1.0 I need yet another 'p' dir to get the "namespacing" |
19:57:37 | Araq | instead it should only add .nimble/pkgs |
19:57:48 | dom96 | I see. And then treat p-1.0/ as p/ |
19:57:54 | Araq | exactly. |
19:57:56 | PMunch | Hopefully :P |
19:58:09 | dom96 | This breaks the "Jester case" |
19:58:21 | PMunch | Which is? |
19:58:29 | dom96 | I want to be able to write `import jester` |
19:58:33 | dom96 | not `import jester/jester` |
19:58:52 | PMunch | Maybe when you ignore -1.0 you could also ignore p/p? |
19:59:47 | * | nsf quit (Quit: WeeChat 1.7) |
20:00:37 | PMunch | Or maybe even add an option to the config file for a package |
20:00:55 | PMunch | So that you would be able to do "p/p as p" or something similar |
20:01:32 | PMunch | To allow the package creator more flexibility with folder structure |
20:02:59 | * | Ven quit (Ping timeout: 246 seconds) |
20:04:34 | Araq | we can have some sugar like 'import jester/_' for this |
20:04:54 | PMunch | That's still a bit ugly though.. |
20:05:16 | PMunch | I mean if I run nimble install jester I assume the import will be import jseter |
20:05:24 | PMunch | s/jseter/jester |
20:06:45 | dom96 | While the way it works currently may prove annoying, it does work and does ensure there are no unintended files installed. |
20:06:59 | * | kulelu88 quit (Ping timeout: 264 seconds) |
20:07:37 | dom96 | Changing the way --nimblePath works won't help def-pri-pub |
20:07:58 | PMunch | def-pri-pub? |
20:08:09 | dom96 | Read the IRC logs |
20:08:22 | PMunch | Sorry :Y |
20:11:23 | PMunch | Hmm, he just wants to stick to the C syntax though |
20:11:51 | PMunch | In that case I think the "Nimian" way (whatever that turns out to be) would be better for a Nim package |
20:11:54 | * | LeNsTR quit (Ping timeout: 240 seconds) |
20:12:09 | PMunch | So you have "import stb_image/write" or something like that |
20:12:14 | * | rokups quit (Quit: Connection closed for inactivity) |
20:12:21 | Araq | well I consider --nimblePath a mistake, I use --noNimblePath more and more often and explicit --path commands |
20:12:54 | dom96 | Araq: Why? |
20:13:18 | * | Ven joined #nim |
20:13:47 | Araq | because I tend to have outdated stuff in my pkgs/ that interferes with my compilations |
20:14:37 | Araq | that's what 'nimble build' itself does. it uses --noNimblePath plus explicit --paths, right? |
20:14:37 | * | Ven quit (Read error: Connection reset by peer) |
20:15:19 | dom96 | yes |
20:15:53 | Araq | so nimble doesn't want this feature and I don't want it either. ;-) |
20:16:08 | dom96 | Well, I do. |
20:16:25 | Araq | maybe not. consider this: |
20:17:02 | Araq | I install 'jester'. then my program has a dependency to 'jester'. |
20:17:14 | Araq | so I add jester to my own .nimble file as dependency. |
20:17:30 | Araq | and that's enough for 'import jester' to work then, no --nimblePath required |
20:18:02 | * | couven92 joined #nim |
20:18:10 | Araq | well that *could* be enough. maybe the compiler should read .nimble files. |
20:19:08 | * | kulelu88 joined #nim |
20:19:12 | dom96 | This is not how you use this |
20:19:29 | dom96 | "Hrm, I wanna try this new fangled jester package" |
20:19:33 | dom96 | nimble install jester |
20:19:37 | * | dexterk_ joined #nim |
20:19:47 | dom96 | echo "import jester; blah" > test.nim |
20:19:49 | dom96 | nim c test.nim |
20:20:06 | dom96 | Do you seriously want me to create a .nimble file every time? |
20:20:11 | * | dexterk quit (Ping timeout: 264 seconds) |
20:20:51 | PMunch | Yeah that would be a pain |
20:21:23 | Araq | <cwd> nimble install jester # nimble creates the cwd.nimble file if not existing |
20:21:53 | * | chemist69 quit (Ping timeout: 246 seconds) |
20:21:56 | Araq | but yes. I think "creating a .nimble file every time" is the lesser evil |
20:22:10 | PMunch | But I don't install jester for every program that uses it :S |
20:22:25 | PMunch | And I tend to open a new shell when installing things |
20:22:30 | Araq | so add jester to your --path in your $nim.cfg |
20:22:49 | Araq | we already have dozens of solutions for this in the config system |
20:22:57 | * | Arrrr quit (Read error: Connection reset by peer) |
20:23:00 | PMunch | But that's annoying.. |
20:23:17 | PMunch | I feel like nimble install jester, import jester should work |
20:23:36 | PMunch | Otherwise I'd say something was wrong with the package manager (or another part of the system) |
20:23:52 | dom96 | Araq: The real problem is that you have outdated Nimble packages in your $nimbleDir |
20:24:21 | Araq | dom96: yes and no. I am also a control freak. |
20:24:30 | dom96 | Araq: This is already an issue and will be fixed |
20:24:38 | dom96 | Why not? |
20:25:08 | dom96 | But hey, if you hate it so much feel free to remove `nimblePath` from your compiler's config file |
20:25:24 | * | chemist69 joined #nim |
20:25:42 | Araq | problem with this is my config file is the config file everybody uses |
20:26:00 | Araq | since it's in Nim's repo. |
20:26:15 | dom96 | Then this problem should be fixed |
20:27:06 | dom96 | yay, aporia-git in arch was updated. Thank you to whoever did that :) |
20:27:40 | Araq | well IMO --nimblePath causes a fragile compilation model and enforces a rigid dir structure for Nimble packages. and Nimble itself doesn't use it. |
20:28:05 | * | libman joined #nim |
20:28:32 | Araq | lots of other solutions are thinkable. |
20:28:48 | PMunch | Nim is still stuck on 0.15.0 in Arch though.. |
20:28:50 | Araq | for example, the existance of foo.nimble disables --nimblepath. |
20:29:01 | * | bozaloshtsh quit (Ping timeout: 268 seconds) |
20:29:04 | Araq | then you can have your easy 'import jester' to play with |
20:29:15 | Araq | but as soon as you have explicit deps, these are used instead. |
20:30:23 | * | shashlick quit (Ping timeout: 264 seconds) |
20:31:07 | dom96 | Araq: The rigid dir structure is still necessary for packages even without --nimblepath |
20:31:42 | dom96 | What does your proposed solution solve? |
20:31:48 | dom96 | It only makes things more complicated |
20:32:39 | * | shashlick joined #nim |
20:33:03 | * | Ven joined #nim |
20:33:47 | Araq | fine, whatever |
20:38:08 | dom96 | PMunch: btw, sorry about giving you the IRC equivalent of RTFM earlier :) |
20:38:21 | PMunch | Haha, no problem :P |
20:38:34 | PMunch | I should've read the log before asking silly questions |
20:40:41 | * | kulelu88 quit (Ping timeout: 260 seconds) |
20:46:27 | * | Ven quit (Ping timeout: 260 seconds) |
20:51:59 | * | user0_ quit (Read error: Connection reset by peer) |
20:53:12 | * | Ven joined #nim |
20:53:36 | * | kulelu88 joined #nim |
20:55:54 | * | Vladar joined #nim |
20:56:03 | * | devted quit (Quit: IRC Client has quit.) |
20:56:26 | * | user0_ joined #nim |
21:00:37 | Vladar | ok, I think I finally figured out that but with appimages |
21:01:14 | Vladar | It cost me running ubuntu live usb for a couple of hours so it better be working now… |
21:02:11 | * | Ven quit (Ping timeout: 264 seconds) |
21:05:47 | * | Ven joined #nim |
21:12:16 | Vladar | def-pri-pub, rauss, are you still here? |
21:19:09 | * | bozaloshtsh joined #nim |
21:20:42 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
21:20:50 | Vladar | anyway, here's working (I hope!) appimages for both architectures: |
21:21:09 | Vladar | https://github.com/Vladar4/ng2planetoids/blob/master/ng2planetoids-i386.run |
21:21:16 | Vladar | https://github.com/Vladar4/ng2planetoids/blob/master/ng2planetoids-x86_64.run |
21:21:55 | Vladar | If any Linux users have free time to test-run it, go ahead =) |
21:22:08 | Araq | Vladar: what was the problem? |
21:22:25 | Araq | (maybe at some point I feel like producing binaries for linux...) |
21:23:13 | PMunch | Vladar, just run the .run file? |
21:23:46 | Vladar | Araq, interesting bug, triggering only when run inside an appimage, caused by a const call to os module: https://github.com/Vladar4/ng2planetoids/commit/b18a43b13ea0d9fbc68b2098deef0e2ac7f26bff#diff-8886a6b85db9f93f54efa34d256d81b5 |
21:23:54 | Vladar | PMunch: that's the idea |
21:24:50 | PMunch | Seems to work fine |
21:24:56 | Vladar | Araq: I know, stupid mistake, but worked when not in the appimage just fine for some reason |
21:25:12 | Araq | yeah well. I think you know why that couldn't work :-) |
21:25:15 | PMunch | Manjaro i3 |
21:25:27 | Vladar | PMunch: thanks, now I could sleep well ) |
21:25:27 | Araq | interesting we actually support this at compiletime |
21:25:45 | Vladar | PMunch: 32 or 64 one? |
21:25:49 | PMunch | 64 |
21:25:53 | Vladar | nice |
21:26:03 | PMunch | I don't have my IBM-6050 at hand :P |
21:26:20 | PMunch | (Pretty sure that's not actually a machine, and if it was it would probably be 8-bit or something :P) |
21:26:55 | Vladar | It was such a pain to build entire SDL2*, Nim and the project on a live usb… man… |
21:27:27 | Vladar | I should setup persistent ubuntu usb tomorrow |
21:27:42 | PMunch | I can recommend Manjaro if you need Linux |
21:28:14 | Vladar | I need ubuntu 12.04 LTS as a lowest common denominator for my appimage builds, I run Arch Linux myself |
21:29:50 | Vladar | btw, the engine show pretty good 60FPS performance on Pentium 4, and even works on my IBM T30 nobebook _decent_ enough |
21:30:14 | stisa | are there packages for the js target that use enums a lot? I think I fixed a bug with enums with holes, but I want to check I didn't break something else |
21:33:46 | * | bjz_ quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
21:39:12 | FromGitter | <Varriount> Are we going to be using appimages to distribute Nim now? |
21:39:31 | dyce[m] | how would you your html/css/js with jester so that everything is contained in the executable? |
21:39:44 | FromGitter | <Varriount> dyce: Use staticRead |
21:39:44 | dyce[m] | would you package* |
21:40:22 | FromGitter | <Varriount> dyce[m]: https://nim-lang.org/docs/system.html#staticRead,string |
21:40:43 | dyce[m] | Varriount: thanks |
21:40:54 | PMunch | Vladar, oh that's a good point |
21:40:58 | PMunch | And nice that it runs so well |
21:41:27 | Vladar | PMunch: Just tried it on T30 and got 60FPS most of the time! |
21:41:38 | PMunch | That's really good! |
21:41:51 | PMunch | I mean, the game is basic enough but it's nice to see such good performance |
21:41:58 | dyce[m] | is it just me or is nodejs/bower/webpack making frontend development become over engineered like java |
21:41:59 | PMunch | Using SDL2? |
21:42:28 | Vladar | PMunch: yes, there's a lot of collision detection going on under the hood too |
21:42:41 | PMunch | Oh right, that's a good point |
21:43:27 | Vladar | and now I'm ready enough for Linux game jam this weekend |
21:43:31 | PMunch | I've been playing with creating a game library (not an engine) for SDL2 in Nim myself |
21:43:37 | PMunch | Oh cool |
21:43:44 | PMunch | Wish there were more of those where I live |
21:43:55 | PMunch | Game jams in general, never seen a Linux one here :P |
21:43:57 | Calinou | Vladar: use a chroot for building your AppImages, or a virtual machine |
21:43:57 | Calinou | :P |
21:44:08 | Calinou | or systemd-nspawn if your target is a modern enough distro |
21:44:20 | Vladar | PMunch: https://forum.nim-lang.org/t/2841 |
21:44:25 | Calinou | dyce[m]: Bower is pretty much dead, be happy |
21:44:40 | Calinou | dyce[m]: and unfortunately, modern web workloads tend to drive towards Webpack since gulp is too limited |
21:44:46 | Calinou | Webpack can do really nice things, but it's also really hard to master |
21:44:50 | PMunch | Oh, it's a global thing :P |
21:44:51 | Vladar | Calinou, any tutorials to setup ubuntu 12 this way? |
21:45:00 | PMunch | Guess I'm just not paying attention |
21:45:10 | Calinou | Vladar: note that Ubuntu 12.04 does not use systemd, so you can't use systemd-nspawn, but you can use a chroot |
21:45:20 | Calinou | https://help.ubuntu.com/community/BasicChroot |
21:45:28 | Vladar | thanks, I'll look into it |
21:45:29 | Calinou | this guide is valid for any host distro (or almost) |
21:45:42 | Calinou | *perhaps* systemd-nspawn can work with Ubuntu 12.04, but with caveats |
21:46:05 | PMunch | https://github.com/PMunch/SDLGamelib/tree/master/gamelib |
21:46:11 | PMunch | That's my game library by the way |
21:46:25 | dyce[m] | Calinou: i started learning angular 1 and it was dead simple easy. no backend tools required, now everything requires webpack and a developer environment |
21:46:32 | PMunch | Currently it's pretty basic, but it supports textureatlases as created by TexturePacker |
21:46:40 | Calinou | dyce[m]: Vue.js can be used without a build system (for basic usage) |
21:47:43 | dyce[m] | Calinou: yea i started using Vue, but it also recommends webpack for routing |
21:47:48 | Vladar | PMunch: interesting approach |
21:47:50 | PMunch | http://backbonejs.org/ is pretty cool. But it requires a REST API that outputs JSON |
21:48:21 | PMunch | Vladar, yeah. I was reading this: https://hookrace.net/blog/writing-a-2d-platform-game-in-nim-with-sdl2/ |
21:48:40 | PMunch | And I liked the simplicity and transparency that the style of programming offered for game dev |
21:48:54 | PMunch | So many times have I been annoyed by magic in the underlying engine |
21:49:22 | Vladar | may be you could use some of my engine's code there, like collisions, etc. https://github.com/Vladar4/nimgame2/blob/master/nimgame2/collider.nim |
21:49:33 | PMunch | So with that library I wanted to focus on letting people pick the features they needed and use that |
21:50:06 | PMunch | Yeah, the collision stuff is the last I added. It was more to have at least something |
21:50:13 | PMunch | And there are many other things that could be added |
21:51:59 | dyce[m] | riotjs seems pretty dead simple |
21:51:59 | * | rauss quit (Quit: WeeChat 1.7) |
21:52:44 | Vladar | PMunch: I struggle with any geometry stuff, but this link helped me a lot: http://paulbourke.net/geometry/ |
21:52:52 | Vladar | tons of ready to use algorithms |
21:53:06 | PMunch | Huh, that's cool |
21:53:46 | PMunch | I've got a pretty good grasp of it since I've been doing gamedev as a hobby and partially as a job for the past 14 years or so :P |
21:54:05 | PMunch | But those algorithms are probably more efficient than what I would write, so it's a nice resource for sure |
21:54:47 | Vladar | whoa, 14 years of professional gamedev? |
21:55:49 | * | bozaloshtsh quit (Ping timeout: 260 seconds) |
21:56:12 | PMunch | No |
21:56:20 | PMunch | I started tinkering with it 14 years ago |
21:56:47 | PMunch | But at the time I was 10, so I didn't start working with it professionally until I was 17-18 |
21:57:15 | PMunch | Now I'm soon through my masters degree in computer science and I'm thinking of getting into gamedev full-time |
21:58:15 | Vladar | Nice. Interesting enough, I've got about 14 years of amateur/enthusiast gamedev myself, 0y professional yet, sadly ) |
21:59:00 | PMunch | That's a shame. Tried getting a job and failed or just busy with other stuff? |
21:59:07 | PMunch | Gamedev is a lot of fun |
21:59:47 | Vladar | worked an engineer job previously, and doing some freelancing stuff now |
22:00:08 | PMunch | Cool |
22:00:34 | PMunch | I've done some freelance besides my studies but I think it would stress me too much to live off-of it |
22:03:00 | Vladar | it depends on the work mostly ) |
22:03:49 | * | gokr quit (Ping timeout: 240 seconds) |
22:04:40 | PMunch | Yeah, but getting it :P |
22:05:26 | Vladar | yeah for sure ) |
22:06:46 | Vladar | OK, going to sleep now. See you around. |
22:07:05 | PMunch | Yeah, see you |
22:07:52 | * | Vladar quit (Quit: Leaving) |
22:28:15 | * | Jesin quit (Quit: Leaving) |
22:39:17 | * | _yeeve joined #nim |
22:39:32 | * | Jesin joined #nim |
22:41:49 | * | yeeve quit (Ping timeout: 240 seconds) |
22:54:21 | * | bozaloshtsh joined #nim |
22:56:11 | * | Jesin quit (Quit: Leaving) |
22:56:13 | * | nsf joined #nim |
22:58:31 | * | rauss joined #nim |
23:00:30 | * | bozaloshtsh quit (Quit: WeeChat 1.7) |
23:00:37 | * | kulelu88 quit (Ping timeout: 260 seconds) |
23:02:39 | * | user0_ quit (Read error: Connection reset by peer) |
23:03:42 | * | user0_ joined #nim |
23:06:54 | * | def-pri-pub joined #nim |
23:07:10 | * | Jesin joined #nim |
23:07:51 | * | nsf quit (Quit: WeeChat 1.7) |
23:12:39 | * | kulelu88 joined #nim |
23:17:01 | * | couven92 quit (Quit: Switching to VPN) |
23:17:33 | * | couven92 joined #nim |
23:23:16 | * | user0_ quit (Read error: Connection reset by peer) |
23:23:32 | * | user0_ joined #nim |
23:46:28 | * | arnetheduck quit (Ping timeout: 240 seconds) |
23:46:40 | * | ftsf_ joined #nim |
23:49:24 | * | kulelu88 quit (Ping timeout: 240 seconds) |
23:52:18 | * | elrood quit (Quit: Leaving) |
23:53:55 | * | user0__ joined #nim |
23:55:45 | * | user0_ quit (Ping timeout: 256 seconds) |
23:57:28 | * | user0__ quit (Read error: Connection reset by peer) |
23:58:08 | * | user0__ joined #nim |