00:00:06 | FromDiscord | <QuiteQuietQ> ok, I thought there is something similar to `setTimeout` :D... and I read the code on geeksforgeeks wrong, it is not using set timeout, nvm |
00:05:01 | FromDiscord | <Gumbercules> Oh for the JS backend yeah |
00:05:15 | FromDiscord | <Gumbercules> I figured you were referring to the C backend, apologies |
00:07:59 | FromDiscord | <BobBBob> it seems like most nim code has any custom types in one big block at the top of the code, but whats the "standard" way to organize procs after that? because usually in other languages you have method functions for a type and they all get bunched together but nim doesnt really have those so you could put them wherever |
00:15:48 | * | fallback quit (Quit: IRCNow and Forever!) |
00:16:21 | FromDiscord | <Elegantbeef> Indeed you can put them anywhere |
00:16:31 | FromDiscord | <Elegantbeef> Generally you write the code in such away that you build upon previous things |
00:17:36 | FromDiscord | <PunchCake> Sooo guys |
00:17:59 | FromDiscord | <PunchCake> I need an easy to use mobile framework for nim |
00:18:11 | FromDiscord | <Elegantbeef> Unlike other languages aside from hooks there are no concepts of type bound operations really(araq wants to change this) so there is no real enforced design requirement |
00:18:12 | FromDiscord | <PunchCake> It doesnt matter if its native or not |
00:18:23 | FromDiscord | <Elegantbeef> Your options are very limited |
00:18:31 | FromDiscord | <PunchCake> What are my options |
00:18:39 | FromDiscord | <PunchCake> I heard about wiish for nim |
00:18:46 | FromDiscord | <PunchCake> Aka why is it so hard |
00:18:53 | FromDiscord | <PunchCake> To make a cross platform app |
00:18:56 | FromDiscord | <Elegantbeef> Partly due to how mobile works, partly due to the small dev pool |
00:18:57 | FromDiscord | <Elegantbeef> nimx and fidget work iirc |
00:19:41 | FromDiscord | <PunchCake> Nimx looks very ugly |
00:19:52 | FromDiscord | <Elegantbeef> Nice |
00:19:58 | FromDiscord | <PunchCake> To the point where if I'd ship my app I'd get bitch slapped to oblivion |
00:20:12 | FromDiscord | <Elegantbeef> Cool, perhaps Nim isnt for this project |
00:20:15 | FromDiscord | <Elegantbeef> Atleast for the frontend |
00:20:41 | FromDiscord | <Elegantbeef> You could use kotlin or java for the front end and call into native Nim code |
00:20:54 | FromDiscord | <PunchCake> I dont know why is it this hard |
00:21:16 | FromDiscord | <PunchCake> Opengl can run on nearly every major os |
00:21:21 | FromDiscord | <PunchCake> Including mobile |
00:21:26 | FromDiscord | <Elegantbeef> Cause mobile devices are designed in such a way to encourage the use of specific languages |
00:21:51 | FromDiscord | <PunchCake> Welp react native is used a lot in production |
00:22:00 | FromDiscord | <PunchCake> And look at it its doing very well |
00:22:07 | FromDiscord | <Elegantbeef> You can technically use any language but you're encouraged to use JVM and Swift |
00:22:31 | FromDiscord | <Elegantbeef> It's not an easy task to replicate react unpaid |
00:22:42 | FromDiscord | <Andreas> In reply to @Elegantbeef "Cause mobile devices are": yes, IOS lingua-franca = Swift | Android= Java |
00:22:45 | FromDiscord | <PunchCake> The thing is kotlin itself is simple but the amount og complexity of the apis is insane |
00:23:16 | FromDiscord | <PunchCake> (edit) "og" => "of" |
00:23:42 | FromDiscord | <Elegantbeef> 2400 contributors and funded/developed by facebook |
00:24:02 | FromDiscord | <PunchCake> Hm yeah |
00:24:15 | FromDiscord | <PunchCake> I dont really understand why we are forced to use java for android |
00:24:41 | FromDiscord | <Elegantbeef> Ok so then time for you to make a Nim cross platform GUI for Desktop and Mobile |
00:24:54 | FromDiscord | <Elegantbeef> Cause that's the language all of their OS interaction is written in |
00:25:09 | FromDiscord | <PunchCake> I thought about it |
00:25:09 | FromDiscord | <Elegantbeef> To use other languages you have to bind to that code somehow |
00:25:29 | FromDiscord | <BobBBob> isnt there qt bindings for nim now |
00:25:36 | FromDiscord | <PunchCake> There is |
00:25:39 | FromDiscord | <Elegantbeef> Sure but QT doesnt support mobile |
00:25:47 | FromDiscord | <PunchCake> It does bro |
00:25:49 | FromDiscord | <PunchCake> Qt5 |
00:26:17 | FromDiscord | <Elegantbeef> Guess i was thinking gtk |
00:26:48 | FromDiscord | <BobBBob> good luck getting it to work well on mobile though haha |
00:26:52 | FromDiscord | <Elegantbeef> If you really wanted to you could use the JNI to wrap the relevant java class you wanted |
00:27:09 | FromDiscord | <Elegantbeef> But anything is going to be much more work than just using a JVM language |
00:27:26 | FromDiscord | <PunchCake> Agreed |
00:27:41 | FromDiscord | <PunchCake> Maybe i could put in the work so other devs dont have to go through this bullshit |
00:27:48 | FromDiscord | <PunchCake> Aka take one for the team |
00:28:32 | FromDiscord | <PunchCake> Or i could just use react native its plenty fast and easy to use |
00:28:54 | FromDiscord | <BobBBob> if I remember the reason android is based around java is because back when it started it was to ensure cross platform compatibility and now theyve already got everything in java so they just have to go with it, as for apple it's just standard apple vendor lock in |
00:29:13 | FromDiscord | <Elegantbeef> It's not even really vendor lock in anymore in apple's case |
00:29:27 | FromDiscord | <Elegantbeef> Just a bit of NIH mixed with fancy ideas |
00:29:39 | FromDiscord | <PunchCake> In reply to @BobBBob "if I remember the": Idk why they didn't make their own language tailored for android |
00:29:45 | FromDiscord | <BobBBob> In reply to @Elegantbeef "Just a bit of": pssh that's what they tell you |
00:30:05 | FromDiscord | <Elegantbeef> Swift is now a cross platform language |
00:30:09 | FromDiscord | <BobBBob> In reply to @PunchCake "Idk why they didn't": i think it was originally a small independent project before getting bought (?) by google |
00:30:09 | FromDiscord | <Elegantbeef> Not that any one uses it as one |
00:30:11 | FromDiscord | <PunchCake> Nice joke |
00:30:15 | FromDiscord | <Elegantbeef> But it's totally allowed now |
00:30:36 | FromDiscord | <PunchCake> Bro fr? |
00:30:47 | FromDiscord | <PunchCake> I can use swift for cross plat dev now |
00:30:57 | FromDiscord | <Elegantbeef> Yes |
00:31:08 | FromDiscord | <PunchCake> The thing is i dont wanna support this walled garden bollocks so i dislike swift |
00:31:53 | FromDiscord | <PunchCake> And i think nimqt is the most reliable and stable bindings avaliable for qt right |
00:32:42 | FromDiscord | <Elegantbeef> If I really wanted to use Nim I'd just use either react native or a JVMlanguage / swift and call into a Nim dynamic library |
00:32:56 | FromDiscord | <Elegantbeef> Anything else is just an exuberant amount of time |
00:33:16 | FromDiscord | <PunchCake> So basically write all the logic in nim and write all the ui in js with the button callbacks |
00:33:21 | FromDiscord | <PunchCake> Sounds like a good idea |
00:40:10 | FromDiscord | <Nilts> `Error: unhandled exception: over- or underflow [OverflowDefect]` |
00:40:26 | FromDiscord | <Nilts> for `let n = Date.now()` |
00:45:44 | FromDiscord | <spoon> date.now? |
00:45:53 | FromDiscord | <spoon> this works |
00:45:58 | FromDiscord | <spoon> sent a code paste, see https://play.nim-lang.org/#ix=4rEh |
00:46:13 | FromDiscord | <Nilts> In reply to @spoon "date.now?": https://nim-lang.org/docs/jscore.html#now%2CDateLib |
00:47:17 | * | azimut quit (Ping timeout: 255 seconds) |
00:48:05 | FromDiscord | <spoon> compiling to js then? |
00:48:09 | FromDiscord | <Nilts> yes |
00:51:13 | FromDiscord | <Nilts> any ideas? |
00:52:48 | FromDiscord | <spoon> does now() from times not work with js? |
00:54:06 | FromDiscord | <Nilts> In reply to @spoon "does now() from times": it should not work from times, or depend on the js one. |
00:54:22 | FromDiscord | <Nilts> sent a code paste, see https://play.nim-lang.org/#ix=4rEj |
00:57:02 | FromDiscord | <spoon> times from stdlib does work with the js backend i just tested but if you need it for compatability... |
00:57:16 | FromDiscord | <impbox [ftsf]> sent a code paste, see https://play.nim-lang.org/#ix=4rEk |
00:59:11 | FromDiscord | <impbox [ftsf]> sent a code paste, see https://play.nim-lang.org/#ix=4rEl |
00:59:36 | * | derpydoo joined #nim |
01:00:03 | FromDiscord | <spoon> sent a code paste, see https://play.nim-lang.org/#ix=4rEn |
01:00:05 | FromDiscord | <spoon> what version of nim are you running? |
01:00:10 | FromDiscord | <spoon> i tested on devel |
01:00:37 | FromDiscord | <Nilts> In reply to @spoon "what version of nim": latest |
01:00:54 | FromDiscord | <Nilts> Although i cannot get devl, only head |
01:00:56 | FromDiscord | <spoon> latest release or devel? |
01:01:02 | FromDiscord | <spoon> are you using choosenim? |
01:01:08 | FromDiscord | <Nilts> In reply to @spoon "are you using choosenim?": yes |
01:01:17 | FromDiscord | <spoon> can do `choosenim devel` to get it |
01:01:46 | FromDiscord | <spoon> and `choosenim stable` if that doesn't work out |
01:01:59 | FromDiscord | <spoon> see if that fixes anything |
01:02:15 | FromDiscord | <Nilts> sent a code paste, see https://play.nim-lang.org/#ix=4rEp |
01:02:21 | FromDiscord | <spoon> missed an e |
01:02:35 | FromDiscord | <Elegantbeef> `devel` is hard to spell |
01:02:50 | FromDiscord | <impbox [ftsf]> the devel is in the details |
01:02:54 | FromDiscord | <Nilts> lol, i have been spelling it wrong this whole time |
01:05:08 | FromDiscord | <Nilts> sent a code paste, see https://play.nim-lang.org/#ix=4rEq |
01:05:24 | FromDiscord | <Nilts> Could be on a completely different line. Nim's bug reporting has done that too me. |
01:05:32 | FromDiscord | <spoon> how are you compiling it? |
01:05:44 | FromDiscord | <spoon> are you running `nim js filename.nim`? |
01:06:56 | FromDiscord | <Nilts> In reply to @spoon "are you running `nim": no other flags |
01:08:03 | FromDiscord | <spoon> hmm, are you using the function from jscore for compatibility reasons or something? |
01:08:55 | FromDiscord | <Nilts> In reply to @spoon "hmm, are you using": I am pretty sure it is the only one. And it is native, so faster ig |
01:09:20 | FromDiscord | <spoon> the one from times does work, i tested with the js backend to make sure |
01:09:45 | FromDiscord | <Nilts> In reply to @spoon "the one from times": also, I want an int, not a datetime |
01:11:03 | FromDiscord | <spoon> if you know what unit it uses there are functions to convert it into s, ms, unix time, etc |
01:11:30 | FromDiscord | <spoon> but since mine compiles i imagine the problem might be on another line |
01:11:53 | FromDiscord | <Nilts> In reply to @spoon "but since mine compiles": arg, nim's buggy error reporting |
01:12:21 | FromDiscord | <spoon> sent a code paste, see https://play.nim-lang.org/#ix=4rEr |
01:12:23 | FromDiscord | <Nilts> I just realized. It only tracks like every 5 lines for the js backend |
01:12:39 | FromDiscord | <spoon> is error reporting different for js? |
01:12:53 | FromDiscord | <Nilts> sent a code paste, see https://play.nim-lang.org/#ix=4rEs |
01:13:31 | FromDiscord | <Nilts> In reply to @spoon "is error reporting different": idk, but i have seen lots of places where it just says it is at an earlier line becuase on inaccuracy. |
01:13:53 | FromDiscord | <spoon> i've never had that problem with the c backend |
01:13:54 | FromDiscord | <spoon> hm |
01:14:57 | * | nanxiao joined #nim |
01:17:23 | FromDiscord | <Nilts> In reply to @spoon "run this snippet through": works. not devl, but works |
01:17:37 | FromDiscord | <Nilts> different machine |
01:19:05 | FromDiscord | <spoon> where is basicproc from? |
01:21:08 | FromDiscord | <Nilts> In reply to @spoon "where is basicproc from?": `type BasicProc = proc ()` |
01:24:28 | FromDiscord | <spoon> i'm getting a different error now: `Error: undeclared identifier: 'cstringArrayToSeq'` |
01:29:04 | NimEventer | New Nimble package! embedfs - Embed directories in executables, easily, see https://github.com/iffy/nim-embedfs |
01:44:26 | FromDiscord | <Nilts> In reply to @spoon "i'm getting a different": with what code? |
01:50:58 | FromDiscord | <spoon> In reply to @not logged in "with what code?": something i imported is trying to use nativesockets which i believe doesn't work with js |
01:51:49 | FromDiscord | <spoon> apparently importing system does that |
01:53:43 | FromDiscord | <spoon> nope, it was asyncdispatch |
01:53:57 | FromDiscord | <spoon> compiled the function succesfully |
02:10:07 | * | nanxiao quit (Quit: Client closed) |
02:26:43 | * | nanxiao joined #nim |
02:27:03 | * | fallback joined #nim |
03:17:22 | * | fallback quit (Read error: Connection reset by peer) |
03:24:13 | NimEventer | New Nimble package! yanyl - A library for using YAML with Nim, see https://github.com/tanelso2/yanyl |
03:40:02 | * | rockcavera quit (Read error: Connection reset by peer) |
03:41:53 | * | rockcavera joined #nim |
03:41:53 | * | rockcavera quit (Changing host) |
03:41:53 | * | rockcavera joined #nim |
03:45:59 | * | deadmarshal_ quit (Ping timeout: 246 seconds) |
04:11:25 | * | nanxiao quit (Quit: Client closed) |
05:36:23 | * | nanxiao joined #nim |
05:55:02 | * | advesperacit joined #nim |
06:05:04 | FromDiscord | <kubo39> what is over- or underflow errors? they seems totally different.. |
06:09:40 | FromDiscord | <Elegantbeef> They're idientical some operation would have caused an integer to either go under `int.low` or above `int.high` |
06:09:52 | FromDiscord | <Elegantbeef> identical even |
06:11:18 | FromDiscord | <kubo39> i know it is overflow. |
06:11:38 | FromDiscord | <Elegantbeef> What? |
06:11:57 | FromDiscord | <Elegantbeef> Overflow is going over int.high, underflow is going under int.low |
06:12:36 | FromDiscord | <kubo39> typically underflow means floating point underflow AFAIK. |
06:12:44 | FromDiscord | <kubo39> https://en.wikipedia.org/wiki/Arithmetic_underflow |
06:13:42 | FromDiscord | <Elegantbeef> > When the term integer underflow is used, the definition of overflow may include all types of overflows, or it may only include cases where the ideal result was closer to positive infinity than the output type's representable value closest to positive infinity. |
06:13:43 | FromDiscord | <kubo39> going under int.low is also overflow |
06:14:04 | FromDiscord | <Elegantbeef> integer underflow is also an acceptable term for going below int.low |
06:14:44 | FromDiscord | <Elegantbeef> There is a whole entry about the definition and it's ambiguity |
06:16:27 | FromDiscord | <Elegantbeef> So i'd say that given colloquialisms it's fine to call below low is underflow |
06:18:36 | FromDiscord | <kubo39> oh, I've found these sentence in integer overflow page. |
06:20:35 | FromDiscord | <Elegantbeef> One of those cases when the term makes sense in the context sorta, so it's adopted as an acceptable term |
06:21:06 | * | nanxiao quit (Quit: Client closed) |
06:25:32 | FromDiscord | <kubo39> ok. |
06:28:41 | * | arkurious quit (Quit: Leaving) |
07:02:06 | * | nanxiao joined #nim |
07:10:39 | * | rockcavera quit (Remote host closed the connection) |
07:17:37 | * | kenran joined #nim |
07:44:17 | * | PMunch joined #nim |
07:48:51 | * | PMunch quit (Client Quit) |
07:54:21 | * | PMunch joined #nim |
08:27:31 | FromDiscord | <4zv4l> why isn't it valid ? |
08:27:32 | FromDiscord | <4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4rFq |
08:27:43 | FromDiscord | <4zv4l> I get invalid control flow |
08:27:54 | FromDiscord | <4zv4l> this is the function |
08:27:56 | FromDiscord | <4zv4l> sent a code paste, see https://play.nim-lang.org/#ix=4rFr |
08:36:31 | PMunch | You have to have a `tmp` as the last thing in the block |
08:36:36 | PMunch | Otherwise it won't return it |
08:37:06 | PMunch | Oh, and `break tmp` doesn't work like that |
08:37:43 | PMunch | Try something like this: https://play.nim-lang.org/#ix=4rFw |
08:38:20 | PMunch | The `break X` syntax is to break out of a named block. So `break tmp` would break out of `block tmp:` |
08:42:06 | * | nanxiao quit (Quit: Client closed) |
08:44:59 | NimEventer | New question by Elliot Cox: Which is the library for data visualization on Nim?, see https://stackoverflow.com/questions/75831559/which-is-the-library-for-data-visualization-on-nim |
08:54:43 | * | nanxiao joined #nim |
09:29:36 | PMunch | I think my obsession with inline blocks might've gone too far.. http://ix.io/4rFM/ |
09:37:00 | * | deadmarshal_ joined #nim |
09:41:45 | Zevv | looks fine to me |
09:45:11 | * | azimut joined #nim |
09:52:47 | FromDiscord | <4zv4l> In reply to @PMunch "The `break X` syntax": oh ok yeah makes sense |
09:53:02 | FromDiscord | <4zv4l> In reply to @PMunch "Try something like this:": I created a proc xD↵easier I guess |
09:53:13 | * | nanxiao quit (Quit: Client closed) |
09:53:18 | FromDiscord | <4zv4l> is there a way to access an array value like the json like if the bound is not correct, not throw an error ? |
09:53:26 | FromDiscord | <4zv4l> like I have to check around the current case |
09:53:34 | FromDiscord | <4zv4l> but if the case is at the border of the array I guess a panic |
09:58:45 | * | Notxor joined #nim |
10:02:05 | * | randomuser464876 joined #nim |
10:05:50 | * | kenran quit (Remote host closed the connection) |
10:06:13 | * | kenran joined #nim |
10:41:04 | * | nanxiao joined #nim |
10:45:19 | FromDiscord | <sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4rGb |
10:45:40 | FromDiscord | <sOkam!> something like pairs, but pairs doesn't seem to work on iterables 🤔 |
10:47:47 | * | nanxiao quit (Quit: Client closed) |
10:53:55 | * | nanxiao joined #nim |
10:54:08 | ormiret | sOkam: enumerate |
10:54:15 | FromDiscord | <amadan> Like have an incrementing index? Maybe https://nim-lang.org/docs/enumerate.html#enumerate.m%2CForLoopStmt |
11:00:48 | FromDiscord | <ieltan> sent a code paste, see https://play.nim-lang.org/#ix=4rGe |
11:01:45 | FromDiscord | <ieltan> I am on 1.6.10 |
11:02:17 | * | nanxiao quit (Quit: Client closed) |
11:08:01 | * | jmdaemon quit (Ping timeout: 240 seconds) |
11:11:34 | Amun-Ra | ieltan: typeof Natural \n typeof 4 |
11:12:17 | Amun-Ra | Natural is a range |
11:12:29 | * | beholders_eye joined #nim |
11:22:43 | NimEventer | New thread by mhComa: Why this code works?, see https://forum.nim-lang.org/t/10033 |
11:27:20 | * | randomuser464876 quit (Quit: Client closed) |
11:30:23 | FromDiscord | <ieltan> sent a code paste, see https://play.nim-lang.org/#ix=4rGj |
11:31:00 | * | beholders_eye quit (Ping timeout: 252 seconds) |
11:31:02 | FromDiscord | <Yardanico> typeof of a type returns the typedesc |
11:31:05 | FromDiscord | <ieltan> In any case, how do i rewrite `4 is Natural` so it works in my usecase? |
11:32:35 | FromDiscord | <choltreppe> sent a code paste, see https://play.nim-lang.org/#ix=4rGk |
11:34:38 | FromDiscord | <Yardanico> In reply to @ieltan "In any case, how": https://forum.nim-lang.org/t/2470#62085 is an easy solution |
11:34:54 | FromDiscord | <Yardanico> `proc contains[T](a: typedesc[range], b: T): bool = b in a.low..a.high` courtesy of beef |
11:35:33 | FromDiscord | <Yardanico> then you can just do `echo 1 in Natural` because in Nim `in` operator calls `contains` overloaded for the types you're checking |
11:36:32 | FromDiscord | <Yardanico> In reply to @choltreppe "hey all, I want": You can actually do a similar thing but do it with `compiles` so that the code is checked to be side-effect free at compile-time, and then you error if it's not |
11:36:45 | FromDiscord | <Yardanico> https://forum.nim-lang.org/t/2923 for example |
11:40:02 | FromDiscord | <ieltan> In reply to @Yardanico "https://forum.nim-lang.org/t/2470#62085 is an easy": Oh man thanks ! |
11:40:19 | FromDiscord | <ieltan> (This should be included in the stdlib imo) |
11:43:00 | FromDiscord | <Yardanico> sent a code paste, see https://play.nim-lang.org/#ix=4rGm |
11:43:00 | FromDiscord | <ieltan> Ah it breaks when you feed it floats |
11:43:01 | FromDiscord | <ieltan> 😢 |
11:43:10 | FromDiscord | <Yardanico> because Natural is for ints |
11:43:20 | FromDiscord | <ieltan> yeah |
11:43:21 | FromDiscord | <Yardanico> In reply to @Yardanico "something like this, although": @choltreppe try adding an `echo` inside the `checkSideEffects` and see it error out |
11:43:30 | FromDiscord | <ieltan> should check for floats ig |
11:43:43 | FromDiscord | <Yardanico> In reply to @ieltan "should check for floats": ranges can only be of one type |
11:44:07 | FromDiscord | <ieltan> In reply to @Yardanico "ranges can only be": No, i mean, in my code |
11:44:21 | FromDiscord | <Yardanico> In reply to @Yardanico "<@705152179782025308> try adding an": although making it a macro would be better so that it would show error in the place where it's used, and not in the template |
11:44:24 | FromDiscord | <choltreppe> In reply to @Yardanico "something like this, although": I actually just found a better solution for my problem :/ but thanks for your help |
11:44:30 | FromDiscord | <Yardanico> can you share it? |
11:45:02 | FromDiscord | <ieltan> Oh, what about `Positive` ? |
11:45:24 | FromDiscord | <Yardanico> what about it? |
11:45:25 | FromDiscord | <ieltan> its a range too oosp |
11:45:51 | FromDiscord | <Yardanico> In reply to @ieltan "its a range too": if you just want to check for numbers being in some range, you can just write procs that check it |
11:45:59 | FromDiscord | <Yardanico> ranges are just a short-hand for checking if a number is in the range manually |
11:46:20 | FromDiscord | <Yardanico> and for documenting needed arguments better |
11:46:33 | FromDiscord | <choltreppe> my original problem was that I wanted to assert specific variables dont get modified. so I noticed noSideeffect would be too harsh. and since I know wich vars are of interrest I can just do the good old `let x = x` showdowing inside a block trick. |
11:47:54 | FromDiscord | <ieltan> In reply to @Yardanico "if you just want": I already did that and I just want to avoid floats and negative numbers, but x.Natural takes cares of not having floats |
11:48:00 | FromDiscord | <ieltan> negatives are still a problem |
11:48:19 | FromDiscord | <Yardanico> not sure what you mean, use positive? |
11:49:12 | FromDiscord | <ieltan> Yeah i got it, thanks ! |
11:49:32 | FromDiscord | <Yardanico> In reply to @ieltan "Yeah i got it,": also btw, ranges aren't some special magic, you can just define them in your own code too |
11:58:53 | FromDiscord | <sOkam!> How is ennumerate used with an iterable? |
11:59:05 | FromDiscord | <sOkam!> (edit) "ennumerate" => "enumerate" |
12:12:00 | FromDiscord | <Yardanico> In reply to @sOkam! "How is enumerate used": you just do `enumerate(iterable)`? |
12:12:08 | FromDiscord | <Yardanico> iterable should have items defined of course so it can be iterated on |
12:22:44 | * | PMunch quit (Quit: Leaving) |
12:30:01 | * | derpydoo quit (Ping timeout: 240 seconds) |
12:56:24 | FromDiscord | <sOkam!> sent a code paste, see https://play.nim-lang.org/#ix=4rGL |
12:56:47 | FromDiscord | <sOkam!> i mean a literal iterable, not an object that can be iterated |
12:57:30 | FromDiscord | <sOkam!> enumerate seems to be working fine for strings,seq,etc... but the input is an iterable, not an object that can be iterated |
13:03:08 | FromDiscord | <konradmb> I need an aligned slice of memory, so I'm using posix\_memalign(). Then I need to free it, so I use c\_free().↵I think I'm supposed to use dealloc() in Nim, but it gives SIGSEGV when freeing. So are there any drawbacks when I use c\_free()? |
13:03:54 | FromDiscord | <spoon> are you using --mm:none? |
13:04:53 | FromDiscord | <konradmb> No, default devel, so orc |
13:05:49 | FromDiscord | <spoon> wondering if its smart enough not to insert an extra dealloc at compiletime |
13:07:54 | FromDiscord | <konradmb> Wait, what? So gc will free externally allocated memory from C? |
13:08:39 | FromDiscord | <konradmb> Or you mean to just leak? |
13:11:00 | FromDiscord | <spoon> i'd have to run benchmarks but on old memory management models i never had a problem with allocating external c anything |
13:24:03 | FromDiscord | <Gumbercules> In reply to @konradmb "Wait, what? So gc": No it won't. Use c_free. |
13:24:48 | FromDiscord | <Gumbercules> The memory wasn't allocated using Nims allocator - it doesn't have anything to do with GC. |
13:28:49 | * | nanxiao joined #nim |
13:38:11 | FromDiscord | <tandy> has anyone use nimporter with a futhark wrapped library? |
13:38:11 | FromDiscord | <tandy> has anyone used nimporter with a futhark wrapped library? |
13:42:21 | * | nanxiao quit (Quit: Client closed) |
13:47:56 | FromDiscord | <Phil> PMunch , the words of futhark have been uttered |
13:48:16 | FromDiscord | <Phil> (edit) "PMunch , ... the" added "I summon thee," |