00:00:04 | dom96 | NopeDK: oh, and you probably can just run 'koch tests cat stdlib' |
00:00:14 | dom96 | but it's good to run it all anyway, might take some time though |
00:00:25 | dom96 | cavariux: only in the source code :) |
00:00:36 | dom96 | look for a platf.nim file or something in the compiler/ dir |
00:01:01 | NopeDK | dom96: some time might be too true... running on a poor Pi xD |
00:01:04 | dom96 | skrylar: worked fine for me, and for Ludum Dare it was brilliant. |
00:01:27 | dom96 | NopeDK: oh then definitely just run the 'stdlib' category |
00:02:29 | FromGitter | <cavariux> @dom96 thanks, sorry if I ask too many questions just new to Nim but loving it |
00:02:41 | skrylar | dom96, it works fine for many people. i don't have any idea why it didn't for me |
00:02:48 | dom96 | cavariux: no need to be sorry :) |
00:03:40 | dom96 | anyway, I must head to bed. Good night. |
00:03:53 | FromGitter | <cavariux> Good night |
00:04:04 | NopeDK | G'night |
00:04:49 | * | marenz_ quit (Ping timeout: 248 seconds) |
00:13:27 | * | endragor quit (Ping timeout: 240 seconds) |
00:16:05 | qih | How do you place an empty line in a Nim program? I want to echo out a return, then a space, then echo a message. |
00:25:24 | NopeDK | qih: What about just doing an empty echo (echo "")? Otherwise you could start the second echo for the message with a newline (echo "\n" & msg). |
00:25:54 | qih | Ah right, good point, I'll try both |
00:26:43 | qih | I'm encoding simple physics equations like Velocity, Distance travelled etc using parseInt.readLine as a learning tool |
00:27:24 | * | onionhammer quit (Quit: WeeChat 1.9.1) |
00:27:55 | * | onionhammer joined #nim |
00:30:41 | NopeDK | I am working on a daemon that can cache read/writes in RAM for folders and files with a simple config for configurable files, folders, preloading, commit interval, double synchronization while hopefully being crashproof due to my design choice. |
00:30:52 | NopeDK | Lot of stuff to learn. |
00:31:29 | qih | Nice, agree |
00:32:25 | qih | I've come from a microcontroller (Forth & Micropython) background to learn some system and application developing focussing on Mapping & GIS |
00:32:52 | qih | So all this full scale "C-like" stuff is a big move for me, but I am enjoying it |
00:38:01 | * | tefter joined #nim |
00:40:49 | NopeDK | Cool. I have dabbled in too many languages due to own curiosity and my education but I really like Nim and want to get more proficient. The readability/programmability of Python with the speed of C, what is not to love |
00:43:03 | qih | "dabbled" =< I hear ya. Yes the speed, interop, and it can be stripped down hard enough to run on an MCU |
00:44:49 | * | vlad1777d quit (Ping timeout: 248 seconds) |
00:45:26 | NopeDK | For now I am keeping Nim on my Pi but I will definitely attempt to get it running on an MCU in the future, got a small AHRS project way overdue. |
00:46:30 | qih | K, cool, I have Nim on the Desktop, so am using it for sysadmin too (why not), as much as I can |
00:46:41 | * | tefter quit (Ping timeout: 260 seconds) |
00:48:57 | NopeDK | Nice, Nim just feels so versatile that I am amazed it hasn't gained much popularity yet. |
00:51:14 | * | astronav_ joined #nim |
00:51:14 | qih | That's a good point as was raised by @cavariux, NFI why, maybe we are getting Peak Alt.Lang? 8-) |
00:53:01 | * | astronavt quit (Ping timeout: 250 seconds) |
00:56:13 | * | astronav_ is now known as astronavt |
00:56:39 | * | yglukhov joined #nim |
00:57:04 | NopeDK | To the future of Nim, \x1D raises glass |
00:57:33 | * | qih does the same 8-) |
00:57:59 | FromGitter | <cavariux> *Follows* |
00:58:05 | NopeDK | Well, one day I will actually get to learn proper IRC usage and etiquette... |
00:58:42 | FromGitter | <cavariux> haha, but what are your thoughts on why Nim hasn't gain popularity? |
00:59:09 | qih | Me? NFI |
00:59:39 | * | yglukhov quit (Read error: Connection reset by peer) |
01:00:07 | * | yglukhov joined #nim |
01:01:16 | NopeDK | Can really only reiterate previously raised points, Nim is not v1.0 and the direct competitors were backed by larger and more public companies like Google's Go and it is not using previous language knowledge that many have like NodeJS |
01:02:12 | FromGitter | <cavariux> Yeah, I have code for 10 years and still it took me pair of days to get Nim's syntax and structure |
01:02:41 | FromGitter | <cavariux> I trully hope Nim takes off in one or two years because it does have potential |
01:02:47 | qih | NopeDK: Seems reasonable. Awareness also perhaps |
01:03:26 | NopeDK | qih: that as well |
01:04:28 | FromGitter | <cavariux> Nim also lacks that project, you know like the project that gets super popular and at the same time makes Nim popular |
01:04:31 | * | yglukhov quit (Ping timeout: 248 seconds) |
01:04:49 | qih | THere is a hepa of great info on the Nim-Lang primary site but the site is ugly as, small fonts, a bit hard to get around. |
01:04:55 | qih | Like Ruby Rails? |
01:05:07 | * | qih apologises for crap typing |
01:05:22 | FromGitter | <cavariux> For example I doubt ruby would be what it is without frameworks like that |
01:05:40 | qih | Agree |
01:05:50 | NopeDK | cavariux: As my background is mainly C and derivatives plus Python I find it closer to a previously forgotten language than a new one. |
01:06:09 | NopeDK | And yeah, that one project, good point. |
01:06:46 | FromGitter | <cavariux> Well, will go eat something, gl and good night |
01:06:55 | NopeDK | G'night |
01:07:58 | qih | g'night |
01:11:01 | * | endragor joined #nim |
01:18:45 | NopeDK | Logging as well, have fun and g'night |
01:19:46 | qih | k, see ya |
01:19:58 | * | NopeDK quit (Quit: Page closed) |
01:32:34 | * | vivus quit (Quit: Leaving) |
01:43:43 | * | NopeDK joined #nim |
01:45:14 | * | NopeDK quit (Remote host closed the connection) |
01:45:51 | * | NopeDK joined #nim |
01:49:31 | * | endragor quit (Ping timeout: 268 seconds) |
02:03:45 | * | dddddd quit (Ping timeout: 248 seconds) |
02:04:46 | qih | I have made a simple calculating program for calculating Velocity (Final_Pos - Initial_Pos / Time), it works but I get a very long Float, all I want is a 2 or 3 decimal Float but cannot seem to get it correct. |
02:05:09 | qih | Error line: 'echo(round(T: float64(result, " Metres per second")))' |
02:18:57 | NopeDK | strutils.formatBiggestFloat(args) |
02:19:49 | NopeDK | Or rather, strutils.formatFloat(args) |
02:20:24 | qih | Oh |
02:21:08 | qih | So: echo(strutils.formatFloat(result, " Metres per second")) ? |
02:21:29 | NopeDK | import strutils |
02:21:43 | qih | Yeah have that |
02:23:12 | NopeDK | Echo(formatFloat(result, precision = numberOfDigitsAfterDot) & " Metres per second") |
02:24:08 | qih | NopeDK: Oh right, I could nnot see that, testing ... |
02:30:00 | qih | OK fixed, your code edit would have worked except for a missing ',' |
02:30:11 | qih | Always the way, just 1 little , |
02:30:33 | qih | My error, not yours, thanks |
02:33:19 | NopeDK | =) |
02:34:33 | * | NopeDK quit (Remote host closed the connection) |
02:34:41 | * | SenasOzys quit (Ping timeout: 255 seconds) |
02:35:02 | qih | Cool, I'll have to modify it for Times in Seconds, Minutes and Hours, make it a bit more interactive and pretty but it works |
02:35:50 | qih | I should be able to use any Unicode char in a Nim program, shouldn't I? |
02:36:25 | * | NopeDK joined #nim |
02:38:37 | FromGitter | <RedBeard0531> char is a byte. To use any codepoint, you need to use unicode.Rune |
02:39:43 | qih | RedBeard0531: unicode.Rune, thanks ... btw, does your nick highlight if i mention you like that using IRC? |
02:40:10 | FromGitter | <RedBeard0531> it does |
02:40:17 | qih | OK great |
02:43:43 | * | onionhammer quit (Quit: WeeChat 1.9.1) |
02:44:21 | * | onionhammer joined #nim |
02:46:23 | * | chemist69 quit (Ping timeout: 255 seconds) |
02:49:43 | qih | In my Velocity calculator program (CLI only), i ask a question, then the answer is read in using 'let final_pos = parseFloat(stdin.readline())', the answer is echo'd to the terminal like '300' or '0', but I really want '=> 300 metres'... how do I add in text via a readLine? |
02:51:17 | qih | https://nim-lang.org/docs/system.html#readLine,File is not clear |
02:54:22 | NopeDK | You mean an interactive prompt with existing text that updates as they enter the value or do you mean output formatting for the result? |
02:55:06 | qih | Hmm both 8-) |
02:55:15 | qih | But I think option B is better |
02:55:52 | qih | Although an interactive prompt would be cool, for the future versions |
02:56:38 | NopeDK | For the first you are looking at terminal ascii codes or stuff like (n)curses. Second is just using strutils again. |
02:57:03 | qih | K, Option B it is then, reading... |
02:57:21 | NopeDK | Look at the % operator |
02:57:30 | qih | K |
02:59:16 | FromGitter | <RedBeard0531> Also, if you are looking for something fancier/easier to use https://lyro.bitbucket.io/strfmt/#string-interpolation-interp is quite nice |
02:59:46 | FromGitter | <RedBeard0531> ` echo $$"=> ${someVar} meters" ` |
03:00:43 | * | chemist69 joined #nim |
03:01:09 | NopeDK | That is indeed a prettier way if you don't mind external libs (which you never should) |
03:05:28 | * | xkapastel quit (Quit: Connection closed for inactivity) |
03:07:22 | qih | RedBeard0531: Thank you |
03:07:26 | qih | NopeDK: Noted |
03:09:07 | NopeDK | Well, personal opinion but much work can be saved by using existing libraries unless security is a priority in which case everything should be checked. |
03:11:34 | qih | Yeah I agree, should be a way to do most stuff for most people. |
03:20:47 | * | arthurz joined #nim |
03:21:56 | arthurz | Hi here, I am curious how one would convert an Int value to a String? I can do it implicitly as say echo ("Test number was ", myTestNum) |
03:22:16 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
03:22:26 | FromGitter | <RedBeard0531> `$myTestNum` |
03:22:49 | NopeDK | the $ operator converts all basic types to strings. |
03:23:21 | FromGitter | <RedBeard0531> and most complex types too |
03:24:27 | arthurz | oh sweet RedBeard0531, thank you. I wish better documentation existed |
03:25:54 | NopeDK | ah, should have said built-in instead of basic. Yeah, most any type can be converted and you can even overload it for your own types. And the Nim Manual does a decent job for intro, there is also the book if you are willing to fork some dollars. |
03:28:04 | arthurz | Thanks NopeDK I'm like in the Cars movie, do not use GPS :-) |
04:08:49 | * | BitPuffin|osx joined #nim |
04:27:43 | * | NopeDK quit (Ping timeout: 248 seconds) |
04:52:51 | * | astronavt quit (Remote host closed the connection) |
04:54:15 | * | dexterk joined #nim |
04:58:45 | * | dexterk quit (Client Quit) |
05:00:15 | * | ftsf quit (Ping timeout: 248 seconds) |
05:13:04 | * | arthurz quit (Ping timeout: 260 seconds) |
05:14:09 | * | skrylar quit (Remote host closed the connection) |
05:15:11 | qih | Is there a common GUI framework that works well with Nim and is not too n00b overwhelming? |
05:23:45 | FromGitter | <cavariux> I think araq made a port of wxWidgets and some one forked it |
05:24:12 | qih | OK, so that will be where? |
05:24:18 | FromGitter | <cavariux> Is there a pragma to ignore --deadCodeElim:on ? Because I need to exportc a struct |
05:24:48 | FromGitter | <cavariux> https://github.com/PMunch/wxnim |
05:27:18 | qih | cavariux: Many thanks. |
05:59:07 | * | rauss quit (Quit: WeeChat 2.0) |
06:01:03 | * | rauss joined #nim |
06:02:35 | * | nsf joined #nim |
06:39:02 | * | arecaceae quit (Remote host closed the connection) |
06:39:21 | * | arecaceae joined #nim |
07:04:08 | * | endragor joined #nim |
07:06:34 | * | solitudesf joined #nim |
07:20:05 | * | dexterk joined #nim |
07:22:02 | * | ftsf joined #nim |
07:30:15 | * | vlad1777d joined #nim |
07:52:48 | Araq | cavariux: that's not how to "exportc" a struct |
08:21:32 | * | PMunch joined #nim |
08:29:13 | * | Vladar joined #nim |
08:30:01 | * | couven92 joined #nim |
08:32:24 | * | yglukhov joined #nim |
08:33:14 | * | RPG joined #nim |
08:33:37 | * | RPG is now known as Guest58466 |
08:35:15 | * | endragor quit (Remote host closed the connection) |
08:37:32 | * | Guest58466 is now known as _RPG_ |
08:42:41 | * | endragor joined #nim |
08:46:03 | * | floppydh joined #nim |
08:49:49 | * | solitudesf quit (Quit: solitudesf) |
08:52:45 | * | solitudesf joined #nim |
08:53:46 | PMunch | What's the deal with this: https://www.reddit.com/r/nim/comments/7ebnr6/this_just_gave_me_the_flu/ |
09:32:26 | * | qih quit (Quit: leaving) |
09:36:03 | * | chemist69 quit (Ping timeout: 250 seconds) |
09:48:46 | * | jjido joined #nim |
09:49:24 | * | SenasOzys joined #nim |
09:49:50 | * | chemist69 joined #nim |
09:54:53 | * | radagast joined #nim |
09:55:44 | radagast | What's the point of knowing endianness? Is it possible to utilize this information to optimize a program/data structure? |
09:56:58 | * | dddddd joined #nim |
09:59:35 | PMunch | What do you mean what's the point? Without knowing endianess you can't parse data |
09:59:51 | jjido | radagast: it is useful for low-level I/O operations |
10:22:03 | * | nkr joined #nim |
10:33:02 | * | vlad1777d quit (Ping timeout: 255 seconds) |
10:33:13 | FromGitter | <tim-st> @ephja here is another lzma lib, found on reddit: https://github.com/freevryheid/nim-lzma |
10:34:07 | * | vlad1777d joined #nim |
10:37:18 | FromGitter | <ephja> I'm not sure if those object sizes are correct |
10:43:13 | * | vlad1777d quit (Ping timeout: 248 seconds) |
10:47:39 | * | gokr joined #nim |
10:47:58 | * | gokr left #nim (#nim) |
10:48:21 | * | claudiuinberlin joined #nim |
10:52:09 | * | marenz_ joined #nim |
10:52:22 | * | dddddd quit (Remote host closed the connection) |
11:01:01 | PMunch | Araq, did you see the reddit question I linked earlier? About cstrings and GC. |
11:02:07 | Araq | no, what about it? |
11:03:14 | PMunch | https://www.reddit.com/r/nim/comments/7ebnr6/this_just_gave_me_the_flu/ |
11:04:26 | Araq | yeah so? the manual is trying to be precise here |
11:04:55 | Araq | instead of guessing, use GC_ref/GC_unref if you are not sure |
11:05:13 | Araq | I don't understand the question tbh. |
11:05:50 | PMunch | Well the manual makes it seem like cstrings can be garbage collected at will |
11:06:20 | Araq | cstrings are not collected at all, strings are. |
11:06:38 | Araq | and you can use cstring as an un-owned pointer into the string |
11:07:29 | PMunch | Ah so if you have as string you can make cstrings that points to different places within the string? |
11:07:53 | PMunch | And if the "parent" string falls out of scope the underlying memory can be collected |
11:08:12 | PMunch | That makes sense. But what if I declare a type as cstring? |
11:08:36 | PMunch | So 'let x:cstring = "Hello world"' |
11:10:25 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
11:16:50 | Araq | string literals are special |
11:17:03 | Araq | and never collected |
11:17:32 | Araq | I think the only problem here is that we have an implicit conversion that is strictly speaking unsafe |
11:18:23 | Araq | which is against Nim's design. We could change the rule so that only string literals are implicitly convertible to cstring, not sure how much code this breaks. probably quite a bit of code. |
11:18:57 | * | fredrik92 joined #nim |
11:19:10 | Araq | it's only unsafe though if the C code takes ownership which it must not do for string literals either (you cannot free() them) |
11:19:20 | Araq | I dunno. |
11:19:29 | * | fredrik92 quit (Client Quit) |
11:21:00 | PMunch | Yeah, that's what I thought. At least add something about which cases this would be unsafe (C code taking ownership, creating a cstring to part of a string) |
11:21:40 | Araq | the real bugs that I noticed are |
11:21:48 | Araq | let x = cstring(newString(60)) |
11:22:03 | Araq | which are explicit conversions... |
11:22:33 | Araq | but the fix is not to write let x = cast[cstring](newString(60)) |
11:22:44 | Araq | though that would make the problem much more obvious ... hmm |
11:32:22 | PMunch | Hmm, I guess GC_ref on a cstring wouldn't work very well? |
11:32:57 | PMunch | You'd have to do GC_ref on a sequence of bytes or something similar that covers the cstring memory |
11:33:25 | PMunch | Or of course the underlying string |
11:35:07 | PMunch | Uhm, never mind :P |
11:52:30 | PMunch | Hmm, what's the right way to have a procedure that returns a cstring? Normally I would assume that the C code calling it would free the cstring after it is done with it. |
11:53:16 | Araq | there is no normal case, free() doesn't work across compilers/DLLs boundaries |
11:53:46 | Araq | so every C library which is not braindead gives you its own free() and consequently its own alloc() |
11:54:36 | PMunch | Hmm, really? |
11:54:45 | Araq | really. |
11:54:52 | PMunch | TBH I can't remember passing string around like this in C |
12:21:41 | * | claudiuinberlin joined #nim |
12:21:56 | FromGitter | <Varriount> Araq: Huh, really? Why is it that free doesn't work across boundaries,? |
12:23:33 | Araq | for the same reason you can't exchange FILE*s |
12:23:39 | Araq | different implementations. |
12:27:41 | * | Snircle joined #nim |
12:33:55 | * | SenasOzys_ joined #nim |
12:36:15 | * | SenasOzys quit (Ping timeout: 246 seconds) |
12:41:30 | FromGitter | <Varriount> Araq: You might find this interesting: https://chadaustin.me/cppinterface.html |
12:44:50 | * | NopeDK joined #nim |
12:57:27 | * | marenz_ quit (Ping timeout: 240 seconds) |
13:25:52 | Araq | "Don't allocate memory on one side of the DLL boundary and free it on the other. Different DLLs and executables can be built with different heaps, and using different heaps to allocate and free chunks of memory is a sure recipe for a crash." |
13:28:34 | * | jjido quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
13:29:59 | * | jjido joined #nim |
13:44:00 | * | NopeDK_WhoStoleM joined #nim |
13:46:47 | * | NopeDK quit (Ping timeout: 255 seconds) |
13:49:37 | FromGitter | <cavariux> @araq thanks for replying how should I export an struct so it appears on a header even if I have deadCodeElim? |
13:51:44 | * | yglukhov quit (Remote host closed the connection) |
13:56:45 | Araq | write the header yourself. the codegen never was designed for header file generation |
14:04:43 | FromGitter | <cavariux> Okay :( it would have been a cool feature haha |
14:04:56 | Araq | well you can do |
14:05:08 | Araq | #include "generated_stuff.h" in your manually written header |
14:08:16 | * | yglukhov joined #nim |
14:08:17 | FromGitter | <zacharycarter> https://github.com/mbasso/asm-dom - would there be any value in something like this for Nim? |
14:09:13 | Araq | oh yes. very interesting. |
14:17:21 | livcd | sorry for stupid question but can i interpolate a string here ? raise newException(SystemError,"blah blah #{foo}") ? |
14:18:43 | FromGitter | <RedBeard0531> with this lib you can say $$"blah blah $foo ${1 + 1}" https://lyro.bitbucket.io/strfmt/#string-interpolation-interp |
14:21:40 | FromGitter | <RedBeard0531> @Araq any chance of getting something like this built in? While I like that it can be build in a lib, the main downside is that tooling doesn't know about it, so eg, nimsuggest autocomplete doesn't work inside the ${expr} |
14:27:59 | livcd | RedBeard0531: ahh ok dont want to use a lib. THought something already exists |
14:28:20 | FromGitter | <alehander42> the closest thing is "blah blah $1" % $foo |
14:28:26 | FromGitter | <alehander42> with import strutils |
14:28:49 | FromGitter | <ephja> all that for SPAs? |
14:29:06 | FromGitter | <zacharycarter> all what for SPAs? |
14:29:12 | FromGitter | <zacharycarter> the link I shared? |
14:30:47 | Araq | SPAs are the future of the UI programming. as sad as that is... |
14:31:16 | Araq | RedBeard0531: there is a PR for that that I'll merge before the next release |
14:33:06 | livcd | alehander42: ah that's nice thanks |
14:33:57 | FromGitter | <alehander42> oh nice, interpolation builtin :3 |
14:35:10 | Araq | no, not builtin, but a stdlib library |
14:40:01 | * | NopeDK_WhoStoleM quit (Ping timeout: 248 seconds) |
14:46:26 | * | dddddd joined #nim |
14:55:25 | FromGitter | <krux02> I have a question here: http://ix.io/CZr |
14:58:19 | Araq | krux02: that was fixed for you |
14:58:39 | Araq | no? |
14:58:54 | * | endragor quit (Remote host closed the connection) |
15:01:53 | * | endragor joined #nim |
15:06:38 | * | endragor quit (Ping timeout: 255 seconds) |
15:07:13 | FromGitter | <krux02> Araq: yes I figuerd it out |
15:07:26 | FromGitter | <krux02> it is not a bug anymore, but still it is not yet intuitive |
15:07:40 | FromGitter | <krux02> I would like to know if a symbol is an alias |
15:08:34 | FromGitter | <krux02> currently I have to write a while loop that keeps resolving the type with getTypeImpl and evaluates what heppens |
15:09:50 | * | qwertfisch is now known as qwrtfsh |
15:10:32 | * | endragor joined #nim |
15:10:40 | * | qwrtfsh is now known as qwertfisch |
15:11:28 | * | arnetheduck joined #nim |
15:11:38 | FromGitter | <krux02> I am currently guessing a but how it works |
15:12:58 | FromGitter | <cavariux> @Araq, when I try to include from one nim compiled program to C from another nim compiled program to C, I get duplicated TGenericSeq and NimStringDesc, is this intended behaviour? |
15:13:01 | FromGitter | <krux02> but getTypeKind returns ntyGenericInst instead of the ntyAlias |
15:13:54 | FromGitter | <krux02> @cavariux that sentence is incomprehensible |
15:14:05 | FromGitter | <cavariux> sry :( english isn't my first language |
15:14:22 | FromGitter | <krux02> it isn't mine either |
15:14:29 | FromGitter | <krux02> try to make shorter sentences |
15:14:38 | FromGitter | <Yardanico> English isn't my native language too :P |
15:14:51 | * | endragor quit (Ping timeout: 240 seconds) |
15:15:14 | FromGitter | <Yardanico> @cavariux but yeah, this is intended behaviour |
15:15:16 | FromGitter | <Yardanico> use nim modules |
15:15:31 | FromGitter | <Yardanico> don't include C sources from one compiled to C Nim program to another |
15:16:25 | FromGitter | <cavariux> Daniil, the issue is that I can't, I'm writing a Kernel in Nim because #yolo and want to write the libc in Nim because #yolo again so, I need to be able to include stdio.h that I'm writing in Nim from the Nim compiler itself |
15:18:23 | * | natrys joined #nim |
15:20:56 | * | jjido quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
15:22:29 | * | endragor joined #nim |
15:23:45 | * | jjido joined #nim |
15:24:22 | FromGitter | <krux02> Well isn't yolo the reason not to do that? |
15:25:43 | FromGitter | <krux02> I don't know what exactly your problem is, but if I understand it correctly, you should keep all nim stuff in a single nim compilation invocation |
15:26:19 | FromGitter | <krux02> If you break that, and compile more nim stuff and try to link those modules together it might become a hassle |
15:26:34 | FromGitter | <cavariux> That means I will have to write some C code after all? |
15:26:49 | FromGitter | <krux02> Well I don't know |
15:26:57 | * | endragor quit (Ping timeout: 240 seconds) |
15:27:06 | FromGitter | <Yardanico> @cavariux also some ASM code as well |
15:27:09 | Araq | why? C has the same problem, can't have two functions 'foo' in your program |
15:27:09 | FromGitter | <krux02> I still don't really understand what you are doing |
15:28:20 | FromGitter | <cavariux> Hi @araq, no the main issue is that when I compile the Nim project of LibC it generates TGenericSeq and NimStringDesc and it is the same with all of the other projects in Nim, so when I try to integrate the LibC into the Nim Compiler it gets redefinition errors |
15:28:50 | FromGitter | <cavariux> Shouldn't this defines be behind some Macros to avoid redefinition? |
15:28:57 | Araq | the problem is your "intergrate the LibC into the Nim compiler" |
15:29:34 | Araq | integrate it properly, don't have random generated names in your public export |
15:30:26 | FromGitter | <krux02> the Nim compiler makes sure everything is only defined once. But when you have two completely independent compilation jobs, they can't tell each other about defined symbols. So you get conflicts |
15:30:28 | FromGitter | <cavariux> Well, because I'm writing my own Kernel I want to be able to do: ⏎ ⏎ ```echo "Hi there kernel"``` ⏎ ⏎ But I need stdio.h in order to do that and because I'm writing eveything in Nim I wanted to make the libc in Nim too but I get this issues, if this isn't possible I will write it in C [https://gitter.im/nim-lang/Nim?at=5a2ea494ba39a53f1a48f96e] |
15:30:53 | Araq | it is possible, but you need to listen. |
15:31:33 | FromGitter | <cavariux> Ohh okay, I get it I have to clean the public export header |
15:32:18 | Araq | Yes. |
15:32:52 | FromGitter | <cavariux> Sorry @araq |
15:34:26 | FromGitter | <cavariux> Are there any flags that do it automaticly? I don't need it but if there are I don't want to redefine existing work |
15:35:16 | Araq | you need to write this header file or write some program to extract it for you |
15:35:43 | Araq | as I said, --header is moribund |
15:35:49 | FromGitter | <cavariux> Okay, thanks sorry for bothering you |
15:36:01 | * | jjido quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
15:36:38 | * | jjido joined #nim |
15:36:51 | Araq | btw you don't have to emulate stdio.h |
15:37:36 | Araq | you can copy lib/system/*.nim and adapt it to your needs and use the --lib config switch to compile with your tweaked Nim core |
15:38:23 | Araq | there is nothing magical about stdio.h, it's a poorly designed C library just like any other C code out there. |
15:38:30 | FromGitter | <cavariux> Yeah thanks, but because this is a long term project I want to be able in the future to compile other C projects in my kernel so it will be cleaner to do the C library |
15:40:08 | Araq | other C projects likely use GNU libc or Musl's C library |
15:40:48 | Araq | which use the IO operations as the OS exported them. An OS doesn't give you stdio.h |
15:41:03 | FromGitter | <cavariux> Well, I still need to read more about kernel development but I thought I had to make my own lib c |
15:41:25 | Araq | lib C is not part of any kernel I am aware of. |
15:41:27 | FromGitter | <cavariux> Ohh okay thanks for clearing this for me @Araq definitely will read more about it |
15:42:56 | Araq | you might want to make your Kernel Posix compliant though ;-) then all the libcs out there will work with it automatically. more or less. |
15:43:14 | Araq | the only downside then is that Posix tends to suck. |
15:44:19 | Araq | Posix doesn't define any values for their #defines. you want to copy them over from Linux or the BSDs for better interop |
15:44:28 | * | Jesin joined #nim |
15:44:44 | FromGitter | <cavariux> But well better to suck than to redo all those years of work, gtg but really, thanks for all the help @Araq |
15:52:59 | FromGitter | <ephja> ENOSYS ftw |
15:54:18 | FromGitter | <Yardanico> @cavariux if all people will think like this we'll never get any OS based on new ideas |
15:56:12 | FromGitter | <cavariux> Well, the pourpose of my OS project isn't to redo the libc is for something completly different |
15:57:16 | Araq | you can redo Nim's IO subsystem though. usually we target Posix and the WinAPI directly, not libc. |
15:58:33 | * | Jesin quit (Quit: Leaving) |
16:06:31 | * | floppydh quit (Read error: Connection reset by peer) |
16:07:15 | * | floppydh joined #nim |
16:20:47 | * | PMunch quit (Quit: Leaving) |
16:25:29 | * | Jesin joined #nim |
16:28:16 | FromGitter | <brentp> if I have some bytes from a C library, can I get them into a seq[T] without copying the underlying data? I have seen and used the CArray stuff but wondered if I can get an actual seq. |
16:28:52 | * | themagician joined #nim |
16:30:11 | Araq | you can't a seq owns its data |
16:30:38 | Araq | you can't do that in any language really, I dunno why it comes up. |
16:32:13 | FromGitter | <brentp> for example, I could do this in python with numpy with the caveat that once the underlying data goes away, the numpy array is also invalid. |
16:34:16 | Araq | I guess this means numnim needs to support that |
16:34:43 | FromGitter | <tim-st> Is there an index operator for array[a+1..b] for example array[a>..b] ? |
16:34:50 | FromGitter | <krux02> Araq: instead of, "you can't do that", you should provide a way to convert a pointer/size pair into an openarray, and say, "a seq owns data, but you can use openarray instead" |
16:35:29 | FromGitter | <krux02> @tim-st do you mean range? |
16:35:57 | * | natrys quit (Ping timeout: 240 seconds) |
16:36:04 | Araq | krux02, good points. |
16:36:39 | Araq | how do we do toOpenArray(x: pointer; y: int) ? |
16:37:08 | FromGitter | <tim-st> @krux02 for array[a..b-1] I can use array[a..<b], I expected the same for opposite array[a+1..b] -> array[a>..b] |
16:37:37 | Araq | template `>..`(a, b): untyped = (a+1)..b |
16:38:06 | FromGitter | <tim-st> @Araq Is this available or should I write it? |
16:38:26 | Araq | you need to write it, but it's a one liner |
16:39:15 | FromGitter | <tim-st> It's a one liner for each file I use it. Than I will stay with +1 |
16:40:13 | Araq | write your own utils.nim file? add --import utils to your config? |
16:40:35 | FromGitter | <krux02> Araq: I would suggest ``proc toOpenArrayT (ptr T, y: int)`` |
16:41:03 | Araq | openArrays suck :-) |
16:41:20 | FromGitter | <krux02> I like them a lot |
16:41:22 | FromGitter | <RedBeard0531> View[T]s, ftw? |
16:41:30 | Araq | we need some way to reify them |
16:41:41 | FromGitter | <krux02> what does reify mean |
16:41:59 | Araq | "make it a first class thing you can pass around" |
16:42:25 | Araq | concepts suffer from the same problem as do parameter passing modes |
16:42:33 | Araq | don't you read my blog? :P |
16:42:50 | FromGitter | <brentp> > **<Araq>** I guess this means numnim needs to support that |
16:42:57 | FromGitter | <krux02> well occasionally |
16:43:05 | FromGitter | <brentp> I wasn't suggesting what nim needs to do, just asking if I could do things better. |
16:44:57 | FromGitter | <krux02> @brentp: but I was suggesting what nim needs to do, :P |
16:45:12 | FromGitter | <brentp> bold |
16:52:37 | * | NopeDK joined #nim |
17:03:07 | * | Trustable joined #nim |
17:05:10 | * | gokr joined #nim |
17:05:38 | * | gokr left #nim (#nim) |
17:11:20 | * | rbrt joined #nim |
17:12:02 | * | floppydh quit (Quit: WeeChat 1.9.1) |
17:24:29 | FromGitter | <zetashift> Huh...I was using spacemacs yesterday and everytime I opened a nim file it would crash but it works now...fascinating |
17:29:01 | FromGitter | <ephja> @tim-st might as well use his lzma lib then |
17:29:54 | * | natrys joined #nim |
17:35:03 | Demos[m] | "make real" |
17:36:00 | * | jjido quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
17:36:22 | * | claudiuinberlin quit (Quit: Textual IRC Client: www.textualapp.com) |
17:38:26 | * | jjido joined #nim |
17:47:20 | * | yglukhov quit (Remote host closed the connection) |
17:47:57 | * | yglukhov joined #nim |
17:51:21 | * | yglukhov quit (Read error: Connection reset by peer) |
17:51:43 | * | yglukhov joined #nim |
17:53:05 | * | cavariux joined #nim |
17:53:41 | * | rbrt quit (Quit: Oíche mhaith) |
17:55:02 | * | rbrt joined #nim |
17:55:51 | * | yglukhov quit (Ping timeout: 240 seconds) |
17:58:43 | * | nsf quit (Quit: WeeChat 1.9.1) |
17:59:34 | FromGitter | <mratsim> What is numnim? |
18:06:19 | * | BitPuffin|osx quit (Ping timeout: 268 seconds) |
18:12:33 | Araq | Nim's version of numpy. |
18:12:45 | Araq | (it doesn't exist yet) |
18:19:15 | * | claudiuinberlin joined #nim |
18:20:48 | NopeDK | asyncftpclient.nim currently failing on devel? |
18:30:42 | FromGitter | <ephja> py2nim it |
18:35:11 | Araq | NopeDK, tests are green |
18:35:13 | * | Senketsu quit (Ping timeout: 258 seconds) |
18:35:58 | NopeDK | Hmm |
18:39:15 | NopeDK | Ah, found the problem. Time to get back to work. |
18:39:47 | FromGitter | <Yardanico> @ephja you meant "cython2nim" it? :) |
18:40:30 | Araq | I wrote a py2nim :P |
18:40:46 | Araq | I doubt anybody uses it for anything, it was hidden in a forum post |
18:40:58 | FromGitter | <Yardanico> are you about old one? |
18:41:00 | FromGitter | <Yardanico> with regexps? |
18:41:06 | Araq | yes |
18:41:14 | FromGitter | <Yardanico> https://www.google.ru/search?q=py2nim ⏎ google has no mercy |
18:41:32 | FromGitter | <Yardanico> oh wait |
18:41:35 | FromGitter | <Yardanico> there's no your forum post anymore |
18:42:08 | FromGitter | <Yardanico> ah, sorry, there is |
18:44:04 | FromGitter | <Yardanico> Wait, does nimforum uses some new font for code? |
18:44:16 | * | georgeg[m] left #nim ("User left") |
18:45:20 | * | cavariux quit (Remote host closed the connection) |
18:48:26 | Araq | unlikely |
18:49:49 | FromGitter | <Yardanico> ah, maybe it's because I've updated to windows fall creators update recently |
18:54:26 | * | Ven`` joined #nim |
18:55:48 | * | sz0 joined #nim |
18:58:56 | * | NimBot joined #nim |
18:59:24 | * | jjido quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
19:01:39 | * | yglukhov joined #nim |
19:04:13 | * | vivus joined #nim |
19:05:48 | * | yglukhov quit (Ping timeout: 246 seconds) |
19:07:25 | FromGitter | <alehander42> I started writing a more reasonable py2nim helper tool one night on runtime type inference but no time for it lately :D |
19:08:36 | * | Ven`` quit (Ping timeout: 260 seconds) |
19:09:58 | FromGitter | <alehander42> I need a good little example python library that would be useful for porting tho as a usecase , it worked ok for small programs |
19:11:43 | * | claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
19:12:50 | * | Ven`` joined #nim |
19:22:47 | * | claudiuinberlin joined #nim |
19:24:12 | * | Ven`` quit (Ping timeout: 240 seconds) |
19:32:54 | * | Ven`` joined #nim |
19:33:11 | * | yglukhov joined #nim |
19:36:08 | * | nkr left #nim ("Leaving") |
19:37:27 | * | Ven`` quit (Ping timeout: 240 seconds) |
19:38:48 | * | GustavoLapasta joined #nim |
19:41:43 | * | GustavoLapasta quit (Remote host closed the connection) |
19:42:08 | * | GustavoLapasta joined #nim |
19:44:00 | * | Ven`` joined #nim |
19:44:04 | subsetpark | I feel like I've been here before, but what's the current prescription for applications that fail gcAssert with tracebacks like this: |
19:44:16 | subsetpark | https://www.irccloud.com/pastebin/vlPRfB62/ |
19:45:06 | FromGitter | <mratsim> @Araq so should I just stop working on Arraymancer and ait for numnim ? :P |
19:45:18 | FromGitter | <mratsim> wait* |
19:46:25 | Araq | mratsim, nah, rename arraymancer to "numnim" |
19:47:20 | Araq | subsetpark, shouldn't a GC assertion have a message too? |
19:48:04 | FromGitter | <mratsim> Maybe I should rename it to Noonim instead (big sister in Korean) |
19:48:06 | subsetpark | Araq: that's just the result of compiling with `useGcAssert` - I didn't include any specific code |
19:48:21 | subsetpark | oh i see |
19:48:25 | subsetpark | Dec 11 19:43:02 ip-10-0-10-115 uwsgi[16682]: [GCASSERT] decRef: interiorPtr |
19:49:07 | Araq | do you use GC_collect() calls? |
19:49:16 | subsetpark | no, there's no manual memory management of any kind |
19:49:32 | Araq | threads? DLLs? |
19:50:11 | subsetpark | Indirectly - it's being compiled into a DLL which is being called from Python, and the Python code is threaded |
19:51:38 | Araq | https://github.com/nim-lang/Nim/issues/6887 that one? |
19:52:13 | subsetpark | I don't think so - I've never heard of `-d:useNimRtl` |
19:52:38 | Araq | well the GC likes to know the stack |
19:52:43 | Araq | it is tied to a thread |
19:52:55 | Araq | when you mess this up, things just crash |
19:53:43 | Araq | in addition to that, the heap is also attached to the thread (it's a thread local heap) |
19:54:10 | subsetpark | What is useNimRtl? It looks like maybe a windows thing? |
19:54:31 | Araq | no it's a general problem that comes up when you have more than one DLL |
19:54:53 | Araq | (I use the term DLL for Unix too) |
19:56:34 | subsetpark | I don't follow though - are you saying I should be using useNimRtl if I am compiling with --dylib and using in threaded code? |
19:56:53 | Araq | I doubt it makes a difference |
19:57:06 | enthus1ast | it does not on asyncdispatch |
19:57:52 | Araq | but Nim has its own idea about threading. you can't just run things on random threads and expect things to work |
19:58:26 | subsetpark | Well no, but this is only in a specific context... This code happily runs inside of a threaded Python context in a different project without any complaints |
19:58:53 | Araq | does the thread ID change? |
19:59:35 | * | xkapastel joined #nim |
19:59:44 | * | endragor joined #nim |
20:00:07 | subsetpark | Dunno, I'll have to see. |
20:00:32 | * | nsf joined #nim |
20:03:26 | enthus1ast | Araq: for understanding, if i import a proc from a dynlib does it then run in its own thread? |
20:04:15 | * | endragor quit (Ping timeout: 248 seconds) |
20:04:24 | Araq | no, it runs in the thread that calls it |
20:05:37 | subsetpark | Araq: would calling NimMain() when the dll is loaded result in a GC/stack for each thread? |
20:05:53 | enthus1ast | so i should (in theory) be able to import an async proc from a dll and register it with my main threads dispatcher? |
20:06:27 | Araq | enthus1ast, in theory async should work |
20:06:57 | Araq | subsetpark, NimMain says "ok, this is the thread we run on, and this is its stack" |
20:07:24 | Araq | you can use setupForeignThreadGc if the procs don't share memory |
20:08:34 | subsetpark | well I can confirm that the thread ID doesn't change |
20:08:47 | subsetpark | and this is with NimMain being called just after the dll is loaded |
20:09:39 | * | qih joined #nim |
20:24:05 | * | rbrt quit (Quit: Oíche mhaith) |
20:25:23 | * | Trustable quit (Remote host closed the connection) |
20:27:51 | Araq | subsetpark, that means the Nim code is run by the same thread? |
20:29:21 | subsetpark | Pretty damn sure. At least the calling thread is reused for multiple requests. I suppose it's possible that uwsgi is loading the dll and then calling a new thread for *all* request responses; I doubt it, but I have some more logging that will tell me |
20:30:09 | Araq | ok |
20:30:43 | * | GustavoLapasta quit (Read error: Connection reset by peer) |
20:31:44 | qih | Araq: Hi, how are you? Thanks for the Nim Lang [ Now fanboi action out of way 8-) ] ... are there are GIS-related plans that you know of? |
20:31:59 | * | GustavoLapasta joined #nim |
20:32:11 | * | rbrt joined #nim |
20:32:22 | * | GustavoLapasta quit (Remote host closed the connection) |
20:32:46 | Araq | thank you. what does GIS mean? |
20:32:59 | qih | Geographic Information Systems, sorry |
20:33:33 | qih | Map-stuff ... as in interacting with existing key GIS projects, like Python does. |
20:36:03 | qih | I spent most of yesterday identifying various applications or libraries that allow for Routing on maps, and the concensus is that Java, C++ & Python are the key languages that allow interoperability. So I wanted to ask did you know about anything, dom96 said yesterday he did not also. |
20:36:30 | Araq | alehander42 is working on it, he is looking for a useful library to translate Python to Nim |
20:37:12 | qih | Ah a useful one: http://pgrouting.org/index.html |
20:37:17 | Araq | even though that is now called "transpile". with a bit of luck my new word "transfinitepile" will catch on |
20:37:39 | subsetpark | oh, i didn't know we had a transpiler now :) |
20:37:54 | Araq | no, it's a transfinitepiler |
20:38:06 | subsetpark | is it abelian? |
20:38:42 | Araq | even better, it is hyper-recursive |
20:38:46 | dom96 | Araq: Feel free to add some code to NimBot to detect and correct every time "transpiler" is used :P |
20:39:07 | qih | Hahaha I doubt it, transpile is OK, transfinitepile is clumsy to say IMHO |
20:39:33 | subsetpark | it'd be a lot more useful if it was primitive recursive |
20:39:48 | qih | Like GNU? |
20:39:50 | subsetpark | so Araq: this might be interesting |
20:40:06 | Araq | ah my bad. I thought the point was to use as much wrong Latin as possible |
20:40:11 | subsetpark | uwsgi spawns two processes, both of which load the Nim DLL and call NimMain() |
20:40:18 | subsetpark | but they actually have the *same* thread ID when they do that |
20:40:27 | Araq | what? |
20:40:33 | qih | Araq: Hahaha no worries, just a little hard to say |
20:40:44 | Araq | how is that even possible, it's supposed to be an ID |
20:40:48 | subsetpark | https://www.irccloud.com/pastebin/j2ogJqHt/ |
20:40:56 | subsetpark | whoops wrong one |
20:41:05 | subsetpark | https://www.irccloud.com/pastebin/uGADZbMa/ |
20:41:41 | subsetpark | check that out -two workers, with different pids, both import the python module, which loads the nim library and echos `threading.get_ident()` |
20:42:03 | Araq | use Nim's getThreadId() instead perhaps? |
20:42:21 | subsetpark | ah sure, can do |
20:42:27 | Araq | anyway, do you keep state on the Nim side of doing thing? |
20:42:29 | Araq | s |
20:42:35 | qih | Araq: Is alehander42 likely to be online or around? I'd like to talk with (Him?) about porting a Python lib to Nim, some features and testign |
20:42:53 | qih | s/testign/testing |
20:43:11 | Araq | he is usually around here, but I'm not sure if he is really looking for more work :P |
20:43:17 | * | rbrt quit (Quit: Oíche mhaith) |
20:43:45 | qih | Haha OK was not going to load him up, just see what his direction was, and what key functionality was planned |
20:44:50 | qih | A functional Nim ROuting module or library that was comparable to ome of the professional .APIs would be brilliant for Nim ... in maps, Routing is King, and hard |
20:45:10 | qih | Anyway, thanks for the heads up |
20:45:38 | subsetpark | Araq: I don't keep state between calls, no |
20:46:11 | subsetpark | Obviously objects are allocated, but it's a fresh context each time the Python calls the DLL |
20:46:30 | subsetpark | and the response object is initialized on the Python side and passed in by reference |
20:48:49 | NopeDK | subsetpark: Are you working on adding a Nim plugin to uwsgi? If that is the case, I would be very interested in seeing the project. |
20:49:03 | subsetpark | No, this is a Nim DLL being called by a Python application |
20:49:20 | subsetpark | That would be cool though :) |
20:50:41 | NopeDK | Yeah, been trying to figure out how to interface Nim with uwsgi with the lacking documentation about the C interface. Would be amazing to have native nginx -> uwsgi -> Nim (and perhaps the Jester Nim server) |
20:51:35 | Araq | subsetpark, well so it's just 2 threads serving some kind of requests, not sure why that would fail. |
20:51:52 | Araq | does it crash immediately or at some random point? |
20:51:55 | subsetpark | now you see my perspective :) they're not threads though, they're processes |
20:51:59 | subsetpark | no, it's highly intermittent |
20:52:14 | subsetpark | well - |
20:52:22 | subsetpark | with d:release, it crashes intermittently |
20:52:38 | subsetpark | but with useGcAssert, I think it fails the assert immediately |
20:53:06 | subsetpark | yes, every time |
20:53:49 | subsetpark | and always at the same assign |
20:54:10 | Araq | can you give us some code? |
20:54:23 | Araq | doesn't have to be the full code, just the section that leads to the stack trace |
20:54:42 | Araq | btw "transfinite recursion" is a real thing, https://www.encyclopediaofmath.org/index.php/Transfinite_recursion |
20:54:55 | subsetpark | yeah let me give you a relevant path... |
20:56:11 | * | SenasOzys_ quit (Read error: Connection reset by peer) |
20:56:32 | * | SenasOzys joined #nim |
20:58:51 | subsetpark | BTW - confirmed that the thread ID is never changed *and* shared by both processes |
20:59:10 | Araq | you mean Nim's idea of a thread ID? |
20:59:14 | subsetpark | whoa - no, that's wrong |
20:59:23 | subsetpark | Python's stays the same - Nim's changes |
20:59:43 | Araq | Nim uses the OS APIs to get it iirc, let me look it up |
21:00:04 | * | vlad1777d joined #nim |
21:00:13 | Araq | which OS? |
21:00:27 | subsetpark | Linux |
21:01:09 | Araq | well if Nim thinks these are different threads and they are... |
21:01:23 | Araq | try to call setupForeignThreadGc() |
21:01:55 | subsetpark | I do :( |
21:02:07 | subsetpark | I call it at the entrypoint |
21:02:53 | Araq | try to not call setupForeignThreadGc() |
21:03:02 | subsetpark | ha, I did :( |
21:06:03 | * | fredrik92 joined #nim |
21:06:20 | subsetpark | Here's some code: https://ghostbin.com/paste/qu4ec |
21:06:47 | subsetpark | maybe i'll try disabling threads in uwsgi |
21:07:45 | * | Ven`` quit (Ping timeout: 248 seconds) |
21:08:23 | Araq | there is little reason to convert all the openArrays into seqs |
21:08:39 | Araq | openArray has a[i] and len() too |
21:09:02 | subsetpark | oh i know, there's other things that only work on seqs further down |
21:11:19 | Araq | which line is magister.nim(113) checkJobs? |
21:12:03 | subsetpark | var jobs = initialJobs |
21:12:28 | * | Ven`` joined #nim |
21:15:20 | Araq | sorry, I see no problem. you need to write a bug report with something that I can run. |
21:15:37 | subsetpark | whuf |
21:15:38 | subsetpark | ok |
21:15:43 | subsetpark | thanks for the attention |
21:23:51 | * | Ven`` quit (Ping timeout: 240 seconds) |
21:28:00 | * | LyndsySimon joined #nim |
21:28:41 | LyndsySimon | Is there a cross-platform way (Win10 + Linux) to get the state of various sensors on a PC? E.g., CPU temperature and fan speed |
21:31:07 | * | gokr joined #nim |
21:32:02 | * | Ven`` joined #nim |
21:32:59 | FromGitter | <Yardanico> Yes |
21:33:35 | FromGitter | <Yardanico> https://github.com/facebook/osquery |
21:33:35 | LyndsySimon | Yardanico: What would that be? psutil is the closest I've found, and it's Linux-only. |
21:34:53 | LyndsySimon | TY. Reading now. |
21:35:15 | FromGitter | <Yardanico> Well IDK, maybe this osquery doesn't provide CPU temperature |
21:36:17 | LyndsySimon | Oooohh, it's a C library. |
21:36:30 | LyndsySimon | OK, I didn't think of that. Duh. I can hook into a C library to get what I need. |
21:37:00 | FromGitter | <Yardanico> I don't know any cross platform Nim libraries for sensor reading |
21:37:06 | qih | Indeed, C libs are our friend, in theory |
21:37:20 | LyndsySimon | I want a small executable that I can use on Linux and Windows. The idea is that I'm setting up a webserver that'll serve system status, and I'll have an RPi or something hitting that and displaying it on a secondary monitor in my office. Just a toy idea. |
21:38:27 | LyndsySimon | Worst case I guess I can hook into Win32 and write each OS separately. As long as I return the same data structure, who cares? Nim's compiler means that I can not include the other OS's libraries in each build. |
21:38:57 | * | Ven`` quit (Ping timeout: 240 seconds) |
21:38:58 | FromGitter | <Yardanico> You can use defines |
21:39:39 | FromGitter | <Yardanico> Ah, I mean only for compile-time |
21:41:13 | * | LyndsySimon is AFK a bit. |
21:42:04 | * | fredrik92 quit (Read error: Connection reset by peer) |
21:47:09 | * | marenz_ joined #nim |
21:51:48 | * | jjido joined #nim |
21:52:05 | * | Ven`` joined #nim |
21:53:29 | * | skrylar joined #nim |
21:53:59 | subsetpark | Araq: I have good news and bad news |
21:54:51 | subsetpark | Good news is: I have resolved the gcAssert failure by replacing a newSeqWith call with an ordinary newSeq followed by mySeq[i] = newSeq[T]() |
21:54:59 | * | pigmej_ joined #nim |
21:55:07 | * | yaiyan_ joined #nim |
21:55:10 | * | ldleworker joined #nim |
21:55:27 | subsetpark | The bad news is, the segfault that I was seeing *without* gcAssert, which I assumed was related to the failure caught by gcAssert, is still happening. |
21:56:27 | * | yaiyan quit (*.net *.split) |
21:56:28 | * | niv quit (*.net *.split) |
21:56:29 | * | ldlework quit (*.net *.split) |
21:56:29 | * | pigmej quit (*.net *.split) |
21:56:30 | * | pigmej_ is now known as pigmej |
21:56:34 | * | niv joined #nim |
22:00:32 | qih | pigmej: Hi, good to see you got that of that tragic _, you look soo much younger |
22:01:27 | qih | got rid of that* ... sigh |
22:05:23 | * | xet7 quit (Ping timeout: 255 seconds) |
22:06:33 | * | claudiuinberlin quit (Quit: Textual IRC Client: www.textualapp.com) |
22:08:48 | pigmej | qih: it was my znc :P |
22:08:51 | * | Ven`` quit (Ping timeout: 260 seconds) |
22:09:22 | * | xkapastel quit (Quit: Connection closed for inactivity) |
22:09:44 | * | qih googles 'znc' |
22:09:59 | qih | Ah got it, k |
22:10:59 | * | nsf quit (Quit: WeeChat 1.9.1) |
22:12:10 | * | Ven`` joined #nim |
22:13:18 | FromGitter | <Varriount> Araq: What were your reasons for not using the HeapAlloc and HeapFree functions on Windows, for the memory allocator? |
22:14:50 | * | Ven`` quit (Client Quit) |
22:14:59 | * | ldleworker is now known as ldlework |
22:14:59 | * | ldlework quit (Changing host) |
22:14:59 | * | ldlework joined #nim |
22:17:08 | subsetpark | Araq: this is definitely a GC issue though... Let me know if this means anything to you |
22:17:32 | * | Ven`` joined #nim |
22:17:35 | subsetpark | https://www.irccloud.com/pastebin/ZRJkIHWa/ |
22:17:51 | * | yglukhov quit (Remote host closed the connection) |
22:19:49 | * | skrylar quit (Remote host closed the connection) |
22:20:36 | * | rbrt joined #nim |
22:22:58 | * | Ven`` quit (Read error: Connection reset by peer) |
22:23:02 | * | Ven` joined #nim |
22:23:38 | * | xet7 joined #nim |
22:31:23 | * | rbrt quit (Quit: Oíche mhaith) |
22:33:07 | * | natrys quit (Quit: natrys) |
22:33:23 | * | rbrt joined #nim |
22:36:04 | * | Ven` quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
22:39:32 | * | Vladar quit (Quit: Leaving) |
22:40:14 | FromGitter | <alehander42> @qih I am online now |
22:40:41 | * | jjido quit (Ping timeout: 255 seconds) |
22:44:32 | * | jjido joined #nim |
22:46:12 | qih | Cool hi, pm in 5 mins? |
22:47:13 | FromGitter | <alehander42> eh ok |
22:49:06 | * | solitudesf quit (Ping timeout: 260 seconds) |
22:52:18 | qih | Ah I am in IRC, pm don't work. |
22:52:31 | qih | I'll sign into Gitter then. |
22:54:00 | FromGitter | <QeyeH> @alehander42 Hi |
22:54:15 | FromGitter | <QeyeH> How do we PM in here |
22:55:47 | FromGitter | <Varriount> @QeyeH Why do you need to PM? |
22:56:10 | FromGitter | <QeyeH> So I do not flood the channel Map/GIS talk 8-) |
22:58:15 | * | themagician quit () |
23:09:19 | * | SenasOzys quit (Ping timeout: 248 seconds) |
23:13:43 | * | astronavt joined #nim |
23:15:02 | Araq | varriount: I use VirtualAlloc, VirtualFree instead, the GC depends on page aligned pointers |
23:15:50 | Araq | subsetpark, it's not "definitely" a GC bug. most likely it's something else. |
23:16:42 | subsetpark | Any thoughts? It's segfaulting when it tries to clean up objects |
23:17:34 | Araq | do you have 'ref's that should have been ptrs? |
23:18:29 | subsetpark | i mean, i'm not doing anything funny with them, so i don't know why they would be |
23:18:57 | * | gokr quit (Ping timeout: 250 seconds) |
23:19:10 | Araq | huh? ref means under the GC's control |
23:20:39 | subsetpark | I know, that's what I mean |
23:21:20 | subsetpark | Everything that's a ref is a normal object, constructed in the nim code and used only there |
23:21:53 | Araq | what is your JobThingie? |
23:23:11 | subsetpark | it's an object, passed in as a struct - it just has a few basic fields, shorts and doubles, et cetera. They're constructed as structs and passed by the Python code. They're not refs. |
23:25:20 | * | SenasOzys joined #nim |
23:26:16 | * | Jesin quit (Quit: Leaving) |
23:38:27 | * | SenasOzys quit (Read error: Connection reset by peer) |
23:38:33 | * | SenasOzys_ joined #nim |
23:49:16 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
23:49:56 | * | beatmox quit (Ping timeout: 258 seconds) |
23:50:18 | * | beatmox joined #nim |
23:56:50 | * | pydsigner quit (Ping timeout: 258 seconds) |
23:57:01 | * | pydsigner joined #nim |
23:57:37 | * | Rush quit (Ping timeout: 258 seconds) |
23:59:12 | * | RushPL joined #nim |